The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

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.

Closed Thread
 
Thread Tools
  #1    
Old Posted September 1st, 2008 (11:40 AM). Edited September 9th, 2008 by *Poliwag*.
*Poliwag*'s Avatar
*Poliwag*
PollyWaggle
 
Join Date: Sep 2007
Location: In a pond, Violet City
Gender:
Nature: Hasty
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 what the sprite bank looks like completely selected, the beginning and end offsets along with byte size are in the red box.

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:

Note the offset of the highlighted Spritebank, it's been moved.

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:

This is to help you understand how the sprite data is arranged using the structure from Part 1. Ignore the red semi-transparent box, that's not included. The other red box is the sprite pointer which you will need to change in at the end of Step 4, for now, leave it as whatever pointer OWE gives you.

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 basic structure of what is essentially, the data for each frame.

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:
16*32 (decimal)
10*20 (hex)
200/2= 100
input in hex editor as 0001


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:
<pointer><data size><unknown 1>
<00 00 82 08><00 01><00 00>

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:
16*32 (decimal)
10*20 (hex)
200/2= 100
input in hex editor as 0001

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:
Frame 0 <00 00 82 08><00 01><00 00>
Frame 1 <00 01 82 08><00 01><00 00>
etc.

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:
Sprite 0 Frame 1 <00 01 82 08>
Sprite 1 Frame 1 <00 11 82 08>
Sprite 2 Frame 1 <00 21 82 08>
etc.

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:

DONE! Did it work for you?

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*
  #2    
Old Posted September 2nd, 2008 (07:09 AM).
cooley's Avatar
cooley
///Keepin' it simple
Community Supporter
 
Join Date: Feb 2007
Location: United States
Age: 20
Gender: Male
Nature: Impish
Send a message via Windows Live Messenger to cooley Send a message via Skype™ to cooley
Wow, nice job! This is really helpful

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

  #3    
Old Posted September 2nd, 2008 (08:02 AM).
Binary's Avatar
Binary
え?
 
Join Date: Aug 2007
Age: 20
Wow, I never knew you could add more Overworlds. I'm so dumb..
The tutorial is great. You've done a great job.
__________________
  #4    
Old Posted September 2nd, 2008 (08:03 AM). Edited September 2nd, 2008 by NTA.
NTA's Avatar
NTA
Where?
 
Join Date: Nov 2007
Nature: Adamant
this is very helpful but could you add some screenshots? just a suggestion

also i need help

Quote:
[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
__________________

  #5    
Old Posted September 2nd, 2008 (08:07 AM).
*Poliwag*'s Avatar
*Poliwag*
PollyWaggle
 
Join Date: Sep 2007
Location: In a pond, Violet City
Gender:
Nature: Hasty
@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.
  #6    
Old Posted September 2nd, 2008 (02:36 PM).
ckk's Avatar
ckk
Beginning Trainer
 
Join Date: Jun 2008
Gender:
wow........
thats a lot of reading......
ill try this out when a get the time and from the looks of it, great tut!
  #7    
Old Posted September 2nd, 2008 (05:17 PM).
Derlo's Avatar
Derlo
Braziliam Hacker!! De Mossoró
 
Join Date: Aug 2007
Send a message via Windows Live Messenger to Derlo
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?
  #8    
Old Posted September 3rd, 2008 (08:38 AM).
*Poliwag*'s Avatar
*Poliwag*
PollyWaggle
 
Join Date: Sep 2007
Location: In a pond, Violet City
Gender:
Nature: Hasty
Quote:
Originally Posted by Nine-Tailed Assassin View Post
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

Quote:
Originally Posted by ckk View Post
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.

Quote:
Originally Posted by Derlo View Post
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...
  #9    
Old Posted September 5th, 2008 (06:57 AM).
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 23
Gender: Male
Nature: Modest
I posted the exact same thing 3 and a half months ago. Seems a bit pointless to have 2 of the same tutorials. -.-
__________________
あなた は しきしゃ です
わたし は ばか です
  #10    
Old Posted September 7th, 2008 (08:27 AM).
*Poliwag*'s Avatar
*Poliwag*
PollyWaggle
 
Join Date: Sep 2007
Location: In a pond, Violet City
Gender:
Nature: Hasty
Quote:
Originally Posted by Darthatron View Post
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.
  #11    
Old Posted September 7th, 2008 (10:00 AM).
hi sir tomato my password is syvniti's Avatar
hi sir tomato my password is syvniti
gggggggggggggggggg
 
Join Date: Jan 2007
Location: My user name _ asciii_ +&h1!" lulz
Quote:
Originally Posted by Darthatron View Post
I posted the exact same thing 3 and a half months ago. Seems a bit pointless to have 2 of the same tutorials. -.-
Well I stopped reading yours about here...
Quote:
Originally Posted by Darthatron View Post
They look fun... NOT!
I realy was findning those pointiers fun...
__________________
THE CAKE IS A LIE!!!!!!!!!!!!!!!!!!!!!!!
  #12    
Old Posted September 12th, 2008 (07:47 AM).
LordKill94's Avatar
LordKill94
Lord of the Dead
 
Join Date: May 2008
Location: Germany
Age: 20
Gender:
Send a message via ICQ to LordKill94
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 ???
__________________
---Visit us---
Nex Board
The next generation of gaming
A german site about games and other things
new rom projekt we need help
don´t be shy to visit a german site all can speak english to
so its no problem
we wait for you

  #13    
Old Posted September 12th, 2008 (07:53 AM).
hi sir tomato my password is syvniti's Avatar
hi sir tomato my password is syvniti
gggggggggggggggggg
 
Join Date: Jan 2007
Location: My user name _ asciii_ +&h1!" lulz
Quote:
Originally Posted by LordKill94 View Post
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 ???
I sended you a pm about it:p
__________________
THE CAKE IS A LIE!!!!!!!!!!!!!!!!!!!!!!!
  #14    
Old Posted February 10th, 2009 (06:50 AM).
mozzer0734's Avatar
mozzer0734
Beginning Trainer
 
Join Date: Sep 2008
Location: England
Gender: Male
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
  #15    
Old Posted February 10th, 2009 (03:15 PM).
Thrace's Avatar
Thrace
@tion
 
Join Date: Jun 2007
Age: 24
Gender: Male
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
__________________
Closed Thread
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
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 07:42 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
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 - 2014 The PokéCommunity / PokéCommunity.com.
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.