// Amkethran duplicate gem bag fix, part one of three (see amsmug02.sto, bago2j.sto)
ACTION_IF FILE_EXISTS_IN_GAME ~mel01.cre~ THEN BEGIN // ToB-only stuff check
COPY_EXISTING ~bag02i.itm~ ~override/bag02j.itm~
// Amkethran duplicate gem bag fix, part two of three (see bago2j.itm, bago2j.sto)
// Amkethran duplicate gem bag fix, part two of three (see bago2j.itm, bago2j.sto)
COPY_EXISTING ~amsmug02.sto~ ~override~
READ_LONG 0x34 "4sale_off"
READ_LONG 0x38 "4sale_num"
WHILE ("%4sale_num%" > 0) BEGIN
SET "4sale_num" = ("%4sale_num%" - 1)
READ_ASCII ("%4sale_off%" + ("%4sale_num%" * 0x1c)) "item"
PATCH_IF ("%item%" STRING_COMPARE_CASE "bag02i" = 0) BEGIN
WRITE_ASCII ("%4sale_off%" + ("%4sale_num%" * 0x1c)) "bag02j"
END
END
BUT_ONLY_IF_IT_CHANGES
// Amkethran duplicate gem bag fix, part three of three (see amsmug02.sto, bago2j.itm)
COPY_EXISTING ~bag02i.sto~ ~override/bag02j.sto~
ENDThis is silly (I know it's from Baldurdash, but that's no excuse Code I'm using:
ACTION_IF FILE_EXISTS_IN_GAME ~amsmug02.sto~ THEN BEGIN //ToB COPY_EXISTING ~bag02d.itm~ ~override/t-bgem04.itm~ //Gem Bag ~bag02d.itm~ ~override/t-bgem05.itm~ ~bag02d.itm~ ~override/t-bgem06.itm~ ~bag02d.sto~ ~override/t-bgem04.sto~ ~bag02d.sto~ ~override/t-bgem05.sto~ ~bag02d.sto~ ~override/t-bgem06.sto~ COPY_EXISTING ~amsmug01.sto~ ~override~ //Amkethran Smugglers 1 PATCH_IF SOURCE_SIZE > 0x9b BEGIN REMOVE_STORE_ITEM ~t-bgem04~ ~bag02i~ ~bag02d~ ADD_STORE_ITEM ~t-bgem04~ LAST #0 #0 #0 ~IDENTIFIED~ #1 END BUT_ONLY_IF_IT_CHANGES COPY_EXISTING ~amsmug02.sto~ ~override~ //Amkethran Smugglers 2 PATCH_IF SOURCE_SIZE > 0x9b BEGIN REMOVE_STORE_ITEM ~t-bgem06~ ~t-bgem05~ ~bag02j~ ~bag02i~ ~bag02d~ ADD_STORE_ITEM ~t-bgem05~ LAST #0 #0 #0 ~IDENTIFIED~ #1 ADD_STORE_ITEM ~t-bgem06~ LAST #0 #0 #0 ~IDENTIFIED~ #1 END BUT_ONLY_IF_IT_CHANGES ENDI've used my own namespace - feel free to use it or something else - anything that's not going to get duplicated. The redundant REMOVE_STORE_ITEMs are in case anyone's installed Baldurdash or another "fix" for this. (And somewhere along Baldurdash's history, RoT has "used" bag02i somewhere else, so let it...)












