• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best places on the 'net to talk Pokémon and more! Community members will not see the bottom screen advertisements.
  • Want to share your adventures playing Pokémon?
    Check out our new Travel Journals forum for sharing playthroughs of ROM Hacks, Fan Games, and other Pokémon content!
  • IMPORTANT: Following a takedown request, the following hacks have been delisted from PokéCommunity:

    • Pokémon Glazed
    • Pokémon: Giratina Strikes Back
    • Pokémon Flora Sky
    • Pokémon Stranded
    The downloads and discussion threads for these hacks will no longer be accessible, and staff will be unable to return questions regarding accessing this content.

Pokemon Fire Red: Editing The Town Map

761
Posts
15
Years
  • Seen today
Intro

Editing the town map is an underexposed part in many ROM Hacks. It's probably because of the lack of a complete, easy-to-understand tutorial. There is a variety of tutorials available on Youtube and Pokecommunity on how to edit the Town Map in Fire Red. Some of those tutorials explain pretty well how to replace the graphics of the Town Map in general, but lack the finishing touch. They often lack an explanation about the underlying mechanics as well. The information on how to completely edit the Town Map is available in a variety of resources, but pretty scattered around the internet. This tutorial aims to put the information of all those resources together in a complete and concise tutorial for binary hacking Fire Red!

Note that this tutorial is not meant for complete beginners in ROM Hacking. You'll need some basic knowledge about offsets, pointers, graphic editing, etc. in order to follow this tutorial. I'm not going to explain those thoroughly to keep it more concise.

Table of Contents


  • Part #1: Getting Started
  • Part #2: Designing the Map
  • Part #3: Making the Tileset
  • Part #4: Making the Tilemap
  • Part #5: Arranging the Palettes
  • Part #6: Inserting the Tileset
  • Part #7: Inserting the Tilemap(s)
  • Part #8: Inserting the Palettes
  • Part #9: Miscellaneous Edits
  • Part #10: Editing the Town Map data
  • Part #11: Assigning a Map Name Header to a certain Town Map
  • Part #12: Making the Protagonists' Head appear correctly
  • Part #13: Editing the Town Map in the Pokedex
  • Part #14: Ending Notes
  • Credits

Part #1: Getting Started

To perform all steps in this tutorial you'll need the following tools:

  • VBA-M
  • AdvanceMap 1.92
  • Paint XP ~ Not default Paint of Windows 10, it won't work with indexed images
  • Irfanview
  • TileMap Creator
  • unLZ-GBA
  • Free Space Finder
  • Advanced Palette Editor
  • HxD
  • NSE 2.1 ~ To check the NSE bookmarks

Part #2: Designing the Map

I'm not going to explain how to make a visually appealing map. But while designing a map in Paint XP, there are a few important characteristics to take into account.

IQyTMcR.png



  • The actual map should be 192x144 pixels, divided in 8x8 tiles (The red square in the image).
  • The map is divided in 8x8 tiles. It's advised to put towns and routes on exact 8x8 tiles and built the rest of your map around it.
  • There are roughly three to five palettes of 16 colors (1 transparent) to work with.
  • Every tile should have all colors that are present in it in one palette, not divided among different palettes.
  • The cursor can move in the blue square of the image. ~ it's advised to put your towns and routes in this area
  • The close-button and the switch-button are placed in the purple square of the image. ~ it's advised not to put your towns and routes in this area
  • The close-button won't show up by default, you'll need to add it to your actual map.
  • The switch-button will show up once you've set flag 0x845, you should not add it to your actual map.
  • Do not include the blue landmark icons to your actual map (the icons that are used for locations like Viridian Forest and Mt. Moon).

Examples of two map designs:
qbBmLVI.png
nhBdpMa.png


Part #3: Making the Tileset

