Difference between revisions of "TLK"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(Make sure the string is 20 characters long, with 2 spaces.)
m (Adding "See also" section)
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
These [[GFF]] files contain strings. They can be opened in the GFF editor.
+
The [[TLK]] file is a [[GFF]] formatted file used to contain strings. They can be opened in the Toolset or the GFF Editor.
  
 
Keep in mind that all numbers are in little-endian format if you are looking at the raw file.
 
Keep in mind that all numbers are in little-endian format if you are looking at the raw file.
  
 
This may be incomplete, as I believe previous TLK files had timing info, etc as well.
 
This may be incomplete, as I believe previous TLK files had timing info, etc as well.
 +
 +
== Structure ==
  
 
A cursory glance at the file leads me to believe it's formatted something like this:
 
A cursory glance at the file leads me to believe it's formatted something like this:
  
'''Header'''
+
<pre>
 +
Header
 +
String ID Section
 +
String Data Section
 +
</pre>
  
'''String ID section'''
+
=== Header ===
 
+
'''String data section'''
+
 
+
----
+
 
+
'''Header'''
+
  
 
*104 bytes
 
*104 bytes
Line 22: Line 22:
 
**4 bytes - number of entries in the table
 
**4 bytes - number of entries in the table
  
'''String ID section'''
+
=== String ID Section ===
  
Tightly packed
+
Tightly packed.
  
 
*4 bytes  
 
*4 bytes  
Line 31: Line 31:
 
**unsigned 32 bit integer - offset to string (appears to be an offset from 0x60)
 
**unsigned 32 bit integer - offset to string (appears to be an offset from 0x60)
  
'''String Data'''
+
=== String Data Section ===
  
 
*4 bytes
 
*4 bytes
**unsigned 32 bit integer - number of characters in string
+
** Unsigned 32 bit integer, little endian - number of characters in string.
*String in 16bit wide characters (unicode?)
+
** The toolset seems to ignore this.
 +
*String in UTF-16, little endian.
 +
** Terminated by a NUL character (0x00) (twice, since it is UTF-16LE) and filled up (with 0xff) to be a multiple of 4 bytes.
 +
 
 +
== See also==
 +
* [[TLK (DA2)]] for information of the TLK format used in Dragon Age 2
 +
 
 +
 
 +
 
 +
 
 +
[[Category:File types]]

Latest revision as of 22:14, 31 March 2015

The TLK file is a GFF formatted file used to contain strings. They can be opened in the Toolset or the GFF Editor.

Keep in mind that all numbers are in little-endian format if you are looking at the raw file.

This may be incomplete, as I believe previous TLK files had timing info, etc as well.

Structure

A cursory glance at the file leads me to believe it's formatted something like this:

Header
String ID Section
String Data Section

Header

  • 104 bytes
    • 20 byte string describing the file, watch the 2 spaces between PC and TLK
      GFF V4.0PC  TLK V0.2
    • 80 bytes of other info I haven't figured out yet. May include info about the table, offsets
    • 4 bytes - number of entries in the table

String ID Section

Tightly packed.

  • 4 bytes
    • unsigned 32 bit integer - TALK_STRING_ID
  • 4 bytes
    • unsigned 32 bit integer - offset to string (appears to be an offset from 0x60)

String Data Section

  • 4 bytes
    • Unsigned 32 bit integer, little endian - number of characters in string.
    • The toolset seems to ignore this.
  • String in UTF-16, little endian.
    • Terminated by a NUL character (0x00) (twice, since it is UTF-16LE) and filled up (with 0xff) to be a multiple of 4 bytes.

See also

  • TLK (DA2) for information of the TLK format used in Dragon Age 2