[(BGEE, BG2) bug] Armor
Armor is supposed to last nine hours per its descript but is currently lasting 10. The visual effect also lasts a smidge long and needs to be cleaned up.
// armor fixes
COPY_EXISTING ~spwi102.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 // fix existing effects
WRITE_SHORT ("%abil_off%" + 0x12 + ("%index%" * 0x28)) 9 // casting time
READ_SHORT ("%abil_off%" + 0x10) "min_lev"
READ_SHORT ("%abil_off%" + 0x1e) "abil_fx_num"
READ_SHORT ("%abil_off%" + 0x20) "abil_fx_idx"
FOR ("index2" = 0; "%index2%" < "%abil_fx_num%"; "index2" = ("%index2%" + 1)) BEGIN
READ_SHORT ("%fx_off%" + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "opcode"
READ_LONG ("%fx_off%" + 0x0e + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "duration"
PATCH_IF ("%opcode%" = 215) BEGIN // play 3d effect opcode
WRITE_LONG ("%fx_off%" + 0x0e + (0x30 * ("%abil_fx_idx%" + "%index2%"))) 2 // corrects duration
END
PATCH_IF ("%duration%" > 5) BEGIN // longer than one round
WRITE_LONG ("%fx_off%" + 0x0e + (0x30 * ("%abil_fx_idx%" + "%index2%"))) 2700 // corrects duration
END
END
END
BUT_ONLY_IF_IT_CHANGES
Post edited by Bhryaen on
1
Comments
SPWI102
1. Duration changed from 3000 to 2700 for all effects (except the short Display string and play visual effect.)
2 Play visual effect duration changed from 3 to 2.