A tileset is basically the 192x144 image of your designed map without the duplicate tiles. The purpose of removing duplicate tiles is to save space in the ROM. You create a tileset manually by removing the duplicate tiles from your own town map design image in Paint XP. After you've finished that, divide your tileset in different parts that each consists of a maximum of 16 colors (of which one is transparent), index the images and create a palette for them with a tool like Irfanview*. The tilesets below are basically the tiles that build up the example map designs above in Pokemon Orange Islands, but without the duplicate tiles. The tileset examples are followed by a few characteristics to take into account when making a tileset.

*The palette file that is created by Irfanview is not a regular .pal or .act file. You can convert the file you get from Irfanview to a properly readable palette file by using a tool called PEdit.

The Tileset (with the different palettes connected to them):
UFzHTDP.png
IlEEMuk.png
Yyy5pw3.png



  • Put one tile in your tileset that only consists of the first color in your palette (the transparant color).
  • Keep the width of your tileset at 128 pixels (like in vanilla Fire Red).
  • Tiles 0x200-0x23F in your tileset won't show up correctly in-game. If your tileset has more than 0x200 tiles, add the additional tiles after tile 0x23F.
  • Make sure that tiles 0xF1, 0xF2, 0xF3, 0x101, 0x102, 0x103, 0x111, 0x112 and 0x113 contain the switch-button in your tileset (The red square in the first tileset image), when you're planning on having more than one town map. If flag 0x845 is set, these tiles will appear instead of the ones that you originally put at that location in your tilemap.
  • Tools that create tilesets automatically don't take the characteristics above into account. Therefore, it's advised to create your tileset manually.

Part #4: Making the Tilemap

The tilemap is basically the file that tells the games' engine how the tiles of a tileset should be arranged on screen. You can create the tilemap in a tilemap editor like Tilemap Creator.


  • Step 1: Open your tileset in Tilemap Creator.
  • Step 2: Set the size of the tileset to a width of 16 tiles.
  • Step 3: Set the size of the tilemap to 30 x 20 tiles and click resize. You should now have a canvas of 30 x 20 tiles to work with.
  • Step 4: Recreate your map design on the canvas like the image below.

opLkwFY.png



  • Step 5: Fill the canvas that is bordered by the red color with transparent tiles.
  • Step 6: Fill the canvas that is bordered by the yellow color with one single tile of one color (white by default). ~ This color will appear as transition color when opening the map from your bag
  • Step 7: Fill the canvas that is bordered by the pink color with your own town map design.
  • Step 8: Switch from ''edit tiles'' to ''edit palette'' and you will see something similar like the image below. You can assign a different palette to every tile in this editor.

j4huzsv.png



  • Step 9: Assign palette 0x0 to the tiles that use palette 0.* ~ The ''main'' palette in vanilla Fire Red
  • Step 10: Assign palette 0x1 to the tiles that use palette 1.* ~ The ''towns'' palette in vanilla Fire Red
  • Step 11: Assign palette 0x3 to the tiles that use palette 3.* ~ The ''switch- and close map buttons'' palette in vanilla Fire Red
  • Step 12: Save your GBA raw tilemap. ~ Make sure your tilemap will be exactly 1216 bytes in size. Tilemap Creator gives an option to add bytes to the tilemap if needed. If your tilemap is not exactly this size, the image will glitch in-game.
*The image shows how the palettes are arranged in the vanilla games. It is possible to customize these palettes to your own liking.

Part #5: Arranging the Palettes

When the town map is loaded on screen, several palettes are loaded by the games' engine. These palettes can be viewed with the Palette Viewer tool of VBA-M.

lmrLjWi.png



  • Background palette 0x0 corresponds with palette 0x0 in the palette editor of Tilemap Creator.
  • Background palette 0x1 corresponds with palette 0x1 in the palette editor of Tilemap Creator.
  • And so on.

