Skye Posted September 22, 2015 Posted September 22, 2015 Is there a simple way of changing a character's XP with only script actions or do you need to apply a spell effect with opcode 104 to change the stat? It's been bugging me for a while since there's an easy way to do it with a console command...
Jarno Mikkola Posted September 22, 2015 Posted September 22, 2015 There's a script way yes: #164, #165. But that works only for the whole party, you have to use the spell in case it needs to be done to just one party member, as it usually is. But you can also know, that you can set the XP in the paty member that is about to join, as the player can then use the XP to level the character up as much as it allows. As you only need a level 1 NPC in most cases... that you can copy as the level in name and just set the XP in the new .cre file, after copying it. Aka: COPY ~achbar/achbar.cre~ ~override~ COPY ~achbar/achbar.cre~ ~override/achbar9.cre~ WRITE_LONG ~0x0018~ ~250000~ COPY ~achbar/achbar.cre~ ~override/achbar11.cre~ WRITE_LONG ~0x0018~ ~750000~ COPY ~achbar/achbar.cre~ ~override/achbar13.cre~ WRITE_LONG ~0x0018~ ~1250000~ COPY ~achbar/achbar.cre~ ~override/achbar15.cre~ WRITE_LONG ~0x0018~ ~1750000~For example as a fighter of that level, and then just use the npclevel.2da to summon the correct NPC.
subtledoctor Posted September 22, 2015 Posted September 22, 2015 I forget exactly what the procedure is. But my mod has a little script that *adds* XP. Not sure if you can subtract or set it. https://forums.beamdog.com/discussion/43878/might-and-guile-a-tweak-mod-and-kit-pack-for-warriors-and-rogues Look in /might_and_guile/components/120_WPO.tpa, at the very end of the file.
Jarno Mikkola Posted September 22, 2015 Posted September 22, 2015 I forget exactly what the procedure is. But my mod has a little script that *adds* XP. ... Look in /might_and_guile/components/120_WPO.tpa, at the very end of the file. //UPDATE SoA STARTING XP____________________________________________________________ // ACTION_IF GAME_IS ~tob~ AND NOT GAME_IS ~bgt~ THEN BEGIN ACTION_IF FILE_EXISTS ~bgmain.exe~ BEGIN COPY ~bgmain.exe~ ~bgmain.exe~ SET i = 1 WHILE (i>0) BEGIN SET i += 4 READ_LONG (0x6b0000 + "%i%" - 1) long_value //start at offset 0x6b0000 READ_LONG (0x6b0000 + "%i%" - 5) long_before_value READ_LONG (0x6b0000 + "%i%" + 3) long_after_value PATCH_IF ("%long_before_value%" = 0) AND ("%long_after_value%" = 161000) THEN BEGIN //look only for a long value bounded by a previous value of 0, and a next value of 161000 WRITE_LONG (0x6b0000 + "%i%" - 1) 1 //setting to zero causes thieving skills to isolate from proficiencies and screws up skill types END PATCH_IF ("%i%" = 0x10001) BEGIN //span a region of 0x10000 bytes SET i = 0 END END END EXTEND_BOTTOM ~ar0602.bcs~ ~might_and_guile/misc/soaxp.baf~ END ACTION_IF GAME_IS ~bg2ee~ THEN BEGIN COPY_EXISTING ~startare.2da~ ~override~ SET_2DA_ENTRY 12 1 1 ~1000~ BUT_ONLY EXTEND_BOTTOM ~ar0602.bcs~ ~might_and_guile/misc/soaxp.baf~ ENDThat's not going to help here.The last soaxp.baf being: IF XPLT(Player1,159000) THEN RESPONSE #100 AddXPObject(Player1,40000) ENDWhich could be helpful. And is likely to be so.... but I won't guarantee that it works on all installs.
Skye Posted September 22, 2015 Author Posted September 22, 2015 I have no clue how I managed to miss AddXPObject(). It works fine, thanks.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.