How to unpack your game with X3 ModManager

The place to discuss scripting and game modifications for X³: Reunion.

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

doubleshadow
Posts: 671
Joined: Fri, 12. Mar 04, 09:14
x3

How to unpack your game with X3 ModManager

Post by doubleshadow » Tue, 6. Dec 05, 15:48

How to unpack your game with X3 ModManager

Note that this tutorial is also available on the X-wiki in nicer format and you can change any mistakes you may find.

This is my attempt to make some X3 related tutorial. I tried to write it so even inexperienced users will be able to follow it.
However it is not meant to be used by everyone. Yeah and try to be tolerant to my lack of English grammar ;)

What does "unpacking the game" mean in the first place...

Most of the data which are part of X3 game are hidden in so called catalog files. Those are the files with extensions .cat and .dat. Most of games are using this technique. The most famous example is the .pak archive developed for Quake.

So to unpack your game means to extract all the files from the catalogs into somewhere. You can extract them into some separate directory or you can extract them into the main X3 directory.

Why should I extract the catalogs?

You probably shoudn't :)

A little variation on what someone on this forum says in his/her signature: There are 0100 types of people - those who need to unpack the game and those who don't.

People who need to do that:
If you are/want to play with 3D modeling then you must do that. You will be able to access all the scene/body files, you will be able to import the models with DBOX2. And you will always know that the game is using the "right" file - because there will be no catalogs/mods to worry about.

People who may want to do that:
If you are playing with modifications on general level, altering the T files, you simply want to know "what is inside".

People who don't want to do that:
If you are scripter then there is no gain by having the files unpacked because all the scripts are unpacked by default (and in fact they cannot be ever packed). You will of course need to access the xml resource files but you just can extract these files and nothing more. If you are a scripter then you spend all your time on messing with the script editor (looking for the right commands ;) ) so you don't have time to look at the game files anyway :D

People who shouldn't ever start thinking of doing that:
If the first place you visit while on Egosoft is anything other then X2/3 Scripting and Modding. I'm serious...


So you made it here so you probably really want to know how to unleash the hell - don't you? ;)

Before I will tell you how to do that, lets talk about where to do that.

You have 3 choices how to unpack the files:

1) Unpack them into separate directory aside from X3 game.
2) Make another copy of your game and extract the files directly into that directory
3) Unpack directly into your one and only game directory

Let's start with option 3. You shouldn't do it. There is however one exception. It is said that by unpacking the catalogs, you can gain some performance. Theoretically it should be true but I never noticed anything. But if you want to do it, you are welcome. But I would recommend to do the option 2) - much safer and you can compare the performance.

Option 2 - This means unpacking/decompressing the files and deleteing the orignal catalogs. Of course having 2 installations of the game will eat some of your free space. 1.9 GB to be precise. That's the size of the data which are not in the catalog files. The rest is in the catalogs which you would unpack anyway so you cannot count their size as lost space.
It will cost you, but it is the best option. You will have game where every file is only once, so you no longer have to worry about "which file is used now?". You can alter the files directly without need for mods - modders heaven.

Option 1 - same as point 2 but you will save the 1.9 GB as you will not have to copy the "normal" game data. Aside from that, you can also decompile all the bob files into bod's. You cannot do that with point 2 as the game cannot load large bod files.

Option 1 and 2 are for 3D modelers. You will need both of them as you will need to decompile all the bob files and you also need unpacked game so you can easily test your models/scenes without the need to make special mod catalog every time and worry about whether the files are really loaded or not.

Option 1 is for people who want to just look on the game files.

