Loose files vs Catalog?

The place to discuss scripting and game modifications for X4: Foundations.

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

Zarryc
Posts: 5
Joined: Tue, 25. Apr 23, 17:39
x4

Loose files vs Catalog?

Post by Zarryc »

Is there a difference between using loose files and catalog files?

Bonus question: How does X4 handle mod compatibility?

I've noticed some mods pack their files into a catalog and others leave them loose. I know that for Skyrim catalog is preferred, because load order does not matter for catalog files. Meanwhile loose files override catalog files from other mods and other loose files, therefor load order matters. So is there a difference in X4? Also how does X4 handle mod compatibility? If two mods modify the same files, which one wins? Does the game have any built-in way to merge the modded files or should all compatibility be resolved by the user by merging the files manualy?

Personally, I find loose files way more convenient, because it allows for easy editing, so if there is no difference, I might convert all my files to loose. Then I could also just merge all my files into one folder and enable/disable everything in game with a single extension option.
User avatar
Dj_FRedy
Posts: 245
Joined: Mon, 27. Jun 11, 05:58
x4

Re: Loose files vs Catalog?

Post by Dj_FRedy »

There is no difference, except for how you want your files to behave, so there are a few factors to take into account with respect to catlogs.
Extracted from the readme 'X Catalog Tool' wrote:Notes for modders on catalog usage in X Rebirth, X Rebirth VR Edition and X4: Foundations:

At first, the game load catalogs of the form ##.cat (## = 01..99). Loading stops at the first missing file.

In each enabled extension, the game then tries to load the following files:
- subst_##.cat (starting with subst_01.cat)
- subst_v###.cat (### = current game version, e.g. subst_v130.cat)
- ext_##.cat (starting with ext_01.cat)
- ext_v###.cat (### = current game version, e.g. ext_v130.cat)

The files in the ext_* catalogs are interpreted as part of the extension.
This is the recommended way of altering the game, it allows for a high degree of compatibility between mods.

The files in the subst_* catalogs are interpreted as relative to the game root (adding/replacing base game files).
This should only be used if there is no other way to adjust the game assets. Please make sure that players are aware of the
potential incompatibilities with other mods.

The version catalogs can be used when a new version of the game is available as a beta. In case your mod becomes incompatible
because of game changes in a new version, or in case you want to use features of the new version, you can use the beta phase to
make the necessary changes and provide support for both game versions simultaneously: Files for one game version are in normal
ext_## catalogs, while the ext_v### applies the necessary changes for the other version. You can use the diff feature of the
catalog tool to generate the version catalog automatically, based on two input folders.

When using a version catalog, it is up to you whether the version catalog represents the "old" (released) version or the "new"
(beta) version. But although it seems natural to use it for the beta content (catalogs being applied chronologically), it makes
sense to use it for the released version instead. This prevents problems in the future when the game gets a higher version
number but no updated mod is available at that time (the new content would not be loaded because the version does not match).
Additionally in the 'content.xml' file you can indicate what dependencies the mod requires, such as game version, load order, and whether they are optional or not.
More related info in the guide 'Steam Workshop for X Rebirth and X4': https://steamcommunity.com/sharedfiles/ ... =245117855
"All my contributions to the Technical Support and Public Beta Feedback sections will be concise and to the point, no diatribes, that's what the other sections are for".
Thank you for your efforts.
Realspace
Posts: 1637
Joined: Wed, 15. Nov 06, 10:21
x4

Re: Loose files vs Catalog?

Post by Realspace »

I don't know if still working or useless, but adding this to the EXE could help prioritizing the loose files:
-prefersinglefiles

When working on a large mod, having to pack everything to see it in action is a terrible waste of time

Return to “X4: Foundations - Scripts and Modding”