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)
Making the Tileset
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
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
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.
Open sphere editor, and click import image to map
After you have made the tilemap, you must now save it to a usable form. Open up your map in sphere.
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
Here is what your final custom tilemap should look like:
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
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
Making The Tilemap
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:
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.
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.
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.
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.
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.
Next, find the tiles you need and their numbers with NTME
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!
Inserting Your Work Into The Game
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.
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!
If you have any problems, ask questions and I will try to help out. Have fun