Option 3 is for people who are low on disk space but want to try to increase the game performance (although I'm not sure whether it helps)

How to make another installation of your game

That's pretty easy. All you need is to copy the game directory. No installation is required. You don't have to copy the catalog files
as you will not need them (because you will have all the data unpacked).

How to unpack the files with X3MM

For those who managed to get here but still don't have the ModManager and don't know where to get it :o click here

You may think that the process is incredibly coplicated and maybe thinking about printing it so you won't screw anything but with the X3MM it will only require few clicks.

Start the X3MM and open 01.cat
Click on Extract button. A dialog will appear. It must say Extract catalog to. If it says Exctract file xx or Exctract n file(s) then close it and click on the arrow next the to Extract button and select Extract whole catalog.

Now make sure you have Decompress files during extraction and Preserve file paths CHECKED.

Select the target directory. If you want to extract into separate directory then select that directory, else select the root directory of X3 installation where you want to exctract the files (example: D:\X3 Reunion Unpacked). Press OK.

Now open catalog 02.cat and repeat the process. When asked for file overwrite press All

Do the same with all the catalogs in the main game directory (1 to 5 for X3 version 1.2)

That's it. If you were extracting the files into second game directory and you copied all the game files, you can now delete the catalogs as they are no longer needed (and in fact they must not be present otherwise the game would use them and not your unpacked files). Be sure NOT to accidentally delete the catalogs from the original game directory!

Things you should know when running multiple game installations

Savegames are saved in your Documents directory in your profile. That means that you have the same savegames no matter what game installation do you start/play.

Mod catalogs on the other hand are in the mods directory in the corresponding game root, so you will have to copy them to all your game installations if you want to use them.

When you activate some mod in "installation 1" and then later you start game from "installation 2" and the activated mod is not present in the mods dir of the game, there will be no mods selected in the Select Mod Package window, but you must press the Original button otherwise the game will crash. That's because there is only a file name of the active mod stored in the registry and the game will try to open the file from within its own mods directory. A this will fail as there is no such file. Of course it wouldn't hurt anyone to handle the error in a different way then calling exit() (or it is abort() :? ) - but you know what is X2/3 policy: when you can catch the error, then don't catch it :D

If you setup X3 Editor to use your "installation 1" as data source and later you activate some mod from "installation 2" which is not also located in "installation 1", an error will occur when starting X3 Editor saying: "Cannot open mod catalog xxx". This error is not fatal and you may continue without problems.

Other things which are good to know

I will try to write these ASAP (which is considered sooner then Soon (tm) ;) )
How X2/3 is loading files - I will tell you how x3 is reading the files and how to make sure that it will use your files.
Last edited by doubleshadow on Fri, 9. Mar 07, 09:52, edited 6 times in total.

User avatar
Dgn Master
Posts: 1228
Joined: Fri, 27. Feb 04, 11:36
x3tc

Post by Dgn Master » Tue, 6. Dec 05, 15:57

Thanks for this, well done; maybe you can see if it can be added to one of the sticky's.
Could the parents of the little Argon girl, Suzie, please claim her sealed jar of remains?
She didn't mind the gap and ended up vapourized!

JonusITA
Posts: 3432
Joined: Mon, 21. Jun 04, 15:13
x3

Post by JonusITA » Tue, 6. Dec 05, 17:32

or select all the files you want and drag them to the desktop... your program is too easy :D
Memento Audere Semper

X-Tended Mod Team Member
X-Tended Mod official forums
X-Tended official ship gallery

User avatar
nuclear_eclipse
Posts: 1128
Joined: Thu, 2. Sep 04, 01:54
x3tc

Post by nuclear_eclipse » Tue, 6. Dec 05, 18:11

NOTE: To clarify/correct one little thing (that sometimes is not so little):

If fou start Installation 1 with mod x, and then try to start Installation 2 that does NOT have mod x, X3 will CRASH. I have had this happen more times than you can EVER imagine... Simply be sure to get in the habit of ALWAYS checking the mod button on the launcher, and always hit that 'original' button if you dont see any mods listed.

doubleshadow
Posts: 671
Joined: Fri, 12. Mar 04, 09:14
x3

Post by doubleshadow » Tue, 6. Dec 05, 18:19

nuclear_eclipse wrote:NOTE: To clarify/correct one little thing (that sometimes is not so little):

If fou start Installation 1 with mod x, and then try to start Installation 2 that does NOT have mod x, X3 will CRASH. I have had this happen more times than you can EVER imagine... Simply be sure to get in the habit of ALWAYS checking the mod button on the launcher, and always hit that 'original' button if you dont see any mods listed.
Oops - didn't know that... I merely assumed that if there is nothing selected in the "Select Mod bla bla" then the game will start without a mod. Looks like I overestimated the Egosoft (again) :shock:
/* updating the tutorial */

