This is a problem I encountered a while back working on EN. If you want to expand the generic minimugs, the game can’t actually read entries greater than 0x06. For whatever aethereal reason, it just won’t work. Which means the Etrurians can’t have their own unique generic icon. Ideally, I’d have one for each enemy faction, but the game can’t even display 0x07 (which it has a graphic for by default).
It’s quite bizarre; the first entry seems to denote “use minimug from portrait data”, whereas the second points to the last minimug graphic (the one I can’t get to display). The third entry points to the graphics displayed for 0x01. Then, the pointer array seems to continue for another three lines (I’m not sure what any of this does, because changing these pointers seem to have no effect on minimug displays).
04 CD 0C 08 04 CD 0C 08 04 CD 0C 08 80 BF 3F 08
30 BF 3F 08 DC BE 3F 08 80 BE 3F 08 DC BD 3F 08
34 BD 3F 08 00 00 00 00 00 00 00 00 08 00 00 00
Yes, I’ve tried repointing the graphics and repointing the array.
Ideally, I’d like to repoint both of the tables to allow for more than 0x07. FE8 does NPC variants with a green palette (that’d be neat to port over), and there are a few others I’d like to include in EN.
Thanks for catching that! I thought I undid that repoint, but apparently not.
Anyways, I tried to take advantage of the repointed tables (moved the palette table down to BE23D0) and add some more generic minimugs. Same glitch, except now it won’t allow for entries > 0x07. Would it be possible to just have an arbitary limit based on the number of entries in the table?
The routines simply don’t just read the pointer tables from the ROM; they load 7 table entries into RAM then read it. This isn’t done just one time, but apparently every time a generic mini-mug needs to be used. The stack pointer gets reset afterwards anyways, so it makes me wonder if loading the table into RAM is even necessary or just the code being weird. Also, the palette routine calls another routine near the end that might mess with something else too.