Notices
For all updates, view the main page.

 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.

#1
March 4th, 2012 (10:06 AM). Edited February 8th, 2013 by Quickster.
 Quickster Dream or Drop? Join Date: Oct 2007 Gender: Male Nature: Quiet Posts: 351
Creating new Overworld palettes in Fire Red!
This is my first tutorial, and I want to make it as simple as possible and easy to follow. Thanks to JPAN for his hacked engine and metapod23 for his overworld tutorial which helped me understand everything better.

Tools needed for this tutorial:
Pokemon Fire Red Rom (Unmodified and modified)
Pokemon Fire Red Hacked Engine
Hex Editor – I will be using Translhextion.
Free Space Finder
Overworld Editor: Rebirth Edition
Nameless Sprite Editor (I will be using classic)
Lunar IPS

I also suggest having a backup of your rom.

Step 1-Applying the hacked engine.
Spoiler:
If you’re reading this, I hope you know how to do this. If not, click here http://www.pokecommunity.com/showthread.php?t=73966 and look at the alternate method of working with patches.

Step 2 – Understanding the data.
Spoiler:
As JPAN states in his guide, a palette pointer consists of PPPPPPPP nn110000, with P = palette pointer and n = palette number. For example, if I wanted to write a pointer to a palette located at 0x800000 with a palette number of 32, I would use this.

00008008 20110000

When typing pointers, you need to break the original address into three blocks of two and rearrange them like so. 80 00 00 -> 00 00 80 80. You had the 80 because it is located within the rom.

20 is actually 32 in hex, so make sure you convert. I would use the calculator that came with your computer.

Step 3 – Finding the free space needed
Spoiler:
In the JPAN rom, the palette table is located at 0x1A2400, giving you room for 256 pointers, so that should be enough.

Each palette takes up 64 bytes. So multiply 64 by the number of palettes you will be inserting.

EX. 64 * 12 = 768

You would need 768 bytes of free space to insert 12 new palettes. But for simplicity, I will be adding 1 so I need 64 bytes of free space.

I will be using 0x800000.

Step 4 – Editing Palette
Spoiler:
Now my way is a sort of a hassle, so if anyone knows an easier way, please tell me.

Open your unmodified rom in NSE. Then edit a palette to your liking.

I just edit the palette of the hero, as it is the first sprite. Once you’re done we can finally move into Hex! Take note that the palette offset is at \$H35B968 or x35B968.

Step 5 – Hex editing
Spoiler:
Remember that offset we found for free space, well were going to use it! Open you modified rom into a hex editor and navigate to 0x1A2400.

Go to the end of the table and insert your pointer before the 00000000 FF110000 as shown. I just rewrote the ending afterwards. Make sure your table ends with that or else in will NOT work at all.

Save.

Now open your unmodified rom in a hex editor. Navigate to the palette offset and copy 64 bytes.
Go back to your hex editor with the modified rom and navigate to 0x800000 and paste the data.

Save.

Success!

Step 6 – Editing the sprites.
Spoiler:
Say you wanted to edit the male hero from Ruby’s sprite. See what he sprite offsett is in NSE and write it down. 0x3A3C64

Go to that address in the modified rom. The palette number is the third byte over. So change that to a 20.

Save!

Now open your Overworld Editor Rebirth sprites.ini file. Go down to the English Fire red and change the SpritePaletteHeader pointer to 1A2400.

Save.

Open the rom in Overworld Editor Rebirth and go to Ruby hero sprite. As you can see, the palette number is now 32. Edit away. Im just inserting the male Fire Red hero since it will look nice.

Step 7 – Fixing a glitch!
Spoiler:
Follow these instructions to make it work.

Quote:
 That is a problem I didn't encounter until mentioned, as I always tested with OW palette 0 and A (no reason why, though, just happened). As such, I didn't know about the "forced load" on start that only happens once per map. This should fix it. Using a hex editor, replace the following values starting at 0x0805E5E0, place 70 88 09 07 09 0f 00 29 01 d0 05 e0, then at 0x0805e5f8 place 03 e0 Also, another "problem" arises from the mist weather. palette slot 0x1, 0x6 to 0x9 and 0xb are reserved for the mist weather effect. If you don't plan on using it on your hack, and need the extra palettes, you can use them after disabling the effect. at 0x0805f680 place 22 e0 (for palette slots 0x6-0x9 + 0xb), at 0x0805f60c place 20 e0 (for palette slot 0x1, the player mist slot). If you wish to have the player enter misty areas, do not apply the last one.
As a side note, the offset you should use is whatever the offset is but drop the 0x08. Sorry for the confusion. For example; 0x5E5E0.

And now you are done! Here is the finished product.

