Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

RTX Dialogue Audio Format

Container format used for dialogue strings and audio assets (for example ENGLISH.RTX).

Overview

RTX stores two payload kinds under a common chunk/index system:

  • String-only entries (ASCII text payload)
  • Audio entries (string metadata + fixed audio header + audio bytes)

The file uses:

  • per-chunk on-disk headers (tag + big-endian payload size)
  • a footer that points to a central index table

All values below are validated against ENGLISH.RTX.

File Layout

[chunk records ...]
[index table]
[footer]
Offset (from EOF)SizeTypeNameDescription
-124ASCIIfooter_tagAlways RNAV
-84u32 LEindex_offsetAbsolute file offset of index table
-44u32 LEindex_countNumber of index entries

For ENGLISH.RTX:

  • footer_tag = RNAV
  • index_offset = 184629473
  • index_count = 4866

Chunk Record (on disk)

Every payload in the data region has an 8-byte chunk header before it:

OffsetSizeTypeEndianNameDescription
0x004ASCIItag4-character chunk label
0x044u32BEpayload_sizeSize of payload bytes that follow
0x08var[u8]payloadEntry payload

Index Table

The index is an array of 12-byte entries. Each entry points to one chunk payload.

OffsetSizeTypeEndianNameDescription
0x004ASCIItagSame tag as the chunk header
0x044u32LEpayload_offsetAbsolute file offset of payload (not header)
0x084u32LEpayload_sizePayload byte size

Validation notes (all 4866 entries):

  • payload_offset - 8 points to a chunk header with matching tag
  • header payload_size (big-endian) matches indexed payload_size
  • all indexed ranges are in bounds (offset + size <= file_size)
  • entries are ordered by descending payload offset

Payload Types

Payload type is identified by byte payload[1]:

  • 0 = string-only entry
  • 1 = audio entry

String-Only Payload (payload[1] = 0)

OffsetSizeTypeEndianNameDescription
0x001u8kindAlways 0
0x011u8subtypeAlways 0 for text entries
0x022u16LEstring_lenByte length of ASCII text
0x042u16LEreservedAlways 0
0x06var[u8]textASCII text bytes, no terminator

Payload size rule:

payload_size = 6 + string_len

Audio Payload (payload[1] = 1)

OffsetSizeTypeEndianNameDescription
0x001u8kindAlways 0
0x011u8subtypeAlways 1 for voice entries
0x022u16LEstring_lenByte length of ASCII label
0x042u16LEreservedAlways 0
0x06var[u8]labelASCII label bytes, no terminator
0x06+N27structaudio_headerAudio metadata (below), N = string_len
0x21+Nvar[u8]audio_dataRaw PCM audio bytes

Audio payload size rule:

payload_size = 6 + string_len + 27 + audio_length

Audio Header (27 bytes)

All fields little-endian unless noted.

OffsetSizeTypeNameDescription
0x004u32type_id0 = 8-bit mono, 1 = 16-bit mono
0x044u32bit_depth0 = 8-bit, 1 = 16-bit
0x084u32sample_rate11025 or 22050
0x0C1u8level_0cAlways 100
0x0D1i8loop_flagAlways 0
0x0E4u32loop_offsetAlways 0
0x124u32loop_endAlways 0xFFFFFFFF
0x164u32audio_lengthByte length of audio_data
0x1A1u8reserved_1aAlways 0

Notes

  • Tags are 4-byte IDs and are not globally reused in ENGLISH.RTX.
  • A few tags include punctuation (for example #bon, ?vql).
  • The index points to payload starts; on-disk chunk headers are always 8 bytes earlier.
  • SFX — sound effects container. Uses the same 27-byte audio header structure (offsets 0x00–0x1A) as RTX audio entries. RTX stores voice clips; SFX stores sound effects.

Redguard Preservation CLI

Read

cargo run -- read ENGLISH.RTX parses the file and prints a per-entry summary: tag, type (TEXT or AUDIO), audio format, sample rate, duration, and a label preview.

Convert

cargo run -- convert ENGLISH.RTX -o output_dir/ extracts all audio entries as individual .wav files (named by 4-character tag, e.g. zbza.wav) and writes an index.json sidecar containing metadata for all 4866 entries (both text-only and audio).

Validated against ENGLISH.RTX: 3933 .wav files + 933 text entries in index.json.

External References