• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Add New Overworlds to FireRed

Status
Not open for further replies.

*Poliwag*

PollyWaggle
23
Posts
16
Years
Add New Overworlds to FireRed (Without Deleting Old Ones!)

Hey all,
This is my first tutorial but i hope to make it a good one. I don't really know the demand to know how to do this but it's here now if anyone needs it.

The object of this tutorial is to teach you how to add new OWs to a FireRed (BPRE) rom without deleting existing ones and then how to configure the newly made sprites to appear in Advancemap.

Before we begin I am aware that Darthatron has done a tutorial on Overworlds and that the first part may be similar to his tutorial, but honestly, I did not copy it! You will see as you progress that this tutorial is for inserting new sprites ready for editing in OWE, which is something Darthatron's tutorial didn't explain. But I'm going to say thanks to Darthatron anyway because his Lesson 1 on sprite data gave me the basics for this tutorial. Thanks Darthatron!

!!!REMEMBER TO ALWAYS BACK-UP YOUR ROM!!!

So, without further ado, I present:

HOW TO: Add New Overworlds to FireRed!

You will need:
A FireRed BPRE rom
Free Space Finder
A Hex Editor (I shall use Translhextion)
Overworld Editor
Windows Calculator
Some patience and some time
Advancemap

Optional:
Overworld Editor RE

Step 1- Finding the Sprite Bank
SCREENSHOT:
Spoiler:

This is simple, find your Overworld Editor folder, and open up the sprites.ini file inside it. Scroll through the file until you see
Code:
[BPRE]
Name                 = Pokémon Fire Red (English)
SpritePalleteHeaders = &H3A5158
SpriteBank           = &H3A3BB0
SpriteCount          = 153

Right, now open up your rom in a hex editor. Take the "SpriteBank" address, scroll to the specified offset and stare in wonder at the gibberish you find. What you are looking out now is all the OW sprite data for the game, one after the other. Sprite data is 36 bytes long and arranged like this:
Code:
<Starter Byte><Palette Number><Unknown Data 1><Unknown Data Size><Width><Unknown Byte 1><Height><Unknown Byte 1><Unknown Data 2><Unknown Pointer 1><Unknown Pointer 2><Unknown Pointer 3><Sprite Pointer><Unknown Pointer 4>

So here's an example for the first sprite's data:

Here it all together-
Code:
FFFF001102110002100020001001000010373A089C373A0870343A08A0003A08FC1C2308

And Here it is broken down-
Code:
FFFF		= Starter Byte
00		= Palette Number
11 02 11	= Unknown Data 1
0002		= Unknown Data Size
20		= Width
00		= Unknown Byte 1
20		= Height
00		= Unknown Byte 1
10 01 0000	= Unknown Data 2
10373A08	= Unknown Pointer 1
9C373A08	= Unknown Pointer 2
70343A08	= Unknown Pointer 3
A0003A08	= Sprite Pointer
FC1C2308	= Unknown Pointer 4

Great! Now we've found the data we can move on to...

Step 2- Moving the Spritebank
SCREENSHOT:
Spoiler:

Right, first off, it's time for a quick calculation. FireRed has 154 sprites (0-153) and each sprite's data is 36 bytes long. So, we need to work out how much data we're going to need to copy. Open up your calculator and multiply 154 by 36. Did you get 5544? Well even if you didn't that's how many bytes need to be selected. Select everything from 0x3A3BB0 to 0x3A5157 (which is 5544 bytes). There is a picture of this in Step 1, if you're unsure. Now copy or cut (I advise copy) the selected data and switch back to your calculator. Now you need to work how many extra sprites you want in your game. I will use 12. So, 12*36 (sprite data is 36 bytes remember?) is 432. Good. Now take the number of bytes needed and add it to the number of bytes already taken up by sprites (5544). Now make a note of this value.
To Free Space Finder now. Open it up and type in the value of the sum you just did (New Sprite Data + Existing sprite data) and search for FF bytes. Got your offset? Great. Now find the offset in the hex editor and paste the sprite bank we copied earlier. Fantastic

