Hi guys, as promised I will provide infos about manipulating the destinations to change the maps of Paper Mario 64. So for this time I will give real adresses because I use more visual clues and because the patterns vary. The data are taken from "Windmill Area".
To begin, I will talk about "directions". The directions data (DD) are the scrypted moves of Mario when he enters or goes away from a loading zone. The DD are well written : each DD occupies a row and begins at the beginning. There are 4 params of 2 bytes separate by 2 [00] : X, Y, Z and Angle. The first 3 are the Mario's position in the new area and the angle is where Mario heads. This range is where they are : 0xbeec80-0xbeecbf. There are 4 : Windmill Door, East, West and Getting the card. Finally, they have an ID in number fairly recognizable : 00, 01, 02 and 03.
Notice, changing it is generally a bad idea, it messes up the process. The only example where it's interesting is when the exit is one way and doorless like when Mario falls from tornadoes.
And now I will talk about the manipulation of exits destination. For each exit, there's 2 bytes that have important functions... actually 3, but as the DD fit well with exits, they should remain with their exit. The first determines which destination will be loaded (ex: arn_08) and the second which exit Mario will go away in the new area. I will explain later how that can be interesting. Here is a table for all the matter :
Adresses | Destinations | Values | Exits |
0xbef263 | kmr_23 | 14 | 02 |
0xbef747 | arn_08 | 1c | 00 |
0xbef7a3 | arn_03 | 24 | 00 |
0xbef7ff | mim_12 | 2c | 01 |
The adresses are where the datas are. The destinations are where the exits lead. The values are the values at the adresses. There are kind of pointers which go to find destinations at the end of area data. They are ascending and fit with the order of this general pattern, in this case 4 leads toward kmr_23 and arn_03 and c toward arn_08 and mim_12 :
0123456789abcdef
€$.ükmr_23..arn_
08..arn_03..mim_
12..............
Finally, exits correpond at the exits ID in the new area. Ex: 02 at kmr_23 means you will have the Getting Card cutscene with Skolar because he is the third Star Spirit. They are always 4 bytes after the adresses over there.
Now I will just give some examples of what you can do with all this news. Like you can see, destinations are written once, but in Forever Forest many ways can lead you at the beginning. It means multiple ways lead at one mim_01 at a specific exit where you can easily go out of the forest. So you can change it to make all exits correct or just one. In more, if you have an area which have 2 exits that lead toward a same area, you can make them pointing on two different areas.