HighVelocity
Posts: 181
Joined: Mon, 22. Dec 03, 18:15
x3ap

Post by HighVelocity » Tue, 6. Dec 05, 18:29

It´s also time that I congratulate doubleshadow for his editor, but there is still one BIG question.
I wrote this weeks ago, maybe to early. I already entpacked all files correctly and when I started a new game with plot the starting scene and the wohle bla bla is always correct. But at the end of the scene you cannot go on.
You hear: message appears, then you see the south gate of Argon Prime and you cannot use any keyboard or joystick-button. The only one functioning is the throttle and the axis. Esc does nothing. I have to ALT TAB to the desktop and brutally end the game.

Can anyone try now exact the same?

1. Expand and overwrite everthing,
2. Rename the CAT and DAT-files,
3. Start new game with easy and plot,
4. TRY TO LAND ON ANY STATION IN ARGON PRIME.

I really want to know, whether this anyone can do.

Greetings....

Runner
Posts: 96
Joined: Sun, 23. Nov 03, 11:58
x3

Post by Runner » Tue, 6. Dec 05, 18:33

I'm probably just stupid to have missed it, but where do I find the x3mm program with which to unpack anything?

doubleshadow
Posts: 671
Joined: Fri, 12. Mar 04, 09:14
x3

Post by doubleshadow » Tue, 6. Dec 05, 18:54

HighVelocity wrote:It´s also time that I congratulate doubleshadow for his editor, but there is still one BIG question.
I wrote this weeks ago, maybe to early. I already entpacked all files correctly and when I started a new game with plot the starting scene and the wohle bla bla is always correct. But at the end of the scene you cannot go on.
You hear: message appears, then you see the south gate of Argon Prime and you cannot use any keyboard or joystick-button. The only one functioning is the throttle and the axis. Esc does nothing. I have to ALT TAB to the desktop and brutally end the game.

Can anyone try now exact the same?

1. Expand and overwrite everthing,
2. Rename the CAT and DAT-files,
3. Start new game with easy and plot,
4. TRY TO LAND ON ANY STATION IN ARGON PRIME.

I really want to know, whether this anyone can do.

Greetings....
Hmm...

I'm running the non-plot Bankrupt Assasin.
I will try the plot version.
Runner wrote:I'm probably just stupid to have missed it, but where do I find the x3mm program with which to unpack anything?
Try clicking the yellowish catchy text in my signature. It is a magic signature :wink:

/* goes to add x3mm link quickly */

doubleshadow
Posts: 671
Joined: Fri, 12. Mar 04, 09:14
x3

Post by doubleshadow » Wed, 7. Dec 05, 10:54

HighVelocity wrote:It´s also time that I congratulate doubleshadow for his editor, but there is still one BIG question.
I wrote this weeks ago, maybe to early. I already entpacked all files correctly and when I started a new game with plot the starting scene and the wohle bla bla is always correct. But at the end of the scene you cannot go on.
You hear: message appears, then you see the south gate of Argon Prime and you cannot use any keyboard or joystick-button. The only one functioning is the throttle and the axis. Esc does nothing. I have to ALT TAB to the desktop and brutally end the game.

Can anyone try now exact the same?

1. Expand and overwrite everthing,
2. Rename the CAT and DAT-files,
3. Start new game with easy and plot,
4. TRY TO LAND ON ANY STATION IN ARGON PRIME.

I really want to know, whether this anyone can do.

Greetings....
I'm hereby confirming that it works - at least for me :P

Started unpacked game with no mods.
Selected New Game, Julian on easy difficulty
After the stupid breefing I landed on Argon Trading station.
I bough some stuff to verify that all is working.

Then I flew to Argon shipyard and bough myself Argon Disco and ordered it to undock - all w/o problems.

To test it really good I unpacked the game once again and run that new installation.
Started as Julian on normal difficulty.
docked at trading station.
Bought some stuff.
Undocked.

Deleted the game.
Went to sleep ;)

My keybord was without problems all the time.

HighVelocity
Posts: 181
Joined: Mon, 22. Dec 03, 18:15
x3ap

