-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDialog.txt
97 lines (75 loc) · 2.78 KB
/
Dialog.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
TLK file format
FileExtension :
TLK (Talk Table)
Content :
Description of TLK V.1
History :
File done by IEFFHP
Update :
Manveru 06.09.2001
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.
According to the BioWare developers this kind of file was named there as "Talk Table"
TLK file versions
V1: Baldur's Gate, Planescape: Torment, Icewind Dale
TLK V1
Overall structure
Header
Entries
Strings section
TLK V1 Header
Offset
Size (data type)
Description
0x0000
4 (char array)
Signature ('TLK ')
0x0004
4 (char array)
Version ('V1 ')
0x0008
2 (word)
unknown (always 0?)
0x000a
4 (dword)
Number of Strref entries in this file.
0x000e
4 (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.
Offset
Size (data type)
Description
0x0000
2 (word)
00 - No message data
01 - Text exists
02 - Sound exists
03 - Standard message
07 - Message with tags (for instance
<CHARNAME>)
0x0002
8 (resref)
resource name of the associated sound, if any
0x000a
4 (dword)
Volume variance.
0x000e
4 (dword)
Pitch variance.
0x0012
4 (dword)
offset of this string relative to the strings section
0x0016
4 (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.
text: 0A = (crlf)
change all 0d0a to 0a (remove 0d)