Now the tutorial will separate, beginner users follow the "a" steps, advanced hackers scroll down to the "b" steps. The "a" steps will insert one sprite at a time whilst the "b" steps will insert multiple sprites in one go. The screenshots will now only be in the "a" tutorials, but if those following the "b" tutorials get lost, the "a" screenshots should provide some help.

Step 3a- Adding a new sprite
SCREENSHOT:
Spoiler:

Right, now we have our sprite bank at the new offset, we need to scroll to the bottom where the numbers and letters stop and a sea of "FF"s appear. Now it is time to put in your own sprite data. I have not tested this thoroughly yet but I would advise basing the data on an already existing sprite with the same number of frames you want. For example, I wanted a sprite with 9 frames (0-8) so i chose the Guard sprite #3. Now if at this stage you are using the Rebirth edition of OW Editor, press Ctrl+M for Master view, if your using the older OW Editor, the data is already there. Now in the free space at the end of the sprite table, begin entering the sprite data in the order of the formula in Step 1.
However, there is one thing you will need to change, and another that is optional. Firstly the sprite pointer will need to be changed. That's the next step. The pallet can also be changed, that's later on.

Step 3b- Adding many new sprites easily
If you are confident with hex and your eyes can handle sifting through all the numbers and letters you can quickly insert many new sprites if they all have the same number of frames (it may work if they don't, I'm just cautious of what the unknown data might influence). To do this follow Step 3a and select the new sprite data you entered (check it's 36 bytes) and copy it. I don't know about other hex editors, but translhextion has a paste feature which allows you to paste the same sequence of bytes you copied as many times as you want, so, find where the sprite table ends (it should be after the sprite data you just copied) and paste the data you copied, changing the number of times pasted to the number of sprites you want (remember that you have already made 1) so in my example, 11.

4a- Repointing the Sprite Pointer

SCREENSHOT:
Spoiler:

The sprite pointer points to the hex art of each frame. Every frame is 8 bytes long so search in FSF for space equal to 8*total number of frames required. In my case this is 9 frames! So for one sprite with 9 frames you need 72 bytes. Once you have this offset from FSF go to the hex editor and find the offset. Now we will start entering the second part of the sprite data, firstly we need another blank offset with a fair amount of free space afterwards. I used 0x820000 as this had nothing there, but if you have already added a large amount of material to you rom check this offset and look all the way through to 0x830000 to make sure no data is there. If there is data already there find another offset with lots of free space after it. Okay back to the second sprite data with our large offset we need to make this a pointer by reversing the bytes so for me it would be 00 00 82 08 next we need data size which is equal to (height*width)/2 with the bytes reversed.
For example:
Spoiler:


after this we put four zeros

You should have <pointer to blank offset><data size><unknown 1>
So in my case: <00 00 82 08><00 01><00 00>

Now repeat this step for the other 8 frames changing only the second byte of the pointer by 01 each time, so for the second frame i would put <00 01 82 08><00 01><00 00> and so on. Now you have all your frames done, return to the offset where inserted your new sprite data in Step 3. At the end of the data should be the pointer FC 1C 23 08, now look at the pointer before this, it is the sprite pointer, change this to the offset where you entered the second part of the sprite data (the data for each frame, NOT the offset each frame points to) and save the rom.

Step 4b- Repointing many sprite pointers at once (assuming you are using a constant number of frames)
The sprite pointer is the one but last pointer of any sprite data and can be quickly identified as it always precedes the pointer FC 1C 23 08. So if your using a constant amount of frames you can easily work out what each sprite pointer will be. To do this work out the number of bytes needed for all your frames 8*(No. of frames* Number of sprites you want to insert) It's 8 because that's how many bytes one frame is. So for me it would be 8*(9*12) which is 864 bytes. So, use FSF to search for the number of bytes and use the offset it suggests. Here you need to put the second sprite data which is related to the hex art. For this you need a pointer to a blank offset, the data size and unknown 1 which is always 00 00. e.g
Spoiler:

For the blank offset i used 0x820000 as you need an offset with a large amount of free space afterwards but as your roms are edited in different ways, this offset may already be taken. If so, find another offset with a fair amount of space after it. The data size is always equal to (height*width)/2 with the bytes reversed.
For example:
Spoiler:

And as remember, unknown 1 is always 00 00
Continue with the other frames in the same manner, changing the second number in the second byte of the pointer by 1 each time
Example:
Spoiler:

Once you have done this and have data for all your frames for one sprite complete; select it all. Now copy and paste the data onto the end of itself as many times as sprites you want to insert (remember you just done the data for one). Once that's done begin changing the pointers again, but in a different way. Whereas before we were changing the second digit of the second byte, we're now changing the first as the second should already be done.
Example
Spoiler:

Once you've finished this return to the sprite bank you moved in Step 3b, you should have copied and pasted the same data over and over- now its time to change all those sprite pointers which point to the same place. As I said before, the sprite pointer is always preceded by the pointer FC 1C 23 08 and is therefore easily identifiable. Now the last sprite pointer premade is that of the SS Anne and is F0 1C 3A 08. So all the sprite data after the this should have the same sprite pointer. So, change the first of the sprite pointers after the SS Anne one to the offset FSF gave you as free space for your second sprite data (the frame data). Now you need to work out how many bytes each sprite has in total for its frames (this is why the frame number needed to stay the same) and convert it to hex using the calculator. So for my 9 frames of 8 bytes each it totalled 72 bytes which i converted to hex using the calculator and it came out as 48. So, next on the calculator i typed in (still in hex) the offset where all my frame data started, the one i just changed the sprite pointer to and added 48 (don't clear this number). Then I changed the second sprite number to the number shown on the calculator and pressed = on the calculator (which added another 48) and changed the third sprite pointer to that. I then just repeated this process until i reached the end of all the sprite data I copied earlier. So if you are using a different number of frames follow my steps, but using your own numbers. When you finish, hit save!

