Question regarding modding modules

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

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

Post Reply
chip56
Posts: 500
Joined: Mon, 13. Apr 20, 21:52

Question regarding modding modules

Post by chip56 » Mon, 12. Apr 21, 20:51

So following situation:
I have modded new modules to produce x10 and some even x100 times. Also modded according new storages.
The modules show up for sale, i can build them, they produce stuff and all that is fine.
However i am running into one rather annoying and not really understandable bug and i also made a rather curious observation:

1)
At some point during constructing such a highly compact complex the autostorage of the manager bugs out and they assign a whopping 0 for EVERY ressource until i manually set the storage for most of the wares. At varying points the autoassign then recovers and assigns the remaining storage to the remaining auto assigned wares.
See here during construction and once it reaches 23 wares in this case:
https://ibb.co/hV8BdKb

Does anyone have a clue what could make the autoassign bug out like that? Lack of overall storage? Too much free storage? I wonder if i could tweak that so that i dont run into this issue or if thats actually some kind of bug in the vanilla autoassign of the storage that it just bugs out after a certain size of storage?

2)
Also it seems like the game is not updating the produced amount of wares if you edit the file after a specific module is build. Funnily enough it does update the length of a cylce though.
Which leads to the fact that you could have two similar modules producing different amounts of wares per cycle:
a) One the old amount if you build it before editing. Lets say it was producing 100 wares per 60 sec. You change the module to 10 wares per 6 sec. This module would now produce 100 wares per 6 sec
b) One building the new amount if you build it afterwards. This one would correctly produce 10 wares per 6 sec.
Which makes testing a bit more complicated since i cant just update the values to see if something changes but i need to rebuild every module and with the hard limit of 1 min thats quite an annoyance even with seta. Is there a way to force update modules to use the new values? Also: didnt the amount of wares per cycle change during some patch? So could ti actually be that someone still playing a game started before that patch would run into a similar issue in vanilla?

chip56
Posts: 500
Joined: Mon, 13. Apr 20, 21:52

Re: Question regarding modding modules

Post by chip56 » Tue, 13. Apr 21, 16:45

So after spending a few hours trying to pinpoint the issue i can say: It doesnt matter how much storage i have. Changing the storage by x100 or /100 has no impact for my issue with the auto assigning of storage.
What does matter is the sheer amount of wares produced and the amount of different wares.
Its more likly to bug out if i build a x100 production module, however each one individually works just fine. A small amount of different modules also works fine. Only after i have at least a dozen different wares it bugs out.
Is there some kind of limit in the script that assigns the storage? It seems none of my changes is indivdually buggy but x4 simply doesnt like the big numbers. which is a shame since i would assume that a single factory module with high output would actually be less load than building 10s or 100s of modules...

Post Reply

Return to “X4: Foundations - Scripts and Modding”