Page 1 of 1

[1.1.91] Stack Filter Inserter + Circuits: Sets filter to a signal with not-highest value.

Posted: Tue Sep 19, 2023 3:39 pm
by Hares
Usually, when a filter inserter in a "set filters" mode receives a circuit signal, it performs the following:
  1. Filter the signals for items-only
  2. Filter the signals for positive value only
  3. Sort the result by value
  4. Take N signals with the highest values where N=5 for purple fast filter inserter and N=1 for white stack filter inserter
However, I've encountered that it's not always the case:
Screenshot from 2023-09-19 18-33-47.png
Screenshot from 2023-09-19 18-33-47.png (117.01 KiB) Viewed 419 times
Here, it receives "Mining Drill = 50", "Pump = 22", and a number of other signals. Instead of selecting Mining Drills (signal with the highest value) as the filter, it selects the pump which is 2nd highest.

I understand this might be a normal behaviour, but looks like a bug for me, especially since the "Circuit Network 377" on the right sorts signals from highest to lowest.

Re: [1.1.91] Stack Filter Inserter + Circuits: Sets filter to a signal with not-highest value.

Posted: Tue Sep 19, 2023 3:57 pm
by Loewchen
The value is irrelevant, it uses signals sorted by item ID.

Re: [1.1.91] Stack Filter Inserter + Circuits: Sets filter to a signal with not-highest value.

Posted: Tue Sep 19, 2023 4:00 pm
by Rseding91
Thanks for the report. Looking into it; step 3 simply is not a thing when it comes to how the inserter set-filter logic works. It simply iterates the signals that the network has and the first N it has it uses.

However every description in the game shows them sorted by count which is where the confusion comes from.