Skip to content
Sage-of-Mirrors edited this page Jan 14, 2014 · 1 revision

RTBL is a chunk found in a DZS file. It defines what rooms are loaded into memory along with the one Link is currently in. This is used in dungeons to allow movement between rooms without loading screens.

This chunk is made up of three parts - offsets, entry definitions, and entries. The number of each of these is the same as the chunkCount specified in RTBL's chunk header entry.

Offsets are simply that - 4 bytes that give the offset of an entry definition within the DZS file. Note that the offset is from the start of the file itself, NOT from the start of the RTBL chunk.

Entry definitions are a bit more complex. They are set up like this:

+0x00 int8 entrySize;
+0x01 int8 unknown1;
+0x04 int entryOffset;

In situations where there is only one room in the worldspace, entrySize will be 1, to show that there are no other rooms to be loaded. However, if there are other rooms to be loaded, entrySize will vary depending on how many rooms will be put into memory.

An example would be:

04 78 00 00 00 00 03 45

This is a definition for a 4-byte long entry which begins at 0x345 in the DZS file.

Entries themselves are made up of at least one byte, which is a combo of C plus the number of the room Link is currently in. For instance, an entry defining other rooms to load from a Room0 would be C0, from Room1 it would be C1, and so on. If there are room numbers that cannot be expressed in hex with one digit, such as 16, which is 10 hex, C changes to D. D0 would thus represent a Room16, D1 would be Room17, and so on. The other bytes are what room numbers to load, in ascending order. Each room is given one full byte. Take this example:

C0 01 03 04

C0 is the room Link will be in, and Rooms1, 3 and 4 will be loaded along with it.

Clone this wiki locally