Shipyard broken : auto-storage broken, several amounts being set to zero/near-zero - Fix in a future build.

Ask here if you experience technical problems with X4: Foundations.

Moderator: Moderators for English X Forum

Post Reply
exogenesis
Posts: 1781
Joined: Sun, 9. Sep 07, 15:39
x4

Shipyard broken : auto-storage broken, several amounts being set to zero/near-zero - Fix in a future build.

Post by exogenesis » Mon, 19. Apr 21, 01:06

Big shipyard at BHS-V, with 22 of 25 million container storage used,
which has been ticking over nicely for ages (months), building loads of NPC ships.

Suddenly it is running out of wares, & doesn't build ships.

Two save files, about 1 day apart.

first with shipyard working OK :
http://www.Exogenesis.co.uk/save_002_SHIPYARD_OK.xml.gz

second with some auto-storage being set to low numbers :
http://www.Exogenesis.co.uk/save_003_SH ... KEN.xml.gz

e.g. auto-storage Quantum Tubes is now 397 of 397 instead of 4034 of 4665.

Before :
http://www.Exogenesis.co.uk/20210418230624_1.jpg

After :
http://www.Exogenesis.co.uk/20210418230043_1.jpg


Also e.g. microchips in the station overview used to say 9458 / 9518 :
http://www.Exogenesis.co.uk/20210418234746_1.jpg

now it says 14 / 0 :
http://www.Exogenesis.co.uk/20210418225937_1.jpg


Save games show 'modified' (but no mods are installed)
having been hand-edited, moving/deleting some objects.

The edits were done before the 'before' game file was saved
(i.e. edits are in both of the above save files)

exogenesis
Posts: 1781
Joined: Sun, 9. Sep 07, 15:39
x4

Re: Shipyard suddenly broken : auto-storage up the creek, several amounts being set to zero / near-zero

Post by exogenesis » Mon, 19. Apr 21, 01:54

Just found out that if I change one of the 'malfunctioning' auto-storage amount ware to manual amount
e.g. set water to 40,000, (un-tick 'automatic storage allocation', & type in 40000),
then the rest of the malfunctioning storage values get set to something sensible.

But if I re-tick the water auto-stoage amount, then all the rest go back to something daft (like 0 storage)

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

Re: Shipyard suddenly broken : auto-storage up the creek, several amounts being set to zero / near-zero

Post by chip56 » Mon, 19. Apr 21, 08:47

I have a similar problem, though my game is modded.
But perhaps this bit of information is of interest:
In my case i found out that if you have huge production complexes (as in amount of wares produced, not in number of modules) the autoassign bugs out at a certain point. in my case modding in x10 modules and building one of those triggers the bug somewhere around 25 wares and sets every container storage to 0. And it works by setting a couple to a manual value as you wrote. However if you build another module with a different ware it bugs out again until you set that one to manual too. Each module indivdually would work though. Almost looks like the calculation of the storage is running into some kind of overflow or something and then defaults to 0. Would be better if the fallbackscenario would be a simple available storage/amount of different wares. At least you would still produce something then without having to fix such stations manually. It also seems that the amount of available storage does not matter for this bug. i tried with different size storages and reduced and increased it by a factor of 100 and the bug triggered at the same amount of different wares. I tried to change the amount of wares produced by the modules (and rebuilding them to update them) and that had an effect. Decreasing it delayed the bug, increasing it triggers it with less different wares.

exogenesis
Posts: 1781
Joined: Sun, 9. Sep 07, 15:39
x4

Re: Shipyard suddenly broken : auto-storage up the creek, several amounts being set to zero / near-zero

Post by exogenesis » Mon, 19. Apr 21, 19:49

I've got 46 wares in the shipyard,
but it's been working like that for a long time.

Guess you're right about it being an overflow or some other kind of miscalculation,
just can't see a reason why it should suddenly happen.

exogenesis
Posts: 1781
Joined: Sun, 9. Sep 07, 15:39
x4

Re: Shipyard suddenly broken : auto-storage up the creek, several amounts being set to zero / near-zero

Post by exogenesis » Mon, 19. Apr 21, 20:41

And now even more worrying, is that after running for a while with the work-around
(set one of the wares to manual storage levels),
it seems that returning that ware to auto-level now doesn't cause the other auto-levels to malfunction anymore.

So the error must happen at a specific condition, but I'm not going to be sure when.

exogenesis
Posts: 1781
Joined: Sun, 9. Sep 07, 15:39
x4

Re: Shipyard suddenly broken : auto-storage up the creek, several amounts being set to zero / near-zero

Post by exogenesis » Sat, 24. Apr 21, 23:50

And shipyard is broken again, completely out of the blue.

With all wares set to auto-storage-levels, several ware levels have been set to stupidly low values,
marked with red arrows :
http://www.Exogenesis.co.uk/20210424221557_1.png

Again setting just water storage-level to manual-level causes all these to get set to a good value,
and putting water back to auto causes the same values to go back to the daft levels.

save game (no mods, just hand edits)
http://www.Exogenesis.co.uk/save_003_SH ... AIN.xml.gz

Randomly breaking shipyards is getting close to game-breaking.

ajime
Posts: 288
Joined: Mon, 15. May 17, 09:00
x4

