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. All the files have the same format, and type.
The only important different(s) is there in different languages. The files can be opened with many GTA text editor tools; most notably Hammer's GXT editor(see the links below).
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 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:
Max entry numbers is 7.
Symbols & Color-codes:
Un-defined:
Most of these where probably used on the Playstation 2 and XBox
Key-presses:
Here are some key-press codes only used during development stage of the game. They were removed or may be replaced later but probably they are still working. Some are only used in PS2 Version.
Here is how to create a .fxt file in the game, .fxt file is a CLEO text file, the GxtHook.cleo plugin, must be in you're CLEO folder, to load the fxt file in the CLEO_TEXT folder.
1: Open Notepad
2: Type the entry name, max is 7 characters.
3: Press you space bar once.
4: Type the message you want in game(if you want in in a color, see the codes above^).
5: Now select ‘File>Save as’ Type any name for the file name.
6: Select the ‘Save as type’ box, and select "All Files"
7: Make sure it has the extension,(.fxt) then save it to the CLEO_TEXT in you're CLEO folder.
8: Done!
GXT Editor 1.2
The only important different(s) is there in different languages. The files can be opened with many GTA text editor tools; most notably Hammer's GXT editor(see the links below).
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 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
Editing
Max entry numbers is 7.
Symbols & Color-codes:
- Code:
Symbol: Description:
~1~ number within a text
~a~ text within a text
~b~ blue text
~g~ green text
~h~ highlight
~k~ key (followed by Key-presses)
~l~ black text
~n~ newline
~p~ purple text
~r~ red text
~s~ reset to standard
~w~ white text
~y~ yellow text
~z~ subtitle (doesn't show when the Subtitles option is off)
Un-defined:
Most of these where probably used on the Playstation 2 and XBox
- Code:
~d~ ?
~<~ ?
~>~ ?
~u~ ?
~v~ Consoles Only?
~x~ Consoles Only?
~m~ Consoles Only?
~o~ Consoles Only?
~j~ Consoles Only?
Key-presses:
- Code:
Foot Controls:
Key: Entry(t): SCM-Key:
Fire ~PED_FIREWEAPON~ 00E1: player 0 pressed_key 17
Next Weapon / Target ~PED_CYCLE_WEAPON_RIGHT~ 00E1: player 0 pressed_key 7
Previous Weapon / Target ~PED_CYCLE_WEAPON_LEFT~ 00E1: player 0 pressed_key 5
Group Ctrl Foward ~GROUP_CONTROL_FWD~ 00E1: player 0 pressed_key 9
Group Ctrl Back ~GROUP_CONTROL_BWD~ 00E1: player 0 pressed_key 8
Conversation - No ~CONVERSATION_NO~ 00E1: player 0 pressed_key 10
Conversation - Yes ~CONVERSATION_YES~ 00E1: player 0 pressed_key 11
Foward ~GO_FORWARD~ 0x1 *
Backwards ~GO_BACK~ 0x1 *
Left ~GO_LEFT~ 0x0 *
Right ~GO_RIGHT~ 0x0 *
Zoom In ~PED_SNIPER_ZOOM_IN~ 00E1: player 0 pressed_key 5
Zoom Out ~PED_SNIPER_ZOOM_OUT~ 00E1: player 0 pressed_key 7
Enter+Exit ~VEHICLE_ENTER_EXIT~ 00E1: player 0 pressed_key 15
Change Camera ~CAMERA_CHANGE_VIEW_ALL_SITUATIONS~ 00E1: player 0 pressed_key 13
Jump ~PED_JUMPING~ 00E1: player 0 pressed_key 14
Sprint ~PED_SPRINT~ 00E1: player 0 pressed_key 16
Aim Weapon ~PED_LOCK_TARGET~ 00E1: player 0 pressed_key 6
Crouch (VC, SA) ~PED_DUCK~ 00E1: player 0 pressed_key 18
Action (VC, SA) ~PED_ANSWER_PHONE~ 00E1: player 0 pressed_key 4
Walk (SA) ~SNEAK_ABOUT~ 00E1: player 0 pressed_key LALT
Look Behind ~PED_LOOKBEHIND~ 00E1: player 0 pressed_key 19
Vehicle Controls:
Key: Entry(t): SCM-Key:
Fire ~VEHICLE_FIREWEAPON~ 00E1: player 0 pressed_key 17
Secondary Fire ~VEHICLE_FIREWEAPON_ALT~ 00E1: player 0 pressed_key 4
Accelerate ~VEHICLE_ACCELERATE~ 00E1: player 0 pressed_key 16
Brake/Reverse ~VEHICLE_BRAKE~ 00E1: player 0 pressed_key 14
Left ~VEHICLE_STEERLEFT~ 0x0 *
Right ~VEHICLE_STEERRIGHT~ 0x0 *
Steer Foward/Down ~VEHICLE_STEERDOWN~ 0x1 *
Steer Back/Up ~VEHICLE_STEERUP~ 0x1 *
Enter+Exit ~VEHICLE_ENTER_EXIT~ 00E1: player 0 pressed_key 15
Trip Skip ~CONVERSATION_YES~ 00E1: player 0 pressed_key 11
Next Radio Station ~VEHICLE_RADIO_STATION_UP~ 00E1: player 0 pressed_key 8
Previous Radio Station ~VEHICLE_RADIO_STATION_DOWN~ 00E1: player 0 pressed_key 9
Horn ~VEHICLE_HORN~ 00E1: player 0 pressed_key 18
Sub-mission ~TOGGLE_SUBMISSIONS~ 00E1: player 0 pressed_key 19
Change Camera ~CAMERA_CHANGE_VIEW_ALL_SITUATIONS~ 00E1: player 0 pressed_key 13
Handbrake ~VEHICLE_HANDBRAKE~ 00E1: player 0 pressed_key 6
Mouse Look ~VEHICLE_MOUSELOOK~ 00E1: player 0 pressed_key RMB
Look Left ~VEHICLE_LOOKLEFT~ 00E1: player 0 pressed_key 5
Look Right ~VEHICLE_LOOKRIGHT~ 00E1: player 0 pressed_key 7
Special Ctrl Left ~VEHICLE_TURRETLEFT~ 0x2 *
Special Ctrl Right ~VEHICLE_TURRETRIGHT~ 0x2 *
Special Ctrl Up ~VEHICLE_TURRETUP~ 0x3 *
Special Ctrl Down ~VEHICLE_TURRETDOWN~ 0x3 *
Here are some key-press codes only used during development stage of the game. They were removed or may be replaced later but probably they are still working. Some are only used in PS2 Version.
- Code:
~TAKE_SCREEN_SHOT~
~SWITCH_DEBUG_CAM_ON~
~TOGGLE_DPAD~
~NETWORK_TALK~
~SHOW_MOUSE_POINTER_TOGGLE~
~PED_1RST_PERSON_LOOK_DOWN~
~PED_1RST_PERSON_LOOK_UP~
~PED_1RST_PERSON_LOOK_RIGHT~
~PED_1RST_PERSON_LOOK_LEFT~
~PED_CENTER_CAMERA_BEHIND_PLAYER~
FXT
Here is how to create a .fxt file in the game, .fxt file is a CLEO text file, the GxtHook.cleo plugin, must be in you're CLEO folder, to load the fxt file in the CLEO_TEXT folder.
1: Open Notepad
2: Type the entry name, max is 7 characters.
3: Press you space bar once.
4: Type the message you want in game(if you want in in a color, see the codes above^).
5: Now select ‘File>Save as’ Type any name for the file name.
6: Select the ‘Save as type’ box, and select "All Files"
7: Make sure it has the extension,(.fxt) then save it to the CLEO_TEXT in you're CLEO folder.
8: Done!
Links
GXT Editor 1.2