Skip to content

Adding a New Sprite Palette

ethan edited this page Jul 2, 2024 · 3 revisions

"I want to make a sprite with colors that aren't available in the default palettes. What can I do???"

This is the Number 1 Most Asked question of hacking. I'm 97% sure 94% of all of us asked this at some point. But don't worry, because it's easy to solve! Just a little complicated due to the way Coilsnake, EarthBound's programming, and the SNES hardware work.

Limitation: There can ONLY be 8 palettes

The Super Nintendo has 8 slots reserved for sprite palettes in its hardware. Nothing can be done about this. Many games used a system where those palettes could be swapped out over the course of the game, but EarthBound does not do this, it uses the same 8 palettes throughout the entire game. This means that, if you want to add a new palette, you'll have to get rid of one first.

You may notice there is a file in your project called sprite_group_palettes.yml, which contains the 8 palettes and the RGB values they have. But don't go right in changing them, or else Coilsnake will yell at you and you will cry. This is because if you change a palette, then suddenly every sprite that used to use that palette will now use a nonexistent palette. In order for this to work, you also need to go through every single sprite and make it use an existing palette, either forcing them to use the modified one or force them to use a different one.

The Spritegroup Palette Manipulator

Chaz has blessed us all and created a wonderful tool that will automate a lot of the work for us! Find it here:

https://www.compnode.net/coilsnake/spritegroup-palettes.html

Hit "Open CoilSnake project directory" and select the main folder of your project. This will load up a lovely view that shows all the 8 palettes, and lists every sprite that uses each one.

screenshot of a project open in the Manipulator

Now take a look at these, and decide which palette you want to overwrite. Keep in mind that whichever palette you pick, all the sprites that use it will have their colors changed, so keep that in mind while making your choice.

Let's say I've decided to overwrite palette 0, and will move all the sprites using it to palette 2. Just set those options in the drop down boxes at the top, and hit "Rewrite"!

image

Now, palette 0 is completely free to use. You can open up sprite_group_palettes.yml and set those RGB values to whatever you want, and then make a new sprite that uses those colors! Once you're done, double check it's correct in the Manipulator (You can hit "Refresh" to reload and show the changes you made)

If it says anything about a "Bad Palette", that might be because you indexed the palette wrong in the sprite PNG, or got the colors off on accident. But don't worry, you can force the Bad Palette to be correct in this tool too.

image

Clone this wiki locally