Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Modifying the Entrance Table
Modifying the entrance table is a must when connecting your new (or even just modified) world together. Without editing the entrance table to abide by your changes, you won't be able to connect your maps and spawns the way you want. 


The entrance table can be thought of as a big list of all possible locations that Link can spawn at; it also controls certain aspects of map transitioning.

Every scene has at least four entrances per spawn: young!day, young!night, adult!day, adult!night
This is because every single scene has at least four states, corresponding individually to the time and age of Link. Some scenes have more entrances because of cutscenes.

Below is an example of an entrance:

"01 00 41 02"

Every entrance is formatted like so:

Where XX = Scene || YY = Spawn/Entrance ||  ZZZZ = Variable

So for example...

[Image: B0xEwPr.png]

"3B" being the scene number in hexadecimal, "01" being the spawn, "4102" being a bitpacked variable.

Bitpacking means that a variable is made up of smaller variables that are only a few bits long. These are packed into one variable which is represented in hex.

Each entrance can be represented by an index. Think of an index as the position of an entry in the entrance list. All indices are in hexadecimal, meaning the first entry would be "0000", and the tenth entry, for example, would be "000A". 


The Entrance Table starts at 0x00B9F360 within the ROM.

1. Take the scene you want to create a entrance for, and convert it's scene number from decimal to hexadecimal (for example: scene 108 would translate to 6C in hex)

2. Write "XX YY ZZZZ" (inserting your own values into the placeholders), making sure to write it 4 times total for each spawn.
(for example: lets say we are exiting from fishing pond and are entering the first spawn of our custom map injected to scene 108, we'll write "6C 00 41 02" and write it a total of 4 times down the line).

3. Since you now have edited your entrance table to whatever extent, you'll need to edit your scene to accommodate these changes. Edit the scene's exit list and write the index of your entrance, making sure the order of exits in polygon types correspond to the order of indices in the exit list. For example, a polygon type with exit 04 would correspond to the fourth index in the exit list. 


4. Review and think through your work. You should be able to look at the entrance table you made and figure out what the destination is and where specifically it'll take you within the scene. Make sure you don't get anything mixed up as it's a hassle to debug, so keep track of every edit you do.

That's about it!
Actually, there is a little bit more to discuss on this topic. Some base entrance index values are coded to have special functionality. If you edit the records for these base entrance indexes, you could potentially introduce new glitches, or even crash the game. The cloudmodding page on the Entrance Table should cover some of the edge cases I've found

Forum Jump:

Users browsing this thread:
1 Guest(s)