Best way to get around the "filter inserters only have 5 filter slots and stack filters only 1" constraint?
Posted: Mon Apr 01, 2024 3:28 am
When you use a circuit signal to set the filters on a filter inserter, the filter inserter only chooses the "first" 5 items in the signal (and a stack filter inserter chooses only the first item).
I'm trying to design a single centralized rail station which demands certain numbers of items with a circuit network signal. For the simple case this is a super well known problem - anybody designing a remote outpost with item limits set by circuit network has already solved this - send a signal for desired items: perhaps 50 walls, 10 turrets, 50 repair packs, subtract the signal for how many of all these items you already have at the outpost (perhaps 30 walls, 10 turrets, 47 repair packs), send the result (20 walls, 3 repair packs) to filter inserters and also set the train limit to the outpost resupply rail station to 1 if necessary, and now you have outpost supply trains that only deploy if there is a shortage, and it is easy to upgrade every already-placed outpost, by changing the 'desired items' signal.
The problem I'm running across is that I want to design a very large version of this kind of automated rail station, with many items that can't possibly fit on a single train car (I want to use one to supply an 'everything' mall, and another one to supply cargo rockets in space exploration). If all desired types of items can fit onto a single train there is no issue with the fact that only 5 or 1 items is used by the filter inserter because the inserter will eventually deliver enough items that those signals will drop to zero, exposing the other item signals, and eventually all requests will be fulfilled.
With multiple trains that can arrive with different items, now there is a problem. If, for example, I am requesting every kind of belt and underneathy and splitter and chest and pipe and assembler and miner and so on, and the first 5 items that the filter inserter happens to select are the yellow belt/underneathy/splitter and the red belt/underneathy, but the train that has just arrived is filled with only assemblers and chemplants, then the filter inserter will not do anything.
I was wondering if anybody had any ideas of how I could get this "how to get specific numbers of items from a single rail station with many kinds of trains arriving" problem solved. I was thinking I could cycle through groups of 5 items at a time on my signal, so perhaps on tick 1, signals for yellow + red belts are sent to the inserter, on tick 2 signals for assemblers and miners etc. are sent, on tick 3 prod modules, on tick 4 speed modules, on tick 5 eff modules, tick 6 refineries, pumpjacks, and chemplants, and so on. But this seems like a nightmare to set up (and hard to extend - every time I add 5 more kinds of items to my requested item list, I have to adjust this looping cycle system), and I don't even know if I can design a reasonably sized system that can loop through the signals like that. Can't think of any other solutions.
I've found some other posts like viewtopic.php?t=50220 where people are asking about features to increase the number of filter slots but I want to see if I can work around the limitation as it exists now.
I'm trying to design a single centralized rail station which demands certain numbers of items with a circuit network signal. For the simple case this is a super well known problem - anybody designing a remote outpost with item limits set by circuit network has already solved this - send a signal for desired items: perhaps 50 walls, 10 turrets, 50 repair packs, subtract the signal for how many of all these items you already have at the outpost (perhaps 30 walls, 10 turrets, 47 repair packs), send the result (20 walls, 3 repair packs) to filter inserters and also set the train limit to the outpost resupply rail station to 1 if necessary, and now you have outpost supply trains that only deploy if there is a shortage, and it is easy to upgrade every already-placed outpost, by changing the 'desired items' signal.
The problem I'm running across is that I want to design a very large version of this kind of automated rail station, with many items that can't possibly fit on a single train car (I want to use one to supply an 'everything' mall, and another one to supply cargo rockets in space exploration). If all desired types of items can fit onto a single train there is no issue with the fact that only 5 or 1 items is used by the filter inserter because the inserter will eventually deliver enough items that those signals will drop to zero, exposing the other item signals, and eventually all requests will be fulfilled.
With multiple trains that can arrive with different items, now there is a problem. If, for example, I am requesting every kind of belt and underneathy and splitter and chest and pipe and assembler and miner and so on, and the first 5 items that the filter inserter happens to select are the yellow belt/underneathy/splitter and the red belt/underneathy, but the train that has just arrived is filled with only assemblers and chemplants, then the filter inserter will not do anything.
I was wondering if anybody had any ideas of how I could get this "how to get specific numbers of items from a single rail station with many kinds of trains arriving" problem solved. I was thinking I could cycle through groups of 5 items at a time on my signal, so perhaps on tick 1, signals for yellow + red belts are sent to the inserter, on tick 2 signals for assemblers and miners etc. are sent, on tick 3 prod modules, on tick 4 speed modules, on tick 5 eff modules, tick 6 refineries, pumpjacks, and chemplants, and so on. But this seems like a nightmare to set up (and hard to extend - every time I add 5 more kinds of items to my requested item list, I have to adjust this looping cycle system), and I don't even know if I can design a reasonably sized system that can loop through the signals like that. Can't think of any other solutions.
I've found some other posts like viewtopic.php?t=50220 where people are asking about features to increase the number of filter slots but I want to see if I can work around the limitation as it exists now.