16

My base has grown quite large and I spend a lot of time keeping the surrounding free of annoying tree-hugging eco-terrorist hippies alien scum.

I covered my whole base with a logistics network and set up my character logistic slots, so my logistic robots will replenish any of my combat consumables (ammunition, capsules, repair packs etc.) as soon as I get near it. Unfortunately my combat supplies are manufactured at one end of my base, so when I am at the other end it can take quite a while until the logistics fleet arrives.

So I placed multiple stashes of combat supplies in passive provider chests all around my perimeter, so my logistics robots can resupply from the nearest one. But now I have to make sure that all these supply depots are full all the time, which requires me to regularly drive around the whole base to refill them. This pretty much defeats the purpose of the logistics network system and I wonder if I can somehow automatize that.

My first idea was to place a requester chest and a passive provider chest next to each other with an inserter taking from the requester chest to the provider chest. The plan was that the requester requests the combat supplies from my combat supply production center which then get transferred to the provider chest which then transfers them to me when required. But this lead to an infinite loop because the requester would request from the provider next to it instead of from the production center.

Is there a way to get my logistics robots to maintain a bunch of depots all around my base while also having them resupply me from said depots?

3
  • 1
    Related forum post (with no solution unfortunately): forums.factorio.com/viewtopic.php?f=6&t=23169 Commented Aug 30, 2016 at 16:28
  • 1
    I was thinking about having the requester and provider on separate logistics networks so that the robots wouldn't move stuff between them, but that will break whenever you walk by with your personal roboport equipped. Now I'm thinking about some trick with a circuit network that turns the requester on/off based on the amount of stuff present, but... it sounds hard.
    – Paul Z
    Commented Aug 30, 2016 at 16:46
  • it feels like there needs to be logistic settings on storage chests, because storage chests are almost the answer to your question. a storage chest both accepts items and makes them available, but you can't configure what they accept except that it does seem that like items get stored with like items. so you could use active provider chests for your ammo production, and then where you want your ammo to be sent make a storage chest and put 1 piece of ammo in it. I don't think this works all that well in practice, but it almost does. Commented Jul 11, 2017 at 8:10

2 Answers 2

10

Update Starting from 0.16 it seems it will be possible to use a new type of buffer chest explicitly for this purpose: https://www.factorio.com/blog/post/fff-203

I have built several variations of the circuit-based approach described below since I wrote this answer to improve the design and work out annoyances (like no items ending up in the storage chest until requests have been satisfied). None of them have worked perfectly yet or became so complex they can't easily be explained so therefore I have not updated this answer yet. With a future (as of this writing) 0.16.x release it seems this problem will go away completely.

The new buffer chests (green) will be a hybrid between requester chests (blue) and passive provider chests (red). I presume the robots will attempt to fill these new chests before putting anything into generic storage chests (yellow), and also grab from them before going to storage or passive providers, given the images and descriptions in that blog post:

By using a buffer chest, you can setup a dedicated 'supply area', where the buffer chest will already contain all the typical items, and the bots can quickly top-up your inventory.

...

Using the buffer chest, it will be easy to setup nearby supplies to quickly repair the walls when needed.

- Factorio devs


Circuit network approach

The idea is to prevent an infinite loop by not requesting anything when it's not needed, and not allowing anything to be picked up from your remote depot until it has been filled completely, at which point it makes everything available to the player (or any other requester chests nearby).

  1. Put a requester chest somewhere near where you want things delivered, do not make it request anything yet. Make sure it's set to "set requests".
  2. Put a regular non-logistics chest next to it, leaving one space between them. This will be our "buffer" to prevent loops.
  3. Put an inserter between the chests, rotated so it picks from the requester chest and places into the regular chest.
  4. Put a storage chest 1 tile away from the regular chest.
  5. Put an inserter between those chests so it takes from the regular chest and puts it into the storage chest.
  6. Put a decider combinator somewhere nearby, set it to trigger if combat supply X goes below Y amount. Set the output type to "1 of X".
  7. Grab a wire (say red) and connect the regular and storage chests together with the inserter which takes from the regular chest, and connect them with the input side of the combinator. The combinator should now show the current total amount of supply X in the depot as its input value, and the output value should be 1 of that type.
  8. Set the condition on that inserter to only trigger if supply X is equal to the amount Y.
  9. Connect the output of the combinator to the requester chest.

The depot should now slowly begin to fill the regular "buffer" chest via the requester chest and the first inserter between them. Once the target amount Y has been reached the requests will stop and the other inserter will take over and dump everything into storage. Requests will resume once the total number of X-items in the chests goes below the Y threshold.

Since bots prioritize fetching from storage chests, they will likely grab from there over a passive provider chest further away when you pass by.

If there's stuff left in the storage chest after you're tanked up, they will be moved back to the requester chest by the bots and end up in the buffer chest again, until the're eventually dumped back into the storage chest when the system has reached the threshold.

There are ways to tweak this system for various purposes and uses.

If you want to fill the depot faster; put an arithmetic combinator between the first combinator and the requester chest, and set it to multiply the input amount (1) by some factor (say 10) (make sure to output the same type). The chest will keep requesting 10 items until the system is full (prepare for some overflow as bots always grab/deliver a full cargo hold if they can).

You could use more combinators to always request the exact number of items left until the system is full, but simply multiplying the number of items requested uses fewer components.

If bots often end up re-filling the system from itself by emptying lots of items from the storage chest into the requester, add another decider combinator (using the green network) which triggers if the storage chest contains Z items, where Z is much lower than the total amount above (Y) and set it so the inserter only grabs that amount from the buffer. It may take slightly longer to restock the player as the storage chest is emptied out more often, but the bots will more likely restock the depot more efficiently as there's not as much "available" from the depot itself.

You could also let the filling of the storage chest be player-controlled by hooking up a state-reading gate pole (or even multiple ones at different locations) to the iserter and only allowing it to operate while you're standing near the gate(s). But if you have to run to a specific location you may as well grab directly from the buffer chest, perhaps conveniently placed near your gates.

3

Use Trains

It's a bit bothersome and hard to maintain and expand, but the idea is simple:

  • Set up a station on your base with a requester chest with whatever supplies you want to move.
  • Set up filters on the train with those same supplies
  • Build a rail network that reaches all the way where you want
  • Place a station and a passive provider on that end of the factory

Of course, you're going to have a similar problem if the requester chest on your base is not filled often enough. You could just use conveyor belts instead of a chest if you can, to minimize the chances of looping, and keep a constant supply of raw materials. Alternatively, segment your logistic network so that you don't have that loop.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.