Post by HighVelocity » Wed, 7. Dec 05, 17:25

Thanks....
I will try immediately on thursday...
(maybe egosoft dosn´t like it, that I have installed X2-German, X3- Englisch and X3-German on one HD ? maybe I send them a message if you have 10 Original "X", than you get one for Zero credits or € :) );

HighVelocity
Posts: 181
Joined: Mon, 22. Dec 03, 18:15
x3ap

Post by HighVelocity » Thu, 8. Dec 05, 17:16

I tried again today and finally it worked.

I also can buy now my XPerimental in the shipyard. It looks like, that all three programs did expand a little bit different; maybe that´s the reason, why i wasn´t able to continue. One missing file and you can go to hell.

Also the first 2 missions worked without problems, although I had changed Argon Prime a littel bit (Gates more out, stations moved away).

Now the real hard work comes (to change every Tradingdock for example, so that you can buy every foor of every race and so on).

thanks again... :D :D

Panzertard
Posts: 89
Joined: Tue, 29. Nov 05, 23:13
x4

Post by Panzertard » Sat, 10. Dec 05, 06:20

Dear Sir - thank you very much for a great tool! Works like a charm on regular CAT/DAT files.

However - I'm a bit puzzled ... I thought this tool could extract .PCK file in general too - including the one's in the \scripts directory.

- If I try using "Open" you can only filter on .CAT files - or all files. Opening a PCK file in \scripts give me a "Bad data in file".
- Drag & Drop doesn't work for PCK files either, same error.
- Assigning PCK files to "X3ModManager.exe" only gives me "Open" in the Windows context menu, which also results in the same error when opening the file (of course).

All of this indicates that you have no implementation of regular PCK files decompression - but only extracting them from CAT/DAT files.
Or have I misunderstood this totally? :?

Cheers

EDIT: Oh - btw - I used the X2modder from your site instead, which works flawless. :)
/Panzertard

doubleshadow
Posts: 671
Joined: Fri, 12. Mar 04, 09:14
x3

Post by doubleshadow » Mon, 12. Dec 05, 09:44

No, X3 ModManager (or X2ModManager) cannot directly work with pck files. There is no real need for that. Either you have catalogs or you have plain (uncompressed) files, but never pck (compressed) files outside catalogs. Such things happen only when you unpack catalogs with old unpacking programs. When unpakcing with X3MM or X2 Archiver (and you have "decompress files" checked) you can never run into such problems.

NOTE: X2 Archiver will not decompress .pbb files (packed bob's) - you must use X3MM ti do that (or change the extension if you want to use X2 Archiver)

You can associate X3MM with
.cat
.pck
.pbd
.pbb

But only the .cat (catalog) files will have the option to open - i.e. they will be opened with X3MM when double clicked.

If you associate the other extensions, the only effect it will have will be that the icons of these files will change and that their "File type" (the description) will change. There is no open action associated with them. The only program which associate open cation with .pck files is X2 Archiver.

Although X3MM doesn't support .pck files directly, you can still extract/create them using the shell extension - check the help file. You just need to go to settings -> File Associations and select either the pck extension in the right (shell extesnion) column, or check the Add extension to all files. Then you can work with the pck files the same way as in X2 Archiver - that is using the file context menu of your file manager (explorer, salamander, total commander,...)

Shadalarion
Posts: 2
Joined: Tue, 13. Dec 05, 21:44
x3

Post by Shadalarion » Fri, 16. Dec 05, 01:44

Love your editor and mod manager, however I have a question. Am creating my own mods and it will not let me work with componets, wareslist, Twares, and jobs.pck

The editor will let me play with Tships, Tweapons, Tlasers, Tbullets and Tmissiles.pck.

Is there another X3 editor that allows one to do the other stuff?

Thx.

Zzyn
Posts: 75
Joined: Sat, 31. Jul 04, 00:08
x3

Post by Zzyn » Fri, 16. Dec 05, 04:14

So, riddle me this... How do I unpack the .pck files that are in the scripts directory? I have tried x3mm and I get an error that there is 'bad data in the file' every time.

Ideas?

Post Reply

Return to “X³: Reunion - Scripts and Modding”