Now the tutorial rejoins again!


Step 5- Editing the .ini file
**NOTE**
If you change the .ini file, normal FireRed BPRE roms won't work until you restore the original .ini file!

Remember sprites.ini we opened in Step 1? Well now it's time to go back to that. Find
Code:
[BPRE]
Name                 = Pokémon Fire Red (English)
SpritePalleteHeaders = &H3A5158
SpriteBank           = &H3A3BB0
SpriteCount          = 153
again and change the Spritebank offset from &H3A3BB0 to whatever you change it to e.g &H800000. Now change the sprite count from 153 to however many new sprites you entered or are going to enter in the hex editor. Now save. Almost there.

Step 6- Editing in OWE
SCREENSHOT:
Spoiler:

Sprites can only be edited in the older version of OWE 1.00.12 because an error message appears when try to edit any frame other than 0 on your newly inserted sprites in OWE Rebirth. So, open up OWE type in 154 and it will take you to your new sprite- a black screen. Ah well, you can either now paint a new OW or import already existing ones from other roms.

Extra Information
So that's that, you now have your newly inserted sprites ready to edit in OWE, but there are probably one or two things you should know. OWE 1.0.0.12 does not support pallet editing so it must be done manually. To do this simply find the needed sprite data in a hex editor and change the two bytes after FF FF to a legitimate pallet, to find the available pallet numbers open OWE Rebirth and type 2 into the pallet box, it should say that it's not a valid number an give you a list of pallets to choose from, pick one of these numbers and change it in the hex editor.
**NOTE**
If you have imported sprites and then want to change the pallet, save the rom in OWE, reload the rom in the hex editor and change the pallet number, save in the hex editor and the continue in OWE. If you insert sprites without saving OWE and reloading the hex editor, your sprites will disappear when you save the pallet change.

Secondly, if you were following the "a" tutorials you've probably sucessfully inserted one sprite, well to insert more you just repeat steps 3a and 4a using clear offsets.

So now your probably wondering, how do I get my newly created sprites to show up in Advancemap? Well.....

That's coming in PART II
Sorry...

PART II will be added at a (not too) later date.

Well, that's all for now, feedback is desired and questions are welcome.
If you feel I have missed anything please don't hesitate to let me know!

Hope this helps

*Poliwag*
 
Last edited:

cooley

