Pasukaru / DSP-Mods

MIT License
5 stars 4 forks source link

Stations become bottomless #12

Closed josenxx closed 2 years ago

josenxx commented 3 years ago

I use this mod in game and some stations store a lot of warpers. Sorry for the Chinese in the picture, but I think you can see some station stores 13k+ warpers. https://z3.ax1x.com/2021/04/11/cwMd1S.jpg https://z3.ax1x.com/2021/04/11/cwM0XQ.jpg https://z3.ax1x.com/2021/04/11/cwMw6g.jpg https://z3.ax1x.com/2021/04/11/cwMr0s.jpg https://z3.ax1x.com/2021/04/11/cwMDmj.jpg

atkilfoil commented 2 years ago

I wanted to add my voice as someone who is experiencing a similar issue. Every ILS continually demands warpers, even when they have more than the requested amount. As josenxx said, it is like they are bottomless in their demand, despite the settings.

This was happening in game as far back as 2021-04-03.

Pasukaru commented 2 years ago

Summary of what happened: The mod inserts the the warper request in the last slot when an ILS is placed. When an ILS is placed with an existing configuration (Via shift-copy or from blueprints), the game also pastes in those requests. (This happens after the mod adds the requests).

Now, let's assume the config from the copied station is warpers, in slot 4. The mod previously added the warper request to slot 5. It was also not overriden by the game because the copied station doesn't have any config in slot 5.

So what happens is we have an illegal state in the station setup.

Slot 4: warpers (request,demand,storage - doesn't matter) Slot 5: Request warpers

Usually, in the UI this is not possible to set up, as it prevents you from having an item in 2 slots. However, when the game pastes the config from the source station or a blueprint, it doesn't check any of that.

So now the station is requesting warpers, and when they arrive, they will be put in slot 4 (the first one that matches the item). Which means slot 5 will never be satisfied and the station will request warpers into infinity.

Please note that the fixed mod does not fix existing stations. You'll have to either fix the duplicate requests yourself, or rebuild the station.

Pasukaru commented 2 years ago

1.3.4 now automatically fixes all affected stations upon loading a save.

Once you saved your game after this patch ran at least once, you can disable this process via the mod's config for a (possibly) faster load on larger saves.