Factorio

Factorio

View Stats:
This topic has been locked
Nova Nov 11, 2021 @ 1:11pm
How do i get a circuit set filter inserter to skip an item?
title im trying to make a defence wall builder/ resupply train. it works perfectly fine once the wall is built but building the wall it gets hung up trying to pull items out of the train that are not there.

i have it set to request a train when the station is low on items and filter insert from the train to a box but while its building it uses those items so it wants mroe but the train doesnt carry 5 miles of walls or turrets in one trip, i want it to unload the rest of the stuff for the train b4 it gets sent off for more without overstuffing the wall chest and wasting resources.
< >
Showing 1-6 of 6 comments
Fel Nov 11, 2021 @ 1:28pm 
An easy way to do that is to have a separate chest and filter inserter per item and limit the number of slots that the chest can use.

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.
astrosha Nov 11, 2021 @ 1:30pm 
That problem is why I do not set filters dynamically. Instead, I set them manually, and they output to specific provider chests. If I only want 2 stacks of Walls present, I slot lock the chest that gets the Walls to 2 slots. That chest only gets those walls, and not the other items that are delivered by train.

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.
knighttemplar1960 Nov 11, 2021 @ 8:19pm 
You can use the item ID to sort things using 5 total combinators. Take a look at this video. The solution to your problem is from 10:35 to 19:00.
https://www.youtube.com/watch?v=AtN3ewXfZHM&t=13s
bluemonkey Nov 12, 2021 @ 2:01pm 
To do what you describe, I use a red wire from my Roboport ( ea > 0 output ea) through a decider (ea*-1 output ea). A green constant combinator takes the minimum stock as a green wire. Both go to a decider that outputs a stop limit of 1 when anything >0.

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.
s1w_ Jul 21, 2024 @ 12:30am 
convert demanded items signal to 1 quantity, add it to train's content signal converted to 1, substract 1 from result and put that signal into inserter
Last edited by s1w_; Jul 21, 2024 @ 12:32am
Mont Jul 21, 2024 @ 10:44am 
This thread was quite old before the recent post, so we're locking it to prevent confusion.
< >
Showing 1-6 of 6 comments
Per page: 1530 50

Date Posted: Nov 11, 2021 @ 1:11pm
Posts: 6