Welcome to the PokéCommunity!

Hi there! Thanks for visiting PokéCommunity. We’re a group of Pokémon fans dedicated to providing the best place on the Internet for discussing ideas and sharing fan-made content. Welcome! We’re glad you’re here.

In order to join our community we need you to create an account with us. Doing so will allow you to make posts, submit and view fan art and fan fiction, download fan-made games, and much more. It’s quick and easy; just click here and follow the instructions.

Pokémon Sun and Moon are now available! Read our extensive Sun and Moon review at Daily!

The finale of the fourth annual Favorite Pokémon Tournament is underway in Pokémon General!View the poll and vote for as many Pokémon as you'd like. Voting is only open until the 5th of December though, so don't wait to make your picks!

Hello! I am Jambo51, also known as TheJambo51 on Youtube and after playing around with my hack, Pokemon ThunderYellow, I managed to discover a beautifully simple way to add extra flight spots to a FireRed rom. While I know the locations for all FireRed roms, I'm still investigating Ruby and Emerald's flight data, as there is, rather bizarrely, a flight spot in the player's bedroom in both of these games.

This is based off of a tutorial on extending the sethealingplace table written by Linkandzelda.

I am not going to explain step by step how to move a fly spot from one map to another. If you're looking at this tutorial, then you should already know how to do that. While the tutorial is written for the English version of the game, if you use the same searches as I did, you will find the data in your rom quite easily. I have also included the offsets for you lazier minded hackers in spoilers at the bottom of each relevant section.

Part 1: Making the Rom recognise the extra flight spots that are to be added.

Spoiler:

You have to go to the following offsets and change the bytes held there:

Credit goes to HackMew for these.

The flight loading routine (which loads the flight spots, healing places and which sprite to move when you white out in the Pokécentre) is located around 0xBFC70. While I don't know exactly where it starts, I know which pieces of data in here require modification in order to extend the flight table. This routine is common to all 3rd generation Pokémon games, with the only discernable difference being the number of flight spots loaded and the pointers to the tables.

Search for the following routine in the game, but replace the XX with the number of flight spots minus 1, in hex.
08320133[XX]2BEED9002010BC02BC0847

That is:
FireRed: XX = 13
Ruby: XX = 15
Emerald: XX = 15

Now we modify this routine so that the XX is higher. This is the first limiting byte. For the purposes of this tutorial, we're only gonna add 1 extra flight spot, but you can add as many as you like as long as you're willing to repoint enough data following the flight table for it to work.

Code:

B5002808D0[XX]2806D8C0000149401803E00000

FireRed: XX = 14
Ruby: XX = 16
Emerald: XX = 16

The same thing applies here. We want to add 1 extra spot to the game, so we up the number at XX by one. This is the second limiting byte in the game. Once these are both upped, the game will support extra flight spots, extra healing places and extra white out ID data.

However, in FireRed, because this data is all located right after each other in the rom, it will currently read the first 2 healing spots as flight data, the first 4 white out ID slots as a healing spot. This is not what we wanted is it?

Part 2a: Repointing the sethealingplace table and the White Out Person ID table in FireRed.

Spoiler:

The sethealingplace table is right after the flight data table in a FireRed rom. So, you want to search for the sethealingplace data, which looks like this:

[map bank][filler][map number][filler]

So for the first healing place in a standard fire red rom, your mum's house, it would be map bank 4, map number 0:
Healing place entries take up a total of 4 bytes each.

04000000

Sadly, this is quite a common string in the rom, so we should also search for the second healing place at the same time.
The Viridian pokecentre is the second slot. Map Bank 5, Map Number 4.

[04000000][05000400]

Search for that hex string above (without the brackets) and you will be taken to the table.
As you can see above, a healing place entry takes up a total of 4 bytes. There are a total of 20 healing places in the game, just like flight spots.
So, 4*20 = 80 bytes.

So we want to copy 80 bytes from this location to another location. This new location MUST end in any of 0, 4, 8 or C. So 0x800000 or 0xA4215C would be suitable, while 0x800001 and 0xA4667D would not.
This is due to THUMB alignment, and it is VERY important that you DO NOT mess this up, or the rom will crash every time the table is used. Using Free Space Finder, search for at least 80 bytes of free space. However, I would recommend giving yourself space to extend the sethealingplace table as well. There has to be as many healing places as flight spots. So I would look for 80 + (8*4) = 112 bytes of free space.

I chose to copy the table to 0xA40000. Now, after we paste this new data to the location chosen, we must still repoint the table from the old one to the new one. This is fairly simple thankfully. You simply need to search for the sethealingplace table's old offset in reverse hex pointer form.

Code:

0x3EEC98 -> [0x][3E][EC][98] -> [98][EC][3E][08] -> 98EC3E08

So we search for the hex string of 98EC3E08 in the rom, and we find 2 matches at 0xBFD80 and 0xBFDA4.

Simply change these to match the new location of the sethealingplace table in reverse hex pointer form. In my case

Code:

0xA40000 -> [0x][A4][00][00] -> [00][00][A4][08] -> 0000A408

