We really need an external mod loader program.

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

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

Post Reply
kmunoz
Posts: 444
Joined: Sun, 25. Feb 07, 19:59
x4

We really need an external mod loader program.

Post by kmunoz » Sat, 25. Sep 21, 05:51

Right now, I have three saves: one with a bunch of regular mods, one with Star Wars Interworlds (and a bunch of mods turned off), one with VRO and a few additional mods (and the SWI mods turned off).

If I use *just* the game's own interface, I have to remember which mods I've used for each save, or else write it down somewhere, and then methodically switch them on/off by hand.

Alternatively, I can keep different copies of Documents/Egosoft/X4/<user>/content.xml, one for each set, which I then swap out as content.xml each time I'm loading a different save.

That works ok unless I add a mod. If I add a mod to one of my saves, I have to then update the content.xml files for *all* of them in order to make sure that the mod stays off in those other save configurations.

But otherwise it's effectively trivial to keep my save mod setups separate by keeping different content.xml files lying around.

It would be REALLY useful if we had a mod loader program that could read in all of our saved content.xml files, let you toggle mods on/off for each of them, and then start the game using a specific one. The biggest hurdle with this is how Steam Workshop mods are listed - they show up only as "ws_xxxxxxx" filenames instead of a more readable filename. (Mods from Nexus and elsewhere, unless they are also on the workshop, use their folder names in content.xml). However, this could presumably be solved by reading the mods in the extensions folder, checking the "id" tags from the top of the mods' content.xml (not to be confused with the mod list xml file), finding the right id tag and then replacing it in the mod loader's list with the "name" tag from the same line of the xml. (So, for example, the Steam VRO mod ID is "ws_1696862840", but the name is "Variety and Rebalance Overhaul." The mod list content.xml file uses the ws_xxx number to identify it, not the mod's actual name, or the folder name as with non-Workshop mods.)

(Please note I'm not 100% sure that's how this works - where exactly does the ws_xxxx number come from, if not from the modder, since it's at the top of the content.xml file for that mod? But if it comes from the modder, how do they guarantee no number collisions? So maybe I'm misunderstanding where that info comes from. Regardless... it's a solvable problem, I'm sure.)

So I guess this is a plea preferably for Egosoft to implement a mod loader program that can (but is not required to be) run prior to running X4, or barring that, for a modder to do this. I'd give it a shot except my only programming knowledge is NWN2 scripting and just enough Python to hurt myself.
Let's Play Poorly! - Suboptimal X4 Playthroughs

tomchk
Posts: 1294
Joined: Mon, 26. Jan 15, 19:55
x4

Re: We really need an external mod loader program.

Post by tomchk » Tue, 5. Oct 21, 16:40

These two posts may give you something much easier. It's what many of us use.

viewtopic.php?t=437413#p5043184 (I was wrong here--you don't need 8 digits)
viewtopic.php?t=436520#p5035651
Care to see what I've been creating? https://www.youtube.com/user/ytubrute

User avatar
MarvC
Posts: 5
Joined: Sun, 9. Dec 18, 16:02

Re: We really need an external mod loader program.

Post by MarvC » Tue, 5. Oct 21, 18:52

Nope. we do not need. speak for yourself
none

kmunoz
Posts: 444
Joined: Sun, 25. Feb 07, 19:59
x4

Re: We really need an external mod loader program.

Post by kmunoz » Tue, 5. Oct 21, 19:09

tomchk wrote:
Tue, 5. Oct 21, 16:40
These two posts may give you something much easier. It's what many of us use.

viewtopic.php?t=437413#p5043184 (I was wrong here--you don't need 8 digits)
viewtopic.php?t=436520#p5035651
That's functionally identical to keeping different content.xml files around, though. The main difference is that you can set the launch argument for which one to load. So that is an improvement, but it's still not automated, and it requires having multiple copies of the installed mods. (I suppose in a world of terabyte drives that's not really an issue, but it does add a step to updating non-Workshop mods.)

I guess for me what's baffling is why there isn't a programmatic solution already when that solution would be, it seems to my limited imagination, fairly trivial to implement.
Let's Play Poorly! - Suboptimal X4 Playthroughs

tomchk
Posts: 1294
Joined: Mon, 26. Jan 15, 19:55
x4

Re: We really need an external mod loader program.

Post by tomchk » Wed, 6. Oct 21, 05:48

kmunoz wrote:
Tue, 5. Oct 21, 19:09
That... requires having multiple copies of the installed mods. (I suppose in a world of terabyte drives that's not really an issue, but it does add a step to updating non-Workshop mods.)
Why multiple copies? I have all my mods in the game's extensions folder, and the content.xml specifies what is enabled, and of course I have separated saves, etc.
Care to see what I've been creating? https://www.youtube.com/user/ytubrute

kmunoz
Posts: 444
Joined: Sun, 25. Feb 07, 19:59
x4

Re: We really need an external mod loader program.

Post by kmunoz » Wed, 6. Oct 21, 16:29

tomchk wrote:
Wed, 6. Oct 21, 05:48
kmunoz wrote:
Tue, 5. Oct 21, 19:09
That... requires having multiple copies of the installed mods. (I suppose in a world of terabyte drives that's not really an issue, but it does add a step to updating non-Workshop mods.)
Why multiple copies? I have all my mods in the game's extensions folder, and the content.xml specifies what is enabled, and of course I have separated saves, etc.
Oh, you're right! I don't know what I was thinking.
Let's Play Poorly! - Suboptimal X4 Playthroughs

Post Reply

Return to “X4: Foundations - Scripts and Modding”