If you have any questions, have suggestions about thread cleanliness, or this tutorial is unclear, be sure to say something! I hope I was able to help!
__________________
I laugh looking at this.

But sometimes I want to come back to it...

#2
March 6th, 2012 (6:54 AM).
 Hackrex Join Date: Aug 2007 Gender: Posts: 35
yeah, it works without any problems. Good tutorial. It´s extrem easy to understand it.
Currently I have inserted 70 new palettes and the rom is working without any problems.
__________________
Temporarily not available
#3
March 10th, 2012 (1:59 PM).
 Crimson5M what Crystal Tier Join Date: Feb 2011 Location: Scotland Age: 21 Gender: Male Nature: Quiet Posts: 1,090
Hmm...I'm thinking this could maybe be abused by giving extra palettes to small tiles B]
Anyway, good tutorial, I'll try it when I get the time. :)
__________________
#4
March 10th, 2012 (3:29 PM).
 Lost Heart I am an ocean, I am the sea ModeratorCS Join Date: Mar 2010 Age: 19 Gender: Male Nature: Quirky Posts: 3,513
This tutorial is actually quite useful. Thanks for sharing the information!
__________________
mod github pair
#5
March 10th, 2012 (7:35 PM).
 Quickster Dream or Drop? Join Date: Oct 2007 Gender: Male Nature: Quiet Posts: 351
Quote:
 Originally Posted by Fireworks Hmm...I'm thinking this could maybe be abused by giving extra palettes to small tiles B]
Ooh, that actually sounds quite interesting.

Quote:
 Anyway, good tutorial, I'll try it when I get the time.
Quote:
 Originally Posted by agentgeo This tutorial is actually quite useful. Thanks for sharing the information!
Thanks!

Also, I guess I should say everyone should keep in mind the sixteen palette slots restriction in mind.
__________________
I laugh looking at this.

But sometimes I want to come back to it...

#6
March 11th, 2012 (1:09 AM).
 Hackrex Join Date: Aug 2007 Gender: Posts: 35
Quote:
 Originally Posted by Quickster Also, I guess I should say everyone should keep in mind the sixteen palette slots restriction in mind.
Well this is a problem because you can´t have the OWs in the same Map. You can see that sometimes it load the right palette and sometimes the wrong. So I have to search how I can fix it. If there is a person who no how I can fix it please send me a PM.
I don´t know if the slots which loads the palettes can be expand or is there a hardware limit. I think there is a limit and this limit is 16. So you can´t load more palettes at the same time.
__________________
Temporarily not available
#7
March 11th, 2012 (3:05 AM).
 ~Anbuja Let's Keep It Simple Join Date: Oct 2010 Location: In Snorlax Stomach Gender: Male Nature: Lonely Posts: 321
Nice tutorial.
I will try this out without applieing JPANS engines too.
__________________
#8
March 11th, 2012 (7:59 AM).
 Cheve_X Join Date: Dec 2010 Location: Argentina Gender: Male Posts: 18
Hi! Great Tutorial! Its a very useful Thing!

Now, the Hardware supports (16*16) *2 In Total, But, For Minisprites use one Part (16*16) and it have some Palets of Tiles Too.

For Better Understand of Wath i means, Open Any .gba Rom with VBA and Go to "Tools > Pallete Viewer" The Right Part Its Used By Ow's

Sorry for My English x'D

Have a Nice Day
#9
March 12th, 2012 (9:29 AM). Edited March 18th, 2012 by Hackrex.
 Hackrex Join Date: Aug 2007 Gender: Posts: 35
Quote:
 Originally Posted by Anbuja's_BlooDY Nice tutorial. I will try this out without applieing JPANS engines too.
Well I tried this and it doesn´t work. I have made some mistakes. But you have to do the same things as you can see in JPANS engine. I mean you have to do the same things with the pointers, etc. All things JPAN have done in his engine with the OWs data and palettes, you must do, too.

@Cheve_X: Yes, I know it. But how can I use the palettes on the left side, which aren´t from any tileset? Or how can I use the last three slots on the right side. I have had a look on this with the VBA. I saw that there are only used 13 from 16 palettes. So it must be easier to use this last 3 palettes than using the last palettes from the tilesets. But how can I hack this? How can I use this "free slots"?

Maybe there you can find a solution for insert the palettes without any problems.
http://nocash.emubase.de/gbatek.htm
It´s a problem to load more than 16 palettes for the sprites. And how I understand it after read it is it impossible because of the hardware....
__________________
Temporarily not available
#10
March 19th, 2012 (6:37 PM).
 dark-96 Join Date: Aug 2011 Location: Sinnoh Gender: Male Posts: 11
