Re: Tutorial: How to hack the game's maps!

Discuss anything related to hacking ROMs of the Telefang games here.
Post Reply
Blaziken257
Posts: 983
Joined: Fri Dec 22, 2006 11:52 am

Re: Tutorial: How to hack the game's maps!

Post by Blaziken257 »

After many hours of hacking, I finally have some knowledge on how to hack the game's maps. This isn't probably the first thing that Telefang hackers are worried about, but in case anybody is interested in it, I'm going to show you step by step how to hack the game's maps. First we'll learn how to hack different acres of the map, which is the simplest part of hacking the game's maps.

Let's start by editing one of the places in the overworld. First off, the overworld is actually made up of four 8x8 maps to form one large 16x16 map. (And all other maps are 8x8 in size, which we'll go over later.) Let's hack one of the acres in the lower-left quadrant, because that's where you start in the game. The lower-left quadrant of the overworld map can be found starting at offset $19C50E and ending at offset $19C54D. You'll find that the data is made up of this:

80 81 82 83 84 85 86 87
88 89 8A 8B 8C 8D 8E 8F
90 91 92 93 94 95 96 97
98 99 9A 9B 9C 9D 9E 9F
A0 A1 A2 A3 A4 A5 A6 A7
A8 A9 AA AB AC AD AE AF
B0 B1 B2 B3 B4 B5 B6 B7
B8 B9 BA BB BC BD BE BF


What does this mean? This tells which acre should go in each section of the map. As you can see, each one is different in this map, but if you hack other areas of the game (such as various floors in Burion Relic), some of these hex values are used multiple times (for example, those long hallways actually use the same acre over and over). A lot of other games do this too (Metroid comes to mind, which is why tons of rooms in the game are similar to each other, and why the game is so repetitive), so this isn't too unusual.

Here's where these hex values would be on the map:

Image

