PDA

View Full Version : [Tutorial] [R/S] Different Palettes for Front and Back Sprites and other good stuff!


xGGxToiZ
June 13th, 2010, 06:47 PM
Intro:
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:
http://farm5.static.flickr.com/4017/4697987803_8bb61d98ff_b.jpg
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.)
Screenie!:
http://farm2.static.flickr.com/1284/4698622698_1acabff0ed_b.jpg
Import your custom BACK SPRITE then click "Write to ROM".
Tick all but "Export Image."
Screenie:
http://farm5.static.flickr.com/4037/4698623050_8d475bc2aa_b.jpg
Okay, go to put any offset you want in the "Palette Offset" Box. (I'll use 800000.)
Click "Ok."
This should appear:
http://farm2.static.flickr.com/1299/4697988309_a86697a302.jpg


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!)
Screenie:
http://farm5.static.flickr.com/4014/4697988353_568585c4d8_b.jpg
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!
http://farm5.static.flickr.com/4041/4697988389_6bf9b4c1ba.jpg
Screenie: HEX Data!
http://farm2.static.flickr.com/1287/4698623182_3027c61a48_b.jpg
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?
Screenie:
http://farm5.static.flickr.com/4052/4697988503_a487e681cc_b.jpg
Okay, calm down, click "Import" and import your custom back sprite.
Then click "Write to ROM". Tick all but "Export Palette".
Screenie:
http://farm5.static.flickr.com/4033/4698623322_1035f00c69_b.jpg
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.
Screenie:
http://farm2.static.flickr.com/1301/4698623452_4fd73ed260_b.jpg
Now, in the "Image" Box, choose "Trainer BackPics".
Screenie:
http://farm5.static.flickr.com/4027/4698623594_a1e68bc7c6.jpg
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".
Screenie:
http://farm5.static.flickr.com/4070/4698623696_ce89330bfc.jpg
See? It corrected itself!

Now, for the easy part, testing it in-game!
Here, it works!:
http://farm5.static.flickr.com/4057/4697988939_97ef7c06ef.jpg
Front Sprite is fine!
In the battle field:
http://farm5.static.flickr.com/4004/4698623808_25fcd18180_b.jpg
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
--------------------------------------------------------------------------------------------------------------------------------
OTHER GOOD STUFF!
How to successfully edit FR's(idk about LG) BATTLE TEXT BOX!

Intro:
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
0x13EE
0x1452
0xF454
0xFCF8

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.
Screenie:
http://farm2.static.flickr.com/1306/4698695317_70b9f77bd3_b.jpg
Okay, for this tutorial, I'll turn the FR Battle Text Box into Emerald's Text Box.
Click "Import".
Screenie:
http://farm5.static.flickr.com/4032/4699326502_4790b49462_b.jpg
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:
http://farm5.static.flickr.com/4040/4698695399_f574a8af49_b.jpg
Then:
http://farm5.static.flickr.com/4072/4698695455_d455022e12_b.jpg

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.
Screenie:
http://farm5.static.flickr.com/4025/4698695475_f74f48e817_b.jpg
See the one in blue? That's the changed pointer!
Now, change it to this:
00 00 D0 08Easy wasn't it? Now do the same for these:
0x1052 0x4719C
0x1066 0x505B8
0x121A 0x238192
0x13EE
0x1452
0xFCF8

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:
http://farm5.static.flickr.com/4053/4699326676_155eb6c1c5_m.jpg
After some palette editing:
http://farm5.static.flickr.com/4012/4699326702_e634648bbc_m.jpg
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.
http://farm5.static.flickr.com/4005/4699341520_793bfb74fc_m.jpg
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!

diegoisawesome
June 14th, 2010, 08:00 PM
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?

xGGxToiZ
June 16th, 2010, 01:48 AM
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.

ERROR
June 23rd, 2010, 07:45 AM
thnx for explaining how to edit the text box in fr

sunggokho
July 23rd, 2010, 12:37 AM
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...

RoyFox2010
December 23rd, 2010, 02:31 PM
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?