# Skeetendo

’Cause all games were better on the GBC

You are not logged in.

## #1 2011-11-13 15:09:59

Miksy91
Member
Registered: 2010-10-16
Post 601/2,348

### How to properly make a new region

Pokemon G/S Hacking Tutorial - How to make 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
NEW BARK TOWN --> 01
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. The table is like this: [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
\$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 contain 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 contain 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.

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 the town map easier, use Harrison's GSC Town Map Editor: http://hax.iimarck.us/topic/97/

Other useful information
-The sixth byte in the primary header of each map tells the game in which area that map belongs.
-By setting the sixth bit ("40") in D571, Town Map will be displayed correctly on Kanto side before accessing Hall of Fame.

Last edited by Miksy91 (2012-10-29 06:58:27)

Offline

## #2 2011-12-29 06:21:36

Miksy91
Member
Registered: 2010-10-16
Post 699/2,348

### Re: How to properly make a new region

I saw that moderators made some of the threads sticky which I honestly think is a good thing.
This thread should be made sticky too - maybe remove "Town Map Hacking" of those while at it.

Offline

## #3 2011-12-29 08:04:39

Mateo
Member
Registered: 2009-11-25
Post 1,143/3,659

### Re: How to properly make a new region

Done and Done

I am not very active on this forum. I only pop in from time to time.

Offline

## #4 2012-02-05 14:06:54

Miksy91
Member
Registered: 2010-10-16
Post 766/2,348

### Re: How to properly make a new region

I'm not going to check the list itself but the beginning of it looks correct.
And they're truly in the same orders as where the pointers at 0x92382 lead so you've got the idea right.

Offline

## #5 2012-02-05 19:37:38

Miksy91
Member
Registered: 2010-10-16
Post 767/2,348

### Re: How to properly make a new region

kkj1116 wrote:

I've looked over the tutorial several times to try to make sure I got this right but I'm still confused.
The table at x91BCC lists the following:

``````01 0E
03 0F
06 10``````

These are New Bark Town, Cherrygrove City, and Violet City. I thought that the table would be something along the lines of:

``````01 0E
02 ..
03 ..
etc.``````

They're like that because of the reason you explained yourself earlier.
NEW BARK TOWN = 01
CHERRYGROVE CITY = 03
VIOLET CITY = 06

kkj1116 wrote:

How would I go about changing the order they appear on the Town Map?
Step 3 is about when is a certain place enabled for Fly, and where Flying/Blackout will lead you to on the map.
Steps 1 and 2 are about the typical bytes and the the maps' locations on their Town Map..
Would I have to relist the table at x92382 so that it reads something like this? (Let's say I go in order starting at Ecruteak, skipping over Special)

You make the pointer that leads to "NEW BARK TOWN", point to ECRUTEAK CITY. The pointer that leads to "ROUTE 29" to "ROUTE 38" etc.
*I see you figured it out on your own but yeah, that's how it goes.

Last edited by Miksy91 (2012-02-05 19:40:33)

Offline

## #6 2012-02-05 20:17:33

Miksy91
Member
Registered: 2010-10-16
Post 768/2,348

### Re: How to properly make a new region

I guess you want Ecruteak to be the first and Olivine to be the second on flying map?
In that case, change 01 0E to 01 XX (in which XX corresponds the flying data in the list at 0x15319 for Ecruteak) and 03 0F to 04 YY (04 comes from the fact 02 would be ROUTE 38 and 03 ROUTE 39 and so you'll also want Olivine to be the 4th when viewing town map).

Offline

## #7 2012-08-25 05:33:15

wuzzupdude5
Member
From: Spark Haven
Registered: 2012-08-16
Post 14/36
Website

### Re: How to properly make a new region

I've repointed all the data and such, but what do I do with the parts of the map that are all unused? (I have about 15 pointers/locations that I don't need at this time.)

“放慢生活的脚步，你会活得更加快乐。”
"Slow down the pace of life and you will live with even more happiness."

Offline

## #8 2012-08-25 11:48:59

Miksy91
Member
Registered: 2010-10-16
Post 1,047/2,348

### Re: How to properly make a new region

wuzzupdude5 wrote:

I've repointed all the data and such, but what do I do with the parts of the map that are all unused? (I have about 15 pointers/locations that I don't need at this time.)

Good point! I'd forgotten about that.

``````\$90FB8 and \$91901
How many Areas in Johto``````

Those two bytes are actually used for Town Map (when viewing from a house) and the other one is for Town Map of Pokegear. I haven't checked how Kanto works yet.

Last edited by Miksy91 (2012-08-25 11:50:12)

Offline

## #9 2012-08-25 15:42:57

wuzzupdude5
Member
From: Spark Haven
Registered: 2012-08-16
Post 16/36
Website

### Re: How to properly make a new region

Okay thank you! If you find anything out about Kanto before I do please let me know. If I find anything I'll post it as well.

“放慢生活的脚步，你会活得更加快乐。”
"Slow down the pace of life and you will live with even more happiness."

Offline

## #10 2012-08-25 17:11:03

Miksy91
Member
Registered: 2010-10-16
Post 1,050/2,348

### Re: How to properly make a new region

wuzzupdude5 wrote:

Okay thank you! If you find anything out about Kanto before I do please let me know. If I find anything I'll post it as well.

I won't be taking a look at it in a while but yeah, I'll provide more info when I find out.

Offline

## #11 2012-08-26 17:15:35

wuzzupdude5
Member
From: Spark Haven
Registered: 2012-08-16
Post 18/36
Website

### Re: How to properly make a new region

I couldn't seem to find anything on it. I tried searching based on how many locations are in Kanto, but I couldn't find anything there either, so I just set all my extras to SPECIAL for now. Will that have any negative effects?

“放慢生活的脚步，你会活得更加快乐。”
"Slow down the pace of life and you will live with even more happiness."

Offline

## #12 2012-08-26 17:31:24

Miksy91
Member
Registered: 2010-10-16
Post 1,054/2,348

### Re: How to properly make a new region

wuzzupdude5 wrote:

I couldn't seem to find anything on it. I tried searching based on how many locations are in Kanto, but I couldn't find anything there either, so I just set all my extras to SPECIAL for now. Will that have any negative effects?

No, I'm also using SPECIAL as a "bag of maps".

Offline

## #13 2012-08-26 18:20:15

wuzzupdude5
Member
From: Spark Haven
Registered: 2012-08-16
Post 19/36
Website

### Re: How to properly make a new region

Miksy91 wrote:

No, I'm also using SPECIAL as a "bag of maps".

Okay then I guess it's fine for now. After repointing all my data I'm now having a problem with maps not matching up. For example I want the city I've named Alden City to match up with Saffron City's data. Would I just switch the map banks here? And if so how do I go about doing that?

“放慢生活的脚步，你会活得更加快乐。”
"Slow down the pace of life and you will live with even more happiness."

Offline

## #14 2012-08-26 18:41:26

Miksy91
Member
Registered: 2010-10-16
Post 1,055/2,348

### Re: How to properly make a new region

What do you mean by maps not matching up? Using different spritesheets than originally which leads into problems of sprites not showing as what they should? It's hard to tell how this could have happened either but this is all I can pick up from that explanation.
If so, map banks can be switched by switching the secondary header pointers with another map that belongs to other map bank.

Last edited by Miksy91 (2012-08-26 18:42:51)

Offline

## #15 2012-08-27 02:43:57

wuzzupdude5
Member
From: Spark Haven
Registered: 2012-08-16
Post 20/36
Website

### Re: How to properly make a new region

I mean that right now Alden City is matching up with Celadon City's map data(buildings, sprites and inside of buildings) but I want it to match up with Saffron City's data. Is that just simply switching the headers then?

“放慢生活的脚步，你会活得更加快乐。”
"Slow down the pace of life and you will live with even more happiness."

Offline

## #16 2012-08-27 04:21:43

Miksy91
Member
Registered: 2010-10-16
Post 1,056/2,348

### Re: How to properly make a new region

wuzzupdude5 wrote:

I mean that right now Alden City is matching up with Celadon City's map data(buildings, sprites and inside of buildings) but I want it to match up with Saffron City's data. Is that just simply switching the headers then?

Changing the sixth byte in each of the map's primary header works.

Offline

## #17 2012-08-28 00:56:57

wuzzupdude5
Member
From: Spark Haven
Registered: 2012-08-16
Post 21/36
Website

### Re: How to properly make a new region

Miksy91 wrote:

Changing the sixth byte in each of the map's primary header works.

That worked!!! Thanks again!

“放慢生活的脚步，你会活得更加快乐。”
"Slow down the pace of life and you will live with even more happiness."

Offline

## #18 2012-08-30 05:57:54

Miksy91
Member
Registered: 2010-10-16
Post 1,064/2,348

### Re: How to properly make a new region

True. You've to also take in notice that in GSC, you can access Mahogany before Olivine. I don't really know how to describe what to "do about it" but checking what's written in ram (D9EE-D9F1) when a bit from table 2 is set can help out.

Offline

## #19 2012-11-21 15:55:12

Miksy91
Member
Registered: 2010-10-16
Post 1,265/2,348

### Re: How to properly make a new region

Update to this!

I've noticed that the flying data for Kanto map is located in the same list as that of Johto, starting at 0x91BCC.
If the player is in Kanto map and the sixth bit (20) in \$D9EF is set (1), the fly map of Kanto is accessed instead of Johto when using Fly command in the game. If this bit value is 0, fly map of Johto is accessed instead.

The sixth bit in \$D9EF can be set to 1 with PKSV command "setbit2 0x3F". This is related to being able to fly to Indigo Plateau in the original games.

Offline

## #20 2012-11-21 20:37:05

comet
Member
Registered: 2012-04-09
Post 34/679

### Re: How to properly make a new region

This actually is the Indigo Plateau flag. It's checked to see if you can fly in Kanto because it's the first place you're supposed to be able to visit.

Offline

## #21 2013-01-27 04:12:57

Member
From: Georgia
Registered: 2011-08-27
Post 483/650

### Re: How to properly make a new region

Back then I fixed this problem with flying data but that version got deleted by accident. So now I'm stuck with the release I uploaded which doesn't have fly data fixed. I have the places on the town map fixed correctly and they appear in the order I want, but I have the problem with the blackout. No matter where I black out I end up at Pallet Town inside your room. The problem is because I transformed the Johto map data to Kanto's and because of this I get empty spots on flying data. I remember I fixed this back then but now sicne my skills and knowledge are dry, I need help.

Starting at 0x15319 has 0D 04 03 06 0F 05 06 02 0F 05 06 02 0F 05

As you can see, this begins to repeat. I want to fix it so that blackouts happen the way they should.

Pokemon Blue DX is reborn!

It's really not

Offline

## #22 2013-01-27 10:24:58

Miksy91
Member
Registered: 2010-10-16
Post 1,474/2,348

### Re: How to properly make a new region

Start out by changing everything back to normal by copy pasting data from the original rom file.
Then remake the stuff in the ways you want.

For instance, make "Pallet Town" set bit 4000 from bittable2 (which originally stands for "New Bark Town"), Viridian City 4100, and so on...
Then simply make those 4-byte flying data "pointers" starting at 0x15319 point to the map locations of Pallet Town instead of New Bark Town, ...

Next, you have the table at 0x91BCC in "order" because Pallet Town stands for New Bark Town (as flying data) but it should just display New Bark Town while being able to fly to Pallet Town. Change the first byte of every 2-byte structure there to look for the right name (and town map location).

Last edited by Miksy91 (2013-01-27 10:27:06)

Offline

## #23 2013-01-27 14:35:24

virus95x
Member
Registered: 2012-04-03
Post 79/225

### Re: How to properly make a new region

Why don't you make a video as an example on how to make one...

Last edited by virus95x (2013-01-27 14:35:50)

Offline

## #24 2013-01-27 16:40:26

Miksy91
Member
Registered: 2010-10-16
Post 1,476/2,348

### Re: How to properly make a new region

Because videos shouldn't be step-by-step tutorials on achieving everything.

I do what I feel people should know about and after that, they can apply that knowledge to base more information on it.

I do think this kind of stuff should be better documented though so I just might do that. What I won't be doing for instance is how to make a person event give you an item and set some bit accordingly. That has already been "recorded" by explaining the stuff of scripting compendium.

Last edited by Miksy91 (2013-01-27 16:42:15)

Offline

## #25 2013-01-27 17:19:09

Member
From: Georgia
Registered: 2011-08-27
Post 488/650

### Re: How to properly make a new region

Miksy91 wrote:

Start out by changing everything back to normal by copy pasting data from the original rom file.
Then remake the stuff in the ways you want.

For instance, make "Pallet Town" set bit 4000 from bittable2 (which originally stands for "New Bark Town"), Viridian City 4100, and so on...
Then simply make those 4-byte flying data "pointers" starting at 0x15319 point to the map locations of Pallet Town instead of New Bark Town, ...

Next, you have the table at 0x91BCC in "order" because Pallet Town stands for New Bark Town (as flying data) but it should just display New Bark Town while being able to fly to Pallet Town. Change the first byte of every 2-byte structure there to look for the right name (and town map location).

Sounds familiar to what I did back then, I just forgot about many things :/

I'll see what I can do.

Pokemon Blue DX is reborn!

It's really not

Offline