Compressed Generic Palette editing

What you’ll need is Feditor, a ROM, nintenlord’s compressor, a hex editor(I use HxD), and your palette(s) of course.

First thing to do is find the animation you want the generic palette to in Feditor(as in the animation). I’ll use the male mage as an example because it’s fairly simple.

see the part I have highlighted? that’s what you came looking for.
Now, open your ROM in the hex editor and search for that text string.

now you want to look for the next name in the text side(in my case it’s magf_mg1). Usually I highlight it to see exactly where it starts in the hex.

this is the beginning of that animation’s data, but the 4 bytes that come before it(or the last 4 bytes of the animation you’re looking for) are what’s actually important.
In this case they are

F4 A0 EF 08

^ this is the address to that animation’s compressed palette



Now, open up Nintenlord’s compressor.
You’ll want to make sure your screen looks something like this:

Input should be your ROM, output should be a blank .dmp file. Make sure to make the compression LZ77(this should look familiar to any older hackers). Put your offset into the “Input Info Offset” section and leave everything else blank. Run it and your file should look something like this.

see those 80 bytes? those are the 4 palettes you see for units(well 3, you don’t normally ever see the 4th).
The order of the 20 byte palettes is

basically what you want to do is replace the enemy one(and any others you wish to replace) and save your .dmp file.

Now you need to just compress the data, which isn’t too difficult.

your input should be the file you just edited and your output should be a new empty .dmp file.
run it, and copy that data into free space in your ROM.

Let’s say you put the data in at 0x9124356(totally not a made up offset), you want to go back to where you found the original palette offset and replace it with the new one.

F4 A0 EF 08 --> 56 43 12 09

and that’s it.

Side note:
for animations with multiple animations like the brigand(axe, handaxe, unarmed) or eliwood knight lord(sword, lance, durandal, unarmed), you’ll need to find and replace all of the palette offsets. However, you should only need one actual compressed palette(unless you want the palette to change for some reason).