How to extract/edit TL2 item files, V012 [With images]

Forum for discussing the Torchlight II mod toolset.

How to extract/edit TL2 item files, V012 [With images]

Postby kalamari157 » Fri Sep 28, 2012 5:19 pm

UPDATE: V012 of cienislaw's tools are out! Find them here

No longer used for Python. No point.

This will use cienislaw dat2txt and txt2dat .exe. You will need basic knowledge on how to work a computer through this tutorial.

I'd also appreciate if you try before asking.

I will also add /spoiler to images so you won't have chronic scroll-down-all-the-time.

Note: This is for version v012 (.EXE) of cienislaw's tools



Tools needed:
Download dat2txt_exe_012.rar
Torchlight 2 Extractor
~Optional~ fgaaghf's torch2packer.v3

Extract v012 somewhere where you will remember.

STEP 1: Torchlight 2 Extractor. Required Step.
Spoiler: show
Now, download, extract and run Torchlight 2 Extractor (Make sure you have it set to English and not Czech if you can't understand Czech.
Image
Click "Open File" near the top left and navigate to where your DATA.PAK file is in your TL2 directory is. For me it is C:\Program Files (x86)\Torchlight II\PAKS\
Image
Image

If you have Steam for TL2, it's more than likely going to be in C:\Program Files (x86)\Steam\steamapps\common\Torchlight II\PAKS

Image

Set an extract path by clicking the wires near the top right. My extraction path is on my desktop.
Image
Image
Click save all. Give it some time, but you may run into some errors which is fine at the moment.
Image
You will then have a MEDIA folder wherever you extracted it too with a bunch of .DAT files.
Image


STEP 2-A: This spoiler is for extracting all of the .dat files in the MEDIA folder to .txt files.
Spoiler: show
First off, extract dat2txt_exe_012.rar anywhere you wish. I extracted mine to my downloads folder.

With v012, you can now drag and drop whole folders!
Image

Or, still use the command line option:
Open up Command Prompt by pressing the windows button or clicking it, type in cmd. You may have to run as Admin. Type in
Code: Select all
cd Wherever-your-dat2txt-folder-is

Image

Press enter.

Now, you can either type in
Code: Select all
dat2txt.exe Wherever-Your-Media-Folder-is
Which will make a MEDIA folder in your dat2txt folder.
Image

Or type in:
Image
Which will make a MEDIAA folder with all the .txt files on my desktop.
Image

Depending on the power of your PC, this will take about 7 minutes.

After it is done, go to whatever folder you dropped, or the MEDIAA folder and you will see A LOT of .txt files. About 16000.
Image
You will see this if you dropped the folder. You will just see .txt files if you used the command line.


STEP 2-B: If you just want to extract one specific .txt from a .dat file, drag the .dat file into dat2txt.exe
Spoiler: show
Image
Image


CONGRATULATIONS! YOU HAVE SUCCESSFULLY EXTRACTED .DAT FILES TO .TXT FILES! WOO!
Last edited by kalamari157 on Sun Mar 24, 2013 2:46 am, edited 43 times in total.
| How to extract/edit TL2 item files, V012 [With images] I am no longer active in the modding community. If you wish to take a project that I have made, besides the 'How to extract/edit TL2 item files', and change it as your own, you may do so.
User avatar
kalamari157
 
Posts: 370
Joined: Mon Sep 24, 2012 1:13 pm

Re: How to extract and edit TL2 item files [images, Window 7

Postby kalamari157 » Fri Sep 28, 2012 5:21 pm

Now this part is using txt2dat.exe


Before we start this, create a folder somewhere easy like the C:\ drive. Name it anything. Mine is "Something" Now create another folder inside that named MEDIA. Like this: "C:\SOMETHING\MEDIA"
For ease of creating more folders, hit the key CTRL+SHIFT+N in that order. Or, download this, extract, and place it in your C:\ drive so it looks like "C:\SOMETHING\MEDIA"

===========================================================================================================================================================================================================
STEP 1: First thing, pick a .txt file you want to mess with. In this case for simplicity, I will be using a level 2 pistol.
Spoiler: show
Image

Pistol in game before changes. I will be changing the speed.
Spoiler: show
Image

The speed before the change. For every increment of 10 speed, in game it will be up by 0.08. Example: 100 speed in the .txt file is 0.80 speed in game.
In this case, 70 speed is 0.56 speed in game.
Spoiler: show
Image

Speed changed to 40 which should be 0.32
Spoiler: show
Image

============================================================================================================================================================================================================

STEP 2: Spoiler for Drag and drop.
Spoiler: show
Drag and drop. Simple as that. Use txt2dat.exe.
Image
You will know if it worked by the modified date.
Image

You will also change the folders based on where the file is located. Example:
ADD_COMBO_FIRE.DAT.txt would translate to
Code: Select all
MEDIA\AFFIXES\SKILLS\ADD_COMBO_FIRE.DAT

And so on and so forth.

You cannot just put the dat file in the \MEDIA\ folder and then pack or it will not work Example below.
Image


STEP 3-A: This spoiler is for fgaaghf's torch2packer.
Spoiler: show
First, download this.
Extract it to somewhere and have the folder open in the backround. We will use this later.

Do you have your .dat file in the correct place? Good. Make sure there are no .txt files in the folders when you plan to create the new DATA.PAK.
Now bring forward the torchpacker window and have open the place where the SOMETHING folder is.
Now, drag the SOMETHING folder, or whatever folder you named it, and drop it over the torch2packer.exe. It should pop up with a window saying extracted.
The new DATA.PAK files are now named whatever your SOMETHING folder was called plus .DATA.PAK.
Now copy both of those files into the PAKS directory of where your TL2 is and you are good to go!
Image


STEP 3-B: This spoiler is for cienislaw's paktool. This works the same exact way that fgaaghf's packer does.
Spoiler: show
First, download this.
Extract it to somewhere and have the folder open in the backround. We will use this later.

Do you have your .dat file in the correct place? Good. Make sure there are no .txt files in the folders when you plan to create the new DATA.PAK.
Now bring forward the paktool window and have open the place where the SOMETHING folder is.
Now, drag the SOMETHING folder, or whatever folder you named it, and drop it over the paktool.exe. It will flash a command prompt window.
The new DATA.PAK files are now named whatever your SOMETHING folder was called plus .DATA.PAK.
Now copy both of those files into the PAKS directory of where your TL2 is and you are good to go!
Image


Now fire up TL2, go in game and spawn the item you modified or if it's your pack or stash check that.

Awesome! It works!
Spoiler: show
ImageImage


Congratulations! You now have edited a txt file and converted it to .DAT and put in game!
Last edited by kalamari157 on Mon Oct 15, 2012 4:56 pm, edited 11 times in total.
| How to extract/edit TL2 item files, V012 [With images] I am no longer active in the modding community. If you wish to take a project that I have made, besides the 'How to extract/edit TL2 item files', and change it as your own, you may do so.
User avatar
kalamari157
 
Posts: 370
Joined: Mon Sep 24, 2012 1:13 pm

Re: How to extract and edit TL2 item files [images, Window 7

Postby chilledfrench » Fri Sep 28, 2012 5:25 pm

thank you! very good post, very clear. you are awesome!
chilledfrench
 
Posts: 204
Joined: Sat Sep 22, 2012 5:28 pm

Re: How to extract and edit TL2 item files [images, Window 7

Postby kalamari157 » Fri Sep 28, 2012 5:30 pm

chilledfrench wrote:thank you! very good post, very clear. you are awesome!


Thank you. From going to not knowing anything about Python to goofy work arounds that work, I feel accomplished.
| How to extract/edit TL2 item files, V012 [With images] I am no longer active in the modding community. If you wish to take a project that I have made, besides the 'How to extract/edit TL2 item files', and change it as your own, you may do so.
User avatar
kalamari157
 
Posts: 370
Joined: Mon Sep 24, 2012 1:13 pm

Re: How to extract/edit TL2 item files, V006 [images, Window

Postby chilledfrench » Fri Sep 28, 2012 7:58 pm

im having an error message when i do this step: dat2txt.py WHERE-EVER-YOUR-MEDIA-FOLDER-IS NAME-OF-A-DIFFERENT-FOLDER-EXTRACT-SOMEWHERE

im starting over to see if i did something wrong
chilledfrench
 
Posts: 204
Joined: Sat Sep 22, 2012 5:28 pm

Re: How to extract/edit TL2 item files, V006 [images, Window

Postby kalamari157 » Fri Sep 28, 2012 8:05 pm

chilledfrench wrote:im having an error message when i do this step: dat2txt.py WHERE-EVER-YOUR-MEDIA-FOLDER-IS NAME-OF-A-DIFFERENT-FOLDER-EXTRACT-SOMEWHERE

im starting over to see if i did something wrong


What is the error message? Also make sure you typed everything correctly.
| How to extract/edit TL2 item files, V012 [With images] I am no longer active in the modding community. If you wish to take a project that I have made, besides the 'How to extract/edit TL2 item files', and change it as your own, you may do so.
User avatar
kalamari157
 
Posts: 370
Joined: Mon Sep 24, 2012 1:13 pm

Re: How to extract/edit TL2 item files, V006 [images, Window

Postby chilledfrench » Fri Sep 28, 2012 8:14 pm

Spoiler: show
Image

this is the message i get, i probably did something wrong somewhere.

EDIT: oh wait i have to name a folder that doesn't exist yet? and it creates it?

EDIT: yes seems to be working. i guess that was the problem
chilledfrench
 
Posts: 204
Joined: Sat Sep 22, 2012 5:28 pm

Re: How to extract/edit TL2 item files, V006 [images, Window

Postby kalamari157 » Fri Sep 28, 2012 8:23 pm

Fantastic. Yes, you can't have the folder already there. Glad you figured it out. :D
| How to extract/edit TL2 item files, V012 [With images] I am no longer active in the modding community. If you wish to take a project that I have made, besides the 'How to extract/edit TL2 item files', and change it as your own, you may do so.
User avatar
kalamari157
 
Posts: 370
Joined: Mon Sep 24, 2012 1:13 pm

Re: How to extract/edit TL2 item files, V006 [images, Window

Postby chilledfrench » Fri Sep 28, 2012 8:47 pm

so far its working perfectly but i have a question, how do you go and do this step:

txt2dat.py 23_09_2012.hash C:\Users\Kalamari\Desktop\MEDIA\AFFIXES\SKILLS\ADD_COMBO_FIRE.DAT.txt C:\SOMETHING\MEDIA\AFFIXES\SKILLS\ADD_COMBO_FIRE.DAT

if the file name has a space in it?

EDIT: lol once again i should have tried before asking, im sorry. putting "C:\etc\filename" worked
chilledfrench
 
Posts: 204
Joined: Sat Sep 22, 2012 5:28 pm

Re: How to extract/edit TL2 item files, V006 [images, Window

Postby kalamari157 » Fri Sep 28, 2012 8:52 pm

Don't worry, I always want to ask questions too. Again, awesome that you figured it out.
| How to extract/edit TL2 item files, V012 [With images] I am no longer active in the modding community. If you wish to take a project that I have made, besides the 'How to extract/edit TL2 item files', and change it as your own, you may do so.
User avatar
kalamari157
 
Posts: 370
Joined: Mon Sep 24, 2012 1:13 pm

Re: How to extract/edit TL2 item files, V006 [images, Window

Postby chilledfrench » Fri Sep 28, 2012 9:34 pm

Spoiler: show
Image


worked like a charm! thanks
chilledfrench
 
Posts: 204
Joined: Sat Sep 22, 2012 5:28 pm

Re: How to extract/edit TL2 item files, V006 [images, Window

Postby Zidders » Fri Sep 28, 2012 10:50 pm

Awesome thread is awesome
Image
User avatar
Zidders
 
Posts: 13309
Joined: Fri Oct 30, 2009 9:50 am
Location: Bertram, Texas

Re: How to extract/edit TL2 item files, V006 [images, Window

Postby grimlaw » Fri Sep 28, 2012 11:02 pm

Thanks a lot. Never donned on me that hasher wasn't the has file that the script was complaining about. =/
grimlaw
 
Posts: 14
Joined: Wed Sep 26, 2012 1:54 pm

Re: How to extract/edit TL2 item files, V006 [images, Window

Postby Salan » Fri Sep 28, 2012 11:25 pm

all the goodies we get to play with soon!
Synergies Conversion mod: http://www.synergiesmod.com
Elite monsters, Hero monsters, world bosses, rare dragons, rare trolls, three tiers of End Game Raids, Legendary Armor sets, NEW Legendary Weapons, 3 new classes, Mercenaries, and Angels!
Image

Image
Salan
 
Posts: 2524
Joined: Tue Jan 12, 2010 2:24 pm

Re: How to extract/edit TL2 item files, V006 [images, Window

Postby cienislaw » Fri Sep 28, 2012 11:50 pm

from 007 you don't have to put hash file in command line. just make sure that it is in the same folder as all .PY files and when needed scripts will use it. you can force tools to use hash file you want by using --fhash=file_name.hash option.

kalamari157 - please update part with hash file, because with 007 it won't work;-)
User avatar
cienislaw
 
Posts: 233
Joined: Wed Nov 04, 2009 5:25 am

Re: How to extract/edit TL2 item files, V006 [images, Window

Postby kalamari157 » Fri Sep 28, 2012 11:59 pm

I am right now. Thanks for the update :)

EDIT: Updated the posts. Should account for V006 and V007 uses.
| How to extract/edit TL2 item files, V012 [With images] I am no longer active in the modding community. If you wish to take a project that I have made, besides the 'How to extract/edit TL2 item files', and change it as your own, you may do so.
User avatar
kalamari157
 
Posts: 370
Joined: Mon Sep 24, 2012 1:13 pm

Re: How to extract/edit TL2 item files, V006/007 [With image

Postby cienislaw » Sat Sep 29, 2012 12:32 am

only TXT2DAT uses hash file, DAT2TXT has no need for it.
User avatar
cienislaw
 
Posts: 233
Joined: Wed Nov 04, 2009 5:25 am

Re: How to extract/edit TL2 item files, V006/007 [With image

Postby kalamari157 » Sat Sep 29, 2012 12:43 am

Got it. Should be properly fixed now.
| How to extract/edit TL2 item files, V012 [With images] I am no longer active in the modding community. If you wish to take a project that I have made, besides the 'How to extract/edit TL2 item files', and change it as your own, you may do so.
User avatar
kalamari157
 
Posts: 370
Joined: Mon Sep 24, 2012 1:13 pm

Re: How to extract/edit TL2 item files, V006/007 [With image

Postby Phanjam » Sat Sep 29, 2012 3:26 am

Fantastic work Kalamari157! The modding community owes you a debt of gratitude!
User avatar
Phanjam
 
Posts: 2693
Joined: Mon Nov 30, 2009 11:15 pm
Location: Same as you, at the center of the universe

Re: How to extract/edit TL2 item files, V006/007 [With image

Postby RMUK » Sat Sep 29, 2012 5:56 am

Great work, kalamari ~ Thorough, neat & concise! +kudos! ;)
User avatar
RMUK
 
Posts: 133
Joined: Mon Jul 26, 2010 9:57 am

Next

Return to Torchlight II Mod Discussion

Who is online

Users browsing this forum: No registered users and 5 guests