this best tutorial on Fire Red,and on emerald such it is possible to make?
#11
March 20th, 2012 (3:01 PM).
 Quickster Dream or Drop? Join Date: Oct 2007 Gender: Male Nature: Quiet Posts: 351
Quote:
 Originally Posted by dark-96 this best tutorial on Fire Red,and on emerald such it is possible to make?
Well Im sure it is, but I dont know how pesonally. If JPAN didnt do anything other than repoint the table in Fire Red, than it could be that simple. But I dont know what else he did.
__________________
I laugh looking at this.

But sometimes I want to come back to it...

#12
March 20th, 2012 (7:02 PM).
 dark-96 Join Date: Aug 2011 Location: Sinnoh Gender: Male Posts: 11
This tut. remains the best
#13
April 16th, 2012 (12:02 PM). Edited April 16th, 2012 by Noririn.
 Noririn Join Date: Apr 2010 Posts: 15
He did just repoint it, I tried repointing the table without the hacked engine and this method works.

The orginal palette table is located at 0x3A5158 in FireRed and the pointers to the table that you need to change are at 0x5F4D8, 0x5F570 and 0x5F5C8 for those whom it may interest.

I would like to know the sprite offsets for the Fly sprites.

Well it seems they're not part of the OW sprite table... I'd like to know how I can repoint their palettes though. :\

Seems I didn't need to. Do they just use the current hero OW palette loaded into the RAM?
#14
November 22nd, 2012 (6:47 AM).
 solrecon111 Didn't do nothing...... yet Join Date: May 2011 Location: Everywhere Gender: Male Nature: Brave Posts: 4
Quickster, this is an amazing tutorial but one thing I can't seem to do is actual apply it in to Advance Map. It would just appear as the original palette. I would use the emerald male hero as an example. Everything works, it shows up in Overworld Editor rebirth as the new palette but when I put it in advanced map it would show up as palette 0x06 and not 0x32. In NSE it doesn't work either that it can't load the new palette.
#15
November 22nd, 2012 (7:24 AM).
 itman Back to ROM hacking. :D Join Date: May 2007 Age: 22 Nature: Adamant Posts: 100
Quote:
 Originally Posted by solrecon111 Quickster, this is an amazing tutorial but one thing I can't seem to do is actual apply it in to Advance Map. It would just appear as the original palette. I would use the emerald male hero as an example. Everything works, it shows up in Overworld Editor rebirth as the new palette but when I put it in advanced map it would show up as palette 0x06 and not 0x32. In NSE it doesn't work either that it can't load the new palette.
You have to change the INI in NSE or OWE for it to show the new palettes (to the new palette table that JPAN made in his patch). Also, it won't show in A-map, but it will show in game. You have to change the OW's palette number in a hex editor though, to change it in the first place.
#16
November 22nd, 2012 (2:54 PM).
 solrecon111 Didn't do nothing...... yet Join Date: May 2011 Location: Everywhere Gender: Male Nature: Brave Posts: 4
Quote:
 Originally Posted by itman Also, it won't show in A-map, but it will show in game. You have to change the OW's palette number in a hex editor though, to change it in the first place.
I know you probably don't want to say how but where could I find out how to do that, like point me to a certain forum here or somewhere else.

Thank you.
#17
November 22nd, 2012 (7:45 PM).
 Sudeki Can you feel it? Join Date: Feb 2010 Location: Golden Rod Age: 24 Gender: Male Nature: Gentle Posts: 321
Quote:
 Originally Posted by solrecon111 I know you probably don't want to say how but where could I find out how to do that, like point me to a certain forum here or somewhere else. Thank you.
Open up NSE Classic, go to the sprite you want to change the palette number of. Make sure "Advanced" mode is on.
Then you want to find the "Sprite Offset:" Go to that offset in your hex editor.

