Thread: [Tutorial] Indexing Images
View Single Post
Old 1st March 2018, 08:37 PM  
Join Date: Nov 2013
Posts: 32
Post Indexing Images

Indexing Images

Seeing as many old tutorials no longer have pictures and some contain outdated methods requiring multiple tools, I felt we were in need of a new tutorial! In short, many images in the third generation of games have a 16-colour limit, which is why indexing is required.
For the purposes of this guide, we're going to index a custom trainer sprite so that it's ready to be inserted. You'll need a ROM of your choice, a sprite you'd like to add to your hack and a tool named GraphicsGale which you can download here.


The first thing you'll want to do is open your sprite in GraphicsGale, highlight "All Frames", then hit "Color Depth".

We want to set this to 4bpp and click "OK". You'll notice that your palette has been trimmed down to 16 colours. Select your entire image at this stage, and hit Ctrl+C to copy. Don't forget!
Even though your image now has a total of 16 colours - technically, your sprite can only use 15 of those. Why? The background colour is going to be transparent in-game; or else we'll have a big green square surrounding our sprite when we see it before a battle. Not exactly ideal! The first colour in the palette should be the one that's going to serve as your transparent one.

Notice that in the above image our first colour is black; not the greenish tone that we want to be our background. How do we fix this? Simply click on the colour, in our case black, and swap the values around with our green. We'll end up with this:

Paste over it, and boof, it now looks normal again! Next we ensure the transparency - open up the image's properties tab circled in red below.

All you have to do is check "Transparent Color" and choose it with the picker, and you're done! Save as a .bmp file if you're inserting with NSE (.png if you're using pokeruby/pokeemerald), insert into your ROM, and test.

Last edited by Avara; 16th December 2018 at 12:11 AM.
Avara is offline   Reply With Quote
Likes Lunos, Luna liked this post