Skip to content

[SoD Help] Patching the Flaming Fist

AndreaColomboAndreaColombo Member Posts: 5,525
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:
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?

Comments

  • jmerryjmerry Member Posts: 3,829
    Most Flaming Fist mercenaries get the male human cleric sprite, true. But not all of the Flaming Fist are male humans. Officer Vai, for example, gets the female human cleric sprite.

    What are the race and class on this particular creature?
  • AndreaColomboAndreaColombo Member Posts: 5,525
    I only quoted the first line of the associative array for brevity but it covers all races and both sexes. I’ll share the TPH file when I’m at the computer.
  • AndreaColomboAndreaColombo Member Posts: 5,525
Sign In or Register to comment.