[MOD] Mod that set starting XP in BG2EE for imported characters to BGEE or SoD xp caps
4ltair
Member Posts: 24
As the title says, is there any mod that sets the starting XP in BG2EE to 161k for BG1EE imported character and to 500k for a SoD imported character?
If not, what would be the easiest way to mod it ?
My idea would be to add some script which sets the starting XP to AR0602.bcs and checks if the character is imported from BG1EE or SoD but my modding skills are just beginner level, so how would the code look like?
Short rambling why i am looking for such a mod:
As all of you might know, you still gain XP after you hit the level cap in BG1EE and that XP is transferred to BG2EE in full. This is not a big problem with a party, because then the difference would be only a level or two higher than the BG1EE level cap but when you play solo, this changes drastically (as an example, a solo completionist FMT would gain around 1.3m XP in BG1EE, which would put him to level 9/11/11 or 9/11/12 at the start of BG2EE) which will trivialize the game pretty much from the start.
LE: So, i managed to put together some code which does exactly what i want (see below), managed to make a WeiDU mod which puts this code in AR0602.bcs but the code does not run (checked by importing a character with 162000 xp, starting a new game and then checking the xp after Imoen joins the party); if i put this code in baldur.bcs, it will run just fine.
Anyone knows why it runs in one script but not in the other?
LE2: Solved the problem by adding Continue() in each block and putting it at the top of ar0602.bcs.
I have added the mod in case there are other players which were looking for something similar
If not, what would be the easiest way to mod it ?
My idea would be to add some script which sets the starting XP to AR0602.bcs and checks if the character is imported from BG1EE or SoD but my modding skills are just beginner level, so how would the code look like?
Short rambling why i am looking for such a mod:
As all of you might know, you still gain XP after you hit the level cap in BG1EE and that XP is transferred to BG2EE in full. This is not a big problem with a party, because then the difference would be only a level or two higher than the BG1EE level cap but when you play solo, this changes drastically (as an example, a solo completionist FMT would gain around 1.3m XP in BG1EE, which would put him to level 9/11/11 or 9/11/12 at the start of BG2EE) which will trivialize the game pretty much from the start.
LE: So, i managed to put together some code which does exactly what i want (see below), managed to make a WeiDU mod which puts this code in AR0602.bcs but the code does not run (checked by importing a character with 162000 xp, starting a new game and then checking the xp after Imoen joins the party); if i put this code in baldur.bcs, it will run just fine.
Anyone knows why it runs in one script but not in the other?
IF Global("SET_BG1EE_XP_CAP","ar0602",0) Global("BD_HAVE_SOD","GLOBAL",0) XPGT(player1,161000) THEN RESPONSE #100 SetGlobal("SET_BG1EE_XP_CAP","ar0602",1) ChangeStat(player1,XP,161000,SET) END IF Global("SET_SOD_XP_CAP","ar0602",0) Global("BD_HAVE_SOD","GLOBAL",1) XPGT(player1,500000) THEN RESPONSE #100 SetGlobal("SET_SOD_XP_CAP","ar0602",1) ChangeStat(player1,XP,500000,SET) END
LE2: Solved the problem by adding Continue() in each block and putting it at the top of ar0602.bcs.
I have added the mod in case there are other players which were looking for something similar
Post edited by 4ltair on
0
Comments
To add more detail, in AR0602.bcs, the code is inserted at the bottom (EXTEND_BOTTOM) and in bladur.bcs i have inserted it at the top (EXTEND_TOP)
A bit off-topic: how often is the code parsed by the engine (i understand that the game parses the script in certain order (override - ... - default) and then restarts this cycle but i did not found anywhere at what time interval this happens)?
Well, there might be your problem. AR0602.bcs is a really crowded place, most likely some other mod added something at the top which then blocks the script from ever getting to your part.
(This might have caused other script blocks to not go off as planned as well, with as of yet unnoticed side effects..)
That's why you should add continue() to all your script blocks. Without continue() the engine will restart the script from the beginning as soon as any contition returns as true. Meaning it is pretty easy to cause a loop.
So now, my question is more like why doesn't work when it is at the end of the script but works when it is at the beginning? As far as i understood, when the engine parses a script, it goes block by block as follows: if the conditions are met, the block is executed and the script is restarted from the beginning and if the conditions are not met, it goes to the next block until it reached the end of the script.
If your script block works at the top but not at the bottom, then one of the other blocks in the script does loop/block the script.
(*edit* The only other explanation would be that one of the other blocks changes a global or other condition your block requires to be true, but I think that's unlikely..)
Yes, that's right. It means that one of the script blocks returns true without its resolution causing it to no longer return true on the next iteration. E.g.:
A pretty crude example, but as you can see, this script block would always be true and as a result the game would never execute any script block that is below since it restarts the script after resolving this block, over and over.
There are quite a few wait() commands in there and I'm not sure how the engine handles those. If the engine indeed waits the allocated time for every block before the next iteration (which I think it should/needs to in order for some scripts to work properly), it might simply take a few seconds before your block gets executed.
For some hard numbers: In my current run, the protagonist imported from BG1 to BG2 at 166,970 XP. The six-member party, which had stayed together most of the game, had experience from kills totaling 1,229,896 XP. If experience kept accumulating, they would be at around 200K each or more, with the protagonist and Imoen somewhat ahead due to midgame decisions to speed up her dual-classing. This didn't happen, and the rest of the party caught up to my protagonist in XP when they reached the BG1 cap.