Neti
Inactive
- 1,516
- Posts
- 17
- Years
- Age 33
- Cologne, Germany
- Seen Feb 7, 2021
=== Introduction ===
Hello everyone. Some of you might know me, others might not. I've been inactive in romhacking for more than 3 years now, but somehow I made my way back :) Did a lot of things change? Actually: No. People still use the same tools that we used back then.
So, I started a new hack. What does every hack need of course? A region map! A few years ago, there were like 3 people who could insert a region map properly. One of them was my teammate X-Buster, who did it for me when I was working on Legend of Fenju. Now i wanted to do it myself, it can't be that hard I thought and there are probably good tutorials out nowadays. I was wrong! I did not find any good text tutorial that taught me to insert my map, I did actually find a video that showed a working method. Unfortunely I had to find out theres a lot more stuff to do than just inserting the map! Some of those things are extremely tricky and I even wrote a little tool to help me with color conversions.
With help of others and two days of work, reading Hex Bytes all day, I got together all the information I needed.
So, why not share all this information with you, now that I have it? That's what I'm gonna do now, and hopefully this will be the end of people wondering how to do this.
=== Chapters ===
=== Tools ===
=== Making the Map ===
=== Making the Tileset ===
=== Making the Tilemap ===
=== Inserting the Tileset ===
=== Inserting the Tilemap ===
=== Changing the Palettes ===
=== Changing the World Map Data ===
=== Credits and ending Words ===
As I stated earlier, I had some help figuring out some of this stuff. Therefore I want to let everybody know who these awesomely helpful people were:
shinyquagsire & gogojjtech => Helped me with the Palette Editing, finding the offsets
prime-dialga => Explained the AGB calculation in another forum post I found
CoolMooseDude => Posted a helpful World Map Insertion Tutorial on youtube
MrDollSteak => Told me that the tilemap file has to be 1216 bytes in size
Also I want to thank the creators of the tools.
Lu-Ho => AdvanceMap
HackMew => FSF, unLZ.GBA
D-Trogh => NTME
X-Buster and Darthatron => WARP RE
I hope this tutorial makes a lot of strange stuff clear to a lot of people. And maybe someday this will be useless, because some cool dude came along and wrote a super-good region map insertion tool. I hope so :D But until then, refer to my tutorial.
Greetings,
Neti
Hello everyone. Some of you might know me, others might not. I've been inactive in romhacking for more than 3 years now, but somehow I made my way back :) Did a lot of things change? Actually: No. People still use the same tools that we used back then.
So, I started a new hack. What does every hack need of course? A region map! A few years ago, there were like 3 people who could insert a region map properly. One of them was my teammate X-Buster, who did it for me when I was working on Legend of Fenju. Now i wanted to do it myself, it can't be that hard I thought and there are probably good tutorials out nowadays. I was wrong! I did not find any good text tutorial that taught me to insert my map, I did actually find a video that showed a working method. Unfortunely I had to find out theres a lot more stuff to do than just inserting the map! Some of those things are extremely tricky and I even wrote a little tool to help me with color conversions.
With help of others and two days of work, reading Hex Bytes all day, I got together all the information I needed.
So, why not share all this information with you, now that I have it? That's what I'm gonna do now, and hopefully this will be the end of people wondering how to do this.
=== Chapters ===
- Tools
- Making the Map
- Making the Tileset
- Making the Tilemap
- Inserting the Tileset
- Inserting the Tilemap
- Changing the Palettes
- Editing the World Map Data
- Credits and ending Words
=== Tools ===
Spoiler:
This is a list of all the tools you will need to perform the steps in this tutorial:
The RGB2GBAConverter is a tool I made, it converts RGB or Hex-Coded Colors into the GBA-Format APE needs. Believe me, you do not want to do that calculation yourself!
You can download it from my webspace here: https://merlindenker.de/romhacking/RGB2GBAConverter.rar
If you want to support the project, you can do so on its project-page on romhack.me: https://www.romhack.me/rgb2gbaconverter/.
You will probably have most of the others already, if not, you can download some of them from my webspace:
- A graphic editor (I use Paint.net)
- NTME (I recommend 1.1 even though its slower than the alpha cause it has multi-tile-selection)
- unLZ.GBA
- FSF (Free Space Finder)
- WRAP RE
- APE (Advanced Palette Editor)
- RGB2GBAConverter (made by me, read below)
- A Hex Editor (I use Cygnus)
- AdvanceMap 1.92
The RGB2GBAConverter is a tool I made, it converts RGB or Hex-Coded Colors into the GBA-Format APE needs. Believe me, you do not want to do that calculation yourself!
You can download it from my webspace here: https://merlindenker.de/romhacking/RGB2GBAConverter.rar
If you want to support the project, you can do so on its project-page on romhack.me: https://www.romhack.me/rgb2gbaconverter/.
You will probably have most of the others already, if not, you can download some of them from my webspace:
Spoiler:
APE: https://merlindenker.de/romhacking/APE.rar
FSF: https://merlindenker.de/romhacking/FSF.rar
NTME 1.1: https://merlindenker.de/romhacking/NTME_1.1.rar
NTME Alpha: https://merlindenker.de/romhacking/NTME_Alpha.rar
unLZ.GBA: https://merlindenker.de/romhacking/unLZ.GBA.rar
WRAP RE: https://merlindenker.de/romhacking/WRAP_RE.rar
FSF: https://merlindenker.de/romhacking/FSF.rar
NTME 1.1: https://merlindenker.de/romhacking/NTME_1.1.rar
NTME Alpha: https://merlindenker.de/romhacking/NTME_Alpha.rar
unLZ.GBA: https://merlindenker.de/romhacking/unLZ.GBA.rar
WRAP RE: https://merlindenker.de/romhacking/WRAP_RE.rar
=== Making the Map ===
Spoiler:
Obviously, I will not teach you how to draw a good map. That's not the purpose of this tutorial. But i want to give you some hints that you should keep in mind when designing it.
1. Your region map will have 30x20 Tiles ingame, which each consist of 8x8 Pixel. That gives you a total size of 240x160px.
2. You most likely will have a 2 tile thick blue border at the top. Just check the original map and you will see why.
3. Also, you will usually have another 2 tile thick border at the left and right. I prefer to just make these blue as well, even though that's not how it is done in the original FR.
3. Besides the blue border, you will also probably have a 1 tile thick white border at the left and right. This leaves you with a total size of 24x18 Tiles.
4. The Map-Close-Button is located at tile 26/18. Do not place a route or town there.
5. If you want the button to be visible, you will have to add a tile for it.
6. The cursor can move in the area of X 5 to 26 and Y 5 to 19. You must not place any routes or cities outside of these boundaries.
If you are confused, just look at this image:
1. Your region map will have 30x20 Tiles ingame, which each consist of 8x8 Pixel. That gives you a total size of 240x160px.
2. You most likely will have a 2 tile thick blue border at the top. Just check the original map and you will see why.
3. Also, you will usually have another 2 tile thick border at the left and right. I prefer to just make these blue as well, even though that's not how it is done in the original FR.
3. Besides the blue border, you will also probably have a 1 tile thick white border at the left and right. This leaves you with a total size of 24x18 Tiles.
4. The Map-Close-Button is located at tile 26/18. Do not place a route or town there.
5. If you want the button to be visible, you will have to add a tile for it.
6. The cursor can move in the area of X 5 to 26 and Y 5 to 19. You must not place any routes or cities outside of these boundaries.
If you are confused, just look at this image:
![[PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG) [PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG)](https://merlindenker.de/romhacking/tutorials/regionmap/original.png)
=== Making the Tileset ===
Spoiler:
Now that you've drawn your beautiful map, you have to destroy it. That sounds bad? Yup, it is. It is a really annoying work and I wish there was a tool for it.
What do I mean with this? Well, Your map may have a total size of 240x160 Pixel (or 30x20 = 600 Tiles). But you tileset is limited to 128x160 (or 16x20 = 320 Tiles). What is that tilemap and why is it getting on my nerves (and yours soon as well)?
Well, have a look at the map of the region of Shihou (this is actually the first time I publish it, it is the region of my new hack, so don't use it or I'll eat your soul!)
Now, this is what Shihous Tileset looks like:
What you do is you remove ALL the tiles that exist more than once in your original image, because otherwise your region map won't fit. And after that you put it all together in that 128x160 image. That means you remove a lot of routes, plain blue/green tiles and some cities.
Note: In my tileset there are even some duplicates left and I didn't use the grey tiles for the left and right border in my actual map, but theyre in the tileset.
To make it a bit more clear, compare the following images of Binggao (the region in Legend of Fenju):
Now scroll back up to Shihous Tileset and compare it to the complete Shihou Map again. What happened to some of the cities colors? The answer is: Your tileset must not have more than 16 colors when you import it later. Therefore, you have to replace some of the city colors with other colors that do not appear on these city-tiles, but elsewhere on the map. Don't worry, we will apply the correct colors back later on ;) As you can see, I replaced the blue city colors with water-blue. Just get to no more than 16 colors.
Oh and one last thing: You need a transparent tile. I recommend making the first tile completely blue (the blue that will be transparent later on, which is #1070E0 for Palette 0).
What do I mean with this? Well, Your map may have a total size of 240x160 Pixel (or 30x20 = 600 Tiles). But you tileset is limited to 128x160 (or 16x20 = 320 Tiles). What is that tilemap and why is it getting on my nerves (and yours soon as well)?
Well, have a look at the map of the region of Shihou (this is actually the first time I publish it, it is the region of my new hack, so don't use it or I'll eat your soul!)
![[PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG) [PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG)](https://merlindenker.de/romhacking/tutorials/regionmap/shihou.png)
Now, this is what Shihous Tileset looks like:
![[PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG) [PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG)](https://merlindenker.de/romhacking/tutorials/regionmap/tileset.png)
What you do is you remove ALL the tiles that exist more than once in your original image, because otherwise your region map won't fit. And after that you put it all together in that 128x160 image. That means you remove a lot of routes, plain blue/green tiles and some cities.
Note: In my tileset there are even some duplicates left and I didn't use the grey tiles for the left and right border in my actual map, but theyre in the tileset.
To make it a bit more clear, compare the following images of Binggao (the region in Legend of Fenju):
![[PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG) [PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG)](https://merlindenker.de/romhacking/tutorials/regionmap/binggao.png)
![[PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG) [PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG)](https://merlindenker.de/romhacking/tutorials/regionmap/binggaohelp.png)
Now scroll back up to Shihous Tileset and compare it to the complete Shihou Map again. What happened to some of the cities colors? The answer is: Your tileset must not have more than 16 colors when you import it later. Therefore, you have to replace some of the city colors with other colors that do not appear on these city-tiles, but elsewhere on the map. Don't worry, we will apply the correct colors back later on ;) As you can see, I replaced the blue city colors with water-blue. Just get to no more than 16 colors.
Oh and one last thing: You need a transparent tile. I recommend making the first tile completely blue (the blue that will be transparent later on, which is #1070E0 for Palette 0).
=== Making the Tilemap ===
Spoiler:
Now you're going to need NTME - The nameless Tilemap Editor.
Start it and open your tilemap. Then set the size to Preset "FR/LG WM".
It it pretty self-explanatory. Select your tiles from the top field and draw your region map in the bottom field. If you kept your tiles horizontally together in the tileset (like I did), you can make use of NTME's "Tile Selection Width" Feature to draw multiple tiles at once.
I did not want to redraw my whole map cause it is a hell of a work, so I loaded my saved tilemap. Unfortunately when importing these tilemaps, NTME has problems with height and size so it looks crappy... But believe me: The data in the file is ok and I could use it right away. It's just a problem of NTME and you have to deal it with now, cause I'm showing you another screenshot to make the following explanation a little easier:
Remember when I said we're gonna fix the colors? Here's step one to that. Open the PaletteMap in the bottom (will take a moment) and you will see a lot of zeros appear on your map. That means these tiles use palette 0. That's ok for most of the tiles, but you will need to assign a different palette for all the tiles that you applied strange colors to earlier to fit the 16 color limit. I used Palette 3, because X-Buster did that in Legend of Fenju and it worked out. So I didn't try anything else.
When you are done, save your tilemap.
Start it and open your tilemap. Then set the size to Preset "FR/LG WM".
Spoiler:
![[PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG) [PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG)](https://merlindenker.de/romhacking/tutorials/regionmap/ntme.png)
It it pretty self-explanatory. Select your tiles from the top field and draw your region map in the bottom field. If you kept your tiles horizontally together in the tileset (like I did), you can make use of NTME's "Tile Selection Width" Feature to draw multiple tiles at once.
I did not want to redraw my whole map cause it is a hell of a work, so I loaded my saved tilemap. Unfortunately when importing these tilemaps, NTME has problems with height and size so it looks crappy... But believe me: The data in the file is ok and I could use it right away. It's just a problem of NTME and you have to deal it with now, cause I'm showing you another screenshot to make the following explanation a little easier:
Spoiler:
![[PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG) [PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG)](https://merlindenker.de/romhacking/tutorials/regionmap/ntmepal.png)
Remember when I said we're gonna fix the colors? Here's step one to that. Open the PaletteMap in the bottom (will take a moment) and you will see a lot of zeros appear on your map. That means these tiles use palette 0. That's ok for most of the tiles, but you will need to assign a different palette for all the tiles that you applied strange colors to earlier to fit the 16 color limit. I used Palette 3, because X-Buster did that in Legend of Fenju and it worked out. So I didn't try anything else.
When you are done, save your tilemap.
=== Inserting the Tileset ===
Spoiler:
The next thing we want to do is get your map into the game. We start off with your tileset image.
Open unLZ.GBA and load your ROM. Then follow these steps:
Screenshots as explanation:
Now, if you get no Popup Message, everything is fine and you can continue with inserting the tilemap. If you get a message saying "Size is XXX which is too big", remember the Hex Number at XXX. Leave unLZ.GBA opened and open any HEX to DEC converter (on the web, or on your computer, I dont care). Convert the HEX number into decimal and remember that number. Open FSF and look for that exact amount of bytes. Copy the offset and return to unLZ.gba.
Now click on "Write to ROM" again, but this time you will replace everything behind the two zeros in the image offset field with the new offset you just copied. Make sure the three checkboxes are still checked so it will repoint your map on its own. If not, you will have to do it yourself. If that happens, check the part of this tutorial where I explain how to use WRAP RE.
Open unLZ.GBA and load your ROM. Then follow these steps:
- Go To 190
- Click Import and choose your Tileset
- Check everything except for "Export palette" and leave the offsets as they are
- Click OK
Screenshots as explanation:
Spoiler:
![[PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG) [PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG)](https://merlindenker.de/romhacking/tutorials/regionmap/unlz.png)
![[PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG) [PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG)](https://merlindenker.de/romhacking/tutorials/regionmap/unlzimport.png)
Now, if you get no Popup Message, everything is fine and you can continue with inserting the tilemap. If you get a message saying "Size is XXX which is too big", remember the Hex Number at XXX. Leave unLZ.GBA opened and open any HEX to DEC converter (on the web, or on your computer, I dont care). Convert the HEX number into decimal and remember that number. Open FSF and look for that exact amount of bytes. Copy the offset and return to unLZ.gba.
Spoiler:
![[PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG) [PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG)](https://merlindenker.de/romhacking/tutorials/regionmap/fsf.png)
Now click on "Write to ROM" again, but this time you will replace everything behind the two zeros in the image offset field with the new offset you just copied. Make sure the three checkboxes are still checked so it will repoint your map on its own. If not, you will have to do it yourself. If that happens, check the part of this tutorial where I explain how to use WRAP RE.
=== Inserting the Tilemap ===
Spoiler:
Now we will do nearly the same thing as we did when inserting the tileset. But there are some little details that freaked me out when I didn't know them.
First of all: Your tilemap file MUST be 1216 Bytes long. If it isn't, you have to append Zeros to the end of your file with the help of a hex editor. When you reach Offset 4C0, you have inserted enough zeros.
Why do I tell you this? Doesn't NTME export the tilemap correctly? The sad answer is: No.
And when importing a tilemap that is too small, You will end up with a blue rectangle at the bottom right of your region map. Not pretty!
Image:
The next thing you will need is some free space. I explained how to use FSF earlier, this time 2000 Byte will definitely be enough. Get your 2000 byte offset and copy it.
Then:
Now your tilemap is inserted! Congratulations! Open your game and check the map. Looks terrible, right? That's because it is still Kantos Tilemap, but with your tileset. How come? Didn't we just insert our tilemap?
Yes we did. But we still need to repoint it, so the game actually uses ours! For this we use WRAP RE.
Open WRAP RE, load your ROM and enter your tilemaps offset (hopefully you still have it in your clipboard, or FSF is still opened). with two leading zeros into the "Main Map Tilemap" Field. Save your ROM and check it again. Looks much better now, right?
You can also do this manually with a hex editor. But it's of course more complicated and you will need to know the correct tilemap offset for your game. I could tell you the one for FR and how to do it, but why? WRAP RE makes it much easier.
First of all: Your tilemap file MUST be 1216 Bytes long. If it isn't, you have to append Zeros to the end of your file with the help of a hex editor. When you reach Offset 4C0, you have inserted enough zeros.
Why do I tell you this? Doesn't NTME export the tilemap correctly? The sad answer is: No.
And when importing a tilemap that is too small, You will end up with a blue rectangle at the bottom right of your region map. Not pretty!
Image:
Spoiler:
![[PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG) [PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG)](https://merlindenker.de/romhacking/tutorials/regionmap/hex.png)
The next thing you will need is some free space. I explained how to use FSF earlier, this time 2000 Byte will definitely be enough. Get your 2000 byte offset and copy it.
Then:
- open unLZ.GBA and load your ROM
- click on "File" -> "Load RAW"
- Select your tilemap and load it
- click on "Write to ROM"
- uncheck everything EXCEPT for "Export Image"
- Paste your copied offset into the "Image Offset" field (add 2 leading Zeros if you overwrote them)
- Click OK
Now your tilemap is inserted! Congratulations! Open your game and check the map. Looks terrible, right? That's because it is still Kantos Tilemap, but with your tileset. How come? Didn't we just insert our tilemap?
Yes we did. But we still need to repoint it, so the game actually uses ours! For this we use WRAP RE.
Open WRAP RE, load your ROM and enter your tilemaps offset (hopefully you still have it in your clipboard, or FSF is still opened). with two leading zeros into the "Main Map Tilemap" Field. Save your ROM and check it again. Looks much better now, right?
You can also do this manually with a hex editor. But it's of course more complicated and you will need to know the correct tilemap offset for your game. I could tell you the one for FR and how to do it, but why? WRAP RE makes it much easier.
=== Changing the Palettes ===
Spoiler:
To change the Palettes you will need multiple Tools. First we need to find the offset of the Palettes.
Are you using FR and Palettes 0 and 3 like I did? You're lucky, I know the offsets: Pal0 = 003EF2DE, Pal3 = 003EF33E
If not, you have to find the offset like I did. Follow these steps:
Images:
Now open APE and load your ROM. Load the palette from your Offset.
The current Palette is now loaded and you can start editing it at the bottom. When done, just click on "Replace" and it will be saved. So, but how do you edit it? This is where the RGB2GBAConverter will help you.
First, open the region map with wrong colors in your game and take a screenshot of it. Open that in your graphics program. Now select one of the wrong colors (from a tile that uses the palette youre currently editing of course) with a color picker tool and copy the rgb or hex value of it. If you don't know how to do that... Well that's not my job to explain it. Insert the values into RGB2GBAConverter and let it calculate the GBA-Value.
Now look for the GBA Value in the Palette in APE. That's the color you want to edit! You now have to assign the new color-value at the bottom, since the bottom is going to be your new palette. How do you get the new value? Yes, you use RGB2GBAConverter again to calculate the GBA Value of the correct color.
Once you're done, repeat the process with your other palette and replace the palettes.
Then load your game and open the region map: Beautiful!
Wanna know how the RGB2GBAConverter calculates the values? Check it here (Really sick!)
Are you using FR and Palettes 0 and 3 like I did? You're lucky, I know the offsets: Pal0 = 003EF2DE, Pal3 = 003EF33E
If not, you have to find the offset like I did. Follow these steps:
Spoiler:
- Open VBA and start your game
- Open the region Map ingame
- In VBAs Menu, open "Tools" -> "Palette Viewer"
- Now look at the color values of the BACKGROUND Palettes
- The palettes are aligned top to bottom, the first row is Palette 0, the next is Palette 1 and so on
- Find the row of the palette of which you need the offset
- Ignore the first color (this is the transparent color)
- Then click on the next color and look at what it says at "Value" in the bottom
- Ignore the "0x" and take the four hex digits.
- Divide them in the middle, so when you had 064B, you get two groups: [06] and [4B]
- Change the order: [4B][06]
- Now do that with the next color again and maybe also with the third, and always append what you get to the end of your previous result. So If my next color was 1ACE, i would change the order to CE1A and append it to the rest, so I would end up with 4B 06 CE 1A.
- Now that you have at least 4 Bytes of color data (i recommend 6), open up your Hex Editor and load your ROM
- Search for that data
- Then check the bytes that follow you search result: Do they match the next colors in your palette? Remember to swap Bytes! For example, I find 62 5A as the next bytes in the hex editor and my next color is 0x5A62. Perfect match!
- Now find the offset where the palette data started. In Cygnus Hex Editor, just move the cursor in front of the first bytes you searched for and then read the offset at the bottom.
- Congratulations, this is your palettes offset! You will have to repeat these steps for every palette you want to edit.
Images:
Spoiler:
![[PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG) [PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG)](https://merlindenker.de/romhacking/tutorials/regionmap/palviewer.png)
![[PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG) [PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG)](https://merlindenker.de/romhacking/tutorials/regionmap/paloffset.png)
Now open APE and load your ROM. Load the palette from your Offset.
Spoiler:
![[PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG) [PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG)](https://merlindenker.de/romhacking/tutorials/regionmap/ape.png)
The current Palette is now loaded and you can start editing it at the bottom. When done, just click on "Replace" and it will be saved. So, but how do you edit it? This is where the RGB2GBAConverter will help you.
First, open the region map with wrong colors in your game and take a screenshot of it. Open that in your graphics program. Now select one of the wrong colors (from a tile that uses the palette youre currently editing of course) with a color picker tool and copy the rgb or hex value of it. If you don't know how to do that... Well that's not my job to explain it. Insert the values into RGB2GBAConverter and let it calculate the GBA-Value.
Now look for the GBA Value in the Palette in APE. That's the color you want to edit! You now have to assign the new color-value at the bottom, since the bottom is going to be your new palette. How do you get the new value? Yes, you use RGB2GBAConverter again to calculate the GBA Value of the correct color.
Once you're done, repeat the process with your other palette and replace the palettes.
Then load your game and open the region map: Beautiful!
Wanna know how the RGB2GBAConverter calculates the values? Check it here (Really sick!)
Spoiler:
First, take your RGB Values and convert them into binaries:
R 87 = 01010111
G 143 = 10001111
B 8 = 00001000
Then cut of the 3 least significant bits (the trailing ones):
R 01010111 => 01010(111)
G 10001111 => 10001(111)
B 00001000 => 00001(000)
Now look at the cut off bits. If their value is 4 or higher (first bit is 1), we increment the 5 remaining bits by 1:
R 01010 => 111 is 7 which is > 4 => 01010 + 1 = 01011
G 10001 => 111 is 7 which is > 4 => 10001 + 1 = 10010
B 00001 => 000 is 0 which is < 4 => remains 00001
Then you stick them together, but in in the wrong order (BGR) and add a zero at the front.
0[00001][10010][01011] = 0000011001001011
You now have exactly 16 bit. Seperate them in the middle into 8 bit pieces:
[00000110]
[01001011]
And now convert these into Hex:
00000110 = 06
01001011 = 4B
Now just put them together and you get your AGB-Value:
064B
R 87 = 01010111
G 143 = 10001111
B 8 = 00001000
Then cut of the 3 least significant bits (the trailing ones):
R 01010111 => 01010(111)
G 10001111 => 10001(111)
B 00001000 => 00001(000)
Now look at the cut off bits. If their value is 4 or higher (first bit is 1), we increment the 5 remaining bits by 1:
R 01010 => 111 is 7 which is > 4 => 01010 + 1 = 01011
G 10001 => 111 is 7 which is > 4 => 10001 + 1 = 10010
B 00001 => 000 is 0 which is < 4 => remains 00001
Then you stick them together, but in in the wrong order (BGR) and add a zero at the front.
0[00001][10010][01011] = 0000011001001011
You now have exactly 16 bit. Seperate them in the middle into 8 bit pieces:
[00000110]
[01001011]
And now convert these into Hex:
00000110 = 06
01001011 = 4B
Now just put them together and you get your AGB-Value:
064B
=== Changing the World Map Data ===
Spoiler:
There's one last thing we have to change: The locations of cities, routes, caves and stuff.
For this job we use AdvanceMap. Make sure you're using Version 1.92 since 1.95b does not have the World Map Editor!
Load your ROM and open the world map editor via this icon:
A window like this will pop up:
But instead of Shihou, it will contain your region and probably a kanto-like route layout. Here, I already did everything (except for town names, but that's not gonna be part of this tutorial). Oh and don't let the german confuse you here ;)
First you will want to clear the map. Therefore, click on every tile that is a city, route or whatever and enter the value C5 in the Value-field of the upper and lower layer. Save the map when you're done and let AMap redraw the map.
Then you will have to add your own Layout. It is pretty much self-explanatory, so I'm not gonna go into detail here.
Just one last thing you might not find out yourself: In order for your head to be positioned at the correct location when opening the map, you will have to edit the locations of the places. What do I mean by that? Check this image:
Just enter the two numbers from the left into the fields at the right and hit the save button under the two fields. If you forget that and click on any other tile, your change will be gone.
Create your map, save it and be happy with your result!
For this job we use AdvanceMap. Make sure you're using Version 1.92 since 1.95b does not have the World Map Editor!
Load your ROM and open the world map editor via this icon:
![[PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG) [PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG)](https://merlindenker.de/romhacking/tutorials/regionmap/worldmap.png)
A window like this will pop up:
Spoiler:
![[PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG) [PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG)](https://merlindenker.de/romhacking/tutorials/regionmap/wmeditor.png)
But instead of Shihou, it will contain your region and probably a kanto-like route layout. Here, I already did everything (except for town names, but that's not gonna be part of this tutorial). Oh and don't let the german confuse you here ;)
First you will want to clear the map. Therefore, click on every tile that is a city, route or whatever and enter the value C5 in the Value-field of the upper and lower layer. Save the map when you're done and let AMap redraw the map.
Then you will have to add your own Layout. It is pretty much self-explanatory, so I'm not gonna go into detail here.
Just one last thing you might not find out yourself: In order for your head to be positioned at the correct location when opening the map, you will have to edit the locations of the places. What do I mean by that? Check this image:
Spoiler:
![[PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG) [PokeCommunity.com] Netis complete Guide to the Region Map (FR/LG)](https://merlindenker.de/romhacking/tutorials/regionmap/wmeditor2.png)
Just enter the two numbers from the left into the fields at the right and hit the save button under the two fields. If you forget that and click on any other tile, your change will be gone.
Create your map, save it and be happy with your result!
=== Credits and ending Words ===
As I stated earlier, I had some help figuring out some of this stuff. Therefore I want to let everybody know who these awesomely helpful people were:
shinyquagsire & gogojjtech => Helped me with the Palette Editing, finding the offsets
prime-dialga => Explained the AGB calculation in another forum post I found
CoolMooseDude => Posted a helpful World Map Insertion Tutorial on youtube
MrDollSteak => Told me that the tilemap file has to be 1216 bytes in size
Also I want to thank the creators of the tools.
Lu-Ho => AdvanceMap
HackMew => FSF, unLZ.GBA
D-Trogh => NTME
X-Buster and Darthatron => WARP RE
I hope this tutorial makes a lot of strange stuff clear to a lot of people. And maybe someday this will be useless, because some cool dude came along and wrote a super-good region map insertion tool. I hope so :D But until then, refer to my tutorial.
Greetings,
Neti
Last edited: