TLK files

Description

Each Infinity Engine game has at least one TLK file with it. Only one of these files will be used at a time. These files contain several strings (with some associated information) which are looked up by a 32-bit identifier called a "Strref" (String Reference). If the designer wishes to replace all the dialog (for instance, to translate to another language), it is a very simple matter of replacing just one file, (sound files not included). Anyway, this is a very straightforward file format. To find a particular string, use the Strref as a 0-based index into the table of entries.

TLK file versions

TLK V1

Overall structure

TLK V1 Header

OffsetSize (datatype)Description
0x00004 (char array)Signature ('TLK ')
0x00044 (char array)Version ('V1 ')
0x00082 (word)unknown (always 0?)
0x000a4 (dword)Number of Strref entries in this file.
0x000e4 (dword)Offset to string data

TLK V1 Entries

This section is hardcoded to start at byte 18 from the beginning of the file. The string offsets are relative to the strings section.

OffsetSize (datatype)Description
0x00002 (word)2 == entry unused? (i.e. ignore other fields), 3 == normal?
0x00028 (resref)resource name of the associated sound, if any
0x000a4 (dword)Volume variance.
0x000e4 (dword)Pitch variance.
0x00124 (dword)offset of this string relative to the strings section
0x00164 (dword)length of this string

TLK V1 Strings

This section is entirely composed of ASCIIZ strings. All the indexing for these strings is done in the strref entries section.

[ back to index ]