Quantcast

Jump to content

» «
Photo

[V] Modifying PC GXT2 files w/ GXT2Tools

44 replies to this topic
SonofUgly
  • SonofUgly

  • Feroci
  • Joined: 27 Jul 2011
  • None

#1

Posted 05 June 2015 - 11:31 PM Edited by SonofUgly, 26 August 2015 - 06:03 PM.

Update: It's easier to use XBLToothPik's Editor (or Stanper's modified version of it).
I've made a short video on how to use them to create a .gxt2 file:



The tutorial below is still useful if you're editing large .gxt2 files, though.


For this you will need:
*OpenIV
*GXT2Tools (mirror)
*A hex editor (I'll be using Hex Workshop)

Now the important part here is that GXT2Tools only works for the PS3/360 version of .gxt2 files. The PC .gxt2 files are slightly different in that some of the information is byte flipped, so we have to unflip the bytes so the files will work in GXT2Tools.
Here is how the gxt2 files work:

dhmG4ME.png

Everything but the light blue 'Descriptions' in the image is what's going to need reversed. I'll refer to this image in the future.
 

Step #1

First up, use OpenIV to extract the .gxt2 language files, they'll be under x64/data/lang/ in an rpf file. The main .gxt2 file is Grand Theft Auto V\update\update.rpf\x64\data\lang\american_rel.rpf\global.gxt2 (replace 'american' with whatever language you're working with).
 

Step #2

Now open the .gxt2 file in your hex editor and select everything but the Descriptions (should note that the Descriptions start 4 bytes after the second "2TXG" header):
Spoiler

After you select the necessary block of data, you need to byte flip it (in Hex Workshop this is Tools → Operations → Byte Flip...). You need to treat data as 32 bit, and make sure you're only applying this to the selection, not the entire file. Then save the file.

fNbZZjP.png


Step #3

Now you have a file that GXT2Tools will accept. In GXT2Tools load your .gxt2 file with File → Load GXT2, and once it's done loading (the main global.gxt2 may take a second to load) go File → Export TXT.
This will create an easily editable .txt file that you can change with any text editor. Just make sure you keep the format the same (the hash, then a tab, then the description).

After you're done editing the .txt file, open it in GXT2Tools with File → Import TXT (make sure GXT2Tools is empty before doing this, either open/close the program or hit File → New GXT2).
Save that as a .gxt2 file with File → Save GXT2.
 

Step #4

Now all you have to do is repeat Step #2, and then import it back into the .rpf file with OpenIV.

 

Adding new entries

For this I'm going to assume you have an editable .txt file (Step #3 above), and know what you're hash names are that you're adding.

If you want to add a completely new entry to a .gxt2 file you need to create a hash out of whatever name/entry you're adding to the game. OpenIV has a nice hash generator that you can use, Tools → Hash Generator.
Just drop the name/list into the Input section, make sure you're on Hex, and hit Generate.

1NXdUGv.png

You can add that hash directly to your .txt file (minus the 0x bit).
  • Jax765 likes this

DrGta
  • DrGta

    Mark Chump

  • Members
  • Joined: 06 Apr 2014
  • United-States

#2

Posted 07 June 2015 - 01:20 AM

where can you change the name of a weapon name that is listed in the GUI of Ammunation when previewing a weapon selected before purchase?


SonofUgly
  • SonofUgly

  • Feroci
  • Joined: 27 Jul 2011
  • None

#3

Posted 07 June 2015 - 01:46 AM

where can you change the name of a weapon name that is listed in the GUI of Ammunation when previewing a weapon selected before purchase?

That's in global.gxt2.

DrGta
  • DrGta

    Mark Chump

  • Members
  • Joined: 06 Apr 2014
  • United-States

#4

Posted 07 June 2015 - 02:45 AM Edited by DrGta, 07 June 2015 - 02:56 AM.

delete


DrGta
  • DrGta

    Mark Chump

  • Members
  • Joined: 06 Apr 2014
  • United-States

#5

Posted 07 June 2015 - 02:55 AM Edited by DrGta, 07 June 2015 - 03:19 AM.

its throwing an error when exporting from gxt2 tools " blah blah is not a valid integer"

BxEmW4r.png

also what is a byte? one value or character? and it seems to be the first part of the txt when exporting back to gxt2 .it would also help to show how many values after 2txg you are suppose to select

 

also in hex editor is there any presets that could mess up the export or save after reversing 32bit?

i have it set to

 

offsets in hex

and little Endian in byte order

 

after messing with it for hours. i give up but i did find that everytime i try to import txt then save it works but if i alter the text it throws that not valid integer. and then no matter what if i just open the gtx2 in gtx2 tools it changes some letters and values in the header, hashes, or entries to different than it was before opening in gtx2 the first time...


XBLToothPik
  • XBLToothPik

    c0de

  • Feroci
  • Joined: 21 Nov 2012
  • None

#6

Posted 07 June 2015 - 05:10 AM Edited by XBLToothPik, 07 June 2015 - 05:18 AM.

Made a small tool for editing GTAV GXT2 Files on PC, specifically for PC with no conversions needed.  Tool is in C# and source code is provided.

 

* Note:  Tool requires .NET Framework 4.5 to run

* Note: The tool is not PERFECT!, so please don't hate.  I created it in less than 20 minutes.

 

Tool Download: Mega Link Here

 

Tool Virus Scan: Virus Total Link Here

 

Tool Source: Mega Source Code Here

 

Double click an item to edit it

Right click anywhere on the list to add an item

Right click on an item to remove it.

 

1bcb8633b3.png
 

  • SonofUgly likes this

DrGta
  • DrGta

    Mark Chump

  • Members
  • Joined: 06 Apr 2014
  • United-States

#7

Posted 07 June 2015 - 06:36 AM

UPDATE AGAIN. removed all special carbine and replaced with various names. no luck changing this name in ammunition though..

any idea?
 

IyN6Nk7.png


SonofUgly
  • SonofUgly

  • Feroci
  • Joined: 27 Jul 2011
  • None

#8

Posted 07 June 2015 - 07:46 AM

Made a small tool for editing GTAV GXT2 Files on PC, specifically for PC with no conversions needed.  Tool is in C# and source code is provided.

Nice. Once you make a release thread for it I guess mods can go ahead and lock this thread.
Also good to see more open source modding tools get released :^:

UPDATE AGAIN. removed all special carbine and replaced with various names. no luck changing this name in ammunition though..
any idea?

It's a DLC weapon so you'll need to edit the global.gxt2 in the DLCpack. For mpbusiness it's Grand Theft Auto V\x64w.rpf\dlcpacks\mpbusiness\dlc.rpf\x64\data\lang\americandlc.rpf\global.gxt2

DrGta
  • DrGta

    Mark Chump

  • Members
  • Joined: 06 Apr 2014
  • United-States

#9

Posted 07 June 2015 - 09:20 PM

 

Made a small tool for editing GTAV GXT2 Files on PC, specifically for PC with no conversions needed.  Tool is in C# and source code is provided.

Nice. Once you make a release thread for it I guess mods can go ahead and lock this thread.
Also good to see more open source modding tools get released :^:

UPDATE AGAIN. removed all special carbine and replaced with various names. no luck changing this name in ammunition though..
any idea?

It's a DLC weapon so you'll need to edit the global.gxt2 in the DLCpack. For mpbusiness it's Grand Theft Auto V\x64w.rpf\dlcpacks\mpbusiness\dlc.rpf\x64\data\lang\americandlc.rpf\global.gxt2

 

believe me i have edited i searched in hex edit for the "special carbine" and nothing comes up...


SonofUgly
  • SonofUgly

  • Feroci
  • Joined: 27 Jul 2011
  • None

#10

Posted 07 June 2015 - 09:48 PM

believe me i have edited i searched in hex edit for the "special carbine" and nothing comes up...

There's also some entries for it in the main global.gxt2 file, Grand Theft Auto V\update\update.rpf\x64\data\lang\american_rel.rpf\global.gxt2. Did you edit that as well?

DrGta
  • DrGta

    Mark Chump

  • Members
  • Joined: 06 Apr 2014
  • United-States

#11

Posted 07 June 2015 - 10:51 PM

 

believe me i have edited i searched in hex edit for the "special carbine" and nothing comes up...

There's also some entries for it in the main global.gxt2 file, Grand Theft Auto V\update\update.rpf\x64\data\lang\american_rel.rpf\global.gxt2. Did you edit that as well?

 

it is now fixed yet im still awaiting how to put a weapon in the new dlc slots like this one below the Hatchet. on very right?

99ehThs.jpg


gpcguy1
  • gpcguy1

    Gangsta

  • Members
  • Joined: 22 Aug 2011

#12

Posted 10 June 2015 - 01:42 AM

Made a small tool for editing GTAV GXT2 Files on PC, specifically for PC with no conversions needed.  Tool is in C# and source code is provided.

 

* Note:  Tool requires .NET Framework 4.5 to run

* Note: The tool is not PERFECT!, so please don't hate.  I created it in less than 20 minutes.

 

Tool Download: Mega Link Here

 

Tool Virus Scan: Virus Total Link Here

 

Tool Source: Mega Source Code Here

 

Double click an item to edit it

Right click anywhere on the list to add an item

Right click on an item to remove it.

 

1bcb8633b3.png
 

Are you going to be updating this? It's a great tool so far. I think it just needs a Search function.


silentkiller44
  • silentkiller44

    A.K.A zxc2.0

  • Members
  • Joined: 06 Aug 2013
  • None

#13

Posted 10 July 2015 - 01:56 PM Edited by silentkiller44, 11 July 2015 - 09:17 PM.

Deleted


Stanper
  • Stanper

    Player Hater

  • New Members
  • Joined: 16 Aug 2015
  • Slovakia

#14

Posted 16 August 2015 - 12:25 AM Edited by Stanper, 16 August 2015 - 12:31 AM.

Hello guys.

 

Thanks for this gtreat software, but I made small modifications,

 

I a bit change design and add hotkeys

next I add functions for searching, export/import from/to CSV

 

for import you must create a new file and it will enabled import button.

 

Image

gtx2.png

 

Download

https://mega.nz/#!Aw...zv96ADbR5wak2Mo

  • XBLToothPik likes this

hristobg
  • hristobg

    Thug

  • Members
  • Joined: 01 Aug 2009
  • None

#15

Posted 16 August 2015 - 05:47 PM Edited by hristobg, 16 August 2015 - 06:10 PM.

Great tool! Is there any chance you add cyrillic encoding? :)
 
