erysdren's WWW site

software, gameware, strangeware

RSS Feed

Rise of the Triad Level Format
2024-06-25

The RTL file format stores levels for Rise of the Triad (1994). It's based on the TED5 file format used by id Software for Wolfenstein 3D and the Commander Keen games. The RTL format usually has the .rtl, .rtc, .rtlx or .rtcx file extensions.

NOTE: The values here are assumed to be in little-endian byte order.

The file format has five different magic identifiers, each identifying its use to the engine and how it was made:

IdentifierDescription
RTL\0Singleplayer levels
RTC\0COMM-BAT levels
RTR\0Generated with RANDROTT
RXL\0Singleplayer levels (Ludicrous Edition)
RXC\0COMM-BAT levels (Ludicrous Edition)

There's also two different known versions:

VersionDescription
0x0101Version 1.1
0x0200Version 2.0 (Ludicrous Edition)

File header structure:

OffsetSizeDescription
0x004Magic identifier in ASCII
0x044Version identifier

In the 1.1 version of the format, there are exactly 100 map header structures immediately following the file header:

OffsetSizeDescription
0x004Boolean signifying if the map is used
0x044Map CRC value
0x084RLE encoding tag
0x0C4Map flags
0x104Offset to compressed walls plane from the start of the file
0x144Offset to compressed sprites plane from the start of the file
0x184Offset to compressed info plane from the start of the file
0x1C4Size of compressed walls plane in bytes
0x204Size of compressed sprites plane in bytes
0x244Size of compressed info plane in bytes
0x2824Map name

Extended Data Chunks

In the Ludicrous Edition version of the format, there is a secondary header following the file header which gives information on the extended data available:

OffsetSizeDescription
0x008Offset to extended chunks table from the start of the file
0x088Number of entries in the extended chunks table

Each extended chunk has this structure:

OffsetSizeDescription
0x0016Chunk type identifier in ASCII
0x108Offset to chunk data from the start of the file
0x188Size of chunk data in bytes

Here are the known extended chunk types:

ValueDescription
MAPSETStandard map headers
MAPINFOJSON metadata