Combinator - Train Auto-Resupply
Posted: Fri Oct 16, 2015 10:00 pm
Okay, so I did a search and couldn't find anything about this, but I'm sure it's a common problem. Basically, what I'm trying to do is have gun turrets at each outpost resupplied automatically, but I don't want to produce a ton extra and have to devote a separate train, or train car, to carrying a full load of ammo around on the off-chance my guns are running low.
Objective:
I want to have say...10 ammo in a box for each gun (unknown number of guns per outpost). I want the amount of missing ammo to be added up and sent to home base. Home base should make that much ammo (and no more), load it into a train car, and send it to back to the outpost. I am fine with a train devoted entirely to doing this as long as it only takes the amount needed so that it can be loaded with ore as it goes, The train can simply run a loop between loading ammo and all outposts. They can pull off what they need and load ore until full, then when it gets to the next outpost it might offload more ammo and now have space for more ore. The final stop can offload all ore before moving back to the ammo loading station to begin again. I don't want belts full of endless amounts of ammo, but rather clean belts that can be picked up and moved to a new location without a ton of waste.
Problem:
The trick is the time needed between the smart chests saying they're low and the ammo getting back to the guns. If you simply use a signal to say, "Make Ammo", then it will make far too much before the train actually gets it to the gun. I can say how much an outpost needs, but how to freeze that number in place, then decrement it each time one is made while reacting to changes in demand I can't figure. The only thing I can think of that might work would be a pulse generator that would add and subtract using a running total, but I can't seem to get this to work.
For those of you who love practical puzzles, this one's for you.
Objective:
I want to have say...10 ammo in a box for each gun (unknown number of guns per outpost). I want the amount of missing ammo to be added up and sent to home base. Home base should make that much ammo (and no more), load it into a train car, and send it to back to the outpost. I am fine with a train devoted entirely to doing this as long as it only takes the amount needed so that it can be loaded with ore as it goes, The train can simply run a loop between loading ammo and all outposts. They can pull off what they need and load ore until full, then when it gets to the next outpost it might offload more ammo and now have space for more ore. The final stop can offload all ore before moving back to the ammo loading station to begin again. I don't want belts full of endless amounts of ammo, but rather clean belts that can be picked up and moved to a new location without a ton of waste.
Problem:
The trick is the time needed between the smart chests saying they're low and the ammo getting back to the guns. If you simply use a signal to say, "Make Ammo", then it will make far too much before the train actually gets it to the gun. I can say how much an outpost needs, but how to freeze that number in place, then decrement it each time one is made while reacting to changes in demand I can't figure. The only thing I can think of that might work would be a pulse generator that would add and subtract using a running total, but I can't seem to get this to work.
For those of you who love practical puzzles, this one's for you.