In the vanilla games, background palette 0x0 up to 0x4 are all designated for the town map and related images. In theory, all these palettes can be used when creating your own town map. How the use of these palettes is divided in vanilla Fire Red is explained below.


  • 0x0: Used for the main scenery like land, sea and mountains.
  • 0x1: Used for cities and towns.
  • 0x2: Used for the foldable map.
  • 0x3: Used for the close- and switch buttons and the minimaps when switching town maps.
  • 0x4: Used for the gray background when opening the fly-map or opening the town map from an overworld script.

If you don't want to make it too hard for yourself, I'd advise to stick to the same division of palettes as in vanilla Fire Red.

Part #6: Inserting the Tileset

To insert the tileset, we will use unLZ-GBA*.


  • Step 1: Open your ROM in unLZ-GBA.
  • Step 2: Go to the vanilla town map tileset at image offset 0x3EF61C. ~ Image 190 in a vanilla Fire Red ROM
  • Step 3: Click ''Import'' and select the tileset you made in Part #3.
  • Step 4: Click ''Write to ROM'', toggle ''Export Image'' and ''Automatically Fix Pointers'' and click ''OK''. ~ If your tileset is the same size or smaller than the original, you can continue to Step 11
  • Step 5: You probably get a notification with the compressed size of your tileset image (in hex) and the message that your tileset size is too large. Which means that we need to repoint the tileset to a different offset with enough space to import the tileset in.
  • Step 6: Open your ROM in Free Space Finder (FSF), set the Free Space Byte to (0x)FF and search for free space starting from offset (0x)800000.
  • Step 7: Convert the compressed size of your tileset image from hex to decimal.
  • Step 8: Search free space for the decimal value of the compressed size of your tileset.
  • Step 9: Copy the found offset ((0x)XXYYZZ).
  • Step 10: Go back to unLZ-GBA, repeat Step 2-4, but now, paste the found offset from Free Space Finder in the ''Image Offset'' and click ''OK''. ~ With the 0 still preceding it
  • Step 11: The tileset should be imported in your ROM now. ~ You can check the town map in-game to be sure. At this point it will still look messy

*I know there are more modern tools like NSE 2 and HMA, but this is what I'm personally used to.

Part #7: Inserting the Tilemap(s)

To insert the tilemap, we will use unLZ-GBA and HxD.


  • Step 1: Open your ROM in unLZ-GBA and search for a small image.
  • Step 2: Click File, Load RAW and select the tilemap you made in Part #4.
  • Step 3: Click ''Write to ROM'', toggle ''Export Image'', untoggle ''Automatically Fix Pointers'' and click ''OK''.
  • Step 4: You should get a notification with the compressed size of your tilemap (in hex) and the message that your tilemap size is too large.
  • Step 5: Open your ROM in Free Space Finder (FSF), set the Free Space Byte to (0x)FF and search for free space starting from offset (0x)800000.
  • Step 6: Convert the compressed size of your tilemap from hex to decimal.
  • Step 7: Search free space for the decimal value of the compressed size of your tilemap.
  • Step 8: Copy the found offset ((0x)XXYYZZ) and make a pointer for that offset. ~ The pointer to offset 0x XX YY ZZ would be ZZ YY XX 08
  • Step 9: Go back to unLZ-GBA, repeat Step 2-3, but now, paste the found offset from Free Space Finder in the ''Image Offset'' and click ''OK''. ~ With the 0 still preceding it
  • Step 10: Open HxD and go to the offset of the original pointer to the first tilemap (at 0x0C035C).
  • Step 11: Paste write the pointer you created in Step 8 in that offset.
  • Step 12: The tilemap should be imported in your ROM now. ~ You can check the town map in-game to be sure. At this point, only the colors of the first town map should be messy

