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!

[(BG2) bug] portrait icon bugs

CamDawgCamDawg Member, Developer Posts: 3,420
edited November 2012 in Fixed
Spell shield uses opcode (effectID) 226, which is hardcoded to display the wrong portrait icon of protection from magic energy instead of spell shield. Rather than fixing this in the engine, I'd suggest using the Fixpack solution, as it would cause fewer mod compatibility issues since it's been out so long.

We swap the portrait icons (states.bam, states2.bam) so that the hardcoded 226 has the right icon and update Protection from Magic Energy to point to the relocated icon.

I've attached my states.bam and states2.bam from BG2FP--it looks like BGEE currently has the smaller BG1 states.bam of portrait icons, so these BAMs would need to be updated anyway.
// spell shield is hardcoded to display icon #73 which is currently protection from magical energy; need to swap
// see also statdesc.2da, states.bam, states2.bam
COPY_EXISTING ~spwi606.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
READ_SHORT ("%abil_off%" + 0x1e + (0x28 * "%index%")) "abil_fx_num"
READ_SHORT ("%abil_off%" + 0x20 + (0x28 * "%index%")) "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%" + 0x08 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "icon"
PATCH_IF (("%opcode%" = 142) AND ("%icon%" = 73)) BEGIN // display old pro-magic energy icon
WRITE_LONG ("%fx_off%" + 0x08 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) 123 // change to new pro-magic energy icon

Post edited by Tanthalas on


Sign In or Register to comment.