View Full Version : [Tutorial] Pokemon G/S - How to create a new region

November 13th, 2011, 2:32 AM
Pokemon G/S Hacking Tutorial - How to create a new region by Miksy91

Notice that I'm explaining how to create a new region replacing either one of the regions that already exist in G/S. Without assembly, it's impossible to add a third one. Besides, this tutorial may be difficult to be understood because editing a region properly is not easy either so don't expect to find a more newbie-friendly tutorial elsewhere.

Step 1

Let's start with the basics. There is a table at $92382 in Gold and Silver. That table contains four bytes for each area in Johto. The structure is like this: [X] [Y] [Pointer]
[X] and [Y] determine the location of the area determined by the [Pointer] in the town map, the [Pointer] leads to the name of the area.

The first four bytes, 00 00 46 69, tell the game that area "SPECIAL" is at (0,0) in town map. The next four bytes, 94 74 FE 64, determine that area "NEW BARK TOWN" is at (94, 74) in town map.

Well, now you should know how to edit the names of areas and determine their location in the town map.
Anyway, we still hardly know a thing yet.

Step 2

According to the table above, each area has its typical byte:
SPECIAL --> 00
ROUTE 29 --> 02 etc. (depending on where the [Pointer] leads, make sure you don't confuse it with the order the area names in which CHERRYGROVE CITY would come after NEW BARK TOWN)

The order of these typical bytes also tells the game, which area is displayed when you click left or right -button when viewing the town map.
This typical table is used in another table at $91BCC which I'll explain soon...

Step 3

Before moving on to the table at $91BCC, let's see what we can find in another table at $15319. If you've hacked G/S before, you may have changed the location where the game starts so you might be familiar with this offset already.

Anyways, at $15319 is a table in this form: [Map Bank] [Map Number] [X] [Y] which tell either the blackout map (loaded when losing a battle) or the map where you can fly to.
The first four bytes are 18 07 03 03 which tell the starting position of the game as well. They also tell the game where you'll end up before if you lose and haven't been at any pokecenter yet.

The next four bytes are unused flying data for Viridian City PC, then the next four bytes determine the flying / blackout position when you've been in Pallet Town.

Now, look at this document by Koolboyman:

As you can see, the bit of "Your House" is 3200, "Viridian PC" is 3300, "Pallet Town" is 3400 etc. Basically, when 3200 is set, you'll end up in the place determined at 0x15319. When 3400 is set, you'll end up in the place determined at 0x15319 + (0x34 - 0x32) * 0x4 = 0x15321

Well, it's hard to explain this better because I don't know the ASM for flying or blackout positions but anyway, when 3400 is set, you're able to fly to Pallet Town but that doesn't mean you'll end up there after blackout. You'll only end up there after blackout if you haven't been to other towns after Pallet. Makes sense right ?

Anyway, when bit 4100 is set, the game knows that you've been in Cherrygrove City. Cherrygrove's flying data is at: 0x15319 + (0x41 - 0x32) * 0x4 = 0x15355

Then again, I was struggling with this thing myself;
Azalea Town's (4300) flying data is not at 0x15355 + 0x8 = 1535D
Instead, it's four bytes ahead at 0x15361.
$1535D you can find the blackout data for Route 31 (where is a pokecenter). As you can see, bit number doesn't itself determine the offset where the game looks for the flying data although it seemed so.

Now, it's time to move on to the final step !

Step 4

It's time to return to table discussed earlier, the one at $91BCC.
The table contains flying map & flying data for each area in Johto region and this is the form of it: [Typical byte] [Which place leads to]

As explained earlier, each area has its own typical byte depending on the [Pointer] in the table at $92382. [Which place leads to] tells the game which list of bytes are loaded in the table at $15319.

Complicated...but fun ;)
Anyways, the first two bytes determine the flying data for NEW BARK TOWN (4000) which are 01 0E.

01 is used to display the flying map for the selected area and 0E loads the place where you'll end up when clicked A button.

01 loads the four bytes at 0x92382 + 0x1 * 0x4 = 0x92386 which contains the (x,y) location and pointer to "NEW BARK TOWN".

0E tells the game to load the flying data at 0x15319 + 0xE * 0x4 = 0x15351 which contains the [Map Bank] , [Map Number] and [X], [Y] location where you'll end up after having blackout or flown to the selected place.

As explained above though, you can't count the flying data location in the same way for places of which bit number is bigger than 4200 (due to the pokecenter being in Route 31). In those situations, you've to minus 4 from the offset calculator gives you.

I'm done !

That's all the info you'll need to create your own region and have it's town map and flying datas edited properly. To create town map easier, use Harrison's GSC Town Map Editor: http://hax.iimarck.us/topic/97/

The sixth byte in the primary header of each map tells the game in which area that map belongs.

March 9th, 2012, 1:38 PM
Thanks for this info, it has really helped.

April 11th, 2014, 3:22 PM
I will put into practice the information.

Thank you very much!