GTA2 GXT format =============== Analysis by Daniel Marschall 22 January 2016 Files C:\GTA2\data\*.gxt C:\GTA2\data\bob_*.gxt These files contain language specific texts used in the game. File structure --------------
... Header ------ char[3] "GBL" char[1] "E","G","F","I","S","J" (Language) int16 64 00 (version = 100) Section ------- char[4]
, e.g. "TKEY" or "TDAT" int32 length of
int32 unknown (always 0)
Section type: TKEY (contains key names) --------------------------------------- int32 char[8] int32 char[8] ... Since the key is zero terminated, the max key length is 7 characters. is the offset of the string, relative to the
of the "TDAT" section. Section type: TDAT (contains texts) ----------------------------------- ... * Icon references (first Unicode character, case sensitive): 6E 21 "n!" Neutral guy 79 21 "y!" Yakuza 6C 21 "l!" Loonies 7A 21 "z!" Zaibatsu 73 21 "s!" Scientists 72 21 "r!" Rednecks 6B 21 "k!" Krishna 6D 21 "m!" Russian xx 21 where [xx] is not one of the above, will result in a program crash any other Unicode character at position 0 is handles as normal text, without icon * Additionally, a different character set is used: GTA2: !" $% '()* ,-./0123456789:; ? ABCDEFGHIJKLMNOPQRSTUVWXYZ 'abcdefghijklmnopqrstuvwxyz ~ ANSI: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ or in hex: GTA2: C0 C1 C2 C4 C6 C7 C8 C9 CA CB CC CD CE CF D2 D3 D4 D6 D9 DA DB DC DF E0 E1 E2 E4 E6 E7 E8 E9 EA EB EC ED EE EF F2 F3 F4 F6 F9 FA FB FC D1 F1 BF A1 ANSI: 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 This applies for the languages E, F, G, I, S Currently, I have no information about the encoding of the Japanese version of the game. * The captions usually don't have foreign characters. * In mission texts, the default color is yellow. Text that is included in #...# is blue. Text in ##...## is yellow again, and so on. * In the credits (key "credits"), there are following format rules * = new line #W = switch to white text #C = switch to yellow/orange text #B = switch to blue text #G = switch to green text