Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Dark Dreams of Furiae - a new module for NWN:EE! Buy now
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

[(BGEE, BG2) bug] Armor

CamDawgCamDawg Member, Developer Posts: 3,420
edited August 2012 in Fixed
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
PATCH_IF ("%duration%" > 5) BEGIN // longer than one round
WRITE_LONG ("%fx_off%" + 0x0e + (0x30 * ("%abil_fx_idx%" + "%index2%"))) 2700 // corrects duration

Post edited by Bhryaen on


Sign In or Register to comment.