The .gxt file(s) contain almost every text within the game, there are 5 files with this format, American.gxt, German.gxt, Spanish.gxt, Italian.gxt, and French.gxt. The GXT file contains almost every text which is displayed in the game, from GTA 2, all the way to GTA 4.
Each GXT file can contain certain tables with sub-tables and entries. The entries are stored in ASCII standard. Just some special characters got some different bit-sets.
The header of GTA 4 GXT is the same as in San Andreas:
The header contains data about the tables and their sub-tables.
The Table Block contains data about the sub-tables and their offsets.
The Offset of the sub-table points to an 8-byte Char Array with the sub-table's name, followed by TKEY. For the MAIN Table this points directly to TKEY!
The TKEY Block of an sub-table contains the CRC32-values of the entry-titles. The game calculates the CRC32-value out of a given string and checks if they exist in the GXT.
The TKEY block is directly followed by the TDAT Block which contains the contents of the entries. The Entry-offset is relative to the TDAT + 4 offset.
From here the entry-offset of each entry points to the content. The content can have different sizes. However it always ends in '\0'! For Example "Hello!" needs to be transformed to "Hello!\0" here and this gives a size of 6 bytes (To tell it in a short form content is a null-terminated string). If this is the 1st content in TDAT the next got an offset of 0x06.
This is the list of our German characters:
list for GTA4 texts
SA GXT file
Each GXT file can contain certain tables with sub-tables and entries. The entries are stored in ASCII standard. Just some special characters got some different bit-sets.
Header
The header of GTA 4 GXT is the same as in San Andreas:
The header contains data about the tables and their sub-tables.
- Code:
INT32 - 4b - Version? (Always 0x080004)
CHAR[4] - 4b - TABL
Table Block
The Table Block contains data about the sub-tables and their offsets.
- Code:
INT32 - 4b - Blocksize
//Array of [Blocksize / 12 Entries]
CHAR[8] - 8b - Subtablename
INT32 - 4b - Offset
The Offset of the sub-table points to an 8-byte Char Array with the sub-table's name, followed by TKEY. For the MAIN Table this points directly to TKEY!
TKEY
The TKEY Block of an sub-table contains the CRC32-values of the entry-titles. The game calculates the CRC32-value out of a given string and checks if they exist in the GXT.
- Code:
CHAR[4] - 4b - TKEY
INT32 - 4b - Blocksize
//Array of [Blocksize / 8]
INT32 - 4b - Entryoffset
INT32 - 4b - CRC32 (Entryname)
The TKEY block is directly followed by the TDAT Block which contains the contents of the entries. The Entry-offset is relative to the TDAT + 4 offset.
TDAT
- Code:
CHAR[4] - 4b - TDAT
INT32 - 4b - Blocksize
From here the entry-offset of each entry points to the content. The content can have different sizes. However it always ends in '\0'! For Example "Hello!" needs to be transformed to "Hello!\0" here and this gives a size of 6 bytes (To tell it in a short form content is a null-terminated string). If this is the 1st content in TDAT the next got an offset of 0x06.
German Characters
This is the list of our German characters:
- Code:
Character Value
Ä 131
ä 154
Ö 145
ö 168
Ü 149
ü 172
ß 150
Links
list for GTA4 texts
See also
SA GXT file