Guide to combining mods
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 2282
- Joined: Thu, 29. Jan 04, 08:19
Guide to combining mods
By combining mods you can mess up your game, set your computer on fire, or call down hail upon your house. If you post in someone's thread that their mod isn't working after you've combined it you may face public ridicule, but luckily not hail. If you ask me for help I will ignore you. If you ask a developer for help everyone's patch will be delayed as many minutes as it takes to help you.
Setup:
1. Download X2tool.exe or X3tools.exe. X3tools is prefered. Download X2build.exe
2. Create a new folder in C:\ drive called ExtractionFolder. Create a new folder in C:\ drive called ModFolder.
3. Move the X3tools.exe to the ExtractionFolder.
4. Open up a command prompt by running cmd.
5. Type in the command prompt cd C:\ and press enter.
6. Type in the command prompt cd ExtractionFolder and press enter.
For each mod to be combined:
7. Move the mod.cat and mod.dat files to your ExtractionFolder.
8. Type in the command prompt X3tools -extract-dat <mod name> where <mod name> is the name of the mod minus the .dat
9a Copy the new files and folders from ExtractionFolder to ModFolder. Do not copy X3tools or the mod.cat or mod.dat
9b If you are asked to overwrite a file during the copying proceedure, then the mods are incompatible. Remove one and start again.
10a Delete all files from ExtractionFolder except X3tool.
10b Repeat from step 7
Combining mod:
11. Copy X2build.exe to the C:\ drive.
12. Type in the command prompt cd C:\ and press enter
13. Type in the command prompt X2build <your mod name> ModFolder, where <your mod name> is a name of your choosing for your new combined mod.
14. Copy the <your mod name>.dat and .cat from the C:\ drive to the X3 Reunion\mods folder.
15. Delete both folders and X2build.
16. Select your mod as the mod package to run.
Setup:
1. Download X2tool.exe or X3tools.exe. X3tools is prefered. Download X2build.exe
2. Create a new folder in C:\ drive called ExtractionFolder. Create a new folder in C:\ drive called ModFolder.
3. Move the X3tools.exe to the ExtractionFolder.
4. Open up a command prompt by running cmd.
5. Type in the command prompt cd C:\ and press enter.
6. Type in the command prompt cd ExtractionFolder and press enter.
For each mod to be combined:
7. Move the mod.cat and mod.dat files to your ExtractionFolder.
8. Type in the command prompt X3tools -extract-dat <mod name> where <mod name> is the name of the mod minus the .dat
9a Copy the new files and folders from ExtractionFolder to ModFolder. Do not copy X3tools or the mod.cat or mod.dat
9b If you are asked to overwrite a file during the copying proceedure, then the mods are incompatible. Remove one and start again.
10a Delete all files from ExtractionFolder except X3tool.
10b Repeat from step 7
Combining mod:
11. Copy X2build.exe to the C:\ drive.
12. Type in the command prompt cd C:\ and press enter
13. Type in the command prompt X2build <your mod name> ModFolder, where <your mod name> is a name of your choosing for your new combined mod.
14. Copy the <your mod name>.dat and .cat from the C:\ drive to the X3 Reunion\mods folder.
15. Delete both folders and X2build.
16. Select your mod as the mod package to run.
-
- Posts: 671
- Joined: Fri, 12. Mar 04, 08:14
Or you can:
(assuming the mods you wanna join are in mods directory under X3 main directory)
Run X3ModManager
Check the mods you want to join
Look at Conflicts window to see what files are in both mods
Click Merge and type the name of your new mod
Select which file to overwrite in case there are conflicts.
No files are unpacked anywhere during the process.
Not so cool how it could be but still better then using x2tool which is supposed to be "original" program but fails to extract some X3 catalogs although the file format (cat, pck) is precisely the same. The command line options are too long (and not posix
) and modification times on extracted files are not preserved (not to mention that there is no posibility to decompress pck files during the extraction). Maybe Egosoft should use tar.gz instead of cat/dat. That's known to work some 13 years 
(assuming the mods you wanna join are in mods directory under X3 main directory)
Run X3ModManager
Check the mods you want to join
Look at Conflicts window to see what files are in both mods
Click Merge and type the name of your new mod
Select which file to overwrite in case there are conflicts.
No files are unpacked anywhere during the process.
Not so cool how it could be but still better then using x2tool which is supposed to be "original" program but fails to extract some X3 catalogs although the file format (cat, pck) is precisely the same. The command line options are too long (and not posix


-
- Posts: 3285
- Joined: Tue, 28. Dec 04, 02:19
-
- Posts: 671
- Joined: Fri, 12. Mar 04, 08:14
Well to really combine 2 mods, you usually need more then just press few buttons (or write few commands). In 90% the mods are altering the same file and you need to merge these changes somehow. Neither AalaarDB's procedure nor mine will help you with it.Any chance this thread cud be stickied, as combining mods is bound to come up often?
There is another aspect: if you combine 2 mods together and there will be update of one of these mods, you will have to start from begining (and merge them again).
-
- Posts: 2282
- Joined: Thu, 29. Jan 04, 08:19
-
- Posts: 2981
- Joined: Mon, 29. Dec 03, 03:29
-
- Posts: 2981
- Joined: Mon, 29. Dec 03, 03:29
Please download X3tools from the site in my signature. If anyone needs that new file, it's you.doubleshadow wrote: Not so cool how it could be but still better then using x2tool which is supposed to be "original" program but fails to extract some X3 catalogs although the file format (cat, pck) is precisely the same.

Cheers.
"Nature's first green is gold" . . . stay golden.
-
- Posts: 671
- Joined: Fri, 12. Mar 04, 08:14
We both know that for some timeAalaarDB wrote:@DS I do everything the hard way don't I?

I don't. The last time I used x2tool was about 1 year ago. I only know about the x2tool error because someone mentioned it here. I know that the new version (x3tools - which is still labeled x2toolBurianek wrote:Please download X3tools from the site in my signature. If anyone needs that new file, it's you.

-
- Posts: 14163
- Joined: Sun, 16. May 04, 13:01
Honestly, I think the whole catalog process should be taken a step further by egosoft.
Tships for example would be used by a majority of mods.
If the facility was introduced so you could have muliple tships files (multiple any file), then each mod would remove the ships not changed by the mod, and create a new tships file.
06 tships file in its standard cat.
06mod cat in mod directory.
tships1 M6 upgrade mod.
tships2 M7 mod.
tships3 player mods
tships4 Fortress mod.
each mod adds to the whole, not modifies the whole.
Only when different mods make a change to the same ship, would a conflict arise. For example M6 upgrade and player mods might conflict by both modifying the same ship, but the order of the files numbering would define the applying of mods. In this case, the player mod would override any conflict with the m6 upgrade mod, for a specific ship doubly mentioned.
So each mod introducing new ships, or new anything, to the game, is merged into a single mod cat, with a running file name used to keep each mod apart within the cat.
Thus simplfying the process of merging mods, and also allowing a single community mod to be more easily assembled.
Tships for example would be used by a majority of mods.
If the facility was introduced so you could have muliple tships files (multiple any file), then each mod would remove the ships not changed by the mod, and create a new tships file.
06 tships file in its standard cat.
06mod cat in mod directory.
tships1 M6 upgrade mod.
tships2 M7 mod.
tships3 player mods
tships4 Fortress mod.
each mod adds to the whole, not modifies the whole.
Only when different mods make a change to the same ship, would a conflict arise. For example M6 upgrade and player mods might conflict by both modifying the same ship, but the order of the files numbering would define the applying of mods. In this case, the player mod would override any conflict with the m6 upgrade mod, for a specific ship doubly mentioned.
So each mod introducing new ships, or new anything, to the game, is merged into a single mod cat, with a running file name used to keep each mod apart within the cat.
Thus simplfying the process of merging mods, and also allowing a single community mod to be more easily assembled.
-
- Moderator (Script&Mod)
- Posts: 22436
- Joined: Sun, 14. Nov 04, 23:26
the problem about having multiple ships is that the game uses the position in the file as the id for the ship, so if you have multiple tship files, you will have multiple ships on the same id.
if it makes it so it loads the files in sequentially so the ids follow on from each file, then it will mess up everything else, like any scripts that use those mods, as the ids will be wrong.
i think some new modding tools are required for adding ships, just a new format where you create a ship mod, and it can be loaded into the game which can them combine it to an existing mod, allowing you to just add new ships without having to create a proper mod
if it makes it so it loads the files in sequentially so the ids follow on from each file, then it will mess up everything else, like any scripts that use those mods, as the ids will be wrong.
i think some new modding tools are required for adding ships, just a new format where you create a ship mod, and it can be loaded into the game which can them combine it to an existing mod, allowing you to just add new ships without having to create a proper mod
-
- Posts: 14163
- Joined: Sun, 16. May 04, 13:01
Hardcoding strikes againCycrow wrote:the problem about having multiple ships is that the game uses the position in the file as the id for the ship, so if you have multiple tship files, you will have multiple ships on the same id.if it makes it so it loads the files in sequentially so the ids follow on from each file, then it will mess up everything else, like any scripts that use those mods, as the ids will be wrong.i think some new modding tools are required for adding ships, just a new format where you create a ship mod, and it can be loaded into the game which can them combine it to an existing mod, allowing you to just add new ships without having to create a proper mod

Ok, maybe we need a custodian of the tships file, and everyone applies for a position in the file. The ships could be added to it, and the file redistributed every time theres a change. (I've just done one so i know its posible) I dont know how feasable it is. Next thing your going to say is the file cant be bigger than x ????
-
- Moderator (Script&Mod)
- Posts: 22436
- Joined: Sun, 14. Nov 04, 23:26
the idea i was actually thinking about was a new program that creates a ship mod file.
so for each ship, you have a seperate mod file
then using an installer program, you can install these ships into the game.
the files will contain all information required for a single ship, including modles and such needed. then the installer jsut combins all these installed ships to a single mod that can be loaded ino the game.
the only problem would be that if any of the ships or mods require scripts, the ids will be wrong as it could be in differnet orders in tships depending on how there all installed.
but this is fixable by making the program create a special t file. then when using the ship id's in a script, instead of using the ship directely, you use a script that returns the correct ship id
so for each ship, you have a seperate mod file
then using an installer program, you can install these ships into the game.
the files will contain all information required for a single ship, including modles and such needed. then the installer jsut combins all these installed ships to a single mod that can be loaded ino the game.
the only problem would be that if any of the ships or mods require scripts, the ids will be wrong as it could be in differnet orders in tships depending on how there all installed.
but this is fixable by making the program create a special t file. then when using the ship id's in a script, instead of using the ship directely, you use a script that returns the correct ship id
-
- Posts: 14163
- Joined: Sun, 16. May 04, 13:01
Yes. Should have been done that way in the beginning. All ships should be accessed solely by the unique id name.Cycrow wrote:but this is fixable by making the program create a special t file. then when using the ship id's in a script, instead of using the ship directely, you use a script that returns the correct ship id
This hardcoding position in the file would have gotten someone fired in my day. I spent several years removing all hardcoding. By the time I was finished the system was finally stable.
If you can figure how to do it, then it will be a very good thing.
-
- Moderator (Script&Mod)
- Posts: 22436
- Joined: Sun, 14. Nov 04, 23:26
-
- Posts: 14163
- Joined: Sun, 16. May 04, 13:01
I would like to, I can do the ship, but not get it into the game, so I havent. (So far anyway).Cycrow wrote: it just depends how much demand there would be for something like that, if people would like to create single ships for adding into the game
I wanted to do 3 ships myself. A custom M6, M1 and M2. The M2 was for a defense platform, not a ship.
Something like a decent defense platform is needed and wanted by a lot of people. The new fortress mod goes some way to doing that and the player hq everyone wants. M7 mod is popular and the other mod with 28 new ships is also getting a lot of attention. So there is 3 mods which might want to be combined with the M6 upgrade mod, for a start.
So if people go for the new couple of mods with a lot of ships in them, and want the fortress, and anything else that comes along, its a problem.
I've just moved the fortress hull and cockpit into my own mod, scrapped the tships and tcockpits files in the fortess mod itself, leaving just the support files for fortess as a 07 file, with the ship itself in my /mod file.
First time for me doing this, so am learning which order to do things to make them work.
Anyway, I can see a need for the ability to get mods to work together, particularly ship ones.
-
- Posts: 80
- Joined: Tue, 6. Apr 04, 00:10
-
- Posts: 230
- Joined: Wed, 5. Oct 05, 19:54
AHHH, don't talk to me about merging, i used modmanger to merge:
Roguey Extreme v1 with NoCivillians-wMinimalhud1.3, then merged them with CC2X131, i had to change two numbers per ship in the same place, for all the ships in the game, lets say it took an hour or 2 of my Sunday morning.
Now guess what, v1.4 is out and so is the cockpit mod for it, i just can't be bothered.
Roguey Extreme v1 with NoCivillians-wMinimalhud1.3, then merged them with CC2X131, i had to change two numbers per ship in the same place, for all the ships in the game, lets say it took an hour or 2 of my Sunday morning.
Now guess what, v1.4 is out and so is the cockpit mod for it, i just can't be bothered.

-
- Posts: 14163
- Joined: Sun, 16. May 04, 13:01
Actually, the X3 editor/Modmanager already has all the data for merging.
All it needs is a merge function. Open the cat file for the end result, select what you want merged into it. Multiple cats, then multiple merges into the opened cat.
Hardest part to handle are actual conflicts where the same ids are in different mods with completely different specs. So it probably means you have to select one to keep, and report on the other. Then complete the merge by manually modifying whatever didnt get merged successfully.
Its not only tships that needs merging, its tcockpits and 44001 as well. They all have to be in sync or things dont work.
All it needs is a merge function. Open the cat file for the end result, select what you want merged into it. Multiple cats, then multiple merges into the opened cat.
Hardest part to handle are actual conflicts where the same ids are in different mods with completely different specs. So it probably means you have to select one to keep, and report on the other. Then complete the merge by manually modifying whatever didnt get merged successfully.
Its not only tships that needs merging, its tcockpits and 44001 as well. They all have to be in sync or things dont work.