[SoD Help] Patching the Flaming Fist
AndreaColombo
Member Posts: 5,530
In the Nostalgia Pack I've got code to change all Flaming Fist sprites to Cleric to match the classic BG1 aesthetic. This is necessary after using the NP component that restores BG1 sprites for that component reads a CRE's class and applies the relevant sprite—but most Flaming Fist CREs belong to the Fighter class, even though they were deliberately given a Cleric sprite in the original game.
Wherein lies the problem, then?
Some CREs aren't getting their Cleric sprite and I don't know why.
It is the case, for example, with BDFFMERC.CRE.
The code starts off with an associative array that matches Fighter sprites to Cleric sprites:
It's pretty long, so I'm only quoting the first line for brevity.
It then proceeds to changing select Flaming Fist CREs accordingly (including their colors.) I'm cutting the list to just BDFFMERC.CRE for simplicity's sake:
Most CREs are in fact getting the Cleric sprite, but this one in particular (alongside a few others) isn't. I'm all out of theories as to the reason. Any ideas?
Wherein lies the problem, then?
Some CREs aren't getting their Cleric sprite and I don't know why.
It is the case, for example, with BDFFMERC.CRE.
The code starts off with an associative array that matches Fighter sprites to Cleric sprites:
ACTION_DEFINE_ASSOCIATIVE_ARRAY animation BEGIN 0x6100 => 0x6000 // human male fighter to cleric
It's pretty long, so I'm only quoting the first line for brevity.
It then proceeds to changing select Flaming Fist CREs accordingly (including their colors.) I'm cutting the list to just BDFFMERC.CRE for simplicity's sake:
ACTION_FOR_EACH creature IN ~bdffmerc~ BEGIN ACTION_IF (FILE_EXISTS_IN_GAME ~%creature%.cre~) THEN BEGIN COPY_EXISTING ~%creature%.cre~ ~override~ READ_LONG 0x28 anim WRITE_BYTE 0x2c 35 // metal color WRITE_BYTE 0x2d 46 // minor color WRITE_BYTE 0x2e 63 // major color WRITE_BYTE 0x30 63 // leather color WRITE_BYTE 0x31 30 // armor color PATCH_IF (VARIABLE_IS_SET $animation(~%anim%~)) BEGIN WRITE_LONG 0x28 $animation(~%anim%~) END BUT_ONLY END END
Most CREs are in fact getting the Cleric sprite, but this one in particular (alongside a few others) isn't. I'm all out of theories as to the reason. Any ideas?
0
Comments
What are the race and class on this particular creature?