CamDawg Posted May 2, 2005 Share Posted May 2, 2005 SoA dart01 is missing the effect that all other darts have, which sets attacks per round at 3. This got me thinking--does the Modify Number of Atacks opcode affect the modified total number of attacks (i.e. after grandmastery bonuses) or the base number (i.e. before grandmastery)? I assume the latter, since folks love to chatter about Mazzy shooting 817 arrows a round, but I wanted to confirm before fixing. Link to comment
devSin Posted May 3, 2005 Share Posted May 3, 2005 Whatever the behavior is, it's obviously right. Just fix it. While you're there, the duration for the same effect on about half of the crossbows is set to Instant/Limited (0). All crossbows should set attacks/round to 1 (I don't know if the bad duration is preventing this from working correctly or not). It's not like anybody actually uses crossbows, though... Link to comment
CamDawg Posted May 6, 2005 Author Share Posted May 6, 2005 Fine, fine. And here I was trying to get free IESDP research. // many crossbows don't set atacks per round to 1 while equipped due to bad timing COPY_EXISTING ~xbow02.itm~ ~override~ // heavy crossbow +1 ~xbow07.itm~ ~override~ // heavy crossbow +2 ~xbow08.itm~ ~override~ // giant hair crossbow +3 ~xbow17.itm~ ~override~ // heavy crossbow +3 PATCH_IF (SOURCE_SIZE > 0x71) THEN BEGIN // protects against invalid files READ_LONG 0x6a "fx_off" READ_SHORT 0x70 "fx_num" 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%" = 1) BEGIN // looks for modify attacks per round WRITE_BYTE ("%fx_off%" + 0x0c + ("%fx_num%" * 0x30)) 2 // instant/while equipped END END END BUT_ONLY_IF_IT_CHANGES // adds proper number of attacks for dart01 COPY_EXISTING ~dart01.itm~ ~override~ READ_LONG 0x64 "abil_off" READ_SHORT 0x68 "abil_num" READ_LONG 0x6a "fx_off" READ_SHORT 0x70 "fx_num" SET "new_fx" = 1 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%" = 1) BEGIN // looks for modify attacks per round SET "new_fx" = 0 END END PATCH_IF ("%new_fx%" = 1) BEGIN // no effect found, add one WRITE_SHORT 0x70 ("%fx_num%" + "%new_fx%") INSERT_BYTES ("%fx_off%" + ("%fx_num%" * 0x30)) 0x30 WRITE_SHORT ("%fx_off%" + ("%fx_num%" * 0x30)) 1 // modify attacks per round WRITE_BYTE ("%fx_off%" + 0x02 + ("%fx_num%" * 0x30)) 1 // target self WRITE_LONG ("%fx_off%" + 0x04 + ("%fx_num%" * 0x30)) 3 // 3 attacks WRITE_BYTE ("%fx_off%" + 0x08 + ("%fx_num%" * 0x30)) 1 // set WRITE_BYTE ("%fx_off%" + 0x0c + ("%fx_num%" * 0x30)) 2 // instant/while equipped WRITE_BYTE ("%fx_off%" + 0x12 + ("%fx_num%" * 0x30)) 100 // probability 1 WHILE ("%abil_num%" > 0) BEGIN // if abilities are present, need to adjust their effects index SET "abil_num" = ("%abil_num%" - 1) READ_SHORT (0x20 + "%abil_off%" + ("%abil_num%" * 0x38)) "abil_fx_idx" WRITE_SHORT (0x20 + "%abil_off%" + ("%abil_num%" * 0x38)) ("%abil_fx_idx%" + "%new_fx%") END END BUT_ONLY_IF_IT_CHANGES Included in alpha 5. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.