Re: Shipyard suddenly broken : auto-storage up the creek, several amounts being set to zero / near-zero

Post by ajime » Tue, 27. Apr 21, 03:26

What i usually do is to set all storage amount manually except for one end product. setting all product automatically tends to bugged and not create trade actions sometimes.

User avatar
BurnIt!
EGOSOFT
EGOSOFT
Posts: 4809
Joined: Wed, 6. Nov 02, 21:31
x4

Re: Shipyard suddenly broken : auto-storage up the creek, several amounts being set to zero / near-zero

Post by BurnIt! » Tue, 27. Apr 21, 17:01

Thanks for the report and saves - I'll take a look.
BurnIt!
In der Ruhe liegt die Kraft. / In peace lies strength.

User avatar
BurnIt!
EGOSOFT
EGOSOFT
Posts: 4809
Joined: Wed, 6. Nov 02, 21:31
x4

Re: Shipyard suddenly broken : auto-storage up the creek, several amounts being set to zero / near-zero - Devs on the ca

Post by BurnIt! » Wed, 28. Apr 21, 15:24

Congrats, you broke the game :-P

Essentially your station has so many production modules (over 1000!) that a section of the internal storage calculations ran into what's called an "integer overflow" and produced silly results.
I've made a change that will address this problem with the next build.

Until then here's a workaround since your save is modified already anyway (your modifications are causing a lot of errors btw. so don't be surprised if you run into problems such as broken story missions or periodic stutters)

I've created a mini-mod that'll update a relevant setting to prevent this issue.

WARNING: using this mod WILL MAKE ANY SAVEGAMES MADE IRREVERSIBLY FLAGGED AS MODIFIED if your game isn't modified already! If you are not suffering from this specific problem as a result of having stations with 1000+ production modules, this will not help you and you do not need or want this mod!
Once the next build is out you can (and should) delete this mod again.

Extract the contents of the attached archive to the following path:

Code: Select all

My Documents\Egosoft\X4\{steamid}\extensions\
So that the structure looks like this:

Code: Select all

My Documents\Egosoft\X4\{steamid}\extensions\megastation_autostorage_workaround\content.xml
My Documents\Egosoft\X4\{steamid}\extensions\megastation_autostorage_workaround\libraries\parameters.xml
Attachments
megastation_autostorage_workaround.zip
(1.25 KiB) Downloaded 9 times
BurnIt!
In der Ruhe liegt die Kraft. / In peace lies strength.

exogenesis
Posts: 1781
Joined: Sun, 9. Sep 07, 15:39
x4

Re: Shipyard broken : auto-storage broken, several amounts being set to zero/near-zero - Fix in a future build.

Post by exogenesis » Wed, 28. Apr 21, 19:43

Hey, my very own Egosoft modification !

Thanks for the fix, I'll give it a try....

Would be interested to know how my simple edits could cause 'periodic stutters',
all I've done is move some objects around & mucked about with race-relations,
but not too surprised about breaking some plots.
(I deleted the Torus cos the puzzle annoyed me)


Now all I need a fix for is OSS vs IS battle outcomes :P
viewtopic.php?f=180&t=437361&p=5042590

exogenesis
Posts: 1781
Joined: Sun, 9. Sep 07, 15:39
x4

Re: Shipyard broken : auto-storage broken, several amounts being set to zero/near-zero - Fix in a future build.

Post by exogenesis » Wed, 28. Apr 21, 20:33

I guessed the instructions should say the 'megastation_autostorage_workaround' folder should be in
<Steam Install Location>\SteamLibrary\steamapps\common\X4 Foundations\extensions
rather than
My Documents\Egosoft\X4\extensions

Which seems to work just fine to fix the broken condition,
thanks again :)

User avatar
BurnIt!
EGOSOFT
EGOSOFT
Posts: 4809
Joined: Wed, 6. Nov 02, 21:31
x4

Re: Shipyard broken : auto-storage broken, several amounts being set to zero/near-zero - Fix in a future build.

Post by BurnIt! » Tue, 4. May 21, 10:45

Well deleting the Torus is a pretty serious edit - there's mission code that is expecting the Torus to exist and is looking for it every now and then for example.

Anyway, yes adding the mod to the steam install folder also works, but the location in your my documents folder should also be valid - I tested it that way and it worked.
Though on second thought it may need to be

Code: Select all

My Documents\Egosoft\X4\{steamid}\extensions
to work in a proper Steam install. I'll update the original post.
BurnIt!
In der Ruhe liegt die Kraft. / In peace lies strength.

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

Re: Shipyard broken : auto-storage broken, several amounts being set to zero/near-zero - Fix in a future build.

Post by chip56 » Tue, 4. May 21, 14:44

That fix is really nice and helps my game a lot. Now my stations with x10 modules actually work fine without me needing to set most wares to fixed values :)

exogenesis
Posts: 1781
Joined: Sun, 9. Sep 07, 15:39
x4

Re: Shipyard broken : auto-storage broken, several amounts being set to zero/near-zero - Fix in a future build.

Post by exogenesis » Tue, 4. May 21, 22:12

I was wondering if the topic 'wrong storage levels in trading dialog' :
viewtopic.php?f=180&t=437997
is related to the auto-storage-levels glitch ?

Post Reply

Return to “X4: Foundations - Technical Support”