Seen 4 Weeks Ago
Posted April 10th, 2022
1,305 posts
11.5 Years
Inserting Custom Sprites in Pokéemerald
I'm going to assume you already have Pokéemerald set up. If you're unsure of how to do that, check out ProjectRevoTPP's tutorial. The sprite editing process is the same for Pokéruby if you'd prefer to use that but why would you.
A tool named GraphicsGale makes editing images and palettes for GBA ridiculously easy, you can get yourself a copy here.
You'll also want Notepad++ for editing files (optional).
Indexing Sprites

I've already covered how to index sprites in another thread already, but it seems like people were skimming past the sentence where I linked it here, so I'll just repost in the spoiler below.

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 as seen above.
When you've done that, 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 to do this!
Even though your image now has a total of 16 colours - technically, your image can only use 15 of those.
Why? The first colour in the palette index will serve as our transparent colour, as per the GBA requirements.

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

Paste/Ctrl+V over it, and boof, it now looks normal again! Sorted.
Export, insert into your ROM, and test.

Replacing Sprites

This method can be used to replace a wide variety of sprites with your own - such as the bags, item icons, etc. Any 16 colour sprite. The method is the same for Pokémon, the only difference there is that you need an extra palette for the shiny version, so I didn't think Pokémon sprites needed their own guide. Although if there are any requests for that, I'll make an addition to this tutorial. For example purposes we'll refer to trainer sprites.

To get started, grab an indexed sprite you want to insert (should be in .png format) and rename the file to give it the same name as the sprite you'd like to replace. For tutorial purposes, I'm using my own hiker trainer sprite to update the standard one, so I'll name it “hiker_front_pic”. The trainer sprites are located in “pokeemerald\graphics\trainers\front_pics”. Open your sprite in GraphicsGale.

Click the little arrow outlined in red above and hit “Save Palette”. Navigate to “pokeemerald\graphics\trainers\palettes”. Save your new palette over the top of the one you want to replace. For me, that's “hiker.pal”. Now go back to the “front_pics” folder. Delete the original sprite (“hiker_front_pic.png” for tutorial reference) and replace it with your own. Compile, test and... yeah, you're done!
If that didn't work for you for whatever reason, click the spoiler and try this way... longer winded but foolproof.
After you've replaced the .pal file, open the sprite you want to replace - “hiker_front_pic.png” for me. Click that little arrow again and hit "Load Palette". Load your new palette.

You'll get a screen that looks like the above, comparing your new palette with the current one. Click "All" and the default image will now include the new colours. All that's left to do now is Ctrl+A to "Select All" on your new sprite, then "Ctrl+V" to paste it on top of the default one. Save, compile and test.

Inserting New Trainer Backsprites

The method for trainer backsprites is pretty much the same. There's just an extra little thing to be aware of: player backsprites actually use the same palette as the player front sprites. If you’re happy for your back and front hero/heroine sprites to share a palette, all you have to do is overwrite “brendan.pal” or “may.pal” with your new palette. After you've done that, overwrite the old sprite(e.g. “brendan_back_pic”) with your new one, compile, test and you're done!

But I don’t want my trainer backsprite to share a palette with its front sprite! Fear not, it’s really easy to de-link them and it’ll only take you a few minutes; it’s just a matter of editing three files. Read on or if you're viewing this as a single post click here.


Seen 4 Weeks Ago
Posted April 10th, 2022
1,305 posts
11.5 Years
De-linking Palette Sharing Between Player Back & Front Sprites

OK, so firstly you’ll want to save your new backsprite pals from the indexed image to the “palettes” folder in “graphics\trainers”. For easiness, I’ve named mine “brendan_back” and “may_back” to go with the sprite names. The next thing we have to do is define the new labels we'll use for our separate backsprite palettes. Navigate to “pokeemerald\include”. Open "graphics.h" in Notepad++ and add the following two lines:
extern const u32 gTrainerBackPicPalette_Brendan[];
extern const u32 gTrainerBackPicPalette_May[];

I’ve //commented the lines in the picture for the sake of this guide so you can see where I’ve put them.
Now go to “pokeemerald\src\data\graphics\trainers.h”. Add the following two lines:
const u32 gTrainerBackPicPalette_Brendan[] = INCBIN_U32("graphics/trainers/palettes/brendan_back.gbapal.lz");
const u32 gTrainerBackPicPalette_May[] = INCBIN_U32("graphics\trainers\palettes\may_back.gbapal.lz");

Finally, navigate to “pokeemerald\src\data\trainer_graphics\back_pic_tables.h” and add your new palette references here. For example, change this:
const struct CompressedSpritePalette gTrainerBackPicPaletteTable[] = 
    gTrainerPalette_Brendan, 0,
    gTrainerPalette_May, 1, 
To this:
const struct CompressedSpritePalette gTrainerBackPicPaletteTable[] = 
    gTrainerBackPicPalette_Brendan, 0,
    gTrainerBackPicPalette_May, 1, 
Like so:

Compile, test, and there you have it! You should now have separate palettes for your player back and front sprites, so you don't have to worry about colours between the two matching.
Seen November 12th, 2022
Posted September 18th, 2021
8 posts
7.1 Years

Don't know where else to really ask this, but where in the pokeemerald depository could one edit the palettes of the "walking, surfing..." from the overworld sprite of character?
Pokemon an trainer battle sprites I get , but I don't know where the palettes of those sprites are stored and how to adjust them?

