CamDawg Posted August 23, 2006 Posted August 23, 2006 Something big I've wanted to cross off my list for a while: missing resources referenced by spells/items/etc. I had started on this once before with creatures and their inventories, but got sidetracked into turning that into a full-blown hunt for broken inventories instead of bad references. Areas were easy: a few were referencing old ambient sound files from BG, so I've added three more sound files to the copy folder. Next, the creatures. As mentioned above, the inventories have already undergone scrutiny, so we're done to other miscellany. Typically these were of the script-not-being-assigned-due-to-typo variety. The big, ugly patches are for the creatures with references to spells which are broken because they refer to non-existent spells or have typos (curse you Elminster!). The sujon.cre assignment of jonsimm.bcs is, I believe, wholly unnecessary but I wanted to post to see if one of the UB folks or devSin could comment--IIRC UB looked at restoring it. // has typos in spell resrefs COPY_EXISTING ~amcarras.cre~ ~override~ READ_LONG 0x2a0 "known_off" READ_LONG 0x2a4 "known_num" READ_LONG 0x2b0 "mem_off" READ_LONG 0x2b4 "mem_num" FOR (index = 0; index < known_num; index = index + 1) BEGIN READ_ASCII ("%known_off%" + (0x0c * "%index%")) "spell" PATCH_IF ("%spell%" STRING_COMPARE_REGEXP "^spw[0-9][0-9][0-9]$" = 0) BEGIN INSERT_BYTES ("%known_off%" + 0x03 + (0x0c * "%index%")) 1 WRITE_ASCII ("%known_off%" + 0x03 + (0x0c * "%index%")) "i" DELETE_BYTES ("%known_off%" + 0x08 + (0x0c * "%index%")) 1 END END FOR (index2 = 0; index2 < mem_num; index2 = index2 + 1) BEGIN READ_ASCII ("%mem_off%" + (0x0c * "%index2%")) "spell" PATCH_IF ("%spell%" STRING_COMPARE_REGEXP "^spw[0-9][0-9][0-9]$" = 0) BEGIN INSERT_BYTES ("%mem_off%" + 0x03 + (0x0c * "%index2%")) 1 WRITE_ASCII ("%mem_off%" + 0x03 + (0x0c * "%index2%")) "i" DELETE_BYTES ("%mem_off%" + 0x08 + (0x0c * "%index2%")) 1 END END BUT_ONLY_IF_IT_CHANGES // mem & known spell resref typos COPY_EXISTING ~amelm01.cre~ ~override~ ~jatermin.cre~ ~override~ READ_LONG 0x2a0 "known_off" READ_LONG 0x2a4 "known_num" READ_LONG 0x2a8 "meminfo_off" READ_LONG 0x2b0 "mem_off" READ_LONG 0x2b4 "mem_num" READ_LONG 0x2b8 "slot_off" READ_LONG 0x2bc "item_off" READ_LONG 0x2c4 "fx_off" SET "delta_known" = 0 FOR (index = 0; index < known_num; index = index + 1) BEGIN READ_ASCII ("%known_off%" + (0x0c * "%index%")) "spell" PATCH_IF ("%spell%" STRING_COMPARE_CASE "sppr112" = 0) BEGIN DELETE_BYTES ("%known_off%" + (0x0c * "%index%")) 0x0c SET "delta_known" = ("%delta_known%" - 1) SET "index" = ("%index%" - 1) SET "known_num" = ("%known_num%" - 1) END ELSE PATCH_IF ("%spell%" STRING_COMPARE_CASE "spwi121" = 0) BEGIN WRITE_ASCII ("%known_off%" + (0x0c * "%index%")) "spwi125" END ELSE PATCH_IF ("%spell%" STRING_COMPARE_CASE "spwi122" = 0) BEGIN DELETE_BYTES ("%known_off%" + (0x0c * "%index%")) 0x0c SET "delta_known" = ("%delta_known%" - 1) SET "index" = ("%index%" - 1) SET "known_num" = ("%known_num%" - 1) END ELSE PATCH_IF ("%spell%" STRING_COMPARE_CASE "spwi610" = 0) BEGIN WRITE_ASCII ("%known_off%" + (0x0c * "%index%")) "spwi624" END ELSE PATCH_IF ("%spell%" STRING_COMPARE_CASE "spwi706" = 0) BEGIN WRITE_ASCII ("%known_off%" + (0x0c * "%index%")) "spwi719" END ELSE PATCH_IF ("%spell%" STRING_COMPARE_CASE "spwi709" = 0) BEGIN WRITE_ASCII ("%known_off%" + (0x0c * "%index%")) "spwi718" END ELSE PATCH_IF ("%spell%" STRING_COMPARE_CASE "spwi801" = 0) BEGIN WRITE_ASCII ("%known_off%" + (0x0c * "%index%")) "spwi802" END ELSE PATCH_IF ("%spell%" STRING_COMPARE_CASE "spwi806" = 0) BEGIN WRITE_ASCII ("%known_off%" + (0x0c * "%index%")) "spwi816" END ELSE PATCH_IF ("%spell%" STRING_COMPARE_CASE "spwi814" = 0) BEGIN WRITE_ASCII ("%known_off%" + (0x0c * "%index%")) "spwi817" END ELSE PATCH_IF ("%spell%" STRING_COMPARE_CASE "spwi901" = 0) BEGIN WRITE_ASCII ("%known_off%" + (0x0c * "%index%")) "spwi917" END ELSE PATCH_IF ("%spell%" STRING_COMPARE_CASE "spwi904" = 0) BEGIN DELETE_BYTES ("%known_off%" + (0x0c * "%index%")) 0x0c SET "delta_known" = ("%delta_known%" - 1) SET "index" = ("%index%" - 1) SET "known_num" = ("%known_num%" - 1) END ELSE PATCH_IF ("%spell%" STRING_COMPARE_CASE "spwi906" = 0) BEGIN DELETE_BYTES ("%known_off%" + (0x0c * "%index%")) 0x0c SET "delta_known" = ("%delta_known%" - 1) SET "index" = ("%index%" - 1) SET "known_num" = ("%known_num%" - 1) END END WRITE_LONG 0x2a4 "%known_num%" SET "meminfo_off" = ("%meminfo_off%" + ("%delta_known%" * 0x0c)) WRITE_LONG 0x2a8 "%meminfo_off%" SET "mem_off" = ("%mem_off%" + ("%delta_known%" * 0x0c)) WRITE_LONG 0x2b0 "%mem_off%" SET "delta_mem" = 0 FOR (index2 = 0; index2 < 17; index2 = index2 + 1) BEGIN READ_LONG ("%meminfo_off%" + 0x08 + ("%index2%" * 0x10)) "meminfo_idx" READ_LONG ("%meminfo_off%" + 0x0c + ("%index2%" * 0x10)) "meminfo_num" SET "meminfo_idx" = ("%meminfo_idx%" + "%delta_mem%") WRITE_LONG ("%meminfo_off%" + 0x08 + ("%index2%" * 0x10)) "%meminfo_idx%" FOR (index3 = 0; index3 < meminfo_num; index3 = index3 + 1) BEGIN READ_ASCII ("%mem_off%" + (0x0c * ("%meminfo_idx%" + "%index3%"))) "spell" PATCH_IF ("%spell%" STRING_COMPARE_CASE "sppr112" = 0) BEGIN DELETE_BYTES ("%mem_off%" + (0x0c * ("%meminfo_idx%" + "%index3%"))) 0x0c SET "delta_mem" = ("%delta_mem%" - 1) SET "index3" = ("%index3%" - 1) SET "meminfo_num" = ("%meminfo_num%" - 1) END ELSE PATCH_IF ("%spell%" STRING_COMPARE_CASE "spwi121" = 0) BEGIN WRITE_ASCII ("%mem_off%" + (0x0c * ("%meminfo_idx%" + "%index3%"))) "spwi125" END ELSE PATCH_IF ("%spell%" STRING_COMPARE_CASE "spwi122" = 0) BEGIN DELETE_BYTES ("%mem_off%" + (0x0c * ("%meminfo_idx%" + "%index3%"))) 0x0c SET "delta_mem" = ("%delta_mem%" - 1) SET "index3" = ("%index3%" - 1) SET "meminfo_num" = ("%meminfo_num%" - 1) END ELSE PATCH_IF ("%spell%" STRING_COMPARE_CASE "spwi610" = 0) BEGIN WRITE_ASCII ("%mem_off%" + (0x0c * ("%meminfo_idx%" + "%index3%"))) "spwi624" END ELSE PATCH_IF ("%spell%" STRING_COMPARE_CASE "spwi706" = 0) BEGIN WRITE_ASCII ("%mem_off%" + (0x0c * ("%meminfo_idx%" + "%index3%"))) "spwi719" END ELSE PATCH_IF ("%spell%" STRING_COMPARE_CASE "spwi709" = 0) BEGIN WRITE_ASCII ("%mem_off%" + (0x0c * ("%meminfo_idx%" + "%index3%"))) "spwi718" END ELSE PATCH_IF ("%spell%" STRING_COMPARE_CASE "spwi801" = 0) BEGIN WRITE_ASCII ("%mem_off%" + (0x0c * ("%meminfo_idx%" + "%index3%"))) "spwi802" END ELSE PATCH_IF ("%spell%" STRING_COMPARE_CASE "spwi806" = 0) BEGIN WRITE_ASCII ("%mem_off%" + (0x0c * ("%meminfo_idx%" + "%index3%"))) "spwi816" END ELSE PATCH_IF ("%spell%" STRING_COMPARE_CASE "spwi814" = 0) BEGIN WRITE_ASCII ("%mem_off%" + (0x0c * ("%meminfo_idx%" + "%index3%"))) "spwi817" END ELSE PATCH_IF ("%spell%" STRING_COMPARE_CASE "spwi901" = 0) BEGIN WRITE_ASCII ("%mem_off%" + (0x0c * ("%meminfo_idx%" + "%index3%"))) "spwi917" END ELSE PATCH_IF ("%spell%" STRING_COMPARE_CASE "spwi904" = 0) BEGIN DELETE_BYTES ("%mem_off%" + (0x0c * ("%meminfo_idx%" + "%index3%"))) 0x0c SET "delta_mem" = ("%delta_mem%" - 1) SET "index3" = ("%index3%" - 1) SET "meminfo_num" = ("%meminfo_num%" - 1) END ELSE PATCH_IF ("%spell%" STRING_COMPARE_CASE "spwi906" = 0) BEGIN DELETE_BYTES ("%mem_off%" + (0x0c * ("%meminfo_idx%" + "%index3%"))) 0x0c SET "delta_mem" = ("%delta_mem%" - 1) SET "index3" = ("%index3%" - 1) SET "meminfo_num" = ("%meminfo_num%" - 1) END END WRITE_LONG ("%meminfo_off%" + 0x0c + ("%index2%" * 0x10)) "%meminfo_num%" END WRITE_LONG 0x2b4 ("%mem_num%" + "%delta_mem%") SET "offset" = (0x0c * ("%delta_mem%" + "%delta_known%")) PATCH_IF ("%slot_off%" >= "%mem_off%") BEGIN WRITE_LONG 0x2b8 ("%slot_off%" + "%offset%") END PATCH_IF ("%item_off%" >= "%mem_off%") BEGIN WRITE_LONG 0x2bc ("%item_off%" + "%offset%") END PATCH_IF ("%fx_off%" >= "%mem_off%") BEGIN WRITE_LONG 0x2c4 ("%fx_off%" + "%offset%") END BUT_ONLY_IF_IT_CHANGES COPY_EXISTING ~bazpat03.cre~ ~override~ // typo WRITE_ASCII 0x268 ~wtasight~ #8 BUT_ONLY_IF_IT_CHANGES COPY_EXISTING ~boy1.cre~ ~override~ //typo ~vvstand3.cre~ ~override~ //typo WRITE_ASCII 0x258 ~runenemy~ #8 BUT_ONLY_IF_IT_CHANGES COPY_EXISTING ~dadrow9.cre~ ~override~ // typo WRITE_ASCII 0x250 ~mage8a~ #8 BUT_ONLY_IF_IT_CHANGES COPY_EXISTING ~dadrow10.cre~ ~override~ //typo WRITE_ASCII 0x250 ~pries10b~ #8 BUT_ONLY_IF_IT_CHANGES COPY_EXISTING ~dadrow12.cre~ ~override~ //typo WRITE_ASCII 0x250 ~pries14t~ #8 BUT_ONLY_IF_IT_CHANGES COPY_EXISTING ~dadrow15.cre~ ~override~ //typo WRITE_ASCII 0x258 ~mage8a~ #8 BUT_ONLY_IF_IT_CHANGES COPY_EXISTING ~daghaun1.cre~ ~override~ //typo WRITE_ASCII 0x258 ~pries14t~ #8 BUT_ONLY_IF_IT_CHANGES COPY_EXISTING ~demnab02.cre~ ~override~ //assigned to demnab01.cre WRITE_ASCII 0x248 ~sumtan01~ #8 BUT_ONLY_IF_IT_CHANGES COPY_EXISTING ~dempit01.cre~ ~override~ //assigned to dempit.cre ~telpit2.cre~ ~override~ //assigned to dempit.cre WRITE_ASCII 0x248 ~dempit~ #8 BUT_ONLY_IF_IT_CHANGES COPY_EXISTING ~drow06.cre~ ~override~ ~uddrow19.cre~ ~override~ READ_LONG 0x2a0 "known_off" READ_LONG 0x2a4 "known_num" READ_LONG 0x2a8 "meminfo_off" READ_LONG 0x2b0 "mem_off" READ_LONG 0x2b4 "mem_num" READ_LONG 0x2b8 "slot_off" READ_LONG 0x2bc "item_off" READ_LONG 0x2c4 "fx_off" SET "delta_known" = 0 FOR (index = 0; index < known_num; index = index + 1) BEGIN READ_ASCII ("%known_off%" + (0x0c * "%index%")) "spell" PATCH_IF ("%spell%" STRING_COMPARE_CASE "spwi801" = 0) BEGIN WRITE_ASCII ("%known_off%" + (0x0c * "%index%")) "spwi811" END END WRITE_LONG 0x2a4 "%known_num%" SET "meminfo_off" = ("%meminfo_off%" + ("%delta_known%" * 0x0c)) WRITE_LONG 0x2a8 "%meminfo_off%" SET "mem_off" = ("%mem_off%" + ("%delta_known%" * 0x0c)) WRITE_LONG 0x2b0 "%mem_off%" SET "delta_mem" = 0 FOR (index2 = 0; index2 < 17; index2 = index2 + 1) BEGIN READ_LONG ("%meminfo_off%" + 0x08 + ("%index2%" * 0x10)) "meminfo_idx" READ_LONG ("%meminfo_off%" + 0x0c + ("%index2%" * 0x10)) "meminfo_num" SET "meminfo_idx" = ("%meminfo_idx%" + "%delta_mem%") WRITE_LONG ("%meminfo_off%" + 0x08 + ("%index2%" * 0x10)) "%meminfo_idx%" FOR (index3 = 0; index3 < meminfo_num; index3 = index3 + 1) BEGIN READ_ASCII ("%mem_off%" + (0x0c * ("%meminfo_idx%" + "%index3%"))) "spell" PATCH_IF ("%spell%" STRING_COMPARE_CASE "spwi801" = 0) BEGIN WRITE_ASCII ("%mem_off%" + (0x0c * ("%meminfo_idx%" + "%index3%"))) "spwi811" END END WRITE_LONG ("%meminfo_off%" + 0x0c + ("%index2%" * 0x10)) "%meminfo_num%" END WRITE_LONG 0x2b4 ("%mem_num%" + "%delta_mem%") SET "offset" = (0x0c * ("%delta_mem%" + "%delta_known%")) PATCH_IF ("%slot_off%" >= "%mem_off%") BEGIN WRITE_LONG 0x2b8 ("%slot_off%" + "%offset%") END PATCH_IF ("%item_off%" >= "%mem_off%") BEGIN WRITE_LONG 0x2bc ("%item_off%" + "%offset%") END PATCH_IF ("%fx_off%" >= "%mem_off%") BEGIN WRITE_LONG 0x2c4 ("%fx_off%" + "%offset%") END BUT_ONLY_IF_IT_CHANGES COPY_EXISTING ~helmbyr.cre~ ~override~ // replaces nonexistent initpc ~latlara.cre~ ~override~ ~talvilon.cre~ ~override~ WRITE_ASCII 0x250 ~initmain~ #8 BUT_ONLY_IF_IT_CHANGES COPY_EXISTING ~jael01.cre~ ~override~ ~ppumb01.cre~ ~override~ ~pries18b.cre~ ~override~ READ_LONG 0x2a0 "known_off" READ_LONG 0x2a4 "known_num" READ_LONG 0x2a8 "meminfo_off" READ_LONG 0x2b0 "mem_off" READ_LONG 0x2b4 "mem_num" READ_LONG 0x2b8 "slot_off" READ_LONG 0x2bc "item_off" READ_LONG 0x2c4 "fx_off" SET "delta_known" = 0 FOR (index = 0; index < known_num; index = index + 1) BEGIN READ_ASCII ("%known_off%" + (0x0c * "%index%")) "spell" PATCH_IF ("%spell%" STRING_COMPARE_CASE "sppr714" = 0) BEGIN WRITE_ASCII ("%known_off%" + (0x0c * "%index%")) "sppr706" END END WRITE_LONG 0x2a4 "%known_num%" SET "meminfo_off" = ("%meminfo_off%" + ("%delta_known%" * 0x0c)) WRITE_LONG 0x2a8 "%meminfo_off%" SET "mem_off" = ("%mem_off%" + ("%delta_known%" * 0x0c)) WRITE_LONG 0x2b0 "%mem_off%" SET "delta_mem" = 0 FOR (index2 = 0; index2 < 17; index2 = index2 + 1) BEGIN READ_LONG ("%meminfo_off%" + 0x08 + ("%index2%" * 0x10)) "meminfo_idx" READ_LONG ("%meminfo_off%" + 0x0c + ("%index2%" * 0x10)) "meminfo_num" SET "meminfo_idx" = ("%meminfo_idx%" + "%delta_mem%") WRITE_LONG ("%meminfo_off%" + 0x08 + ("%index2%" * 0x10)) "%meminfo_idx%" FOR (index3 = 0; index3 < meminfo_num; index3 = index3 + 1) BEGIN READ_ASCII ("%mem_off%" + (0x0c * ("%meminfo_idx%" + "%index3%"))) "spell" PATCH_IF ("%spell%" STRING_COMPARE_CASE "sppr714" = 0) BEGIN WRITE_ASCII ("%mem_off%" + (0x0c * ("%meminfo_idx%" + "%index3%"))) "sppr706" END END WRITE_LONG ("%meminfo_off%" + 0x0c + ("%index2%" * 0x10)) "%meminfo_num%" END WRITE_LONG 0x2b4 ("%mem_num%" + "%delta_mem%") SET "offset" = (0x0c * ("%delta_mem%" + "%delta_known%")) PATCH_IF ("%slot_off%" >= "%mem_off%") BEGIN WRITE_LONG 0x2b8 ("%slot_off%" + "%offset%") END PATCH_IF ("%item_off%" >= "%mem_off%") BEGIN WRITE_LONG 0x2bc ("%item_off%" + "%offset%") END PATCH_IF ("%fx_off%" >= "%mem_off%") BEGIN WRITE_LONG 0x2c4 ("%fx_off%" + "%offset%") END BUT_ONLY_IF_IT_CHANGES COPY_EXISTING ~mumgre01.cre~ ~override~ //typo ~riftcr03.cre~ ~override~ //typo WRITE_ASCII 0x248 ~sumtan01~ #8 BUT_ONLY_IF_IT_CHANGES COPY_EXISTING ~sarpro01.cre~ ~override~ // typo WRITE_ASCII 0x268 ~wtrunsgt~ #8 BUT_ONLY_IF_IT_CHANGES COPY_EXISTING ~sendro05.cre~ ~override~ //typo WRITE_ASCII 0x268 ~cassa20b~ #8 BUT_ONLY_IF_IT_CHANGES COPY_EXISTING ~shadeld.cre~ ~override~ //typo WRITE_ASCII 0x250 ~shadel~ #8 BUT_ONLY_IF_IT_CHANGES COPY_EXISTING ~slmage2.cre~ ~override~ READ_LONG 0x2a0 "known_off" READ_LONG 0x2a4 "known_num" READ_LONG 0x2a8 "meminfo_off" READ_LONG 0x2b0 "mem_off" READ_LONG 0x2b4 "mem_num" READ_LONG 0x2b8 "slot_off" READ_LONG 0x2bc "item_off" READ_LONG 0x2c4 "fx_off" SET "delta_known" = 0 FOR (index = 0; index < known_num; index = index + 1) BEGIN READ_ASCII ("%known_off%" + (0x0c * "%index%")) "spell" PATCH_IF ("%spell%" STRING_COMPARE_CASE "spwi422" = 0) BEGIN DELETE_BYTES ("%known_off%" + (0x0c * "%index%")) 0x0c SET "delta_known" = ("%delta_known%" - 1) SET "index" = ("%index%" - 1) SET "known_num" = ("%known_num%" - 1) END END WRITE_LONG 0x2a4 "%known_num%" SET "meminfo_off" = ("%meminfo_off%" + ("%delta_known%" * 0x0c)) WRITE_LONG 0x2a8 "%meminfo_off%" SET "mem_off" = ("%mem_off%" + ("%delta_known%" * 0x0c)) WRITE_LONG 0x2b0 "%mem_off%" SET "delta_mem" = 0 FOR (index2 = 0; index2 < 17; index2 = index2 + 1) BEGIN READ_LONG ("%meminfo_off%" + 0x08 + ("%index2%" * 0x10)) "meminfo_idx" READ_LONG ("%meminfo_off%" + 0x0c + ("%index2%" * 0x10)) "meminfo_num" SET "meminfo_idx" = ("%meminfo_idx%" + "%delta_mem%") WRITE_LONG ("%meminfo_off%" + 0x08 + ("%index2%" * 0x10)) "%meminfo_idx%" FOR (index3 = 0; index3 < meminfo_num; index3 = index3 + 1) BEGIN READ_ASCII ("%mem_off%" + (0x0c * ("%meminfo_idx%" + "%index3%"))) "spell" PATCH_IF ("%spell%" STRING_COMPARE_CASE "spwi422" = 0) BEGIN WRITE_ASCII ("%mem_off%" + (0x0c * ("%meminfo_idx%" + "%index3%"))) "spwi408" END END WRITE_LONG ("%meminfo_off%" + 0x0c + ("%index2%" * 0x10)) "%meminfo_num%" END WRITE_LONG 0x2b4 ("%mem_num%" + "%delta_mem%") SET "offset" = (0x0c * ("%delta_mem%" + "%delta_known%")) PATCH_IF ("%slot_off%" >= "%mem_off%") BEGIN WRITE_LONG 0x2b8 ("%slot_off%" + "%offset%") END PATCH_IF ("%item_off%" >= "%mem_off%") BEGIN WRITE_LONG 0x2bc ("%item_off%" + "%offset%") END PATCH_IF ("%fx_off%" >= "%mem_off%") BEGIN WRITE_LONG 0x2c4 ("%fx_off%" + "%offset%") END BUT_ONLY_IF_IT_CHANGES COPY_EXISTING ~sppain.cre~ ~override~ ~vakola.cre~ ~override~ READ_LONG 0x2a0 "known_off" READ_LONG 0x2a4 "known_num" READ_LONG 0x2a8 "meminfo_off" READ_LONG 0x2b0 "mem_off" READ_LONG 0x2b4 "mem_num" READ_LONG 0x2b8 "slot_off" READ_LONG 0x2bc "item_off" READ_LONG 0x2c4 "fx_off" SET "delta_known" = 0 FOR (index = 0; index < known_num; index = index + 1) BEGIN READ_ASCII ("%known_off%" + (0x0c * "%index%")) "spell" PATCH_IF ("%spell%" STRING_COMPARE_CASE "sppr112" = 0) BEGIN DELETE_BYTES ("%known_off%" + (0x0c * "%index%")) 0x0c SET "delta_known" = ("%delta_known%" - 1) SET "index" = ("%index%" - 1) SET "known_num" = ("%known_num%" - 1) END END WRITE_LONG 0x2a4 "%known_num%" SET "meminfo_off" = ("%meminfo_off%" + ("%delta_known%" * 0x0c)) WRITE_LONG 0x2a8 "%meminfo_off%" SET "mem_off" = ("%mem_off%" + ("%delta_known%" * 0x0c)) WRITE_LONG 0x2b0 "%mem_off%" SET "delta_mem" = 0 FOR (index2 = 0; index2 < 17; index2 = index2 + 1) BEGIN READ_LONG ("%meminfo_off%" + 0x08 + ("%index2%" * 0x10)) "meminfo_idx" READ_LONG ("%meminfo_off%" + 0x0c + ("%index2%" * 0x10)) "meminfo_num" SET "meminfo_idx" = ("%meminfo_idx%" + "%delta_mem%") WRITE_LONG ("%meminfo_off%" + 0x08 + ("%index2%" * 0x10)) "%meminfo_idx%" FOR (index3 = 0; index3 < meminfo_num; index3 = index3 + 1) BEGIN READ_ASCII ("%mem_off%" + (0x0c * ("%meminfo_idx%" + "%index3%"))) "spell" PATCH_IF ("%spell%" STRING_COMPARE_CASE "sppr112" = 0) BEGIN DELETE_BYTES ("%mem_off%" + (0x0c * ("%meminfo_idx%" + "%index3%"))) 0x0c SET "delta_mem" = ("%delta_mem%" - 1) SET "index3" = ("%index3%" - 1) SET "meminfo_num" = ("%meminfo_num%" - 1) END END WRITE_LONG ("%meminfo_off%" + 0x0c + ("%index2%" * 0x10)) "%meminfo_num%" END WRITE_LONG 0x2b4 ("%mem_num%" + "%delta_mem%") SET "offset" = (0x0c * ("%delta_mem%" + "%delta_known%")) PATCH_IF ("%slot_off%" >= "%mem_off%") BEGIN WRITE_LONG 0x2b8 ("%slot_off%" + "%offset%") END PATCH_IF ("%item_off%" >= "%mem_off%") BEGIN WRITE_LONG 0x2bc ("%item_off%" + "%offset%") END PATCH_IF ("%fx_off%" >= "%mem_off%") BEGIN WRITE_LONG 0x2c4 ("%fx_off%" + "%offset%") END BUT_ONLY_IF_IT_CHANGES COPY_EXISTING ~sudemon.cre~ ~override~ //assigned to sudemon2.cre WRITE_ASCII 0x248 ~attkneu2~ #8 BUT_ONLY_IF_IT_CHANGES COPY_EXISTING ~sujon.cre~ ~override~ //typo ? WRITE_ASCII 0x250 ~jonsimm~ #8 BUT_ONLY_IF_IT_CHANGES COPY_EXISTING ~tobban03.cre~ ~override~ //typo ~tobpar06.cre~ ~override~ //typo WRITE_ASCII 0x268 ~cfigh20b~ #8 BUT_ONLY_IF_IT_CHANGES COPY_EXISTING ~tobpar01.cre~ ~override~ //typo WRITE_ASCII 0x258 ~inpaivsg~ #8 BUT_ONLY_IF_IT_CHANGES COPY_EXISTING ~yarmy01.cre~ ~override~ //typo ? WRITE_ASCII 0x258 ~cfigh20b~ #8 BUT_ONLY_IF_IT_CHANGES Only one item left with a bad resref: the spellhaunt protection item references non-existent spells. // spellhaunts have extraneous protection from spell effects COPY_EXISTING ~spellh01.itm~ ~override~ READ_LONG 0x64 "abil_off" READ_SHORT 0x68 "abil_num" READ_LONG 0x6a "fx_off" READ_SHORT 0x70 "fx_num" SET "delta" = 0 FOR (index2 = 0; index2 < fx_num; index2 = index2 + 1) BEGIN READ_SHORT ("%fx_off%" + (0x30 * "%index2%")) "opcode" PATCH_IF ("%opcode%" = 206) BEGIN READ_ASCII ("%fx_off%" + 0x14 + (0x30 * "%index2%")) "spell" PATCH_IF (("%spell%" STRING_COMPARE_CASE "sppr316" = 0) OR ("%spell%" STRING_COMPARE_CASE "spwi315" = 0) OR ("%spell%" STRING_COMPARE_CASE "spwi323" = 0)) BEGIN DELETE_BYTES ("%fx_off%" + (0x30 * "%index2%")) 0x30 // deletes it SET "fx_num" = "%fx_num%" - 1 SET "delta" = "%delta%" - 1 SET "index2" = "%index2%" - 1 END END END WRITE_SHORT 0x70 "%fx_num%" // adjusts global fx number FOR (index = 0; index < abil_num; index = index + 1) BEGIN // adjusts fx indices on abilities READ_BYTE ("%abil_off%" + ("%index%" * 0x38)) "type" READ_SHORT ("%abil_off%" + 0x20 + ("%index%" * 0x38)) "abil_fx_idx" SET "abil_fx_idx" = ("%abil_fx_idx%" + "%delta%") WRITE_SHORT ("%abil_off%" + 0x20 + ("%index%" * 0x38)) "%abil_fx_idx%" END BUT_ONLY_IF_IT_CHANGES Spell changes were a bit more extensive. Most were simple typos in VVC and sound references with a few creature and spell references thrown in for good measure. There were also some irresolvable missing resources--for example, many missing eff files for Balthazar's abilities--that were left alone. // resurrection(s) trying to remove incorrect spell resource COPY_EXISTING ~bhaal4a.spl~ ~override~ ~spja01.spl~ ~override~ ~sppr504.spl~ ~override~ ~sppr712.spl~ ~override~ ~sppr729.spl~ ~override~ ~spwish10.spl~ ~override~ READ_LONG 0x64 "abil_off" READ_SHORT 0x68 "abil_num" READ_LONG 0x6a "fx_off" FOR (index = 0; index < abil_num; index = index + 1) BEGIN // adjusts fx indices on abilities READ_SHORT ("%abil_off%" + 0x1e + ("%index%" * 0x28)) "abil_fx_num" READ_SHORT ("%abil_off%" + 0x20 + ("%index%" * 0x28)) "abil_fx_idx" FOR (index2 = 0; index2 < abil_fx_num; index2 = index2 + 1) BEGIN READ_SHORT ("%fx_off%" + (0x30 * ("%index2%" + "%abil_fx_idx%"))) "opcode" READ_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%index2%" + "%abil_fx_idx%"))) "spell" PATCH_IF (("%opcode%" = 172) AND ("%spell%" STRING_COMPARE_CASE "spwi126" = 0)) BEGIN WRITE_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%index2%" + "%abil_fx_idx%"))) "spin126" END END END BUT_ONLY_IF_IT_CHANGES // dragon breath attacks missing vvc to play over victims COPY_EXISTING ~drgrbrht.spl~ ~override~ ~spin691.spl~ ~override~ ~spin893.spl~ ~override~ READ_LONG 0x64 "abil_off" READ_SHORT 0x68 "abil_num" READ_LONG 0x6a "fx_off" FOR (index = 0; index < abil_num; index = index + 1) BEGIN // adjusts fx indices on abilities READ_SHORT ("%abil_off%" + 0x1e + ("%index%" * 0x28)) "abil_fx_num" READ_SHORT ("%abil_off%" + 0x20 + ("%index%" * 0x28)) "abil_fx_idx" FOR (index2 = 0; index2 < abil_fx_num; index2 = index2 + 1) BEGIN READ_SHORT ("%fx_off%" + (0x30 * ("%index2%" + "%abil_fx_idx%"))) "opcode" READ_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%index2%" + "%abil_fx_idx%"))) "resref" PATCH_IF (("%opcode%" = 215) AND (("%resref%" STRING_COMPARE_CASE "spgdraim" = 0) OR ("%resref%" STRING_COMPARE_CASE "spbdimsp" = 0))) BEGIN WRITE_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%index2%" + "%abil_fx_idx%"))) "spsdimpa" END END END BUT_ONLY_IF_IT_CHANGES // typo in vvc reference COPY_EXISTING ~spin650.spl~ ~override~ READ_LONG 0x64 "abil_off" READ_SHORT 0x68 "abil_num" READ_LONG 0x6a "fx_off" FOR (index = 0; index < abil_num; index = index + 1) BEGIN // adjusts fx indices on abilities READ_SHORT ("%abil_off%" + 0x1e + ("%index%" * 0x28)) "abil_fx_num" READ_SHORT ("%abil_off%" + 0x20 + ("%index%" * 0x28)) "abil_fx_idx" FOR (index2 = 0; index2 < abil_fx_num; index2 = index2 + 1) BEGIN READ_SHORT ("%fx_off%" + (0x30 * ("%index2%" + "%abil_fx_idx%"))) "opcode" READ_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%index2%" + "%abil_fx_idx%"))) "resref" PATCH_IF (("%opcode%" = 215) AND ("%resref%" STRING_COMPARE_CASE "icamor" = 0)) BEGIN WRITE_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%index2%" + "%abil_fx_idx%"))) "icarmor" #8 END END END BUT_ONLY_IF_IT_CHANGES // typo in vvc resource COPY_EXISTING ~spin783.spl~ ~override~ ~spin852.spl~ ~override~ READ_LONG 0x64 "abil_off" READ_SHORT 0x68 "abil_num" READ_LONG 0x6a "fx_off" FOR (index = 0; index < abil_num; index = index + 1) BEGIN // adjusts fx indices on abilities READ_SHORT ("%abil_off%" + 0x1e + ("%index%" * 0x28)) "abil_fx_num" READ_SHORT ("%abil_off%" + 0x20 + ("%index%" * 0x28)) "abil_fx_idx" FOR (index2 = 0; index2 < abil_fx_num; index2 = index2 + 1) BEGIN READ_SHORT ("%fx_off%" + (0x30 * ("%index2%" + "%abil_fx_idx%"))) "opcode" READ_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%index2%" + "%abil_fx_idx%"))) "resref" PATCH_IF (("%opcode%" = 215) AND ("%resref%" STRING_COMPARE_CASE "sparmor" = 0)) BEGIN WRITE_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%index2%" + "%abil_fx_idx%"))) "spsarmor" #8 END END END BUT_ONLY_IF_IT_CHANGES // typo in cre reference COPY_EXISTING ~spin968.spl~ ~override~ READ_LONG 0x64 "abil_off" READ_SHORT 0x68 "abil_num" READ_LONG 0x6a "fx_off" FOR (index = 0; index < abil_num; index = index + 1) BEGIN // adjusts fx indices on abilities READ_SHORT ("%abil_off%" + 0x1e + ("%index%" * 0x28)) "abil_fx_num" READ_SHORT ("%abil_off%" + 0x20 + ("%index%" * 0x28)) "abil_fx_idx" FOR (index2 = 0; index2 < abil_fx_num; index2 = index2 + 1) BEGIN READ_SHORT ("%fx_off%" + (0x30 * ("%index2%" + "%abil_fx_idx%"))) "opcode" READ_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%index2%" + "%abil_fx_idx%"))) "resref" PATCH_IF (("%opcode%" = 151) AND ("%resref%" STRING_COMPARE_CASE "gendoa01" = 0)) BEGIN WRITE_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%index2%" + "%abil_fx_idx%"))) "gendao01" #8 END END END BUT_ONLY_IF_IT_CHANGES // typo in spl reference COPY_EXISTING ~spinhum.spl~ ~override~ READ_LONG 0x64 "abil_off" READ_SHORT 0x68 "abil_num" READ_LONG 0x6a "fx_off" FOR (index = 0; index < abil_num; index = index + 1) BEGIN // adjusts fx indices on abilities READ_SHORT ("%abil_off%" + 0x1e + ("%index%" * 0x28)) "abil_fx_num" READ_SHORT ("%abil_off%" + 0x20 + ("%index%" * 0x28)) "abil_fx_idx" FOR (index2 = 0; index2 < abil_fx_num; index2 = index2 + 1) BEGIN READ_SHORT ("%fx_off%" + (0x30 * ("%index2%" + "%abil_fx_idx%"))) "opcode" READ_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%index2%" + "%abil_fx_idx%"))) "resref" PATCH_IF (("%opcode%" = 172) AND ("%resref%" STRING_COMPARE_CASE "spinhun" = 0)) BEGIN WRITE_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%index2%" + "%abil_fx_idx%"))) "spinhum" #8 END END END BUT_ONLY_IF_IT_CHANGES // enemy versions of symbol spells missing casting sounds COPY_EXISTING ~spwi897.spl~ ~override~ ~spwi898.spl~ ~override~ ~spwi899.spl~ ~override~ ~spwm123.spl~ ~override~ WRITE_ASCII 0x10 ~cas_m03~ #8 BUT_ONLY_IF_IT_CHANGES // typo in wav reference COPY_EXISTING ~spwi995.spl~ ~override~ READ_LONG 0x64 "abil_off" READ_SHORT 0x68 "abil_num" READ_LONG 0x6a "fx_off" FOR (index = 0; index < abil_num; index = index + 1) BEGIN // adjusts fx indices on abilities READ_SHORT ("%abil_off%" + 0x1e + ("%index%" * 0x28)) "abil_fx_num" READ_SHORT ("%abil_off%" + 0x20 + ("%index%" * 0x28)) "abil_fx_idx" FOR (index2 = 0; index2 < abil_fx_num; index2 = index2 + 1) BEGIN READ_SHORT ("%fx_off%" + (0x30 * ("%index2%" + "%abil_fx_idx%"))) "opcode" READ_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%index2%" + "%abil_fx_idx%"))) "resref" PATCH_IF (("%opcode%" = 174) AND ("%resref%" STRING_COMPARE_CASE "eff_m09 " = 0)) BEGIN WRITE_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%index2%" + "%abil_fx_idx%"))) "eff_m09" #8 END END END BUT_ONLY_IF_IT_CHANGES // typo in vvc reference COPY_EXISTING ~spwish01.spl~ ~override~ ~spwish02.spl~ ~override~ ~spwish03.spl~ ~override~ ~spwish04.spl~ ~override~ ~spwish05.spl~ ~override~ ~spwish06.spl~ ~override~ ~spwish08.spl~ ~override~ READ_LONG 0x64 "abil_off" READ_SHORT 0x68 "abil_num" READ_LONG 0x6a "fx_off" FOR (index = 0; index < abil_num; index = index + 1) BEGIN // adjusts fx indices on abilities READ_SHORT ("%abil_off%" + 0x1e + ("%index%" * 0x28)) "abil_fx_num" READ_SHORT ("%abil_off%" + 0x20 + ("%index%" * 0x28)) "abil_fx_idx" FOR (index2 = 0; index2 < abil_fx_num; index2 = index2 + 1) BEGIN READ_SHORT ("%fx_off%" + (0x30 * ("%index2%" + "%abil_fx_idx%"))) "opcode" READ_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%index2%" + "%abil_fx_idx%"))) "resref" PATCH_IF (("%opcode%" = 215) AND ("%resref%" STRING_COMPARE_CASE "inmagich" = 0)) BEGIN WRITE_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%index2%" + "%abil_fx_idx%"))) "icmagich" #8 END END END BUT_ONLY_IF_IT_CHANGES
devSin Posted August 23, 2006 Posted August 23, 2006 If we delete all of Elminster's spells, it speeds up his spawn time by a factor of a billion. There's no way he would ever cast even a single of those spells. AMCARRAS - check one the MAGTHF* script or something. He'll never cast any of these spells, but I guess it's most appropriate. MUMGRE01 - if this is a mummy, don't give it the demon script. Probably just lazy copy/paste from the designer. Make sure you check the SUDEMON. One of them needs to be just plain enemy so it doesn't attack Raamilat (the drow guard near Demin's house). Don't change SUJON. The way it was supposed to originally work is that SUJON casts fake mislead/simulacrum, which gets the JONSIMM script, which then casts its own fake mislead/simulacrum, which gets the JONSIMMM script. It makes the tree battle loads more fun to have 3 copies of Irenicus (albeit substantially less powerful and dispellable) running around, but it's not a bug. SHADELD - unused, no? The ToB party and ToB bandit spawns - these guys never spawn. The party are bounty hunters and the other guy has his bandit orcs (he even gets reinforcements). All unused. SPIN650 is DM armor - never, ever used. If SPIN783 and 852 are the Slayer change, be very careful. The default effect settings will cause the animations to run on the place cast for about 8 in-game hours. SPIN968 is probably one of the PPBOOK or portal spells, all unused (even if it's a different spell, still unused). All those last SPWISHes are unused.
CamDawg Posted August 23, 2006 Author Posted August 23, 2006 Cheers. And whoops on the mummies--they're supposed to be mummy01 (the current assignment is mummy01' with the bonus apostrophe). We may not want to fix it anyway; it's the screwy script that has them turn into commoners when someone casts resurrection on them.
CamDawg Posted August 25, 2006 Author Posted August 25, 2006 AMCARRAS - check one the MAGTHF* script or something. He'll never cast any of these spells, but I guess it's most appropriate. He's assigned thiefmag.bcs, which will cast at least a couple of these. I've gone ahead and added the mummy scripts as well.
SimDing0 Posted August 25, 2006 Posted August 25, 2006 The mummy scripts work like shit in the original game. I wouldn't bother restoring them.
CamDawg Posted August 27, 2006 Author Posted August 27, 2006 OK. I thought you had used the mummy for Quest Pack and had some issues with it. Of the original list the changes, these have been dropped: mumgre01.cre, riftcr03.cre, shadeld.cre, spin650.spl, spin968.spl, sudemon.cre, sujon.cre, tob*.cre, and wish*.spl. I've tested the two slayer changes altered (spin783.spl and spin852.spl) and the animation plays once and then goes away, so they're included. sudemon.cre is the baalor used in a cutscene with the dying elf. Added locally, moving to archives.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.