///Keepin' it simple
1,148
Posts
17
Years
Wow, nice job! This is really helpful
ThumbsUpSmiley.jpg

I give it an A- for not posting this sooner :P
Good luck!
 

Binary

え?
3,977
Posts
16
Years
  • Age 29
  • Seen Apr 7, 2014
Wow, I never knew you could add more Overworlds. I'm so dumb..
The tutorial is great. You've done a great job.
 

NTA

Where?
264
Posts
16
Years
  • Age 30
  • Seen Feb 10, 2012
this is very helpful but could you add some screenshots? just a suggestion

also i need help

[BPRE]
Name = Pokémon Fire Red (English)
SpritePalleteHeaders = &H3A5158
SpriteBank = &H3A3BB0
SpriteCount = 153Right, now open up your rom in a hex editor. Take the "SpriteBank" address, scroll to the specified offset and stare in wonder at the gibberish you find. What you are looking out now is all the OW sprite data for the game, one after the other. Sprite data is 36 bytes long and arranged like this:

i typed it in and it said cannot be found
 
Last edited:

*Poliwag*

PollyWaggle
23
Posts
16
Years
@Everyone
Thanks for the comments so far!

@Nine-tailed Assassin
Sure, I'll be adding screenshots later today, I was in a rush to get it finished last night so i neglected the screenshots.
 

ckk

23
Posts
15
Years
  • Seen Aug 28, 2009
wow........
thats a lot of reading......
ill try this out when a get the time and from the looks of it, great tut!
 

Derlo

Tired....
135
Posts
16
Years
Great tuto..
but he only makes to appear new minis in OWE.... and you edit them
to work in the rom he/she has to use the other of Darthatron
...
Everything gave right with me.... AMAP accepted... OWE also... BUT!!

The rom didn't accept.. every time that I will see the mini for the rom, the rom locks...
that only happens with the mini with the other modified frames...

Did that happen with you POLIWAG?
 

*Poliwag*

PollyWaggle
23
Posts
16
Years
this is very helpful but could you add some screenshots? just a suggestion

also i need help



i typed it in and it said cannot be found

When you type the offset into the hex editor to search, try writing the offset as 003A3BB0 or 0x3A3BB0

wow........
thats a lot of reading......
ill try this out when a get the time and from the looks of it, great tut!

Thanks, and yeah, it is a lot of reading, especially with all the pointers and such.

Great tuto..
but he only makes to appear new minis in OWE.... and you edit them
to work in the rom he/she has to use the other of Darthatron
...
Everything gave right with me.... AMAP accepted... OWE also... BUT!!

The rom didn't accept.. every time that I will see the mini for the rom, the rom locks...
that only happens with the mini with the other modified frames...

Did that happen with you POLIWAG?

I'm not sure about this, i will have to look into this more. It may be a scripting thing more than anything...
 

*Poliwag*

PollyWaggle
23
Posts
16
Years
I posted the exact same thing 3 and a half months ago. >_> Seems a bit pointless to have 2 of the same tutorials. -.-

I don't mean to cause conflict here...

Like I said near the top of my first post, it may appear similar, but it is not the same really. Your tutorial (which is awesome) shows people how to insert new sprites so they can be seen in Advancemap, not OWE. Also, your frame repointing lesson is similar to a part of my tutorial, but you repoint an existing sprite's data whereas I show how to insert new sprite data. I agree that these differences could be considered minor, but they require different methods so therefore my tutorial is not the same as yours.
 

LordKill94

Lord of the Dead
11
Posts
15
Years
wow first of all nice tut ;)
maybe is it possible for a new addon for overworld edior to add new overworlds?????
as an new function ???
 
11
Posts
15
Years
I am strugling with this so could realy use some help. I have got my new overworlds in owe and advance map but they appear in the rom as random sprites, could any one help. Im using emerald. Thanx
 

Thrace

@tion
1,048
Posts
16
Years
  • Age 33
  • Seen Oct 2, 2016
Please do not revive month old threads. Ask your question in the Simple Questions thread but detail what problems you are having and the steps you took.

Closed
 
Status
Not open for further replies.
Back
Top