[alert=Photoshop Indexing:]Click Image, Mode, Indexed Colour...
You will see a box like this come up:
Uh Oh! As you can see, when the palette is exact (i.e. every colour will be shown in the palette), I have used 17 colours in the image :surprised: If I had done it right, the Colours number should be 16.
Luckily for me Photoshop has a feature to limit the colours to a certain number (click the drop-down palette menu, click 'Local (Selective)' and type 16 in the colours box)
If the colours box says 16, you can proceed to the next step.
Also, untick transparency, since this adds another colour (transparent) to the palette. Pokemon ROMs don't handle transparency in this way, so it'd just be a waste of a palette slot.
Now that we have a 16-colour image, we have to index it and create the palette. If we just clicked OK now, Photoshop may not put the background colour in the first slot of the palette, which is really bad. The first colour in the palette will be transparent in the game, so we want the creamy-greeny-white colour to be in the first slot.
Click the drop-down menu under Forced, and choose Custom. Another box will pop up:
Click the first square in the new box, and a colour selection box will pop up. Click on the background colour of your new sprite, and click OK, OK, OK.
Guess what? Your new sprite is indexed, ready to be imported into your ROM. Click File, Save As and choose .png in the drop down menu. Save this file somewhere memorable. Proceed to Part 3.[/alert]
[alert=Irfanview Indexing]
Firstly, to index your sprite using IrfanView, open up your sprite in the program.
Click Image, Decrease Colour Depth. Choose 16 Colors (4 BPP), and make sure the 2 boxes are unticked. Click OK.
Now click Image, Palette. See the 16 colours there? Remember, the first colour in the palette will be transparent in game. For my Charmander sprite, we want the first colour to be the greeny-creamy-white background colour.
As you can see from this picture, IrfanView has made the first colour black. So how do we solve this problem? We swap the background colour with the first colour in the palette.
Click on the background colour in the palette:
Notice the circled bit in red down the bottom? These are the Red/Green/Blue values identifying that colour. Write this down somewhere. Click on the first colour in the palette and write down its RGB value too. My RGB values ended up being
Background Colour = [204, 202, 172]
First Colour = [20, 18, 20]
Now double-click on the first colour in the palette, a new window will pop up:
Replace the values in the box (circled in red in the pic) with the values of the background colour you just wrote down. Click OK. Do the same for the background colour, replace its RGB values with the first colour's values. Click OK.
Now your palette should have the background colour and first colour swapped:
Click OK again.
Your sprite will now look messed up. This is normal.
My sprite looks like this after swapping the colours:
No sprite available. Soz.
Just click File, Save As, and save this picture as a .PNG file. Close up IrfanView, and open your graphics editing program. I will use paint just as an example.
Open up the messed-up version of your sprite you just saved from IrfanView. Also open up the correctly coloured version of your sprite:
Now just copy all of the correct sprite across to the messed up sprite (I used Ctrl+A, Ctrl+C, then Ctrl+V into the other window):
[/alert]
Save this fixed up file as a .PNG file. Guess what? Your sprite is now correctly indexed and ready for insertion. Move to the next step