Merging Chests

by Atria

Enables merging of multiple chests into one entity. Supports merging of arbitrary number of chests (configurable in mod settings). Version 5.0.0 introduced potentially breaking changes for old saves. If your have chests larger than 42 don't update to 5.0.0.

Content
a month ago
0.13 - 1.1
99.7K
Storage

i Make any chest type mergeable

4 years ago

I looked through the discussion topics and either over-looked or didn't see this suggestion, but would it be possible to implement the ability to make any chest mergeable instead of choosing just one type in the settings? I read a bug where an iron chest was placed in the middle of merged wooden chests and it turned them all to iron chest merge version (which, if it wasn't patched out, I will likely do when I'm ready to upgrade from wooden > iron > steel).

On another topic I may go through the code and see about adding the two boxes added by bob's logistics, it's just a pain to change a setting and go through reload on a heavily modded game (I think my load time is about 20 minutes or so at the moment, which is just amazing for de-bugging >:| ). I haven't gone through the .lua scripts enough yet to find an entity table, but would adding in those chests work or is there further algo's the script uses that may make it not play well with another mod (had an issue with BigChests attempting to apply it's 4 line script to B'sLog but it wasn't having it.

4 years ago
(updated 4 years ago)

I think there already was this suggestion. Unfortunetaly I won't implement this. I'd have to create an entity definition for every possible combination of every possible way of creating a merged chest. If you would try to create 3x3 chests I'd have to have 1 entity for:
- 9 wooden chests
- 8 wooden and 1 iron chests
- 8 wooden and 1 steel chests
- 7 wooden, 1 iron and 1 steel chests
- ...
And if I'd added support for bob's chests there would be EVEN MORE combinations. There would be also a problem when just trying to split these chests, because I'd have to keep in memory some data about what chests were merged.

About adding support for bob's new chests: I looked into it before and decided to not implement it (i don't remember the exact reason, I'll have to check again if I was just lazy or if there was some actuall problem). I'm currently rewriting the merging logic so I'll take a look if it could be implemented.

And about your long loading time. This mod can increase your loading time a lot if you increased max area, width, height settings. If that is the case I'd suggest either lowering the limits or using the whitelist setting (if you really need large chests).

4 years ago

I think there already was this suggestion. Unfortunetaly I won't implement this. I'd have to create an entity definition for every possible combination of every possible way of creating a merged chest. If you would try to create 3x3 chests I'd have to have 1 entity for:
- 9 wooden chests
- 8 wooden and 1 iron chests
- 8 wooden and 1 steel chests
- 7 wooden, 1 iron and 1 steel chests
- ...
And if I'd added support for bob's chests there would be EVEN MORE combinations. There would be also a problem when just trying to split these chests, because I'd have to keep in memory some data about what chests were merged.

About adding support for bob's new chests: I looked into it before and decided to not implement it (i don't remember the exact reason, I'll have to check again if I was just lazy or if there was some actuall problem). I'm currently rewriting the merging logic so I'll take a look if it could be implemented.

And about your long loading time. This mod can increase your loading time a lot if you increased max area, width, height settings. If that is the case I'd suggest either lowering the limits or using the whitelist setting (if you really need large chests).

Ah, I understand the issue here. I was thinking more along line of wooden explicit merges/iron explicit/etc. and didn't realize how your mod was setup. The loading times isn't from your mod explicitly, it's just having (checking current mod count...) 119 mods installed lmao.

Thanks for the response though, and thanks for keeping this mod up to date!

4 years ago

Oh, that could be done quite easily, but that would also triple the amount of entities I have to create. I'd had to enforce some maximum limits to not use large amount of memory.

But you gave me an idea for dividing the mod to multiple ones. One base mod (with maximum chest limit which should be enough for vast majority of people), second to unlock the limits and third to unlock merging all chests types at once. If someone would really want some functionality they would willingly have to install another mod to enable that. And if their game crashed they could just disable those mods. Thanks a lot for this idea you gave me.

4 years ago

Oh, that could be done quite easily, but that would also triple the amount of entities I have to create. I'd had to enforce some maximum limits to not use large amount of memory.

But you gave me an idea for dividing the mod to multiple ones. One base mod (with maximum chest limit which should be enough for vast majority of people), second to unlock the limits and third to unlock merging all chests types at once. If someone would really want some functionality they would willingly have to install another mod to enable that. And if their game crashed they could just disable those mods. Thanks a lot for this idea you gave me.

Right on, I'm glad my factorio-addiction is getting some use :D

4 years ago

Oh, that could be done quite easily, but that would also triple the amount of entities I have to create. I'd had to enforce some maximum limits to not use large amount of memory.

But you gave me an idea for dividing the mod to multiple ones. One base mod (with maximum chest limit which should be enough for vast majority of people), second to unlock the limits and third to unlock merging all chests types at once. If someone would really want some functionality they would willingly have to install another mod to enable that. And if their game crashed they could just disable those mods. Thanks a lot for this idea you gave me.

Right on, I'm glad my factorio-addiction addled mind is getting some use :D

4 years ago

Version with multiple chest types is live now.

4 years ago

Version with multiple chest types is live now.

You are a gentleman and a scholar!

4 years ago

Just trying this mod out. I was surprised that I could merge only one type of chest but I'd never expect to merge a mixture of chest types.

4 years ago

Install this mod to be able to merge all types of basic chests.
Yes, only chests of same type can be merged with each other but you can merge merge wooden and iron (and steel) chests on one map without the needto change settings.

4 years ago

Install this mod to be able to merge all types of basic chests.
Yes, only chests of same type can be merged with each other but you can merge merge wooden and iron (and steel) chests on one map without the needto change settings.

Nicely done sir!

New response