TOH file format

Applies to:
BGEE, BGEE, IWDEE, PSTEE

General Description
This file format serves a similar purpose (and has a similar structure to) TLK files. Version 2 of the TOH format combines the separate TOH/TOT files requried by version 1, while still allowing text from dialog.tlk to be overriden. The files are contained in the SAV files in the savegame folders.

Detailed Description
Header
This section is 14h bytes long.

Offset Size (data type) Description
0x0000 4 (char array) Signature ('TLK ')
0x0004 4 (char array) Version (0x02)
0x0008 4 (dword) Unknown
0x000c 4 (dword) Number of strref entries in TOH file
0x0010 4 (dword) Start offset of strref entries

Strref Entries
These sections have 8h bytes.

Offset Size (data type) Description
0x0000 4 (dword) String reference number. Values in TOH files are generally over 3,000,000. Smaller values can be used to override existing dialog.tlk entries
0x0004 4 (dword) Start offset of the override string (relative to the start of the Strref entries section)

TOH V2 Strings
This section is composed of null-terminated ASCII strings.