How can I convince my logistic robots to maintain depots for goods I request for myself?

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.


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.

Tags:

Factorio