In vanilla Fire Red, there are 4 town maps (1 Kanto and 3 Sevii Islands maps). Each map uses the same tileset, but has a different tilemap. In theory, you're able to import 4 different town maps in Fire Red without manually touching any ASM Routines. The vanilla offsets of the tilemaps for the town map in Fire Red can be found below.


  • Tilemap 1 (Kanto), Tilemap Offset: 0x3F089C, Pointer Offset: 0x0C035C
  • Tilemap 2 (Sevii Island 1,2 & 3), Tilemap Offset: 0x3F0AFC, Pointer Offset: 0x0C0370
  • Tilemap 3 (Sevii Island 4 & 5), Tilemap Offset: 0x3F0C0C, Pointer Offset: 0x0C0388
  • Tilemap 4 (Sevii Island 6 & 7), Tilemap Offset: 0x3F0CF0, Pointer Offset: 0x0C03A4

The process of altering the Sevii Islands tilemaps would be similar to altering the tilemap of Kanto. The only difference would be the offsets that are used in the process.

Part #8: Inserting the Palettes

To import the palettes you created in Part #3, we will use Advanced Palette Editor (APE).

The palettes mentioned in Part #5 can be found in the following offsets.

  • 0x0 (main scenery): 0x3EF2DC
  • 0x1 (cities and towns): 0x3EF2FC
  • 0x2 (foldable map): 0x3EF31C
  • 0x3 (close- and switch buttons): 0x3EF33C
  • 0x4 (gray background): 0x3EF35C


  • Step 1: Open your ROM in Advanced Palette Editor (APE).
  • Step 2: Untoggle ''Compressed Palette (LZ77)'', select ''Load Offset'' and enter the palette offset mentioned above that you want to edit.
  • Step 3: At ''Edited Palette'' click import and select your custom palette file.

The display in Advanced Palette Editor (APE) should now look similar to the image below (but probably not in Dutch). In that image the red square should contain the original palette and the blue square should contain your custom palette that should overwrite the original.

XSIXcMh.png



  • Step 4: Click ''Replace''. By doing this, the original palette will be overwritten with the edited palette.
  • Step 5: Repeat the process for any other palettes that you would like to edit.

Apart from the blue landmark icons and the protagonist head, the background graphics of the town map should now show up correctly in-game.

Part #9: Miscellaneous Edits

There are several smaller graphics related to the town map of which the most important ones will be mentioned below. They can be found and edited with a tool like NSE 2 (or unLZ-GBA). I've documented several of these graphics already which can be found in these Bookmarks for NSE 2. Be aware that some of these graphics share their palette with each other. Which means that changing the palette for one sprite could also alter the appearance of another sprite.


  • The Protoganist Head (that shows where you are located on the map).
  • The Zoomed-Out Town Maps.
  • The Landmark Icon.
  • The Fly Icon.

In vanilla Fire Red, Birth Island and Navel Rock don't show up on the third and fourth town map by default. Before their respective worldmapflags are set, their tiles on the town maps are replaced by tile 0x3 (sea tile) in the town map tileset. This will also happen to custom town maps that replace the third and fourth town map. To prevent this, you can set worldmapflags 0x8B5 (Navel Rock) and 0x8C2 (Birth Island). This will cause the tiles mentioned earlier to show up correctly.

Part #10: Editing the Town Map data

To alter the town map data we will use the World Map Editor in AdvanceMap 1.92. In this tool we can basically alter the data that is overlaying the graphics of the town map. Before you start editing the data, your map will probably look somewhat like the image below in the World Map Editor.

f3JI5g7.png



  • Step 1: Click ''Change Routines'' once. This will alter the flight spot routine and allow for more flight spots to be added to the table.
  • Step 2: Click on a tile of the town map for which the data should be altered.
  • Step 3: If there should be no route, town or landmark on the selected tile, set the bottom-layer and the top-layer to value 0xC5.
  • Step 4: If there should be a route or town on the selected tile, set the bottom-layer to the designated map name header value (in case of Pallet Town it would be value 0x58).
  • Step 5: If there should be a landmark on the selected tile, set the top-layer to the designated map name header value (in case of Viridian Forest it would be value 0x7E).
  • Step 6: Set every map name header value to its correct X- and Y-coordinate.
  • Step 7: If a route/town is larger than one 1x1 tile, set the position of the route/town to its top leftmost X- and Y-coordinate to make the protagonist head appear correctly.
  • Step 8: Repeat this process until you have drawn the complete map and click ''Save Map''.