P.S. Some ideas for future releases:

  • CTRL + Z Undo action;
  • Centering the Search window (not being in the upper left side);
  • Implementing the ~a~, ~s~, ~b~ etc into the editing window box (Instead of ~r~WASTED could be just WASTED);
  • ~BLIP_INFO_ICON~ (and similar) could be replaced with their corresponding icons;
  • And the Item Name values with text... So the lines could be sorted like subtitles. 

I guess there is going to be much research on the last two, but just thought I could throw in some ideas.

I know this tool is in its early stage and I have so much respect for you. And I'm really thankful for that as a translator and ex-modder (if that's a thing).

 

Another useful feature could be having three columns - Item Name, Item Text and Translated Text. In the last column the user can see his translation of the Item Text, while the text under Item Text is the original one. After saving the file though, the text under Translated Text is now under Item Text as being a new original instance. Hope I made it sound logical. 

 

Cheers!


ali mc
  • ali mc

    Player Hater

  • Members
  • Joined: 24 Jun 2008

#16

Posted 24 August 2015 - 08:54 AM

Hey wondering if you could help me out here. I am trying to add  new vehicle to the game via the dlc pack I have manageg to get around 10 new vehicles installed and fully working ranging from helis planes supers and police cars. no ofcourse I have so real world cars like the aventador I want to change the game name and brand from...

 

