CamDawg Posted March 12, 2005 Share Posted March 12, 2005 IPSION is the item that provides protections for Mordenkainen swords and boneblades. This is adaptation of devSin's code--the BD item seems to remove a redundant undroppable flag and misses some string/animation protections. // changes to ipsion, which provides psionic protections for Mordy swords and ToB boneblades COPY_EXISTING ~ipsion.itm~ ~override~ READ_LONG 0x6a "fx_off" READ_SHORT 0x70 "fx_num" READ_SHORT 0x70 ("%fx_num%" + 3) INSERT_BYTES ("%fx_off%" + ("%fx_num%" * 0x30)) 0x30 // new effect WRITE_SHORT ("%fx_off%" + ("%fx_num%" * 0x30)) 296 // suppress animation WRITE_BYTE ("%fx_off%" + 0x02 + ("%fx_num%" * 0x30)) 1 // target self WRITE_BYTE ("%fx_off%" + 0x03 + ("%fx_num%" * 0x30)) 8 // power WRITE_BYTE ("%fx_off%" + 0x0c + ("%fx_num%" * 0x30)) 2 // instant/while equipped WRITE_BYTE ("%fx_off%" + 0x0d + ("%fx_num%" * 0x30)) 2 // no dispel/not bypass WRITE_ASCII ("%fx_off%" + 0x14 + ("%fx_num%" * 0x30)) ~SPFLAYER~ // vvc file INSERT_BYTES ("%fx_off%" + ("%fx_num%" * 0x30)) 0x30 // new effect WRITE_SHORT ("%fx_off%" + ("%fx_num%" * 0x30)) 296 // suppress animation WRITE_BYTE ("%fx_off%" + 0x02 + ("%fx_num%" * 0x30)) 1 // target self WRITE_BYTE ("%fx_off%" + 0x03 + ("%fx_num%" * 0x30)) 8 // power WRITE_BYTE ("%fx_off%" + 0x0c + ("%fx_num%" * 0x30)) 2 // instant/while equipped WRITE_BYTE ("%fx_off%" + 0x0d + ("%fx_num%" * 0x30)) 2 // no dispel/not bypass WRITE_BYTE ("%fx_off%" + 0x12 + ("%fx_num%" * 0x30)) 100 // probability WRITE_ASCII ("%fx_off%" + 0x14 + ("%fx_num%" * 0x30)) ~SPMINDAT~ // vvc file INSERT_BYTES ("%fx_off%" + ("%fx_num%" * 0x30)) 0x30 // new effect WRITE_SHORT ("%fx_off%" + ("%fx_num%" * 0x30)) 267 // suppress animation WRITE_BYTE ("%fx_off%" + 0x02 + ("%fx_num%" * 0x30)) 1 // target self WRITE_BYTE ("%fx_off%" + 0x03 + ("%fx_num%" * 0x30)) 4 // power WRITE_BYTE ("%fx_off%" + 0x04 + ("%fx_num%" * 0x30)) 14782 // strref for "confused" WRITE_BYTE ("%fx_off%" + 0x0c + ("%fx_num%" * 0x30)) 2 // instant/while equipped WRITE_BYTE ("%fx_off%" + 0x0d + ("%fx_num%" * 0x30)) 2 // no dispel/not bypass WRITE_BYTE ("%fx_off%" + 0x12 + ("%fx_num%" * 0x30)) 100 // probability WHILE ("%fx_num%" > 0) BEGIN SET "fx_num" = ("%fx_num%" - 1) WRITE_BYTE ("%fx_off%" + 0x0d + ("%fx_num%" * 0x30)) 2 // no dispel/not bypass WRITE_LONG ("%fx_off%" + 0x0e + ("%fx_num%" * 0x30)) 0 // duration END BUT_ONLY_IF_IT_CHANGES @devSin: I didn't remove the ability (though it's redundant) but I could not for the life of me figure out what these two patches are for, even accounting for the deleted byte offset: WRITE_LONG 0x043a 0x05 WRITE_LONG 0x046a 0x13 Link to comment
devSin Posted March 12, 2005 Share Posted March 12, 2005 They change the two duplicate immunity effects (stun and hold) to charm and intelligence modification (two things which shouldn't affect the sword). Link to comment
CamDawg Posted March 28, 2005 Author Share Posted March 28, 2005 Recoded to change the duplicated immunities. Included in alpha 3. COPY_EXISTING ~ipsion.itm~ ~override~ READ_LONG 0x64 "abil_off" READ_SHORT 0x68 "abil_num" READ_LONG 0x6a "fx_off" READ_SHORT 0x70 "fx_num" WHILE ("%abil_num%" > 0) BEGIN // adjusts indices for abilities SET "abil_num" = ("%abil_num%" - 1) READ_SHORT ("%abil_off%" + 0x20 + ("%abil_num%" * 0x38)) "fx_idx" WRITE_SHORT ("%abil_off%" + 0x20 + ("%abil_num%" * 0x38)) ("%fx_idx%" + 3) END WRITE_SHORT 0x70 ("%fx_num%" + 3) SET "stun_dupe" = 0 SET "hold_dupe" = 0 WHILE ("%fx_num%" > 0) BEGIN // searches through global effects SET "fx_num" = ("%fx_num%" - 1) READ_SHORT ("%fx_off%" + ("%fx_num%" * 0x30)) "type" PATCH_IF ("%type%" = 101) BEGIN // immunity to stun or hold READ_LONG ("%fx_off%" + 0x08 + ("%fx_num%" * 0x30)) "param" PATCH_IF ("%param%" = 45) BEGIN PATCH_IF ("%stun_dupe%" = 0) BEGIN // if first effect SET "stun_dupe" = 1 END ELSE BEGIN // if dupe effect WRITE_LONG ("%fx_off%" + 0x08 + ("%fx_num%" * 0x30)) 5 // change to charm END END ELSE PATCH_IF ("%param%" = 175) BEGIN PATCH_IF ("%hold_dupe%" = 0) BEGIN // if first effect SET "hold_dupe" = 1 END ELSE BEGIN // if dupe effect WRITE_LONG ("%fx_off%" + 0x08 + ("%hold_dupe%" * 0x30)) 19 // change to inteligence modification END END END END INSERT_BYTES ("%fx_off%" ) 0x30 // new effect WRITE_SHORT ("%fx_off%" ) 296 // suppress animation WRITE_BYTE ("%fx_off%" + 0x02) 1 // target self WRITE_BYTE ("%fx_off%" + 0x03) 8 // power WRITE_BYTE ("%fx_off%" + 0x0c) 2 // instant/while equipped WRITE_BYTE ("%fx_off%" + 0x0d) 2 // no dispel/not bypass WRITE_ASCII ("%fx_off%" + 0x14) ~SPFLAYER~ // vvc file INSERT_BYTES ("%fx_off%" ) 0x30 // new effect WRITE_SHORT ("%fx_off%" ) 296 // suppress animation WRITE_BYTE ("%fx_off%" + 0x02) 1 // target self WRITE_BYTE ("%fx_off%" + 0x03) 8 // power WRITE_BYTE ("%fx_off%" + 0x0c) 2 // instant/while equipped WRITE_BYTE ("%fx_off%" + 0x0d) 2 // no dispel/not bypass WRITE_BYTE ("%fx_off%" + 0x12) 100 // probability WRITE_ASCII ("%fx_off%" + 0x14) ~SPMINDAT~ // vvc file INSERT_BYTES ("%fx_off%" ) 0x30 // new effect WRITE_SHORT ("%fx_off%" ) 267 // disable display string WRITE_BYTE ("%fx_off%" + 0x02) 1 // target self WRITE_BYTE ("%fx_off%" + 0x03) 4 // power SAY ("%fx_off%" + 0x04) #14782 // strref for "confused" WRITE_BYTE ("%fx_off%" + 0x0c) 2 // instant/while equipped WRITE_BYTE ("%fx_off%" + 0x0d) 2 // no dispel/not bypass WRITE_BYTE ("%fx_off%" + 0x12) 100 // probability WHILE ("%fx_num%" > 0) BEGIN SET "fx_num" = ("%fx_num%" - 1) WRITE_BYTE ("%fx_off%" + 0x0d) 2 // no dispel/not bypass WRITE_LONG ("%fx_off%" + 0x0e) 0 // duration END BUT_ONLY_IF_IT_CHANGES Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.