After you're finished, your map will probably look somewhat like the image below, in which the data corresponds with the image underlying it.

bh0Jotj.png


A few characteristics of the map data are important to note when editing the data.


  • One tile can either have a bottom-layer or a top-layer, but can also have both (if there is a landmark in the same location as a route or town).
  • Every map name header value has a pre-set purpose. It is designated to be either a route, town or a landmark (with or without a location preview image). If a map name header value is not used for its original purpose, it could end up glitchy in-game (the letters showing up as bright pink/red for example). Therefore, it's advised to re-use the map name header values that were designated for towns in vanilla Fire Red for towns in your ROM hack as well. ~ The same goes for routes and landmarks
  • If there is a flight location in a map with a certain map name header value, the Flying/Display Flag will be shown in the designated textbox in the World Map Editor (in case of Pallet Town, flag 0x890). Once this flag is set with the setworldmapflag command in an (XSE) script, the flight spot for this location will become available. ~ In vanilla Fire Red, these worldmapflags are set when you enter a particular area for the first time
  • A lot of the landmarks have a Flying/Display Flag connected to them, but don't actually have a flight spot connected to them in the vanilla games. These Flying/Display Flags are mainly used to determine whether the area has been visited already or not. If the area has been visited once (and the worldmapflag has been set), the small grayish landmark icon will change to a slighty bigger light blue one. When opening the town map from your bag in-game, these light blue landmark icons can be selected and will give some background information about the selected landmark (like the image below).

v5mEk8W.png


Part #11: Assigning a Map Name Header to a certain Town Map

In vanilla Fire Red, certain maps are assigned to the first town map (Kanto), some are assigned to the second town map (Sevii Island 1,2 & 3), others are assigned to the third town map (Sevii Island 4 & 5) and some are also assigned to the fourth town map (Sevii Island 6 & 7). But what if you want to change which town map shows up when you are located on a certain map? The information needed to alter which town map shows up will be explained below.

Which town map opens up is determined by the map name header value of the map on which you are currently located. The map name header values range from 0x58 to 0xC5 in vanilla Fire Red, in which 0x58 is Pallet Town (the first location in the table) and 0xC5 is ''no-location''. By checking the map name header value, the games' engine knows that when I open the town map in Viridian City (0x59), the town map of Kanto should be shown. But when I'm currently located on Five Island (0x93), the games' engine knows that the town map of Sevii Island 4 & 5 should be shown. We can alter which of the four town maps shows up by hex editing the data mentioned below with a hex editor like HxD.


  • There is one byte at offset 0x0C0064 (0x8E in vanilla Fire Red). All map name header values below the value at this offset will be assigned to the first town map.
  • For the other three town maps, the map name header values that are assigned to them are determined by an array of bytes that is located at offset 0x3F1AA4.
  • The first part of the array (in red) determines which map name header values will be assigned to the second town map, terminated by the 0xC5 byte.
  • The second part of the array (in yellow) determines which map name header values will be assigned to the third town map, terminated by the 0xC5 byte.
  • The third part of the array (in blue) determines which map name header values will be assigned to the fourth town map, terminated by the 0xC5 byte.
  • As far as I know, the 0x00 bytes in the array are just used as padding and can be overwritten safely.
  • If you need space to assign more map name header values to the second, third or fourth town map. You can repoint the whole array at 0x3F1AA4 to a different offset in free space.

Rz5ifJA.png


There is only one more thing to note. The World Map Editor in AdvanceMap 1.92 does not take these manual hex changes into account. To check whether the map name header values are assigned to the correct town map(s), you need to check your hex changes in-game.

Part #12: Making the Protagonists' Head appear correctly