Now, let's hack one of these areas. For one example, let's hack the acre just to the left of where you start in Toronko Village. This acre happens to be in the third row in the fourth column (remember, you're just looking at the bottom left quadrant, not the entire map), which happens to be 93 if you look at the grid above. Let's hack it so it's the same acre as the starting point (which happens to be 94, one to the right). So, what you want to do is change 93 to 94, save it on your hex editor, and then load the ROM up and go to the start.

Image

So here is the start, like normal:

Image

Now go to the left, and you'll end up on the same acre!

Image
Image

Because the game was never intended to make you end up on top of a tree, you're stuck here. But at least it works!

Note that you're not modifying the coordinate, you're just modifying what acre goes in the coordinate. Even after hacking this byte, you're still in the third row in the fourth column:

Image

By the way, there are other maps hackable too -- see for yourself. Here are all the locations I found (including the aforementioned lower-left quadrant of the overworld map), and I think I got all the offests for this data correct (someone could do me a favor and double-check these, though):

Overworld Map - Upper left quadrant (includes antenna trees): $19C152 - $19C191
Overworld Map - Upper right quadrant (includes antenna trees): $19C330 - $19C36F
Overworld Map - Lower left quadrant (includes antenna trees): $19C50E - $19C54D
Overworld Map - Lower right quadrant (includes antenna trees): $19C6F3 - $19C732
Toronko Village Water Station: $19C876 - $19C8B5
Marts & Houses (yes, all these indoor locations are actually next to each other): $19C8FD - $19C93C
Kurinon Village Cave - Floor 1: $19CBD7 - $19CC16
Kurinon Village Cave - Floor 2: $19CC7A - $19CCB9
Paparuna Lake Laboratory: $19CCFA - $19CD39
Panses Village Cave: $19CDD5 - $19CE14
Toripa Antenna Tree Cave - Floor 1: $19D00E - $19D04D
Toripa Antenna Tree Cave - Floor 2: $19D079 - $19D0B8
Toripa Antenna Tree Cave - Floor 3: $19D0DD - $19D11C
Toripa Antenna Tree Cave - Floor 4: $19D141 - $19D180
Toripa Antenna Tree Cave - Floor 5: $19D1A5 - $19D1E4
Peperi Mountain - Floor 1: $19D1ED - $19D22C
Peperi Mountain - Floor 2: $19D251 - $19D290
Peperi Mountain - Floor 3: $19D2DF - $19D31E
Peperi Mountain - Floor 4: $19D351 - $19D390
Peperi Mountain - Floor 5: $19D3B5 - $19D3F4
Kakotos Relic - Floor 1: $19D404 - $19D443
Kakotos Relic - Floor 2: $19D46F - $19D4AE
Kakotos Relic - Floor 3: $19D551 - $19D590
Kakotos Relic - Floor 4: $19D68E - $19D6CD
Kakotos Relic - Floor 5: $19D7A1 - $19D7E0
Kakotos Relic - Floor 6: $19D96A - $19D9A9
Kakotos Relic - Floor 7: $19DA84 - $19DAC3
Kakotos Relic - Floor 8: $19DB66 - $19DBA5
Burion Relic - Floor 1: $19DC3A - $19DC79
Burion Relic - Floor 2: $19DC90 - $19DCCF
Burion Relic - Floor 3: $19DD56 - $19DD95
Burion Relic - Floor 4: $19DED9 - $19DF18
Burion Relic - Floor 5: $19DFF3 - $19E032
Burion Relic - Floor 6: $19E0F1 - $19E130
Burion Relic - Floor 7: $19E22E - $19E26D
Burion Relic - Floor 8: $19E302 - $19E341
Burion Relic - Floor 9: $19E423 - $19E462
Human World - Main Area: $19E4E9 - $19E528
Human World - Antenna Tree (this has only one real acre, XD): $19E554 - $19E593
Human World - Unused Buildings: $19E5A3 - $19E5E2
Ion Island Cave - Floor 1: $19E73C - $19E77B
Ion Island Cave - Basement 1: $19E7D1 - $19E810
Ion Island Cave - Basement 2: $19E86D - $19E8AC

And here are some locations that I know the offsets to (from looking at the pointer table which is just above the offsets -- $19C000 - $19C09E to be exact, which makes it possible to edit all the location offsets if necessary), but I don't know what locations these are for.

$19C09F - $19C0DE
$19C0E7 - $19C126
$19E600 - $19E63F
$19E64F - $19E68E
$19E69E - $19E6DD
$19E6ED - $19E62C


It's worth nothing that it's sometimes possible to place rooms from one location into another location. For example, you can place rooms from Toronko Village Water Station into Kurinon Village Cave, and vice versa. However, if you try to place one room that is meant for one location into another one that has different graphics (for example, a room from Toripa Antenna Tree Cave into Peperi Mountains), the graphics will look scrambled. Here is a complete list of groups of places that can share the same rooms:

1. The top-left, top-right, and bottom-left quadrants of the overworld (including the antenna trees)
2. The bottom-right quadrant of the overworld, as well as Toronko Village Water Station, both floors in Kurinon Village Cave, Paparuna Lake Laboratory, and Panses Village Cave
3. All floors of Toripa Antenna Tree Cave and Peperi Mountains
4. All floors of Kakotos Relic
5. The first six floors of Burion Relic
6. The last three floors of Burion Relic, as well as the marts/houses, and all parts of the Human World (even the unused buildings)
7. All floors of Ion Island Cave

I know all of this by itself isn't too useful, but don't worry, I'll cover other things really soon. Next up is hacking different tiles in an acre (i.e. hacking the layout), and then after that, I'll show how to hack warping data (i.e. specifying where the game should take you when entering/exiting doors, entering staircases, antenna trees, or entering/exiting caves, etc... that way you'll all know how I made that patch that warps you from Toronko Water Station to Barran Antenna Tree... XD).
Milnivri(imported)
Posts: 351
Joined: Wed Dec 27, 2006 10:14 pm

Re: Tutorial: How to hack the game's maps!

Post by Milnivri(imported) »

Hey that's useful. Perhaps one day (maybe in sometime like December >_>) I can make a map editing program with VB, just like the famous Advance Map. :)

And for that to happen I need to figure out how to even load bitmaps as bytes from the rom...
Seike(imported)
Posts: 10
Joined: Thu Dec 06, 2007 5:41 pm

Re: Tutorial: How to hack the game's maps!

Post by Seike(imported) »

not sure if this helps any, but I found this just now
Milnivri(imported)
Posts: 351
Joined: Wed Dec 27, 2006 10:14 pm

Re: Tutorial: How to hack the game's maps!

Post by Milnivri(imported) »

Seike wrote: not sure if this helps any, but I found this just now
That's because Blaziken put it in there just after finding it out xD
Blaziken257
Posts: 983
Joined: Fri Dec 22, 2006 11:52 am

Re: Tutorial: How to hack the game's maps!

Post by Blaziken257 »

Yeah, I was the one who put all that stuff there. When I find new things, I put them in that page. Just look at the edit history... also, you'll see that I put the information on base stats/movesets/evolution on that page too (farther up).

And, um, I'll post a tutorial here on how to edit individual tiles of an acre pretty soon, so that you all can try to edit the game's layout and make it all look different.
Blaziken257
Posts: 983
Joined: Fri Dec 22, 2006 11:52 am

Re: Tutorial: How to hack the game's maps!

Post by Blaziken257 »

I added some more information on map hacking here, maybe I'll add the information here when I get a chance. There's some stuff there I still need to clarify, though...
Post Reply