The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources
Reload this Page Tutorial [R/S] Different Palettes for Front and Back Sprites and other good stuff!
Sign Up Rules/FAQ Daily Battle Blogs Mark Forums Read

Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.
New threads in this forum are to be approved by a moderator before they are displayed.

Thread Tools
Old June 13th, 2010 (6:47 PM). Edited June 14th, 2010 by xGGxToiZ.
xGGxToiZ's Avatar
xGGxToiZ xGGxToiZ is offline
>.//:SO HOT:\\.<
Join Date: Mar 2010
Location: We're now near the Tin Tower! . xD
Age: 20
Gender: Male
Nature: Modest
Posts: 44
Hi there! Have you ever noticed that when you edit the front sprite of the hero in R/S its palette must be the same with its back sprite?

For me, it's quite annoying, so I've come up with my own method of having separate palettes for both front and back sprites of the heroes!

WARNING! Always have a backup of your ROM when doing something like this!

Okay, you'll need:

Your front and back sprites.
2 Copies of your ROM
UNLZ-GBA (I use the hacked version.)
RS BALL (Comes with Elitemap.)
HEX EDITOR (I'll be using HxD for this one.)
FSF (Optional)

STEP 1: Replacing the front.
Use your Original Copy.
Open Unlz-gba and go to 1294*, pal 1041* (We are going to replace Brendan's front.) And then import your custom front sprite.

Click "Write to ROM". Tick all of the boxes.
Like this:

Click "Ok". If it's too big, get the size and use FSF to find an offset with lots of free space.

STEP 2: Getting the Pallete of your backsprite.

Okay, for this, use the other copy of your ROM!

Open Unlz-gba and go to 1363*, pal 1041* (This is Brendan's Back.)

Import your custom BACK SPRITE then click "Write to ROM".
Tick all but "Export Image."

Okay, go to put any offset you want in the "Palette Offset" Box. (I'll use 800000.)
Click "Ok."
This should appear:

STEP 3: Get the Back Sprite's Palette data in HEX!
Okay, close both Unlz-gba windows and open your HEX Editor. (The fun bit!)

Go to the offset where you chose your Palette offset, I used 0x800000 so I'll go to 800000. (Use GoTo Function not Find!)

You're looking at LZ77 Palette Data.

Now, open the original copy of you ROM in the HEX Editor.
And go to any offset that can fit 28(hex) Bytes in but the offset must end in 0! (It doesn't work in other numbers from what I know.) I chose 700000 (Remember the offset!)
Screenie: Search Function!

Screenie: HEX Data!

Now, hit SAVE!

STEP 4: Inserting the Back sprite + custom palette.
Close the HEX Editor and open your ORIGINAL Copy of the ROM in UNLZ-gba .
And again, go to 1363*, pal 1041*.
FTW!! What happened to this guy?

Okay, calm down, click "Import" and import your custom back sprite.
Then click "Write to ROM". Tick all but "Export Palette".

Click "Ok", if it's too big, get the size and find an offset with lots of free space in FSF.

We're almost done!

STEP 5: Correcting the Palette in RS BALL.
Close UNLZ-gba. Now, put the original copy of the ROM in the same directory as RS BALL and open RS BALL. Then, choose the right ROM.

Now, in the "Image" Box, choose "Trainer BackPics".

Oh crap, what a mess!
Don't worry now, remember the offset we used to put in the palette data? (e.g. 700000)

Well, put that in the "Palette" Box under Pointer Management.
And click "Apply pointer changes".

See? It corrected itself!

Now, for the easy part, testing it in-game!
Here, it works!:

Front Sprite is fine!
In the battle field:

Whoa! It worked, too!

For May's sprite, do the same steps but use these numbers:
Pic: 1295*, pal 1042*.

* May vary depending on the ROM.

There could be other ways to do it but this is how I "roll". :p
How to successfully edit FR's(idk about LG) BATTLE TEXT BOX!

Have you ever tried to edit the battle text box before? But in Unlz it replaces about 6-10 pointers and destroys your game?

Well, I'm here to help!
First of all, you must know what pointers are being changed when Unlz-gba does it automatically for the FIRST TIME.
Here are the offsets: (FR US v1.0)
0x1052           0x4719C
0x1066           0x505B8
0x121A           0x238192

Okay, let's do this then.

STEP 1: Replacing the text box itself.
First, open Unlz-gba and open your FR ROM. Then go to 413*, pal Use Black/White.

Okay, for this tutorial, I'll turn the FR Battle Text Box into Emerald's Text Box.
Click "Import".

Tip: You need to edit the the parts in red.
Next, click "Write to ROM". Tick all but "Export Pallete". Then click "Ok".

If it's too big, click the spoiler.

Too big, huh?
Then, copy the size in the message and use FSF to find the proper offset for it.
In this example, I'll use the offset 0x860000.
Like so:


Then, click "Ok".

Now, tell me, did it change more than 6 pointers?
Okay, if you test the ROM now, it will not function at all.
So let's proceed to Step 2.

STEP 2: Fixing the changed pointers MANUALLY.
Don't worry, it won't take long.

Okay, exit Unlz-gba then open your ROM in a HEX Editor.
Then, go to offset 0x1052.

See the one in blue? That's the changed pointer!
Now, change it to this:
00 00 D0 08
Easy wasn't it? Now do the same for these:
0x1052           0x4719C
0x1066           0x505B8
0x121A           0x238192

Each of these offsets has 4 bytes being XX XX XX 08.
Notice I didn't include 0xF454. It's because that's the real pointer for the battle text box!
After you changed the mentioned offsets, hit SAVE.

Now, you have fixed your ROM!

Now test it in-game, it should like this:

After some palette editing:

Not bad, right?
The image is not doctored at all! That's 100% pure UNLZ edit!

I have some secret stuff about the two pink colors in the text box palette.

To use them use these colors: (In Black/White mode.)
First Pink color: Second Pink Color:
R:160 R:192
G:160 G:192
B:160 B:192

There! You have two extra colors for your Battle text box!

You have successfully edited FR's Battle Text Box! Enjoy!

This is also my first tutorial so I hope you liked it!
Feel free to comment!


. . .

Reply With Quote

Relevant Advertising!

Old June 14th, 2010 (8:00 PM).
Diegoisawesome's Avatar
Diegoisawesome Diegoisawesome is offline
Oh god the bees
Silver Tier
Join Date: Dec 2007
Location: :noitacoL
Age: 19
Gender: Male
Nature: Naive
Posts: 1,002
Yeah, Un-LZ is just buggy like that. It doesn't even make a sanity check to see if the pointer's correct. (Ex. Seeing if the pointer is at an offset ending in 0, 4, 8, or C)

Why not, instead of doing all of those steps to fix the damaged "pointers", just uncheck the "Automatically fix pointers" box and repoint it manually?

My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Diego's Miscellaneous Patches
GBA Intro Manager
The Secret Sauce: Triple-Layer Tiles
Reply With Quote
Old June 16th, 2010 (1:48 AM).
xGGxToiZ's Avatar
xGGxToiZ xGGxToiZ is offline
>.//:SO HOT:\\.<
Join Date: Mar 2010
Location: We're now near the Tin Tower! . xD
Age: 20
Gender: Male
Nature: Modest
Posts: 44
Originally Posted by diegoisawesome View Post
Yeah, Un-LZ is just buggy like that. It doesn't even make a sanity check to see if the pointer's correct. (Ex. Seeing if the pointer is at an offset ending in 0, 4, 8, or C)

Why not, instead of doing all of those steps to fix the damaged "pointers", just uncheck the "Automatically fix pointers" box and repoint it manually?
Hmm.. I never thought of that. I usually hack Ruby and I just found this method by "accident", I was toying with my FR ROM.

I have a manner of making things quite tough. "
Yeah, I think that will be easier. Gotta edit that the next time. I still have homework to do.
And yeah, Un-LZ is quite buggy. But that's what we've got for now so we have to live with it I guess.


. . .

Reply With Quote
Old June 23rd, 2010 (7:45 AM).
ERROR ERROR is offline
Join Date: Aug 2009
Posts: 84
thnx for explaining how to edit the text box in fr
Reply With Quote
Old July 23rd, 2010 (12:37 AM).
sunggokho sunggokho is offline
Join Date: Jul 2010
Gender: Female
Posts: 2
Hahah Finally! I found the right place I have been looking for!1 This is what exactly i wanted to do with the animation. Can I save this thread? This will be my manual. And okay, I will provide another ROM as for back up. And what else do I need to do and buy? PLease, PLease response... I wanna do this.. Thanks in advance...
improve conversion
steve barbarich
Reply With Quote
Old December 23rd, 2010 (2:31 PM).
RoyFox2010 RoyFox2010 is offline
Join Date: Dec 2010
Gender: Male
Posts: 1
Whenever I try to upload the sprite to the trainer back image, it accepts it, and changes the pallete for every other sprite that uses the same palette (appearently the front and back images before it and the back sprites after it) it acts like it was never changed, do you have any idea why?
Reply With Quote
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -8. The time now is 3:44 PM.

Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2016 The PokéCommunity™,
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / Poké
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2016.