Restored BG1 mage sprites suffer from an engine limitation whereby they never show any armor levels other than unarmored (i.e. equipping any robe won't change their appearance.)
In order to circumvent the issue it is necessary to change all robes' appearance from 2W / 3W / 4W to 5A / 6A / 7A, then alter the relevant animation BAMs accordingly. This is the solution I used on the Enhanced Editions and it worked like a charm.
This is the code I'm using to change robes' appearance:
ACTION_DEFINE_ASSOCIATIVE_ARRAY ac_robes_map BEGIN 2W => 5A 3W => 6A 4W => 7A END COPY_EXISTING_REGEXP GLOB ~.*\.itm~ ~override~ READ_ASCII 0x22 current (2) PATCH_PHP_EACH ac_robes_map AS no => yes BEGIN PATCH_IF (~%current%~ STR_EQ ~%no%~) BEGIN WRITE_ASCIIE 0x22 ~%yes%~ #2 END END BUT_ONLY
I also have all BG1 mage sprites from Infinity Animations renamed to comply.
However, applying the code above and dumping the renamed BAMs into the override folder won't do. I reckon I need further code to tell the engine to use the renamed BAMs somehow?
Any help would be appreciated.