[(BG2) bug] portrait icon bugs
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.
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
END
END
END
BUT_ONLY_IF_IT_CHANGES
Post edited by Tanthalas on
0
Comments
Ok, #73 is Spell Shield now
#123 is Protected from Magical Energy
1. In vBG1 STATES.BAM has a dark background while STATES2.BAM has the greenish one. Now both have the STATES2 greenish one. Actually it seems vBG2 has the same fix: both BAMs are identical. :-D But if the BAMs are being changed, was the change to the spell necessary?
2. For all spell levels SPWI606 (Protection from Magical Energy) now creates Display portrait icon "Spell shield" (123), backward (and thus correct) from vBG2's use of Display portrait icon "Protection from Magical Energy" (73).
3. STATDESC.2DA... Well, I don't know.
Entry 73 = 25123 (Strref = "Magic Attack Cancelled")
Entry 123 = 25063 (Strref = "Protected from Magical Energy")
vBG2 uses:
Entry 73 = 8286 (Strref = "Protected from Magical Energy")
Entry 123 = 26228 (Strref = "Spell Shield")
@CamDawg
Not sure what that was supposed to have done, but now SPWI943.SPL that's called Dire Charm has a Spell description of "Protected from Magical Energy." Strref 25153 only shows up (according to NI) in MSECTYPE.2DA... At present SPWI606 is using Display string "Protection from Magic Energy", #26556. More lovely Dialog.tlk issues?
NOTES:
@Avenger_teambg is right though that Entry 7 = 54337, way out of bounds otherwise, I assume. Not sure what that affects, but maybe needs a new thread...
And the portrait icons are not fixed until they are displayed with the states bam font in the character status window too!!!
Dawg swapped entry 73 and 123, that's correct, but...
Magic Attack Cancelled is not the proper string for entry 73. It should be 'Spell Shield'
This one requires further tweaking.