Jump to content

XPLEVEL and XPCAP.2da Modifications


grogerson

Recommended Posts

Between playing Ultima 7 again with the Exult utility and having the week off, I've begun thinking of doing some changes to the BG1 Tweaks, right now with the Change XP Cap component.

 

The relevant .2da files for NPC's all have settings to level 20, even if capped below 10th. The files xplevel and xpcap can be patched to make the remaining levels accessible, which is what I want to do via patching instead of dumping a pre-altered file into the override (rule sets above 20 are probably easier dumping instead of patching).

 

Thanks to plainab, fixing the cleric and druid xp scales are easy (and that section of code will be marked as from the BG1 Fixpack, with your permission of course). What I'm looking for is code to:

 

1- Add a level 21 column to the xplevel.2da that reads -1 for all rows.

 

2- Change the xpcap.2da to read -1 for all rows.

 

3- Make these changes in a single command per file, if possible.

 

The WeiDU readme and plainab's code for the BG1 Fixpack tell me how to do it one column and row at a time, but being only a sometimes (read idiot) modder I could use some help for making the process much simpler and cleaner.

Link to comment

You'll need something like this:

OUTER_PATCH 1 BEGIN
 WRITE_BYTE 0 0x9
 READ_ASCII 0 tab (1)
END

If you already have something like that in your tp2 file, you don't need to include it a second time. Otherwise you can simply include it in the ALWAYS section of your tp2 file.

 

1- Add a level 21 column to the xplevel.2da that reads -1 for all rows.

APPEND_COL xplevel.2da "$ $ 21 -1 -1 -1 -1 -1 -1 -1 -1" UNLESS "^[ %tab%]+1[ %tab%]+2[ %tab%]+ 3[ %tab%]+4[ %tab%]+5[ %tab%]+6[ %tab%]+7[ %tab%]+8[ %tab%]+9[ %tab%]+10[ %tab%]+11[ %tab%]+12[ %tab%]+13[ %tab%]+14[ %tab%]+15[ %tab%]+16[ %tab%]+17[ %tab%]+18[ %tab%]+19[ %tab%]+20[ %tab%]+21"

You can accomplish this with REPLACE_TEXTUALLY as well, but that's a tad more work.

 

2- Change the xpcap.2da to read -1 for all rows.

COPY_EXISTING xpcap.2da override
 REPLACE_TEXTUALLY CASE_INSENSITIVE EVALUATE_REGEXP "\([a-z]+[ %tab%]+\)[0-9]+" "\1-1"
BUT_ONLY

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...