x2tool problems

The place to discuss scripting and game modifications for X²: The Threat.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

HasItNow
Posts: 85
Joined: Mon, 2. Jul 07, 11:40

x2tool problems

Post by HasItNow »

I tried unpacking the cat and dat files with x2tool (for my Regain the Univerase mod) but all that happens is a command prompt flashes up then disappears. It has made one BOD file appear. What am I doing wrong?
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22438
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

x2tool is a command line program.

u'll need to run it in the command prompt and give it the correct arguments for it to do anything
HasItNow
Posts: 85
Joined: Mon, 2. Jul 07, 11:40

Post by HasItNow »

I tried that. All it says is 'x2tool is not a program or batch file' or something like that.
Harlock776
Posts: 2261
Joined: Wed, 9. Mar 05, 21:53
x2

command line stuff

Post by Harlock776 »

Click on the start button, click on programs, accessories and then the item command prompt.

Notice how it's just sitting there this time instead of disappearing?

Ok before you use it though try making a folder on your C drive and call it decompiled or mod files or something easy to remember and type.

You will have to go to this directory with the keyboard in that command prompt so if it's on C drive directly then you don't have to type out all those other directories thats your x2tool is under just to get to it.

So if you made that folder and lets say you named it decompiled, you would type in the command prompt cd.. and then press enter until just C:\ was displayed. The type decompiled and press enter. Now type x2tool.exe and press enter. That should bring up the command options for x2tool.


Of course you could just go to doubleshadow's website http://www.doubleshadow.wz.cz and browse the downloads area I think it was and get a program called X2Archiver v1.02 and use that to unpack mod files with.

X2Archiver is a right click only program so when you see the X2 cat&dat files you can right click on the .cat file and select unpack and everything just comes out right away lol.
Our mighty sovereign may she always go before us sailing brightly in the sea of black.
HasItNow
Posts: 85
Joined: Mon, 2. Jul 07, 11:40

Post by HasItNow »

So it's x2tool.exe not just x2tool?
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22438
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

x2tool.exe is the filename

but when in the command prompt you dont have to type the extension, x2tool on its own will work, as long as your working directory is correct, you cant simply type it anywhere.

like harlock said, you need to navigate to the correct directory where you put x2tool.exe, or edit your path environment so it can work in any directory.

you dont need to keep doing cd.., just doing cd\decompiled would take u directly there.
DragonFly1102
Posts: 29
Joined: Sat, 17. Mar 07, 10:48

Post by DragonFly1102 »

When you enter say "myprogram" into command promt it will try to find and run the following files. (I think in this order although not sure). It will only run the 1st one it finds.
myprogram.bat
myprogram.com
myprogram.exe

If you don't want to run the 1st one then you need to enter the complete name (eg myprogram.exe)

Command prompt will look for the above files in the current working directory and in all the directorys in the system environment path.
HasItNow
Posts: 85
Joined: Mon, 2. Jul 07, 11:40

Post by HasItNow »

Tried that. It just says 'x2tool is not a batch file,etc'.
DragonFly1102
Posts: 29
Joined: Sat, 17. Mar 07, 10:48

Post by DragonFly1102 »

can you copy paste the entire comtents of the command prompt window. Starting with just before you gave the run program command?
(right click -> "mark". then select the area of texh and press "enter" to copy it to the clipboard)
TycHouse
Posts: 488
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by TycHouse »

My suggestion which works for me is as follows

Create a seperate folder for all your mod/scripting work
Browser into your new folder
Copy the script/file into the new folder
Place a copy of x2tool.exe into the new folder
Right click on x2tool.exe and select 'Create Shortcut'
Right click on the shortcut you just made

--> change the 'Target' info to read:
"C:\new_folder\x2tool.exe" -unpack sourcescriptname.pck destinationscriptname.xml

--> make sure the 'Start In' info is correct:
"C\new_folder"

That will unpack a *.pck file into a *.xml file. Obviously you will need to edit the target info every time you want to unpack a new file. Dirty... but it works.

For .dat/.cat files you need to use a different switch:
--> "C:\new_folder\x2tool.exe" -extract -dat 01

where 01 is the dat file name.

Hope that helps.
AMD FX-8350 Eight-Core 4.0GHz Processor
ASrock Extreme 3 R2.0 Motherboard
8Gb memory
2 x AMD HD7770 Graphics (Crossfire not enabled)
Windows Vista Ultimate 64bit SP2
HasItNow
Posts: 85
Joined: Mon, 2. Jul 07, 11:40

Post by HasItNow »

That's it, I've had enough. I'll just download the mod kit and start again.
Harlock776
Posts: 2261
Joined: Wed, 9. Mar 05, 21:53
x2

don't worry

Post by Harlock776 »

Lol don't worry bout it just download that X2Archiver v1.02 and you will be fine.

I have been packing and repacking my mod since it was version 1.0 years ago and it's working just fine for me. Besides x2tool is just a packer unpacker it's not the only tool that does that but if you ever want to compile an edited bod file to bob, because you had to run it through notepad to properly set the LOD ranges or convert your materials to MAT3, then you will have to learn how to use a command line program like doubleshadow's bod compiler.
Our mighty sovereign may she always go before us sailing brightly in the sea of black.
HasItNow
Posts: 85
Joined: Mon, 2. Jul 07, 11:40

Post by HasItNow »

Are there any other Programs I can use?

Return to “X²: The Threat - Scripts and Modding”