Grotti, Vacca, Sports

 

to...

 

Lamborghini, Aventador, Sports

 

Now in the vehicles.meta file we can change this such as

 

<gameName>VACCA</gameName>

<gameMakeName>GROTTI</gameMakeName>

 

in order to change it to this...

 

<gameName>AVENT</gameName>

<gameMakeName>LAMBO</gameMakeName>

 

I need to add a global.gxt2 file to the dlc.

 

so within the file itself we need to add...

 

LAMBO          Lamborghini

AVENT          Aventador

 

Now this is where I get stuck as when I do this and then view the file in openiv it looks like this

 

0x85D84G   Lamborghini

0x5D844A   Aventador

 

(not actual hex just example)

 

I have tried just putting in the hash/hex but that still doesn't work yet if we look at the games original global.gxt2 file

it have things like

 

BUCK     Buckingham

VAPID    Vapid

0x548F48S SOME RAMDOM SUBTITLE LINES

 

And I can't figure it out what so ever.

 

I feel like there is a another file I need to edit which contains code such as

 

0x557D444A     SLAMVAN

0X44D76G4      VAPID

 

This file in theory if it exists tells the game what these numbers and letters in the global.gxt2 actually mean.

 

PLEASE HELP


WildBrick142
  • WildBrick142

    🦋 This action will have consequences...

  • GTA Series Staff
  • Joined: 18 Dec 2012
  • Unknown
  • Draw Contest Winner 2016
    Contribution Award [GTA V]

#17

Posted 25 August 2015 - 12:23 AM

Spoiler

The hex numers is a Jenkins hashed name of the string. It's another way the game can read/request stuff. Modders that have more knowledge can say more about it.

 

You have to go to "C://Users/username/AppData/Local/New Technology Studio/Apps/OpenIV/Games/Five/strings" and edit a file called "GxtKeys.txt" and add "AVENT" (or any other new string names you added) at the end so instead of displaying "0x9C108375" it will display "AVENT" in OpenIV. Doesn't matter if you do it all caps or all lowercase, it will display anyway.

 

I wouldn't worry about making the value readable as long as you know for sure it's correct.