A problem that you will probably encounter after importing your town map data is that the head of your protagonist will not always appear in the exact right coordinates on the town map. This is probably because the town map dimensions of your routes/towns have not been altered accordingly. The games' engine determines the width and height of a every map by checking a table located at offset 0x3F2178. We can alter this hex data with a hex editor like HxD. The format of the table is explained below.


  • Every map name header value has its own entry in the table.
  • The table start with the dimensions of map name header 0x58 (Pallet Town) followed by 0x59 and so on.
  • Every entry in the table is four bytes long and has the following format. [WW] 00 [HH] 00, in which WW is the width and HH is the height of the map in tiles.

The hex data looks like this at the beginning of the table. To give a better understanding about how the table is formatted, the colored parts are indicated in text below the code.

mgkqEN7.png



  • The map name header data in red represents entry 0x58 (Pallet Town), which means that this entry has a width of 1 tile and a heigth of 1 tile.
  • The map name header data in yellow represents entry 0x59 (Viridian City), which means that this entry has a width of 1 tile and a heigth of 1 tile.
  • The map name header data in green represents entry 0x5A (Pewter City), which means that this entry has a width of 1 tile and a heigth of 1 tile.
  • The map name header data in blue represents entry 0x65 (Route 1), which means that this entry has a width of 1 tile and a heigth of 2 tiles.
  • The map name header data in pink represents entry 0x68 (Route 4), which means that this entry has a width of 6 tiles and a heigth of 1 tile.

For example, Route S (entry 0x99) in Pokemon Orange Islands has a width of 5 tiles and a heigth of 1 tile, represented by hex values 05 00 01 00 in the table. Route S is located in the red square of the town map below. Because the data is correctly altered in the table, the head of the protagonist will appear in the Western side of the town map when the protagonist is also at the Western side of Route S. When the protagonist is at the Eastern side of Route S, the head of the protagonist will also appear at the Eastern side of the town map.

DybR5tZ.png

6gEo9a5.png
DclSBVD.png

LnWbB4P.png
YXD0lMq.png


If you need more information concerning this table with coordinates you could probably check this post by Chaos Rush.

Part #13: Editing the Town Map in the Pokedex

If everything went well in Part #1 up to Part #12, the town map should be correctly implemented at this point. However, the town map is not the only location in the ROM in which Kanto or the Sevii Islands show up. In the Pokedex, there are several map images in which you can see where a chosen Pokemon can be caught. These images are pretty much unrelated to the other town maps and need to be adjusted separately. You can see how these map images show up once you receive the Pokedex in a vanilla Fire Red game below.

5uPNNVk.png
UNqGvbI.png


Only the Kanto catch map shows up at this early point in the game. The Sevii Islands' catch maps show up later in the game once you visit them for the first time. In the image below you can see the catch map in the Pokedex once it's completely unlocked. This is followed by an explanation about the characteristics of the catch map(s).

8jx8dSI.png
blppwih.png



  • The tiles bordered by the red line represent Kanto and are unlocked once you get the Pokedex.
  • The tiles bordered by the orange line represent Sevii Island 1 and are unlocked once worldmapflag 0x89B is set.*
  • The tiles bordered by the yellow line represent Sevii Island 2 and are unlocked once worldmapflag 0x89C is set.*
  • The tiles bordered by the green line represent Sevii Island 3 and are unlocked once worldmapflag 0x89D is set.*
  • The tiles bordered by the blue line represent Sevii Island 4 and are unlocked once worldmapflag 0x89E is set.*
  • The tiles bordered by the purple line represent Sevii Island 5 and are unlocked once worldmapflag 0x89F is set.*
  • The tiles bordered by the gray line represent Sevii Island 6 and are unlocked once worldmapflag 0x8A1 is set.*
  • The tiles bordered by the black line represent Sevii Island 7 and are unlocked once worldmapflag 0x8A0 is set.*
