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.

Hey everyone, so this is my first tutorial on hacking so give me a bit of slack Ask questions and I will answer them to the best of my knowledge.

I have been struggling with hacking the world map for quite some time now and I finally got my map completed and not glitched in my game. Every tutorial I have found made part of the map glitch, and since I wanted to have the map switcher button, I figured this out. (Many tutorials skip this part to make it not glitch I learned)

Requirements

Spoiler:

A Pokemon Rom
VBA
unLZ
NTME
Microsoft Paint works, but Photoshop will be much better to use
Sphere Game Developer
Microsoft Excel
Hex Editor (I prefer HxD)
The resources file at the end of this post
Time

Making the Tileset

Spoiler:

In order to hack the map, first you will need to make a map, or modify the original. In my case, I am making an extension to the original map. First, I made my map (There are many ways to make the map, just make sure that you have the correct palette at the ene, I will upload this

Before things get messy, make a folder called World Map so that you can keep things in order, and extract that resources file into the folder too

Next, you must make the map in the correct palette. You could use paint if you used the eye dropper, but in my case I used photoshop to make sure the image was "indexed" or was using a specific palette. If you want to use the original map as a starting point, I have also uploaded the map below. (You can use a completely new map, but make sure that you know how to edit the palette if needed, and that the map is 208x144)
Here is my final map

Spoiler:

Save your map to your world map folder

Once the map is made, you need to make a new tilemap of the new map you have made. What I did at this point was figure out what parts were changed and then I changed those tiles later on. So for my map, I had changed this part of the map

Spoiler:

After finding what of the original map was changed, you need to select only that part of the map, to make a new tileset of the new areas.

Spoiler:

Save this new part of the map, and fill the rest with the blue color.

Open sphere editor, and click import image to map

Spoiler:

Save that map to your world map folder.

After you have made the tilemap, you must now save it to a usable form. Open up your map in sphere.

Spoiler:

Next, use print screen or the snipping tool in windows to take a screenshot of your tilemap. Paste this into your image editing program and crop it to the pixel, so that all you can see is this. Then pencil in or fill bucket the first tile to remove the purple

Spoiler:

Here is what your final custom tilemap should look like:

Spoiler:

To make things not glitch, we now need to add this tilemap to the original tilemap of the game, which is included in the resources folder. To do this, you need to move all of your tiles onto the extra space below the tiles

Spoiler:

Your final tileset will look like this with all tiles on the map. My tile map contains around 384 tiles. This is much larger than the "limit" of 256 tiles, however this may be per tilemap and not tileset. Either way, my map worked but I cannot guarantee results

Spoiler:

Making The Tilemap

Spoiler:

Now that we have a tilemap and a reference image, it is time to make the map as a raw. This sounds scary, but just takes a bit of time to do. I found a simple way that will not glitch up things, but will take time to do. To make this raw, first open up the excel file in the resources folder. This file has tons of data in it, but we are only concerned with the first table right now. Looking at the table, there are lots of values, these correspond to the values of the tiles on our final tilemap.
Here is how the tiles work:

Spoiler:

The number across the top and down the side are the decimal number of the grid, while the numbers inside are the decimal number of the tile. If you think of counting across the rows, then down the columns, this will make sense. The tiles work like this:

Spoiler:

Now that you understand the first grid, let’s move on to the second grid to the right, this one tells the number of the tile in hex. Hex is a base 16 number system, and if you don’t understand this counting, I suggest you stop with this tutorial.

The third grid, moving down a row on the left side is the hex numbers with the extra zeroes needed to make it 2 bytes (4 total numbers). This is useful so that we can reverse the bytes.

Spoiler:

Our next table is where the bytes of the two are reversed, so if a number was 00 01, it would become 01 00. This reversal is how the game figures out which tiles go where, like pointers I believe.

Spoiler:

The bottom left table shows the palette used at each square on the grid, the outside uses a palette 2. Normal tiles use a palette 0, and special tiles use palette 1. Each red city dot uses palette 1, and also some certain elevations use palette 1. This is why the tiles in the resources are blue and look wrong, they use another palette, but the image only has one palette.

Spoiler:

The palettes were a bit confusing for me to figure out, but I discovered that a palette of 0, would keep the hex as it was. While a palette of 1 would add 10 (16 in decimal) to the smaller byte. This being said, tile 1 in hex turns to 01 00, and with the palette, tile 1 (cities) in raw is 01 10. Sorry that was very technical!

Finally, our last table on the bottom right shows us the raw data in a table, which means that this is what a program like NTME will generate, but since I have had problems with NTME, I made this.

Spoiler:

The fun part about this spreadsheet is that if you change a value in the first table (Decimal tile number), it will change the rest of the tables accordingly. So to make your tiles, you only need to input the decimal version of the tiles into the first table, and the raw data will then be made.

To go about making the map, simply open up NTME and press open tileset.

Spoiler:

Next, find the tiles you need and their numbers with NTME

Spoiler:

Because NTME gives you the Hex number, you will need to convert every number into decimal. This is quite tedious, but it is basically the way one would hex edit this map.

Once the map is done, you can change the palette If needed, but be careful that the tiles will not change themselves if you do this.
After that, simply copy the final chart, remember not to include the grid numbers on the edges!

Spoiler:

Inserting Your Work Into The Game

Spoiler:

Open up the default world map raw file, and paste write the values into it. At the end should be a row of 16 0’s, keep these! Then save

Spoiler:

Our final steps are inserting our tiles into the game and testing. Open up unLZ and type in 188 (BPRE), somewhere close for other games, but I cant guarantee it working.

Spoiler:

Import the tiles you made, not the raw file and choose a free offset using FSF if necessary (I chose 812500). Press write to rom, and check fix pointers. It should say that it moved the pointer for the tiles. Next, load the raw from file-load raw. Choose another offset for this (I chose 813600).

Spoiler:

The raw won’t be automatically repointed, so open your rom in the hex editor. Goto offset C035C, and type in your offset reversed. For me, I typed in 00 36 81 08. Save, and you are done!

Spoiler:

Results

Spoiler:

Now go to test, and you should have a new map. If things didn’t work quite right, check back on the numbers you typed into the spreadsheet. Good luck!

Spoiler:

If you have any problems, ask questions and I will try to help out. Have fun

Thank you for the feedback! I believe that you should be able to insert a completely new map if you wanted. I would suggest if you wanted to use the islands yet, find only the tiles unused and replace them. I happened upon this technique late one night and I am still unsure if there is a much simpler way, but once you figure things out you are set. Experiment, but make a backup before! I suggest simply adding your sphere tile set below the original, but there apparently have been problems with large tile sets. Good luck, let me know how things work out!

__________________

Pokemon Ember - an addition to the already wonderful pokemon games
Coming Soon!

Thank you for the feedback! I believe that you should be able to insert a completely new map if you wanted. I would suggest if you wanted to use the islands yet, find only the tiles unused and replace them. I happened upon this technique late one night and I am still unsure if there is a much simpler way, but once you figure things out you are set. Experiment, but make a backup before! I suggest simply adding your sphere tile set below the original, but there apparently have been problems with large tile sets. Good luck, let me know how things work out!

Ahh... I was not aware you wanted to do ruby. I believe that the same concepts should apply to this as well. This tutorial was made for fire red, but it should work as long as you deconstruct the map as I did for this game. I would suggest looking at this tutorial for ruby, but I have never hacked ruby so I am unsure. My way is a bit rediculous, but I feel that I learned a lot in the process, and it was the one way I got my map to work. Try the tutorial first, but if it doesn't work, by all means you can figure out the map for ruby using this method. I will add in the info if you do find it out! Once again, good luck and I hope your map looks great after you change it

__________________

Pokemon Ember - an addition to the already wonderful pokemon games
Coming Soon!

Ironically I tried that tutorial first but found out I had too many tiles to fit the 128 x 128 square (256 tiles) which mine had over 400 so I am going to have to try this way otherwise I will have to resdesign the map, lol. Hacking a game first time ins't easy! XD Thanks!!

You are quite welcome. Let me know if you run into problems. Remember that you should not have quite that many tiles if you use sphere to make the tiles into a tilemap.

The largest possible amount of tiles in the map is 30*20 = 600. Granted, 600 tiles means every single tile is unique. About 1/3 of your tiles may not be unique. You will need to use sphere though to find out. In total, I used about 384 tiles. It is possible with over 256 using my method... In my experience that is

This is my first tutorial and my first attempt at a hack is in progress as well. Once I put the pieces together, things worked out. Getting my map to work took many hours - I don't want to think about how many nights I kept getting problems. Then I decided to try something not in a tutorial and dissembled what I could of my work and found a solution. Quite a process, but quite rewarding in the end. I am glad I was at least able to spark interest in you!

__________________

Pokemon Ember - an addition to the already wonderful pokemon games
Coming Soon!

Haha, okay thanks! Now I just have the massive task of trying to understand something I don't know how to do even though I am following your tutorial (which is very detailed and understandable)! What I gather from the tutorial is that I now have to change the data on the Excel document to the numbers of each of the tiles in my tileset which was created in Sphere as per the tutorial? This ended up in giving me a tileset with 440 tiles and no duplicates.

-Edit-
I see how your tutorial works now, you take the tile number convert and place in the excel file what I have to do is not particularly hard but is very long-winded. Converting 440 tiles from HEX to Decimal, DAMN! xDD

Yes, it is simply time consuming. If you look at the excel file, it does convert from decimal to hex with a cell at the bottom. I am sorry that the spreadsheet is that way, but changing it would be quite a pain. I would suggest getting a piece of graphing paper and write in your map. By the end you will understand exactly how the map works I promise!

__________________

Pokemon Ember - an addition to the already wonderful pokemon games
Coming Soon!

Yes, it is simply time consuming. If you look at the excel file, it does convert from decimal to hex with a cell at the bottom. I am sorry that the spreadsheet is that way, but changing it would be quite a pain. I would suggest getting a piece of graphing paper and write in your map. By the end you will understand exactly how the map works I promise!

That's a great idea! I am recreating the map in HEX in a new Excel spreadsheet and then converting them to decimal later so I know that everything is in the correct place.

Thanks for your help!! :D

Okay, the problem I have now is with the palette fields in the Excel document, are yellow 1s meant to match up with the towns/cities on the map because my map contains those (and same with the other corresponding colours)?

Sounds like you are chugging away at this map. Firstly, making a separate excel spreadsheet is a good idea. Remember to use the DEC2HEX function to convert it all and then copy/paste the numbers into the original spreadsheet.

For the palette numbers, yes they are meant to match the cities and towns. I am not sure in ruby, but I believe that it should be similar. There are about 4 cells which may stay yellow (palette 1) so check that it is only highlighting your cities.

__________________

Pokemon Ember - an addition to the already wonderful pokemon games
Coming Soon!

Sounds like you are chugging away at this map. Firstly, making a separate excel spreadsheet is a good idea. Remember to use the DEC2HEX function to convert it all and then copy/paste the numbers into the original spreadsheet.

For the palette numbers, yes they are meant to match the cities and towns. I am not sure in ruby, but I believe that it should be similar. There are about 4 cells which may stay yellow (palette 1) so check that it is only highlighting your cities.

Yeah, did that pretty quickly as you said by reversing the HEX2DEC function and pasting the values once copied - do I need to worry about the code behind head of the coloured palette fields, would a screen-shot help show you what it currently looks like? Checking the yellow fields, pretty much none of them match up with the cities/towns. I think what may be sending it off is that the maps are different - one contains a blue border whereas my map takes up the whole space of 160 * 240 dimensions.

Yes. You need to have your map smaller I believe. You can probably scale it down w/o loss of quality as long as it is indexed. If you use photoshop there is an option to keep the pixels but scale it. Additionally if you would like, pm me your files you have and I'll check it out so I can help the ruby hackers as well. Make sure that the 2nd tile in total is the city tile. Just send me what you has and I'll take a look

__________________

Pokemon Ember - an addition to the already wonderful pokemon games
Coming Soon!

Thank you for clearing up the issues with finding sphere. In my experience I found that using sphere was the easiest. That was me personally, but your mileage could vary. Thank you for the heads up for NTME though

__________________

Pokemon Ember - an addition to the already wonderful pokemon games
Coming Soon!

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.