Skip to content

Adding a New Sprite Palette

Gabbi (Rickisthe1) edited this page Dec 27, 2024 · 4 revisions

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

This is one of the most common questions in sprite hacking, and for good reason! Almost every hacker has asked this at some point. Fortunately, it’s possible to add new colors, but there are some limitations to keep in mind due to how CoilSnake, EarthBound's programming, and SNES hardware function.

Limitation: There Can ONLY Be 8 Palettes

The Super Nintendo hardware has a hard limit of 8 available slots for sprite palettes. EarthBound doesn’t swap these palettes during gameplay, so the game uses the same 8 palettes throughout. To add a new palette, you'll need to overwrite one of the existing ones.

You may have noticed a file called sprite_group_palettes.yml in your project, which contains the RGB values for these 8 palettes. However, simply changing these values is not enough. Doing so without proper steps will result in CoilSnake errors, as it will be unable to find the palettes linked to sprites.

In order for your new palette to work, you must also modify all the sprites that use the overwritten palette. These sprites will either need to be linked to the new palette or another existing palette.

The Spritegroup Palette Manipulator

Fortunately, a tool has been created to automate this process and make things much easier! The Spritegroup Palette Manipulator was created by Chaz and can help you modify palettes while managing which sprites use them.

You can access the tool here:
[Spritegroup Palette Manipulator](https://www.compnode.net/coilsnake/spritegroup-palettes.html)

How to Use the Tool:

  1. Open the CoilSnake Project: Start by clicking "Open CoilSnake project directory" and selecting the main folder of your project. This will load the tool’s interface, displaying the 8 palettes and a list of all the sprites that use each one.

    Manipulator Interface

  2. Choose Which Palette to Overwrite: You’ll need to decide which palette to overwrite. Keep in mind that changing a palette will affect all sprites that use it. Make sure to consider this before making your choice.

  3. Move Sprites to Another Palette: Let’s say you want to overwrite palette 0 and move all sprites that use it to palette 2. Use the drop-down menus at the top to select the palettes to move, then click "Rewrite."

    Overwriting Palette

    After this, palette 0 is free to use for your new sprite. You can open sprite_group_palettes.yml, change the RGB values, and add your new sprite using those colors.

  4. Verify Your Changes: Once you’ve finished, use the "Refresh" button to reload the tool and ensure that the changes were applied correctly.

    If any issues arise, such as a "Bad Palette" message, it’s likely due to incorrect indexing of the palette in the sprite PNG or errors in the color values. Don’t worry though, you can correct this directly in the tool by forcing the palette to be fixed.

    Bad Palette Fix

Conclusion

Using the Spritegroup Palette Manipulator, you can easily free up one of the 8 palettes and use it for your custom sprite. While you can't add more palettes to the game, this tool makes it simple to swap palettes and manage sprite color changes without much hassle.

Clone this wiki locally