Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

Dream Text Data

James edited this page Oct 4, 2020 · 3 revisions

Text Data

These contain strings for a given dream, allowing it to be translated into multiple languages

Files with the 4-byte magic TRST contain text strings (and their translations) for your Dream. These don't seem to have very much compression, and are actually relatively simple:

Header

These files begin with a 40-byte header:

Offset Type Details
0x0 char[4] File magic TRST
0x4 uint32 Unknown; seen hardcoded as 3 in the app's code
0x8 uint32 TRNX block count
0xC uint32 Default block ID
0x10 byte[8] Unknown; seen as null
0x18 uint32 Number of string definitions in the file
0x1C uint32 Offset to the footer section
0x20 uint32 Unknown; seen as 1
0x24 uint32 Filesize not including the first 24 bytes

The header is followed by a table with the following info for each TRNX block:

Offset Type Details
0x0 uint32 Block ID
0x4 uint32 Block offset
0x8 uint32 Block size, not including its header
0xC uint32 Unknown, seen as 0

Blocks

As far as I can tell, there's one TRNX block per language. Each block begins with a 72-byte header:

Offset Type Details
0x0 char[4] Block magic TRNX
0x4 uint32 Unknown; seen as 4
0x8 byte[4] Unknown
0xC byte[4] Unknown; seen as null
0x10 uint32 Number of string definitions in this block
0x14 uint32 Length of string table
0x18 byte[4] Unknown; seen as null
0x1C uint32 Length of string table - again!
0x20 uint32 Length of string data
0x24 uint32 Length of TRNX block (not including header)
0x28 byte[4] Unknown; seen as null
0x2C uint32 Length of TRNX block (not including header) - again!
0x30 byte[8] Unknown; seen as null
0x38 uint32 Length of string table - one more time!
0x3C byte[4] Unknown; seen as null
0x40 uint32 Length of TRNX block (not including header) - once more time!
0x44 byte[4] Unknown; seen as null

The block header is followed by a table with the following info for each string definition:

Offset Type Details
0x0 uint32 String ID?
0x4 uint32 Unknown, maybe flags?
0x8 uint32 String offset, relative to the start of the string data
0xC uint32 String length

Following this is the actual data for each string

TRST Footer

This section seems to be LZ4-compressed, I'm unsure what it does.

Clone this wiki locally