Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
You can of course use circuit network to do what you want but it's a bit overkill unless you already set the train stop's train limit through circuit network.
If you did set it with a static combinator holding the values you want in negative, you can re-use the signal that combines that and the chest's content, multiply it by -1 and use that to set the filters on your inserter.
You can also start by reading the train's content and remove the items you want from it with decider combinators when other items are there and use the result for your filters.
This is probably unnecessarily complex given the amount of combinators you will need to use.
What you are running into is just like trying to set a light's color while sending multiple color inputs to it : it picks the one with (lowest, I think?) internal ID number, regardless of the value of the signal, and uses that over all else. Only when that signal is zeroed out (and the game does NOT recognize a zero value signal; it treats them as not even being there, as a null signal) and not present does the next ID number signal get used. Whats worse is that Stack filter Inserters only have the one filter slot! At least Filter Inserters can have 5 filters set, meaning that if one item is not present, the next may be picked up.
I avoid this, as I said, by using chests dedicated to one item each. Walls get one chest, Repair Packs get another chest, whatever turret I'm using gets its own chest, ammo (if applicable) gets its own chest, roboports, pipes, pipe to grounds, etc. all get their own chests (depending on just what wall defense setup I'm using). The filter stack inserters only try to pick up their one item, but then, only if there is room in the chest to put them. Otherwise, they leave stuff on the train.
I set up a Constant Combinator with the negative of the desired buffer for each item the train is delivering. If I only want up to 200 Walls at the station, but want at least 50, then I'd set the CC to -50 Walls. if I want 200 Repair Packs, but to call for a train when there are less than 25, I'd set the CC to -25 Repair Packs. I wire the CC to each of the chests at the train station. Then I do one of two things : A) wire them straight to the train stop, telling it to Enable when Anything < 0; or B) wire them to the input of a Decider Combinator, set the DC to read Anything < 0 output L = 1, and then wire the output of the DC to the train stop, setting the limit to L. 'A' works when there is only one train servicing all the wall repair stations. 'B' works best when there is the potential for more than one train to want to head to that wall repair station.
By setting the train to Inactive 5 seconds, when the station is enabled (or has the Limit increased to 1) the train comes along with its full load. It then tries to top off the chests, which is why they need to be slot locked to avoid flooding with material better used elsewhere. When the train stops unloading for 5 seconds, off it goes, back to its loading station, to get a full load for the next wall repair station that needs materiel.
https://www.youtube.com/watch?v=AtN3ewXfZHM&t=13s
Now for the filter inserters, I take the green wire from the constant combinator and run that through an arithemetic combinator multiplying each by some handy factor (ea * 5 output ea). This outputs to a fresh green wire network to the filter inserters (Set filter) and combines with the red wire used with stop decider.
The outcome is that once the minimum amount of any item is triggered, the supply train comes along and replenishes any item that is running "low". The advantage is I don't have to have a separate chests for each item, it preserves easy control of the quantities and facilitates reasonable unloading speeds.