Noob Question: no self-made mods working

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

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

Aseron
Posts: 38
Joined: Sat, 14. May 16, 04:08
x4

Noob Question: no self-made mods working

Post by Aseron »

I recently decided to make a mod, specifically one that increases the number of shields the X-shuttle has to make it more in line with normal heavy fighter shielding.

As it happens there is already one such mod on Nexus that does the same thing, just not to the level I wanted. So I asked the mod author if I could use his work as the basis of mine and he agreed.

I edited the .dat file to give it more shields, renamed the folder, changed the content.xml to match, and loaded the game.
My mod was in the extensions section, and enabled... and to check it I went into custom gamestart and changed starting ship to X-shuttle... and it had only 1 shield slot (not the 7 my mod should have given it).

The mod, although found by the game, didn't take effect.


I downloaded the other author's mod from nexus, and checked that it was working the same way -- it was, the x-shuttle had the 3 shield slots he gave it.
Working on a hunch, I made a direct copy of that mod, deleted the original (downloaded) version, and renamed the copy to what the original was without changing anything in it...
I then checked to see if it was working -- and it was NOT. So to be clear, two mod files, with no difference aside from that one was created on my machine and the other downloaded to it, have different outcomes with only the downloaded one actually working.

Has anyone else had the issue where any mod files that were created on your machine, as opposed to downloaded to it in a zip, do not apply in game?
Has anyone found a way around that which they could share?


Heres a link to the fileshare of my version of the mod. If it turns out that it is an issue with something I did, could one of you tell me where I went wrong? I'm still quite new to X4 modding:
https://drive.google.com/file/d/1ZOe5oQ ... sp=sharing
Vectorial1024
Posts: 304
Joined: Mon, 30. Jul 18, 04:16
x4

Re: Noob Question: no self-made mods working

Post by Vectorial1024 »

Please don't directly edit .dat files...

Use the Catalog Tool to unpack the .cat/.dat files, and then modify the unpacked xml files. This is much easier.

Adding shield slots is done by editing the ship's macro. Are you sure you are really adding the additional shield connections and the positions to the ship?
The future awaits.

X4 Foundations mods:
Civilian Fleets: (Obsolete for X4 7.0+) Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Market Discovery: Find Black Market Traders; also rerolls them.
Logistics Optimization: Improve your station traders; improve your trade stations!
Aseron
Posts: 38
Joined: Sat, 14. May 16, 04:08
x4

Re: Noob Question: no self-made mods working

Post by Aseron »

I took the working mod, and then just added more entries with appropriate changes to the entry names and position. Its all in the fileshare.

The original mod is https://www.nexusmods.com/x4foundations ... posts&BH=1


What is the catalog tool, and where can I get it?

Will it make a difference, given what I mentioned about how an exact copy of the working mod didn't actually work in spite of having no differences aside from one "originating" on my machine?
Not Actually Reimu
Posts: 8
Joined: Thu, 22. Oct 15, 18:47
x4

Re: Noob Question: no self-made mods working

Post by Not Actually Reimu »

Try checking the path. I made a similar mod and had to explicitly put the file in extensions/ego_dlc_timelines/ to make it affect anything.
Aseron
Posts: 38
Joined: Sat, 14. May 16, 04:08
x4

Re: Noob Question: no self-made mods working

Post by Aseron »

Not Actually Reimu wrote: Sun, 30. Jun 24, 23:16 Try checking the path. I made a similar mod and had to explicitly put the file in extensions/ego_dlc_timelines/ to make it affect anything.
In the .cat file? Or literally making the folder path?
Vectorial1024
Posts: 304
Joined: Mon, 30. Jul 18, 04:16
x4

Re: Noob Question: no self-made mods working

Post by Vectorial1024 »

Not Actually Reimu wrote: Sun, 30. Jun 24, 23:16 Try checking the path. I made a similar mod and had to explicitly put the file in extensions/ego_dlc_timelines/ to make it affect anything.
Btw, this trick also allows mods to modify other mods by placing patch files under extensions/[NAME]
The future awaits.

X4 Foundations mods:
Civilian Fleets: (Obsolete for X4 7.0+) Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Market Discovery: Find Black Market Traders; also rerolls them.
Logistics Optimization: Improve your station traders; improve your trade stations!
Vectorial1024
Posts: 304
Joined: Mon, 30. Jul 18, 04:16
x4

Re: Noob Question: no self-made mods working

Post by Vectorial1024 »

Aseron wrote: Sun, 30. Jun 24, 23:47
Not Actually Reimu wrote: Sun, 30. Jun 24, 23:16 Try checking the path. I made a similar mod and had to explicitly put the file in extensions/ego_dlc_timelines/ to make it affect anything.
In the .cat file? Or literally making the folder path?
...it seems you do not know what is going on with .cat/.dat or just modding in general.

.cat/.dat is the "packed" format of mods, and normally you are not supposed to touch it. To touch it (e.g. edit some of its details), use the Catalog Tool to unpack the .cat/.dat into "loose files" format first. More info about how to find/use this Catalog Tool can ref X Rebirth Official Tools viewtopic.php?t=363625

"Loose files" format means everything is now in human-readable XML format, and you may very easily modify the file contents.

There are several ways to handle unpublished mod files, but the easiest one to manage is to add a -prefersinglefiles switch to your X4 executable (ref viewtopic.php?t=434569); this tells the game to use the unpacked loose files instead of using the .cat/.dat files in your wip local mod.

-------

To modify Timelines DLC content, you should create diff files, so that your mod folder structure looks like this:

Code: Select all

content.xml
...
extensions/ego_dlc_timelines/...
...
The future awaits.

X4 Foundations mods:
Civilian Fleets: (Obsolete for X4 7.0+) Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Market Discovery: Find Black Market Traders; also rerolls them.
Logistics Optimization: Improve your station traders; improve your trade stations!

Return to “X4: Foundations - Scripts and Modding”