Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Criminal Enterprises
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

*DO NOT* SHARE MEDIA OR LINKS TO LEAKED COPYRIGHTED MATERIAL. Discussion is allowed.

GXT Compiler v2.0


Sergeanur
 Share

Recommended Posts

Sergeanur
Posted (edited)

GXT Compiler/Decompiler

 

A tool to compile TXT files into GXT and decompile GXT back to TXT using the original syntax of TXT source files.

 

Download: https://github.com/Sergeanur/GXT-compiler/releases/download/v2.0/gxt.zip

GitHub repo: https://github.com/Sergeanur/GXT-compiler

Repo with decompiled texts and usage examples for various games: https://github.com/Sergeanur/GXT

 

 

Usage: gxt -i [input_file(s)] -o [output_file] [[optional parameters]]

Parameters

  • -i [input_file(s)]: list of TXT files which you want to compile into GXT (can be one or multiple files) or a GXT file you want to decompile into TXT
  • -o [output_file]: name of a GXT/TXT file that will be generated

 

Optional parameters

  • -t [table_file]: charset table file that is used for GXT. Syntax example is listed below. Tables for some games are contained in tables' directory
  • -k (CHAR8|CHAR16|CRC32|JENKINS|CHAR8_TIME|CHAR12_TIME): type of keys used in GXT. CRC32 for SA, JENKINS for IV, CHAR8_TIME and CHAR12_TIME - MH2, CHAR8 - rest of the games. Default: CHAR8
  • -w(0|1): 0 - use one byte chars, 1 - use two byte chars. Only some versions of SA and IV should have this set to 0. Rest of the games use 1. Default: 1
  • -f (KEY1,KEY2,KEY3...): list of comma separated keys that would have no conversion applied to them
  • -b: enable big endian. Only useful for MH2 Wii.

 

Compilation only

  • -c (CODEPAGE): TXT codepage ID if the file isn't UTF-8 BOM, UTF-16 LE BOM or UTF-16 BE BOM. Default: 1252
  • -h(0|1|2): 0 - don't write GXT header, 1 - write GXT header, 2 - write GTA 2 header. Only SA and IV should have this set to 1. Default: 0
  • -s(0|1): 0 - don't sort tables, 1 - sort tables. All of the games have tables sorted except LCS and VCS. Default: 1
  • -m(0|1): 0 - don't sort keys in the main table, 1 - sort keys in the main table. All games should have this enabled except IV. Default: 1
  • -u(0|1): 0 - leave key case as is, 1 - turn all keys to uppercase. Should be 0 only for GTA 2. Default: 1
  • -d(0|1): 0 - don't remove repeated spaces, 1 - remove repeated spaces. Default: 1. Normally you'd want to have this on, but for Korean version this was disabed.
  • -~: enable highlighting ~TAGS~ with 0x8000. This is only used for non-latin languages in some games. Examples: III PS2 Japanese, III PC Japanese, IV Japanese and Russian (probably more Japanese translations too, except mobile version)
  • -l (LANGUAGE): language id. Only useful for GTA 2

 

Decompilation only

Commands that start with --original- are used for adding untranslated text as comments to translations like this:

[CRMCANC]
{CANCEL}
ABBRECHEN
  • --original-i [input_file]: GXT file of an untranslated text to have comments of the original text added to each line
  • --original-t [table_file]: charset table that is used for the untranslated GXT
  • --original-k (CHAR8|CHAR16|CRC32|JENKINS|CHAR8_TIME|CHAR12_TIME): type of keys used in the untranslated GXT. Default: whatever is supplied in -k
  • --original-w(0|1): 0 - use one byte chars, 1 - use two byte chars. Default: whatever is supplied in -w
  • --original-f (KEY1,KEY2,KEY3...): list of comma separated keys that would have no conversion applied to them
  • --original-b: enable big endian
  • --original-s: sort keys using order from the original untranslated GXT

 

Docs and examples

GXT Syntax

[KEY] {commentary}
Text
  
[KEY2:TABLE]
More Text {more comment}

Table File Syntax

Unicode_HEX_CODE=GXT_HEX_CODE

You can get Unicode Hex Codes here: https://unicode-table.com/en/

Example:

0152=008C
0153=009C
0160=008A

 

Edited by Sergeanur
Link to comment
Share on other sites

Great program!
Will there be GUI support?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.