*Note that unlocking the catch maps is directly related to setting several worldmapflags. There is no way to disconnect these two from each other without ASM as far as I know, other than making all catch maps appear once you get the Pokedex for the first time. This will be explained below.

If your ROM hack only has one region, there is a way to make all catch maps appear at once when you receive the Pokedex. This allows you to combine all the different catch maps into one large(r) catch map. To do this, paste write the following code at offset 0x0CC206, this will remove all checks for the worldmapflags.
Code:
FF 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Subsequently, make the following hex edits and graphical changes.


  • Paste write 0x06 at offset 0x452207. This will correctly align the ''Area''-text above the catch map.
  • Paste write 0x00 at offset 0x106716. This will correctly align the X-value of the ''Area Unknown''-box.
  • Paste write 0x2D at offset 0x10671A. This will correctly align the Y-value of the ''Area Unknown''-box.
  • Paste write 0x42 at offset 0x10673C. This will correctly align the X-value of the ''Area Unknown''-text.
  • Paste write 0x2D at offset 0x10674A. This will correctly align the Y-value of the ''Area Unknown''-text.
  • Replace the image at offset 0x443D00 with this image
    2Ea8w05.png
    . Unlike the original ''Area-Unknown''-box, this box will fit with the current alignment of the ''Area-Unknown''-text.*
*The ''Area-Unknown''-box is documented in the NSE 2 Bookmarks.

At this point, all catch maps should show up once you receive the Pokedex. Besides that, the ''Area''-text and the ''Area-Unknown''-text should be aligned in the middle of the large(r) catch map. We can now start editing the catch map images. The Kanto catch map and the Sevii Islands' catch maps each have their own indivual image. The image offsets of these catch maps are listed below. The palette for all these images is shared and located at offset 0x4406E0. The images don't have a tilemap connected to them and can be imported in the same manner as the tileset in Part #6.


  • Kanto: 0x443620.
  • Sevii Island 1: 0x443910
  • Sevii Island 2: 0x443988
  • Sevii Island 3: 0x4439FC
  • Sevii Island 4: 0x443A78
  • Sevii Island 5: 0x443AF8
  • Sevii Island 6: 0x443BB0
  • Sevii Island 7: 0x443C54

You can now design your own 128x104 catch map based on your town map. Subsequently, divide the catch map into one 96x72 catch map, three 32x24 catch maps and four 32x32 catch maps. For example, check the catch map for Orange Islands below.

YkrRHMI.png
esXoktM.png


After creating the (indexed) images, import them with a tool like unLZ-GBA or NSE 2. For a Pokemon that can't be caught in-game, the catch map should look somewhat like the image below at this point.

5gza0KX.png


You probably noticed that Pokemon that can be caught in-game still show their vanilla Fire Red catch locations. But how does the games' engine determine how these catch area blobs display on screen? Every catch map has its own table that assigns a ''catch map value'' to every map name header value that is present in that table, a so-called conversion table. The conversion table for the Kanto catch map is located at offset 0x464148. The characteristics of this table are summed up below.


  • Every entry in the table is four bytes long and has the following format. [XX XX] [YY YY], in which XX XX is the map name header value and YY YY is the connected catch map value.
  • The amount of entries in the table is determined by a byte at offset 0x13CA9C (0x37 in vanilla Fire Red). ~ If you decide to expand and repoint the conversion table, make sure to adjust this byte as well
  • The pointer to the Kanto catch map table is located at offset 0x13CAC8. ~ If you decide to expand and repoint the conversion table, make sure to adjust this pointer
  • Not every map name header value necessarily has a related catch map value.
  • Different map name header values can have the same catch map value.
756cXa8.png



  • The data in red represents entry 0x0, which connects map name header value 0x58 to catch map value 0x1.
  • The data in yellow represents entry 0x1, which connects map name header value 0x59 to catch map value 0x2.
  • The data in green represents entry 0x2, which connects map name header value 0x5A to catch map value 0x3.
  • The data in blue represents entry 0xD, which connects map name header value 0x65 to catch map value 0xC.
  • The data in pink represents entry 0x10, which connects map name header value 0x68 to catch map value 0xF.