UHDFreddyEST
  • UHDFreddyEST

    Player Hater

  • Members
  • Joined: 20 Aug 2015
  • Estonia

#18

Posted 26 August 2015 - 10:31 PM Edited by UHDFreddyEST, 26 August 2015 - 10:32 PM.

I have stil problems, i dont know what to do :/ :(. Where i make a mistake :/

 

http://imgur.com/j2OdZ6k


SonofUgly
  • SonofUgly

  • Feroci
  • Joined: 27 Jul 2011
  • None

#19

Posted 26 August 2015 - 10:38 PM

I have stil problems, i dont know what to do :/ :(. Where i make a mistake :/

Do you have dlctext.meta in your DLCPack? And in it, does hasGlobalTextFile = true?

UHDFreddyEST
  • UHDFreddyEST

    Player Hater

  • Members
  • Joined: 20 Aug 2015
  • Estonia

#20

Posted 26 August 2015 - 11:47 PM

Yes


SonofUgly
  • SonofUgly

  • Feroci
  • Joined: 27 Jul 2011
  • None

#21

Posted 27 August 2015 - 12:12 AM

Yes

Upload it and I'll take a look.

UHDFreddyEST
  • UHDFreddyEST

    Player Hater

  • Members
  • Joined: 20 Aug 2015
  • Estonia

#22

Posted 27 August 2015 - 09:14 PM

 

Yes

Upload it and I'll take a look.

 

there's my files and locations. https://mega.nz/#F!7...2ULe5Qrw31gUSmA


SonofUgly
  • SonofUgly

  • Feroci
  • Joined: 27 Jul 2011
  • None

#23

Posted 27 August 2015 - 09:19 PM

there's my files and locations. https://mega.nz/#F!7...2ULe5Qrw31gUSmA

You're missing:
<Item>dlc_caraddon:/common/data/dlctext.meta</Item>
In CARADDON_AUTOGEN in content.xml

UHDFreddyEST
  • UHDFreddyEST

    Player Hater

  • Members
  • Joined: 20 Aug 2015
  • Estonia

#24

Posted 27 August 2015 - 09:40 PM

 

there's my files and locations. https://mega.nz/#F!7...2ULe5Qrw31gUSmA

You're missing:
<Item>dlc_caraddon:/common/data/dlctext.meta</Item>
In CARADDON_AUTOGEN in content.xml

 

i don't understund, :/

http://i.imgur.com/h3DgBun.png


UHDFreddyEST
  • UHDFreddyEST

    Player Hater

  • Members
  • Joined: 20 Aug 2015
  • Estonia

#25

Posted 27 August 2015 - 09:46 PM Edited by UHDFreddyEST, 27 August 2015 - 09:47 PM.

 

 

there's my files and locations. https://mega.nz/#F!7...2ULe5Qrw31gUSmA

You're missing:
<Item>dlc_caraddon:/common/data/dlctext.meta</Item>
In CARADDON_AUTOGEN in content.xml

 

i don't understund, :/

http://i.imgur.com/h3DgBun.png

 

do you mean that, i must add that <Item>dlc_caraddon:/common/data/dlctext.meta</Item> to the left side where is blucolored box ?  http://i.imgur.com/anzhPft.png


SonofUgly
  • SonofUgly

  • Feroci
  • Joined: 27 Jul 2011
  • None

#26

Posted 27 August 2015 - 09:51 PM

do you mean that, i must add that <Item>[/size]dlc_caraddon:/common/data/dlctext.meta[/size]</Item> to the left side where is blucolored box ? [/size] http://i.imgur.com/anzhPft.png

Yep.

UHDFreddyEST
  • UHDFreddyEST

    Player Hater

  • Members
  • Joined: 20 Aug 2015
  • Estonia

#27

Posted 27 August 2015 - 09:58 PM


Yep.

 

 

Thanx :)


vitalik2187836
  • vitalik2187836

    Square Civilian

  • Members
  • Joined: 30 Jul 2013

#28

Posted 28 August 2015 - 11:37 AM

Can i somehow use this program with russian language?


vitalik2187836
  • vitalik2187836

    Square Civilian

  • Members
  • Joined: 30 Jul 2013

#29

Posted 29 August 2015 - 10:51 PM

Please, can someone help me? How i can fix this? Why this programs dont want to show correct russian symbols? This happening with both methods. Thanks)

https://yadi.sk/i/aJgWrJIJik5Ku


MrPhillips
  • MrPhillips

    Crazy Trevor

  • Members
  • Joined: 09 Aug 2013
  • Bosnia-and-Herzegovina

#30

Posted 31 August 2015 - 10:03 AM Edited by grandT, 05 September 2015 - 04:59 PM.

Very nice





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users