Thanks in advance, and happy belated Bunny day!
Seen April 15th, 2023
Posted April 15th, 2023
1,406 posts
9.1 Years
So the various palettes are in
, and the particular palettes used by each animation are listed in

For example:
const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BrendanNormal = {0xFFFF, OBJ_EVENT_PAL_TAG_8, OBJ_EVENT_PAL_TAG_10, 512, 16, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, gObjectEventImageAnimTable_BrendanMayNormal, gObjectEventPicTable_BrendanNormal, gDummySpriteAffineAnimTable};

const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MayNormal = {0xFFFF, OBJ_EVENT_PAL_TAG_17, OBJ_EVENT_PAL_TAG_10, 512, 16, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, gObjectEventImageAnimTable_BrendanMayNormal, gObjectEventPicTable_MayNormal, gDummySpriteAffineAnimTable};
Brendan's regular walking animation uses palette 8, and (IIRC) his reflection uses palette 10, whereas May uses 17 and 10.
Seen August 2nd, 2022
Posted April 22nd, 2020
5 posts
10.1 Years
Hi, I tried to do that but when I replace the sprite the compiler won't take into account the new file. Everytime I need to force it with -B to recompile everything to make it work (which of course takes time). Do you have any idea why ?

Also, when the sprite is imported the background appears in white even though it is transparent in photoshop. I am not very familiar with palettes and sprites so maybe I missed something ?
Note that when imported in a clean ROM using old-fashioned ways (Advanced Sprite Editor) the transparent background works.

Edit: I tried with the Gale software from your guide before asking. Same result
Edit2: Found out about the transparency, it is because the transparency color in the palette is the last oneinstead of the first. No idea how to fix this, I've been looking for hours for a tool to switch palette order without destroying the image but no luck
Edit3: Fixed transparency issue by opening the image in GraphicsGale then All Frame > Color Depth > 16 Colors. This creates an image with the correct palette
Seen November 16th, 2022
Posted August 5th, 2020
11 posts
4.1 Years
Hi, I tried to do that but when I replace the sprite the compiler won't take into account the new file. Everytime I need to force it with -B to recompile everything to make it work (which of course takes time). Do you have any idea why?
It's likely a dependency issue with make. I've had success with manually deleting the .4bpp/.gbapal files to trigger a rebuild.


Random Uruguayan User

Montevideo (Uruguay)
Seen 2 Hours Ago
Posted 1 Week Ago
3,006 posts
14.7 Years
How do you change the actual player icon sprites
What do you mean by "player icon sprites"? The overworld sprites of Brendan and May? They're located in pokeemerald\graphics\object_events\pics\people.
To modify them, you can use your favorite image editing software. Just keep in mind they must have a maximum of 16 colors (with the color in the first slot of its palette being the same one used as the background color).
Seen 2 Weeks Ago
Posted February 18th, 2022
49 posts
4.5 Years
For some weird reason the sprites aren't changing. I changed the palette and the sprite exactly like you did but it's still showing the original sprite once I run a test to see if it changed.
run "make clean" and then your normal "make" again, that could be the problem
Age 17
Seen October 1st, 2021
Posted January 5th, 2021
37 posts
4.4 Years
Me:Yveltal use Oblivion wing
Seen February 13th, 2022
Posted February 13th, 2022
2 posts
1.3 Years
Okay, so I'm kind of slow at all this stuff, and sprites have nearly given me an aneurysm. I have an issue where, following the steps above for just regular editing, my front and back sprites look awesome but my OW ones have issues. I left Brendan as he is for now by my May sprite has new colors, and when a trainer [!] come up, its like dull orange for the '!' with a yellow tint for the white, and the surf mon is a couple colors of green. I'm not quite sure how to use the information already on this thread so far to fix the issue. Thanks in advance!
Seen December 12th, 2022
Posted December 12th, 2022
1 posts
180 Days
Hiya, I'm trying to give castform a sandstorm form. However, it leads to very unstable behavior.
I've created sprites for anim, front, and back, as well as normal+shiny palletes, they're all fine.
In battle.h there's this bit:
#define CASTFORM_ICE 3
#define CASTFORM_SUBSTITUTE (1 << 7)
I've added the ground type, and upped the num from 4 to 5.

In battle_anim_mons.c there's 3 arrays for the types, I've updated those too
(such as this one)
static const u8 sCastformElevations[NUM_CASTFORM_FORMS] =

I've updated the CastformDataTypeChange in battle_util.c

And in the graphics_file_rules.mk I changed added the sandy sprites.
$(CASTFORMGFXDIR)/front.4bpp: $(CASTFORMGFXDIR)/front_normal_form.4bpp \
$(CASTFORMGFXDIR)/front_sunny_form.4bpp \
$(CASTFORMGFXDIR)/front_rainy_form.4bpp \
$(CASTFORMGFXDIR)/front_snowy_form.4bpp \
$(CASTFORMGFXDIR)/front_sandy_form.4bpp \
@cat $^ >[email protected]

The game compiles just fine, but it breaks castform entirely. Catching one might do one of the following: Nothing special, stop audio, override audio with glitch sounds, freeze game, restart game.
Having it transform into the sandy form will freeze animation, but not the audio. It freezes in the blocky state, but the colour of the blocks does already match the correct pallette.

I think it's likely a ram issue, that the 1 extra entry in the array of castform forms (castforms?) causes an overflow later on, but I don't know how to fix that. I've been looking everywhere I can, and can't find it, so out of desperation I'm posting here, I hope you can help :P