Merging Chests

by Atria

Enables merging of multiple chests into one entity. Supports merging of arbitrary number of chests (configurable in mod settings).

Content
5 days ago
0.13 - 2.0
115K
Storage

g Two stupid question.

5 years ago
(updated 5 years ago)
  • Why this mod has no "script update" on debug overlay ?

I always concern regarding whether a mod will took a UPS hit if used extensively.

This mod is very similar in functionality with an old mod called "Equalizer Chest",
https://mods.factorio.com/mods/boogieman14/Equalizer_Chests

Which distribute the item evenly on every adjacent chest.
Big problem was, that mod will took a huge UPS hit; very noticeable if it used extensively, and it show on Debug Overlay.

To my surprise, this "Merging Chest" didn't have any "script update " so i can monitor whether this mod took a UPS hits.
But from what i gather, it's basically creating a new entity (chest) during load, as if the vanilla game engine have this wide chest.
Kinda the same way the D-Load-Storage mod do ?
https://mods.factorio.com/mod/D-Load-Storage

The only difference is that, D-Load have fixed chest, while this mod can create a dynamic chest; created during start-up/load; based on mod setting ?

So in a way, there will be virtually no performance hit ?
The UPS / performance loss is basically the same like putting the vanilla chest ?
Aside from that 1000 slot concern that you mention in other thread, i mean.

  • What does the "Percent change of decal of sprite decal" option do ?

Sorry for this stupid question.

5 years ago

This mod doesn't have any direct UPS hit, while there is still indirect hit if you are inserting into chest with massive inventory (configurable and by default limited to 1000 slots) but you get that with every container type entity in game. This mod doesn't subscribe to on_tick event, everything this mod does is done in single fired events like player_selected_area or on_shortcut. And these event are triggered only on player input.

You are correct, this mod is basically a collection of large amount of different chests with varying sizes and some code that handles merging/splitting. First iteration of this mod was exactly as D-Load-Storage mod, then I added logic to merge chests, later I removed limitation of chest size and even later I added area chests.

During upgrade to area chests I wanted to introduce some variety to warehouse or trashdump sprites. If you construct area 5x5 of chests and merge them you can see some tiles on the roof of warehouse are different. Those are decals used when the sprite is generated and they are used "Percentage chance of decal" % amount of times. Warehouse is the only entity type which have this implemented because I lost the artist who was creating them for me shortly after that, so we never got to chests or trashdumps's decals.

5 years ago
(updated 5 years ago)

Thanks for the response.
So in a way, using this mod is probably have better UPS saving than vanilla ?
I mean, in vanilla; if we load/unload item using whatever circuit to control inserter, or splitter to balance things out; it will add to UPS penalty, albeit small, it will accumulate as the number entity goes up.

But, using this mod, there's no need for controlling inserter using circuit, nor the need to use balancer at all.
Just plop these, and it works out because the chest will always be "even".
So, this is became more UPS friendly due less entity being used?

Ahh,.no wonder i never get to see those sprite decal, i read in the other thread, it's better to limit the number of chest to reduce load times, so i only use two variant chest of 1x27 and 27x1.

Btw, how do you test Inserter update time that i read on other thread?
I want to test it myself, i increase the slot to 1296 (as in the original total number of 27 chest add-up).
I don't use that much slot, just curiosity. about my inserter update time, and how it will affect my UPS..
If the hit is negligible, i will keep it as it is, but if it affecting, i will decrease it to 500.

Care to share the map/layout you use to test it out ?

Edit :
Scrap that last request, i just read /u/Schallfalke reply to that thread.
Interesting, didn't know about that.
Got it, i'm gonna limit my slot as much as possible to either to 160 or 200

5 years ago

Yes, if you used circuits or splitter to balance train unload then this mod will definetly be a UPS increase. I don't have the testing map anymore, but it was just vanilla with my mod, 2 100 long chests with 100 inserters between them and about 200 slots of items in them. Then I just altered inventory size and checked the update time.

Yeah, the main question would be if you really need the 1296 slots. 27 chests long train has 4 wagons, each wagon have 30? slots, so you really need just 120 bud I understand some extra buffer space would be nice. Only problem is if you merge full chests you will LOSE all items that would be in those slots that don't exist anymore.

5 years ago

I only merge empty chest, so i don't lose item.
Besides, losing item is negligible in factorio as making things is part of the game 😁
Also, a cargo is 40 slot, so to match up it's 160 slot.

Well, the idea of using 1296 slot is because i want to reduce constant traffic (to reduce UPS; collision check or whatever the game is doing), a moving train is also UPS drainer (or so i read in factorio benchmark site).

So the idea is, instead of constant train traffic, i set all factory with threshold.
That way i won't get UPS penalty all the time, just once in a while when the train busy stockpiling buffer.
So with that approach, most of the time the train will be idle.
And that require a big chest, thus this mod came into mind.

New response