Thread: [Tutorial] Indexing and Inserting Sprites
View Single Post
Old July 21st, 2008 (7:51 AM). Edited April 15th, 2010 by Logan.
destinedjagold's Avatar
destinedjagold destinedjagold is online now
Oh Hai Thar~
  • Silver Tier
Join Date: May 2007
Location: Philippines
Age: 27
Gender: Male
Nature: Careful
Posts: 8,580
destinedjagold's Sprite Indexing and Inserting Tutorial
Before anything else, here's RedYoshi's Indexing Sprites Tutorial, where I based my tutorial.
Oh, and if you find this tutorial difficult to understand, try viewing the video tutorial I have uploaded entitled 'How to Insert Sprites'

Okay, so hi everyone. I am destinedjagold, a ROM hacker/modder who stinks at spriting, but is showing you a spriting tutorial. o.O
Anyways, this thread is updated now since I lost my images. Blame PhotoBucket -__- ...
Anyways, I hope you'll find this tutorial useful, and pardon me for reusing this old thread of mine.
Since I saw this thread's still open, I decided to update it instead of making a new one. Might be a waste of space in the forums.

What You Need...
  • ROM
  • Unlz-GBA
  • MS Paint
  • Your sprite
  • IrfanView
  • Hex Editor (I'll be using Hex Workshop)

Before Anything Else...
Remember to make a back-up of your ROM. Just in case you messed something up.
Remember the golden rule in ROM-hacking... "SAVE BACK-UP"...


Step 1...
1. Open your sprite through MS Paint. Then resize it to 64x64. If it's too big, then you'll have to reduce it. How? It's up to you. :\
2. Pick a colour which is not used by the sprite. Exampe, HAUNTER has a purple pallete, so you have to use Yellow or Orange or Cyan as it's back colour.

Step 2...
1. After you saved your 64x64 sprite, open it with IfranView (if you don't have one, Google it).
2. Then on the 'Image' tab, click the 'Decrease Color Depth'.
3. A little window will show up. From 256, change it to 16 colors and press 'Ok'.
4. Then go to the 'Image' tab once again, but this time, go to 'Palletes' and click 'Edit Pallete...'.
5. A window will show up. You will see all 16 colours the sprite uses. On the left-most pallete/color, change it to the same color of the background color. Then change the other color which is the same color as your background color to the color you replaced in the left-most pallete/color.
6. Click 'Ok'. Then you'll have to save it. But here's a trick to make things easier. Don't replace your old 64x64 sprite. Save it with a different name.

Step 3...
1. Open both your sprites;the IrfanView and the MS Paint ones.
2. Press CTRL+A or Select All on your old 64x64 sprite, and then Copy it.
3. Paste it on the MS Paint where you opened the sprite you edited through IrfanView. This will lessen the burden of fixing your sprite, in case it has been pixelized by IrfanView.
4. Save it. In this step, you can now delete the unindexed sprite to avoid confusion.

Step 4...
1. Open your ROM with Unlz-GBA.
2. Find the old PKMN sprite you want to replace.
3. Click on the 'Import' button and select your newly indexed sprite.
4. Click the 'Write to ROM' button.
5. A window will pop-up. Check the 'Automatically Fix Pointers'.
6. Open your ROM with a Hex Editor and find a free space for your new sprite. You can use FSF as well if you want to. Memorize the free offset.
7. Close your FSF, or any programs that opened your ROM as well, such as A-Text or A-Map and the like.
8. Type the offset on the 'Image Offset' box. Don't remove those two zeros.
9. Click on the OK button and you're done. If a pop-up window appears and states 'Ptr found at <offsets go here>. Changed.'.., then it means that you have successfully inserted a new sprite, or rather replaced an old sprite for a new one! Horay!
10. You can do the same for it's palletes, of if you're too lazy to run a search for free offsets, you can use APE or just check the 'Export Pallete', but remember to uncheck the 'Automatically Fix Pointers'.
11. Test it out on your ROM.

Indexing the backsprite...
June 4, 2009

Okay... Now you know how to index and insert your new POKéMON's front sprite.
But now you ask, how to do the backsprite?
It's quite simple, actually...
Now, I'm gonna use Stormidran, Samson's fakemon.

I am assuming that by this time, you already know how to index your front sprites...


1. Open both your POKéMON's front and back sprites...

2. Select All, then Copy your back sprite and paste it to your front sprite. Don't forget to make the background the same as your front sprite...

3. Open the back sprite of the POKéMON that you will replace. In this example, I'll replace Tropius...

4. Select All, then copy the back sprite of the POKéMON you'll replace and paste it to your back sprite. Notice that both back sprite is 'cut'. If you aren't bothered, put a line starting from the replaced POKéMON's back sprite to your new back sprite...

5. After doing that, you should put the 'cut' of your new back sprite on the line, so it won't look floating on the game.

6. After making sure that the new sprite's on the same level of the replaced sprite, turn it back to 64x64 in size, save it, and it should be in .png format...

7. Then, open your ROM in Unlz-GBA and go to your replace-to-be back sprite. The same to inserting the front sprite, first try if you can insert it by checking both 'Auto abort if new data is bigger' and 'Export Image'...

8. And if your new sprite's bigger, simply search for free offset, click 'Auto abort if new data is bigger', 'Export Image' and 'Automaticly Fix Pointers'...

You might be asking about the back sprite's pallete if it will also be included to export.
Well, since you already inserted the front sprite along with the front sprite's pallete, you need not to export the back sprite's pallete, as long as you copied your back sprite and pasted it on your indexed front sprite.


Okay. I hope that this will help you all to insert new sprites for your hacks/mods. ;)
I had fun updating this tutorial though.
Thanks for sparing time to read this tutorial. :)
Well, good luck and have fun hacking/modding!

FC: 0061-1111-6462
TSV: 1364(X), 0790(OR)

Reply With Quote