Here is what the hero's first overworld data looks like
Code:
`  FFFF001102110002100020001001000010373A089C373A0870343A08A0003A08FC1C2308`
and is broken down like this (courtesy of GBChacker's post):

Code:
```FFFF     = Starter Byte
00     = Palette Number
11 02 11 = Sprite validation.
0200 = This is equal to the second 4 numbers in the Frame Data Pointer; this is the size of each frame
0010 = Width
0020     = Height
0110 and 0000 = oam data. Do not modify!
1@ 10373A08    = Points to @3.
2@ 9C373A08    = Void pointer\ unsure.
3@ 70343A08    = A pointer to @5 lol.
4@ A0003A08    = Sprite Pointer
5@ FC1C2308    = Pointer to pointers which point to code that loads the  sprite through the ewram into the sprite block of the vram and its data  into the oam.```
I bolded the parts you are interested in. Do not forget to put the number in hex and not decimal.
__________________
#18
November 23rd, 2012 (11:22 AM).
 Quickster Dream or Drop? Join Date: Oct 2007 Gender: Male Nature: Quiet Posts: 351
Quote:
 Originally Posted by Sudeki Open up NSE Classic, go to the sprite you want to change the palette number of. Make sure "Advanced" mode is on. Then you want to find the "Sprite Offset:" Go to that offset in your hex editor. Ripped from Metapod 23's thread Here is what the hero's first overworld data looks like Code: ` FFFF001102110002100020001001000010373A089C373A0870343A08A0003A08FC1C2308` and is broken down like this (courtesy of GBChacker's post): Code: ```FFFF = Starter Byte 00 = Palette Number 11 02 11 = Sprite validation. 0200 = This is equal to the second 4 numbers in the Frame Data Pointer; this is the size of each frame 0010 = Width 0020 = Height 0110 and 0000 = oam data. Do not modify! 1@ 10373A08 = Points to @3. 2@ 9C373A08 = Void pointer\ unsure. 3@ 70343A08 = A pointer to @5 lol. 4@ A0003A08 = Sprite Pointer 5@ FC1C2308 = Pointer to pointers which point to code that loads the sprite through the ewram into the sprite block of the vram and its data into the oam.``` I bolded the parts you are interested in. Do not forget to put the number in hex and not decimal.
Thank you for explaining that. I didnt go into as much depth, but I explained the basics of how to do it under Step 6.
__________________
I laugh looking at this.

But sometimes I want to come back to it...

#19
November 23rd, 2012 (12:54 PM).
 solrecon111 Didn't do nothing...... yet Join Date: May 2011 Location: Everywhere Gender: Male Nature: Brave Posts: 4
For some reason it works with the hero of fire red but it wont work with the hero from emerald. in the picture i didnt edit the fire red hero's palette but as you can see the emerald hero is messed up
#20
March 27th, 2013 (10:04 AM).
 Spherical Ice ModeratorCS Join Date: Nov 2007 Location: Bristol, UK Age: 18 Posts: 4,809
Is there a fix to the bug where if you go to another screen (most menus in the bag, battles, etc.) and then return to the map the palette reverts to one of the original palettes?
__________________
#21
March 27th, 2013 (2:13 PM).
 itman Back to ROM hacking. :D Join Date: May 2007 Age: 22 Nature: Adamant Posts: 100
Quote:
 Originally Posted by Spherical Ice Is there a fix to the bug where if you go to another screen (most menus in the bag, battles, etc.) and then return to the map the palette reverts to one of the original palettes?
As long as the hero palette is located in the first slot (slot 0), and no other palette overwrites that slot, that should never happen.

In your hex editor, this number is what palette slot the palette takes up.

Spoiler:
FF FF 04 11 FF 11 00 02 20 00 20 00 13 02 00 00 18 37 3A 08 F0 37 3A 08 68 33 3A 08 00 28 90 08 FC 1C 23 08

In that case, it takes up slot number 4 (since 0 is one, etc...).
To make sure it's taking up the right palette, in VBA check: Tools>Palette Viewer.
#22
March 27th, 2013 (3:07 PM).
 Spherical Ice ModeratorCS Join Date: Nov 2007 Location: Bristol, UK Age: 18 Posts: 4,809
Oh, it's not the overworld for the player but a separate overworld, and the slot that is stays in gets rewritten with the original palette in that slot everytime the map is loaded (exiting menus etc)
__________________
#23
April 5th, 2013 (6:59 AM).
 theRiolvile Thelucaman Join Date: Mar 2013 Location: South Africa Age: 20 Gender: Male Nature: Adamant Posts: 14
I want to put DP overworld sprites but i don't know how it show when I reseized it show only the upper part
#24
April 7th, 2013 (5:02 PM).
 Quickster Dream or Drop? Join Date: Oct 2007 Gender: Male Nature: Quiet Posts: 351
Quote:
 Originally Posted by Spherical Ice Oh, it's not the overworld for the player but a separate overworld, and the slot that is stays in gets rewritten with the original palette in that slot everytime the map is loaded (exiting menus etc)
I know this reply is a bit late, but I tried looking into it some. I found that when you have the palette slot set as A-F, the palette refreshes fine, and, as far as I can tell, nothing is messed up.. Ill see if I can find anything else on the matter.

Quote:
 Originally Posted by theRiolvile I want to put DP overworld sprites but i don't know how it show when I reseized it show only the upper part
I dont remember much about resizing, so Ill look into this a bit more also.
__________________
I laugh looking at this.

But sometimes I want to come back to it...

#25
April 18th, 2013 (11:25 PM).
 Shadowraze ur mum Join Date: Apr 2013 Location: ur mum Age: 17 Gender: Other Nature: Lonely Posts: 798
Just a question but can this be used to have individual palletes for each OW?