The respective offsets of the conversion tables of the Sevii Islands' maps, the location of their pointers and the location of the byte that determines the length of the table will be listed below. If you only use the original Kanto catch map or you make all catch maps available once you receive the Pokedex, you can completely fill the tables with 0x00 bytes.


  • Sevii Island 1, conversion table offset: 0x464224, pointer: 0x4642BC, length determination byte: 0x4642C0.
  • Sevii Island 2, conversion table offset: 0x464234, pointer: 0x4642C4, length determination byte: 0x4642C8.
  • Sevii Island 3, conversion table offset: 0x46423C, pointer: 0x4642CC, length determination byte: 0x4642D0.
  • Sevii Island 4, conversion table offset: 0x464250, pointer: 0x4642D4, length determination byte: 0x4642D8.
  • Sevii Island 5, conversion table offset: 0x464258, pointer: 0x4642DC, length determination byte: 0x4642E0.
  • Sevii Island 6, conversion table offset: 0x464274, pointer: 0x4642E4, length determination byte: 0x4642E8.
  • Sevii Island 7, conversion table offset: 0x464290, pointer: 0x4642EC, length determination byte: 0x4642F0.

After you've given all map name header values with catchable Pokemon a connected catch map entry in the conversion table, you can start adjusting another table in which the catch map entries are interpreted. This table is located at offset 0x463580. The characteristics of this table are summed up below.


  • Every entry in the table is four bytes long and has the following format. [ZZ] [XX] [YY] [00], in which ZZ is the shape of the catch area, XX is the X-coordinate on the catch map, YY is the Y-coordinate on the catch map and the 0x00 byte is used as padding.
  • The pointer to the catch map interpretation table is located at offset 0x1344DC. ~ If you decide to expand and repoint this table, make sure to adjust this pointer
  • The X-coordinate and the Y-coordinate count from the top leftmost pixel of the 128x104 catch map.
  • There are seven different shapes of the catch areas. These different shapes are present in one image located at offset 0x46343C.*~ A visual representation of how catch area shape 0x00 - 0x06 will look in-game can be seen below.
*The ''Catchmap Blob''-image is documented in the NSE 2 Bookmarks.

DEO7HEU.png


1dIkLGJ.png



  • The data in red represents entry 0x0, which is used as padding.
  • The data in yellow represents entry 0x1, which causes catch area shape 0x00 to show up at X-coordinate 0x09 and Y-coordinate 0x42.
  • The data in green represents entry 0x2, which causes catch area shape 0x00 to show up at X-coordinate 0x09 and Y-coordinate 0x35.
  • The data in blue represents entry 0x11, which causes catch area shape 0x02 to show up at X-coordinate 0x19 and Y-coordinate 0x3D.
  • The data in pink represents entry 0x14, which causes catch area shape 0x06 to show up at X-coordinate 0x30 and Y-coordinate 0x32.

When you've adjusted both the conversion table and the catch map interpretation table, the catch map should now be correctly implemented. This should look somewhat like the images below (but with a slightly different color).

vbROUmS.png
TnVRtS6.png


Part #14: Ending Notes

This should be everything you need related to editing the town map in Fire Red! If something is not clear or you have any other question, feel free to comment! Good luck!

Credits


  • Blah - For finding the alignment-coordinates of the textbox and texts when re-arranging the Pokedex Town Map.
  • Chaos Rush - For providing this post about the appearance of the protagonist head.
  • Mastermind_X - For providing this tutorial about assigning a map to a certain town map and this tutorial about editing catch maps in the Pokedex.
  • Spherical Ice - For providing this information which provides a way to expand the Pokedex Town Map.
 
Last edited:
Back
Top