Jump to content


Experience Limit?


  • Please log in to reply
35 replies to this topic

#21 russ

russ

    bilbo_faramir

  • Member
  • 78 posts

Posted 18 January 2005 - 10:17 AM

I have what I think is a similar problem. I agree with CBisson (having learned from the past that he is ususally correct) that this XP problem and my problem are a weidu/make biff problem. Using NI and DLTCEP I tried looking at the 2da files. In NI I could open them. In DLTCEP I could not. However, when I exported them I could open them in DLTCEP. I then noticed that when I run DLTCEP I get alot of error messages involving ids files. Going on a hunch I made a list of about 20 files, some that were biffed in BP some that were biffed in CtB and some that were biffed with DD or SOS. In DLTCEP I could open all the files except the BP files. I'm wondering, is there a limit to how many biff files you can have or to how many resources you can have in your biff files? Perhaps when CtB biffs its files it knocks out the previous biffs (which are BP-*.biff at least in my install).

BTW on the XP issue, my XPCap.2da file was not in the override but in the BP-Rule.bif. Also its XP limit for each class was -1 which I guess means it uses a default. I changed all the -1 to 20000000 (that's twenty million). I don't know if this helped or does anything for this problem.

#22 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 19 January 2005 - 02:44 AM

I have what I think is a similar problem. I agree with CBisson (having learned from the past that he is ususally correct) that this XP problem and my problem are a weidu/make biff problem. Using NI and DLTCEP I tried looking at the 2da files. In NI I could open them. In DLTCEP I could not. However, when I exported them I could open them in DLTCEP. I then noticed that when I run DLTCEP I get alot of error messages involving ids files. Going on a hunch I made a list of about 20 files, some that were biffed in BP some that were biffed in CtB and some that were biffed with DD or SOS. In DLTCEP I could open all the files except the BP files. I'm wondering, is there a limit to how many biff files you can have or to how many resources you can have in your biff files? Perhaps when CtB biffs its files it knocks out the previous biffs (which are BP-*.biff at least in my install).

BTW on the XP issue, my XPCap.2da file was not in the override but in the BP-Rule.bif. Also its XP limit for each class was -1 which I guess means it uses a default. I changed all the -1 to 20000000 (that's twenty million). I don't know if this helped or does anything for this problem.

View Post


And I must disagree with you... :closedeyes:

Older versions of weidu didn't --make-biff properly, and wreaked havoc on toolsets. If you installed bp-bgt a long time ago, this is the case. The only reason my year+-old BP-* biffs work in dltcep is because I hand-editted them in hex code (following Avenger's instructions). It took me 3 full days, I don't recommend it to anybody--even an enemy.

XPCAP.2DA in the biff is fine; IE only recognizes the latest biff entry, after checking the OVR folder out. -1 is also fine. The XPCAP worked/works just fine in bp-bgt-nej, the way it is. It's only with the addition of CtB that the problem arrives. Wish I could figure out why; I'd fix it.

Best 'workaround' I can think of is a system of checks (say, every 100000 XP for 3Mil and up, setting globals to reflect this change, and a bunch of entries in XPLIST.2da to add the points back. Run this all from an invisible creature or two. Still haven't worked out all the details (It would be rediculously easy in Aurora Scripting; confounded clumbsy IE script commands!)

Edited by horred the plague, 19 January 2005 - 02:45 AM.


#23 cujo

cujo
  • Member
  • 216 posts

Posted 19 January 2005 - 06:36 AM

I have been reading this forum for a while and because everyone says that it's the biff's that create the exp. limit I installed CtB on top of BP-BGT-NEJ (fully patched). I changed the .tp2 file and copied everything to the override folder. Then I changed the finish.bat script so that it upacks the tis files and music only, no biffs created.

When I start a new game for BG1 I changed the exp. using CLUAConsole:SetCurrentXP(3500000). This worked and when I saved it, the correct amount of XP was stored. I checked this in NI and it was correct. I loaded the game and just when it was about to end the loading I pressed R. In the record screen my XP showed up as 3500000, the correct amount. However when I go to the inventory screen and back to the record screen it shows 2950000.

I don't know if this can help anybody but the problem doesn't seem to be the biff files, nor the load itself, but happens right after the game is loaded. Or maybe it's just me doing something very stupid.

#24 Yacomo

Yacomo

    cartographer of the realms

  • Member
  • 485 posts

Posted 19 January 2005 - 07:32 AM

When I start a new game for BG1 I changed the exp. using CLUAConsole:SetCurrentXP(3500000).  This worked and when I saved it, the correct amount of XP was stored.  I checked this in NI and it was correct.  I loaded the game and just when it was about to end the loading I pressed R.  In the record screen my XP showed up as 3500000, the correct amount.  However when I go to the inventory screen and back to the record screen it shows 2950000.


I am just trying to understand IE scripting at the moment, so I am no expert. But could this be an OnCreation() trigger? Either in baldur.bcs or dplayer.bcs? :huh:

I'm currently refreshing my install and cannot check for myself, but maybe somebody can answer these two questions:
- Does this also happen if you disable group AI (before saving)? Otherwise I guess we can blame dplayer.bcs :angry:
- Does this affect all characters or only the main character?

Edit:
Again, I'm not so sure about how the game handles this, but when I directly start a new ToB game with a new character, then this characters XP is set to a certain value (hopefully this is 2950000). Could it be that this adjustment somehow occurs upon loading now?

Edited by Yacomo, 19 January 2005 - 08:21 AM.


#25 russ

russ

    bilbo_faramir

  • Member
  • 78 posts

Posted 19 January 2005 - 03:07 PM

I have new information (but no answers) to add to the discussion. Using the backup of my BGMain.exe (created when I used XPPatcher) I used a hex editing program to search for 2950000 (changing to hex and reversing order). I then replaced those bits with the hex for 20000000. I then loaded a test game where I had raised PC xp to 9000000 and the xp stayed the same (it didn't go down to 2950000). I made the change at offset 6b7260.
I have purposefully left out the actual hex values because I don't really know what I just did and if you don't have a backup of BGMain you may very well have to reinstall your game from scratch. However, to those who do know what they are doing, is this a valid workaround? Does it also suggest a reason why this problem is occuring? Just curious.

#26 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 19 January 2005 - 07:38 PM

I have new information (but no answers) to add to the discussion. Using the backup of my BGMain.exe (created when I used XPPatcher) I used a hex editing program to search for 2950000 (changing to hex and reversing order). I then replaced those bits with the hex for 20000000. I then loaded a test game where I had raised PC xp to 9000000 and the xp stayed the same (it didn't go down to 2950000). I made the change at offset 6b7260.
I have purposefully left out the actual hex values because I don't really know what I just did and if you don't have a backup of BGMain you may very well have to reinstall your game from scratch. However, to those who do know what they are doing, is this a valid workaround? Does it also suggest a reason why this problem is occuring? Just curious.

View Post



I think you are definitely on to something; I did a hex search of bgmain a few days ago, but on a different premise (I was looking for XP). It didn't yield the kind of results that yours did. Making a backup of bgmain is as easy as copy/paste. Anyone playing bp-bgt should already have one, the result of using the XP patcher.

*Digs up a pencil and paper, and begins multiplying 16 by itself* ;)

#27 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 19 January 2005 - 08:36 PM

Give that man a Cee-gar!!! :thumbsup:

Worked like a dream! :D


Now, in the simplest English I can put it in:

Get yerself a hex editor--run a search, there are freeware ones available

Make a backup of your bgmain.exe (copy/paste)

Open up the bgmain.exe in your hex editor, and go down to line 6B7260

(mine said the line was 6B725E--close enough)

Look for a piece of the line that reads: 70 03 2D 00

Change this to: 40 78 7D 01

(I chose 25 million--hey, what's a few mil between friends?)

Save the bgmain.exe

Go on about yer business. I ran a PC to 5mil XP, save, quit, reloaded--and he still had 5 mil. Then, I ran him up to 10 mil; saved, reloaded--and he still had 10 mil!!! YAY!!!! :w00t:

Since it would be somewhat illegal to distribute the fixed bgmain, you'll have to do this yourself. If you can't do it, you'll just have to suffer along--sorry, copyright rules/laws apply.

EDIT: I wonder if doing this would make levels beyond 50 possible... :unsure:

Edited by horred the plague, 19 January 2005 - 08:38 PM.


#28 hlidskialf

hlidskialf

    Incarnation of the Eternal Ale Warrior

  • Modder
  • 2510 posts

Posted 19 January 2005 - 09:20 PM

Give that man a Cee-gar!!! :thumbsup: 

Worked like a dream!  :D


Now, in the simplest English I can put it in:

Get yerself a hex editor--run a search, there are freeware ones available

Make a backup of your bgmain.exe (copy/paste)

Open up the bgmain.exe in your hex editor, and go down to line 6B7260

(mine said the line was 6B725E--close enough)

Look for a piece of the line that reads: 70 03 2D 00

Change this to: 40 78 7D 01

(I chose 25 million--hey, what's a few mil between friends?)

Save the bgmain.exe

Go on about yer business. I ran a PC to 5mil XP, save, quit, reloaded--and he still had 5 mil. Then, I ran him up to 10 mil; saved, reloaded--and he still had 10 mil!!! YAY!!!!  :w00t:

Since it would be somewhat illegal to distribute the fixed bgmain, you'll have to do this yourself. If you can't do it, you'll just have to suffer along--sorry, copyright rules/laws apply.

EDIT: I wonder if doing this would make levels beyond 50 possible...  :unsure:

View Post


Those that have searched, have discovered it's not quite so easy to find the level 50 cap. Apparrently it crops up in more than one location inside the .exe and the linkages are... tenuous.
BTW, I'm glad someone else did the legwork on this, as I was going to tackle it on my first BP-BGT-CTB install when my comp's fixed. Damn I love the community spirit. :D

PS. I believe it is possible to use weidu to fix this on a patch instead of requiring the hex editor. Someone might want to play with that idea.

The great wolf Fenrir gapes ever at the dwelling of the gods.


#29 Yacomo

Yacomo

    cartographer of the realms

  • Member
  • 485 posts

Posted 20 January 2005 - 04:50 AM

PS. I believe it is possible to use weidu to fix this on a patch instead of requiring the hex editor. Someone might want to play with that idea.

View Post

This does the trick:

BACKUP ~YacomoPatch/backup~

AUTHOR ~Yacomo~

BEGIN ~Fix CtB XPCap problem (by patching bgmain.exe)~

COPY ~bgmain.exe~ ~bgmain.exe~
WRITE_LONG 0x006B7260 ~0x017d7840~


Yay! My first .tp2-file :w00t: - maybe it even makes it into the next s&h patch ;)


For those unfamiliar with .tp2 files:
Just save as 'Setup-YacomoPatch.tp2', copy weidu to 'Setup-YacomoPatch.exe', create directories 'YacomoPatch' and 'YacomoPatch/backup'. Then finally run 'Setup-YacomoPatch.exe'.

#30 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 20 January 2005 - 05:44 AM

PS. I believe it is possible to use weidu to fix this on a patch instead of requiring the hex editor. Someone might want to play with that idea.

View Post

This does the trick:

BACKUP ~YacomoPatch/backup~

AUTHOR ~Yacomo~

BEGIN ~Fix CtB XPCap problem (by patching bgmain.exe)~

COPY ~bgmain.exe~ ~bgmain.exe~
WRITE_LONG 0x006B7260 ~0x017d7840~


Yay! My first .tp2-file :w00t: - maybe it even makes it into the next s&h patch ;)


For those unfamiliar with .tp2 files:
Just save as 'Setup-YacomoPatch.tp2', copy weidu to 'Setup-YacomoPatch.exe', create directories 'YacomoPatch' and 'YacomoPatch/backup'. Then finally run 'Setup-YacomoPatch.exe'.

View Post


well done! :D A great way to start off in tp2-land ;)

#31 seanas

seanas
  • Modder
  • 1906 posts

Posted 20 January 2005 - 05:46 AM

and here it is, packaged for use. to use, download, rename to CtBXPFix.zip, extract to main BGII directory.

you'll get, as Yacomo indicates, Setup-YacomoPatch.exe, Setup-YacomoPatch.tp2, and the YacomoPatch directory.

just to be safe, back up yr BGMAIN.EXE, and then run Setup-YacomoPatch.exe, and yr XP cap problems will be solved.

the .zip file is also available here.

Attached Files


Edited by seanas, 20 January 2005 - 05:49 AM.

"A simple test of the relative merits of science and religion is to compare lighting your house at night by prayer or electricity" - A. C. Grayling
"EFF files have saves, too." - CamDawg
|| this is radio seanas || BP Series v3 || seanas at work ||


#32 russ

russ

    bilbo_faramir

  • Member
  • 78 posts

Posted 20 January 2005 - 09:47 AM

I just saw what happened after my post.

I will now take a bow. :D

I would like to ask however, just because I'm the curious type, why this happens in the first place. My thought is that one of the mods (could be bgt, ctb or any other) does something to prevent the use of xpcap.2da or that it does something that when you load a saved game it uses the cap in BGMain.exe as opposed to the one in xpcap.2da. Perhaps a mod which checks to see if a players level or stats are too high? (BTW I tried looking at a few bcs files but gave up because it would take too long.)

#33 Yacomo

Yacomo

    cartographer of the realms

  • Member
  • 485 posts

Posted 20 January 2005 - 10:57 AM

I just saw what happened after my post.

I will now take a bow. :D

I would like to ask however, just because I'm the curious type, why this happens in the first place. My thought is that one of the mods (could be bgt, ctb or any other) does something to prevent the use of xpcap.2da or that it does something that when you load a saved game it uses the cap in BGMain.exe as opposed to the one in xpcap.2da. Perhaps a mod which checks to see if a players level or stats are too high? (BTW I tried looking at a few bcs files but gave up because it would take too long.)

View Post


Well russ, I guess first and foremost we all have to bow before you and especially before cujo for giving us a hint in the right direction :thumb:

Apart from that: Your guess as to what is the actual cause is as good as mine, all we have now is a workaround, not a fix... I would also like to know what the real reason is?

Anyway, if it works 'all is good' :)

Cheers & thanks,

Yacomo

Edited by Yacomo, 20 January 2005 - 10:59 PM.


#34 radish_hoedown

radish_hoedown
  • Member
  • 201 posts

Posted 21 January 2005 - 10:22 AM

thats some damn good works guys, i take my hat off to you all.

#35 -araknid70-

-araknid70-
  • Guest

Posted 22 January 2005 - 08:55 AM

Thanks all... works fine now. =)

#36 cujo

cujo
  • Member
  • 216 posts

Posted 27 January 2005 - 02:05 AM

(I chose 25 million--hey, what's a few mil between friends?)

View Post


When you use a multi class Figher/Mage/Thief or Fighter/Mage/Cleric 25 million won't allow all three classes to reach lvl 50. To reach lvl 50 with all three classes you will need at least 45 million IIRC.

Maybe it's a good idea to change it to 80 F0 FA 02 (50 million). I tried it out myself with both multi classed characters and 50 million allows them to reach lvl 50 in all three classes.

This can easily be changed in the tp2 file and everyone can reinstall it as it will overwrite no matter what the value is.