Now we have to repoint another small batch of data too. This table contains the sprite numbers for the white out routine to load when you white out.
That is, when you white out and get transported to a Pokecentre, it uses the sprite number contained in the relevant slot of this table to pass to the LASTTALKED variable, and then moves the sprite which has been loaded. Almost all Pokecentres have Nurse Joy as sprite number 0x1.

Since it's a bit horrible to find, I'll just tell you what to look for in the rom:

0101030101010101010201010101010101010101

So we search for that hex string in the rom. It will take you to 0x3EECE8. Again, we must copy this data to a new location that ends with any of 0, 4, 8 or C.
So, once again, we boot up Free Space Finder and search for free space ending with 0. This table must also be extended. This table is much easier though, as it is literally a byte for each piece of data in the table.
So, in my case, I would be looking for 28 bytes of free space with an offset ending in 0. So, I chose 0xA40100 as my offset for this.

Then we simply paste the data in here and repoint again.
So we search for the hex string E8EC3E08 in the rom and we find matching data at 0xBFE14.
Once again, we modify this data so that it points to the new table and I've chosen to change this to 0xA40100.

Code:

0xA40100 -> [0x][A4][01][00] -> [00][01][A4][08] -> 0001A408

ie. Change the what's in the red boxes to the new values.

Now that we've repointed all the critical data that's located after the flight data table, we can start work on the actual flight spots.

Part 2b: Repointing the Flight Table

Spoiler:

The flight table is actually very easily repointed. So, search for the following hex string in your rom:

Code:

0300060008000000

This is the first entry of the flight spot table in FireRed. The search will take you to 0x3EEBF8. This is the start of what we would recognise as the flight spot table. However, the table actually contains another entry before this. The table starts at 0x3EEBF0.

So, starting from 0x3EEBF0, select 168 bytes of data. This is the entire flight table. Copy and paste the table to another location in the rom, again, leaving room for expansion.

This is the strange part. You need to do 2 separate repoints for this table.
The first repoint allows you to edit the flight spots in A-Map.
Replace this:

Bear in mind, that every one of these values has to be in hex.
So, let's put it somewhere easy to find so that we can move it easily to a new map when needed by using advance map rather than hex editing.
So, because it makes it easy to test, and because it's easy to find, I've put it on Route 1, right below the signpost that is nearest to Pallet Town. So, add the string of hex bytes below to create the new flight spot exactly where I described. 1 step down from the signpost nearest Pallet Town.

[03][13][09][00][20][00][00][00]

Now save your rom in the hex editor and open Advance Map. If you go to the map that you added the flight spot to, you should see the flight spot, exactly where you put it. So we go to Route 1, and sure enough, there's a flight spot sitting right below the signpost nearest Pallet Town. You can now move it around freely to whatever map you wish, and whatever co-ordinates you wish, but I would advise keeping it on Route 1 for testing purposes.

Part 4: Making the Game use the new flight spot.

Spoiler:

This is where most people will fall flat in trying to get an extra flight spot working. The game needs the airport data, as I like to call it, to be able to fly to any new flight spots.
So open up Advance Map and open the world map editor. Now click on Pallet Town. You will see that under the flight data, there is a set of what looks like 6 random numbers, followed by the flight spot data for the map.

[030001][030006000800]

Now we look at Route 1 instead, and we expect to see.......
Hang on! Didn't we just add flight data to Route 1?? Yes and no. You see, according to the "airport data", the flight spot on Route 1 doesn't exist!
That's because the airport data doesn't have any record of the new flight spot in it yet. Kind of like a new airport opening and there being no flights to it because no-one knows it exists. So, we look again at Pallet Town's flight data.

It turns out that the 6 random numbers aren't so random, but they are actually pretty important to how it works!
So, I think we should examine them in a little more detail.

[03] - Map Bank of the map to fly to
[00] - Map ID of the map to fly to
[01] - Ah, this is the important part, this is the flight spot slot. So, this tells the game to look for the flight spot in the slot that is written here whenever you try to fly to it. Unlike most other tables in the game, where slot 1 is referred to as slot 0 by the game, the flight data uses 00 as no flight spot, and anything other than that as the slot on the flight data table.

If we compare this with Route 1's data, we find that Route 1's data is:

[03][13][00]

Ah, Route 1 isn't on the flight network!

So clearly we have to modify that data so that it is. But how do we find it when the data string 030001 is fairly common within the FireRed rom.
I know, just like before, we combine 2 airport data slots into 1 search.
Slot 0 on that table is Pallet Town, and slot 1 is Viridian City, so we search for BOTH of their airport data at once.

030001030102

This will take you to the airport data table.
Now we look for the string 031300 from the start of this table and when you find it, you change it to 031315.

This is because we want the game to use flight spot 0x15 on (Map Bank, map ID) (0x3, 0x13). Now save and reopen Advance Map. Open up the World Map editor and click on Route 1. You will now see that in the flight data boxes, there is now flight data!
If you press the open map, flying position button, it'll take you to the map with the flight spot on it! Excellent!

Now all you have to do is change the worldmapflag using advance map, and then set the worldmapflag using a script in the game.

