- 222
- Posts
- 7
- Years
- Seen Nov 18, 2023
In Emerald, the Intro Sprites are actually rather easy to edit. However, in FireRed, the process is much more involved, mostly because the sprites in question are not actually sprites, but considered part of the background. This causes some pros and cons:
This tutorial aims to address this process, because surprisingly I haven't found a tutorial for this for decomp, and it's a lot less straightforward than it honestly should be. I'll be using GIMP for this tutorial, but GraphicsGale should work too.
Part 1: Indexing the Image
1. First, you're gonna load up your image in the image editor of your choice. (Like I said, I'll be using GIMP). I'll be using an image of Paul Brown from TPP for this tutorial (Art courtesy of Megaman-Omega).
Make sure the image is 64x96 in size, even if your character doesn't take up the whole space. Also, fill the background in with another color like usual and turn off transparency (Layer -> Transparency -> Remove Alpha Channel). GIMP doesn't play well with transparency in indexed images. GraphicsGale might fare better here, but for the sake of following this tutorial go ahead and disable transparency too if you're using that program.
.
2. Next, you'll want to index the image like normal, ensuring the background color is first in the order. As this is an indexing tutorial for a specific resource, and not a general one, I will not cover that here and assume you already know how to index a normal image. Please note that you can have up to 32 colors! The total amount of colors should be either 16 or 32, even if you have to add some blank ones to make it work.
.
3. Now, you will add extra rows of colors to the colormap. Make sure you are using a color that is not in your image. I'm using hot pink in this example. If you are replacing Red or Leaf, add 4 rows, if you are replacing Oak or Blue, add 6 rows. This is because the palettes are loaded in different slots in-game. Note: If you are using GraphicsGale, there may be a bunch of empty rows below the ones you added. Worry not, that's just GraphicsGale being GraphicsGale. Just make sure you have the right number of rows that you added.
.
4. Rearrange the colormap to where your "real" colors are on the bottom row, as shown above. The "true" transparent color should remain in slot 0 as shown. If you are replacing Red or Leaf, your real colors should be on the 5th row, if you are replacing Oak or Blue they should be on the 7th row.
.
5. If you originally only had 16 colors (like in my example), add another row to the bottom. If you originally had 32 colors, skip this step.
.
6. You're done with the indexing part! Export the image into the graphics/oak_speech folder, overwriting red_pic.png, leaf_pic.png, oak_pic.png, or rival_pic.png. Then, move on to part 2 of this tutorial.
Part 2: Editing the Palette File
1. Locate the corresponding .pal file to the picture file you edited. red_pic.png has a red_pal.pal, oak_pic.png has an oak_pal.pal, etc.
.
2. Open your terminal and navigate to where you would usually run make. Then run the following command, replacing red_pic.png and red_pal.pal with the files for the person you're trying to replace:
This should modify the .pal file you located earlier, using the palette from the png you just indexed.
.
3. Open up your .pal file. You should see either 80 or 112 as the number of colors, depending on whether you added 4 rows or 6 rows back in part one. If you see a different number, you did part 1 incorrectly. Note: the decomps will only accept .pal files with CRLF file endings. If you are on Windows, you don't need to know what this means, but otherwise, you should make sure you are using a text editor that preserves line endings.
.
4. Change the number of colors to 32.
.
5. Keeping the header and "number of colors" lines, delete all the colors in the file except for the last 32, including the "real" transparent color. Your final pal file should be exactly 36 lines including the newline at the end of the file.
Example Pal File:
And now you're done! Congrats! You can go ahead and build your ROM now.
I hope this tutorial helps some people. Feel free to ask questions in the thread below.
- The image can contain 32 colors instead of 16.
- The image can be 64x96 instead of 64x64.
- However, it is difficult to index the image properly.
- The .pal file also needs to be hand-edited.
This tutorial aims to address this process, because surprisingly I haven't found a tutorial for this for decomp, and it's a lot less straightforward than it honestly should be. I'll be using GIMP for this tutorial, but GraphicsGale should work too.
Part 1: Indexing the Image
Spoiler:
![[PokeCommunity.com] [FireRed] How To Edit The Intro Sprites [PokeCommunity.com] [FireRed] How To Edit The Intro Sprites](https://cdn.discordapp.com/attachments/875083342066909295/884095814228656158/1.png)
1. First, you're gonna load up your image in the image editor of your choice. (Like I said, I'll be using GIMP). I'll be using an image of Paul Brown from TPP for this tutorial (Art courtesy of Megaman-Omega).
Make sure the image is 64x96 in size, even if your character doesn't take up the whole space. Also, fill the background in with another color like usual and turn off transparency (Layer -> Transparency -> Remove Alpha Channel). GIMP doesn't play well with transparency in indexed images. GraphicsGale might fare better here, but for the sake of following this tutorial go ahead and disable transparency too if you're using that program.
.
![[PokeCommunity.com] [FireRed] How To Edit The Intro Sprites [PokeCommunity.com] [FireRed] How To Edit The Intro Sprites](https://cdn.discordapp.com/attachments/875083342066909295/884096658646913054/2.png)
2. Next, you'll want to index the image like normal, ensuring the background color is first in the order. As this is an indexing tutorial for a specific resource, and not a general one, I will not cover that here and assume you already know how to index a normal image. Please note that you can have up to 32 colors! The total amount of colors should be either 16 or 32, even if you have to add some blank ones to make it work.
.
![[PokeCommunity.com] [FireRed] How To Edit The Intro Sprites [PokeCommunity.com] [FireRed] How To Edit The Intro Sprites](https://cdn.discordapp.com/attachments/875083342066909295/884098542896054282/3.png)
3. Now, you will add extra rows of colors to the colormap. Make sure you are using a color that is not in your image. I'm using hot pink in this example. If you are replacing Red or Leaf, add 4 rows, if you are replacing Oak or Blue, add 6 rows. This is because the palettes are loaded in different slots in-game. Note: If you are using GraphicsGale, there may be a bunch of empty rows below the ones you added. Worry not, that's just GraphicsGale being GraphicsGale. Just make sure you have the right number of rows that you added.
.
![[PokeCommunity.com] [FireRed] How To Edit The Intro Sprites [PokeCommunity.com] [FireRed] How To Edit The Intro Sprites](https://cdn.discordapp.com/attachments/875083342066909295/884143391280082995/4.png)
4. Rearrange the colormap to where your "real" colors are on the bottom row, as shown above. The "true" transparent color should remain in slot 0 as shown. If you are replacing Red or Leaf, your real colors should be on the 5th row, if you are replacing Oak or Blue they should be on the 7th row.
.
![[PokeCommunity.com] [FireRed] How To Edit The Intro Sprites [PokeCommunity.com] [FireRed] How To Edit The Intro Sprites](https://cdn.discordapp.com/attachments/875083342066909295/884144908678602843/5.png)
5. If you originally only had 16 colors (like in my example), add another row to the bottom. If you originally had 32 colors, skip this step.
.
6. You're done with the indexing part! Export the image into the graphics/oak_speech folder, overwriting red_pic.png, leaf_pic.png, oak_pic.png, or rival_pic.png. Then, move on to part 2 of this tutorial.
Part 2: Editing the Palette File
Spoiler:
![[PokeCommunity.com] [FireRed] How To Edit The Intro Sprites [PokeCommunity.com] [FireRed] How To Edit The Intro Sprites](https://cdn.discordapp.com/attachments/875083342066909295/884147030530883645/unknown.png)
1. Locate the corresponding .pal file to the picture file you edited. red_pic.png has a red_pal.pal, oak_pic.png has an oak_pal.pal, etc.
.
![[PokeCommunity.com] [FireRed] How To Edit The Intro Sprites [PokeCommunity.com] [FireRed] How To Edit The Intro Sprites](https://cdn.discordapp.com/attachments/875083342066909295/884148552136261733/unknown.png)
2. Open your terminal and navigate to where you would usually run make. Then run the following command, replacing red_pic.png and red_pal.pal with the files for the person you're trying to replace:
Code:
./tools/gbagfx/gbagfx graphics/oak_speech/red_pic.png graphics/oak_speech/red_pal.pal
.
![[PokeCommunity.com] [FireRed] How To Edit The Intro Sprites [PokeCommunity.com] [FireRed] How To Edit The Intro Sprites](https://cdn.discordapp.com/attachments/875083342066909295/884152208805994506/Untitled.png)
3. Open up your .pal file. You should see either 80 or 112 as the number of colors, depending on whether you added 4 rows or 6 rows back in part one. If you see a different number, you did part 1 incorrectly. Note: the decomps will only accept .pal files with CRLF file endings. If you are on Windows, you don't need to know what this means, but otherwise, you should make sure you are using a text editor that preserves line endings.
.
![[PokeCommunity.com] [FireRed] How To Edit The Intro Sprites [PokeCommunity.com] [FireRed] How To Edit The Intro Sprites](https://cdn.discordapp.com/attachments/875083342066909295/884153463267795005/unknown.png)
4. Change the number of colors to 32.
.
5. Keeping the header and "number of colors" lines, delete all the colors in the file except for the last 32, including the "real" transparent color. Your final pal file should be exactly 36 lines including the newline at the end of the file.
Example Pal File:
Spoiler:
Code:
JASC-PAL
0100
32
255 0 227
0 0 0
58 42 39
47 55 54
40 58 84
105 44 49
107 74 60
41 90 148
115 82 26
159 68 66
216 96 97
190 122 23
150 151 164
222 165 109
248 165 56
239 242 247
255 0 227
255 0 227
255 0 227
255 0 227
255 0 227
255 0 227
255 0 227
255 0 227
255 0 227
255 0 227
255 0 227
255 0 227
255 0 227
255 0 227
255 0 227
255 0 227
And now you're done! Congrats! You can go ahead and build your ROM now.
I hope this tutorial helps some people. Feel free to ask questions in the thread below.