Factorio

Factorio

View Stats:
Malidictus Oct 30, 2024 @ 9:00am
Decent Linked Chests mod?
Back in the day, I swore by Shall Autolinked Chests[mods.factorio.com] for a variety of reason. However, it hasn't been updated to 2.0. I tried searching on my own, but the only things that come up are two Chinese mods which I think (based on Google Translate) also include linking chests across distance. That's a bit overpowered in my opinion. I just need something that lets me slap chests together into a larger structure with a shared inventory. Does that still exist?

I sincerely hope I don't end up having to make my own... That would be a massive amount of reading that I'd rather not do.
< >
Showing 1-5 of 5 comments
Klown007 Oct 30, 2024 @ 11:35am 
I think I saw that merger chest was updated to 2.0 ( I didn't use it before) so not sure if thats what you're looking for. AAI storage was also updated (2x2, 4x4,6x6 boxes with
increasing inventory sizes)
Malidictus Oct 30, 2024 @ 12:41pm 
Originally posted by Klown007:
I think I saw that merger chest was updated to 2.0 ( I didn't use it before) so not sure if thats what you're looking for. AAI storage was also updated (2x2, 4x4,6x6 boxes with increasing inventory sizes)

No. A while ago, the development team introduced the "linked-container" prototype, which allows multiple containers to share the same instance of inventory. This isn't used in the Live game (or wasn't, last I checked), but mods sprung up using it. Technically, these chests can be anywhere on the layer, and even on different layers, but most mods require them to be back-to-back (for balance and cheating reasons). That's what the Autolinked Chests mod I mention ed above does.

Merging Chests predates "linked-container" by a fair bit. Rather than merging multiple containers, it introduces multiple containers with a larger footprints and unique graphics. That's not quite what I'm looking for. I'm already using the Warehousing mod, which gives me 3x3 and 6x6 buildings. What I want is the ability to create my own custom shape, and that's only going to work via Linked Containers.

There used to be a large number of these mods back in 1.1, but none seem to have been updated for 2.0. The reason I don't want to make one of my own is because I'd need to learn a lot of new skills all at the same time - runtime scripts, event listeners, dynamically editing existing buildings, etc. I kind of just want to play the game for a bit :)
Ben Lubar Oct 31, 2024 @ 6:15am 
Originally posted by Malidictus:
Originally posted by Klown007:
I think I saw that merger chest was updated to 2.0 ( I didn't use it before) so not sure if thats what you're looking for. AAI storage was also updated (2x2, 4x4,6x6 boxes with increasing inventory sizes)

No. A while ago, the development team introduced the "linked-container" prototype, which allows multiple containers to share the same instance of inventory. This isn't used in the Live game (or wasn't, last I checked)

There's an item for it in the map editor in the same section as the infinity chest and infinity pipe. I don't know anything about Factorio modding, but it's probably easier to make a recipe for an existing item than it is to make an entirely new item and recipe. If you're interested in learning modding, this could be a very good first project.
Malidictus Oct 31, 2024 @ 9:59am 
Originally posted by Ben Lubar:
There's an item for it in the map editor in the same section as the infinity chest and infinity pipe. I don't know anything about Factorio modding, but it's probably easier to make a recipe for an existing item than it is to make an entirely new item and recipe. If you're interested in learning modding, this could be a very good first project.

I looked into that, yeah. There are two crucial issues with it, however. Firstly, it requires the player to manually set each chest's LinkID, and not as an integer (it's a 32bit int), but rather as a selection from four 8-sided tumblers. That's a lot of combinations, to be sure, but I need something done procedurally, not manually. *edit* D'oh. That's 4*8 = 32 boolean options, i.e. a 32-bit integer. Still, I need to do this automatically.

More significantly, though, those Linked Chests can be linked across any distance. Granted, this has been the case with autolinked mods anyway, but I absolutely don't want to do that. What I'm trying to create is storage that can be built in any shape, not a means for resource teleportation.

I'm actually not sure how those are implemented, though, so looking at their coding should help. Thanks for the heads-up.
Last edited by Malidictus; Oct 31, 2024 @ 10:10am
Malidictus Oct 31, 2024 @ 4:23pm 
Yeah, the Linked Chest is implemented in the laziest way possible. It's a deep copy of the Steel Chest with circuit connector graphics removed and type changed from "container" to "linked-container". The UI with the crazy tumblers is specific to the Linked Container prototype, but it's easy enough to hide.

Getting them to connect automatically is a bit more complex, though. The approach I'm looking at right now is similar to what the Schall Autolinked Chests do, which is listen for linked-container entities being built, then go from there. So far, I can track the container and the four neighbouring containers in cardinal directions. Getting them connected won't be quite so simple, since I need to make sure chests don't auto-generate with already-used link IDs, and need to figure out what happens if you try to merge with entities that have stuff in the inventory. Deleting items is generally a no-no in Factorio.

I kind of hate all the time I'm spending learning this stuff, but it IS fun getting it to work.
< >
Showing 1-5 of 5 comments
Per page: 1530 50