To change the worldmapflag, open the world map editor. Press the changeroutines button. Then go into the flying/display flag box. Change it to a free flag in the game. Absolutely any free flag will do.

Then press the "save flag" button, then "save map".

To make sure it works, move the cursor onto a different piece of the world map, then move it back. If the flag is still the same, then congrats!

Finally, use a script like this:

Code:

#dynamic 0x800000
#org @main
setworldmapflag 0x[Put Flag Here]
end

And put it into the game as a Header Script, type 3 (On entering map/not on menu close). As soon as you enter the map with that header, the flight spot will become available.

Obviously, you need HM02, the THUNDERBADGE and a pokemon capable of using fly to actually use it. But it's really as simple as that!

To add even more flight spots, simply repeat the process from part 1, skipping part 2, then continuing from part 3, changing the maps you put it in, as well as the airport data to the relevant slots.
For example, the next flight spot you would add would have 16 at the end rather than 15.

__________________

Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!

It would have been a good idea telling everyone how did you got those offsets, because not everyone can or want to figure those by him/herself like I did a while ago. It would also help getting the proper offsets for other games. Oh, and some pictures would be nice as well. Not to mention you could spend a little more time on the thread to improve its readibility.

*i looks around on google, but i probably won't finds any--wait... FTW! YEEAH!!!!!! A NEW TUT ON SOMETHING GOOD!* this is... PROBLY TEH BEST THING IV EVR SENE!!!! I hav alwys wanned to ad new flite spots, wun fr eech rout! :D bud i woudn't ad fly til teh end, so meh-heh-heh... crogunk stile. sorry about the spelling, its a bad joke. but honestly, this is amazing, and if you had some pics, that would be stupifying, cuz, you know, we would have some proof.

I did something that really bad.But made all Chinese can hack Pokemon, too.If you guys hate me, I totally understand,but cannot do anything but force to keep everything.
If there must be someone to undertake all spit and curse, it must be me.

It would have been a good idea telling everyone how did you got those offsets, because not everyone can or want to figure those by him/herself like I did a while ago. It would also help getting the proper offsets for other games. Oh, and some pictures would be nice as well. Not to mention you could spend a little more time on the thread to improve its readibility.

I found the data by following a tutorial on extending the sethealingplace table, written by linkandzelda, in which this data is listed and credited to you XD.

Sadly, I don't have the ability to upload screenshots yet, but rest assured that when I do, I will.

As for tidying this thread up, no problem. Thanks for the tips and advice.

I could quite easily find the data for the other language FireReds in fairness, as long as it's based on the same principles. I might even be able to find Ruby and Emerald's tables. I wouldn't be able to find the limiting bytes though, as I don't have the ASM skills required as yet.

__________________

Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!

The first pointer (the one that you need to change to edit the flight spots in A-Map) is located at 0xFA88C. Replace the string 20 5A 3E with the offset you repointed your flight table to in reverse hex.

The other two pointers you need to replace are at 0xFA8BC and 0xFA8DC. They are identical strings, and in both, change 18 5A 3E with your new offset (again, in reverse hex).

The "airport Data" is at 0x3E7920.

However, I've run into a bit of a roadblock in that AdvanceMap's "changeroutine" button doesn't actually seem to work for Ruby. Is there a workaround that will allow me to assign a flag to the new flight positions through other means?

Still, I hope this info will help other Ruby hackers who, like me, found that the number of ingame flight positions just weren't good enough

Many thanks are required for this research. I will now bookmark this for in-depth editing later on in my hack, but for now, it's good to know that this exists. Keep fighting the good fight, this is Three Dog, I mean, YouListeningROMs, signing out.

Hmmm, not sure what I did wrong, but for some reason, all of my flight spots on the maps have disappeared. I think I didn't follow the flight table portion correct. The Pokemon Center Healing works perfectly however.

Edit - The part I had to replace data (I had put all FF in those spots) at 0x3EEC98 didn't work for some reason. So I just placed it in my extended table.
Thanks for the tutorial! Very much appreciated.

Edit 2 - Lol, well now only my new flight spot works throwing me into into trees where I'm stuck, hahaha and all the others give me a black screen. I'll get back to this later.

Edit 3 - Got everything working now. There's was no need for me to repoint the Flight Data which was for some reason giving me problems to repoint. 30 flight spots should be enough for my hack. Thanks once again.

Edit 4 - Also using the JPAN engine, I noticed that at seahealingplace Pointer 0xBFD80, 98EC3E08 does not exist. I can only find 98EC3E08 at the other offset.

__________________

Current Live Update: Build 3.0 RC 2.73 No more Flag Errors!
Always periodically make backup saves!

So...if I set all the sethealingplace flags to 'true' I will be able to use fly to get there without visiting each healing spot beforehand?

Yes, though that can be done without even doing this tutorial. It doesn't make for great game design though. :/

Is this tutorial compatible with JPAN's hacked engine? I can't seem to get any Flight Spots to show up in Advance Map (both 1.9.2 and 1.9.5) to work on a ROM that has the patch applied. They still work in-game but I don't really have a convenient way to move the Flight Spots around.

Help

The PokéCommunity

Meta

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, or The Pokémon Company International. We just love Pokémon.