[2.0.10] Selector Combinator "Select Index" mode is difficult to use with signal-based index

Bugs that are actually features.
AntiBlueQuirk
Long Handed Inserter
Long Handed Inserter
Posts: 71
Joined: Wed May 03, 2017 2:57 pm
Contact:

[2.0.10] Selector Combinator "Select Index" mode is difficult to use with signal-based index

Post by AntiBlueQuirk »

The Selector Combinator's "Select Index" mode picks a signal out of the input signals using an index to determine which signal to select. Normally, this index is the constant 0, but you can also use an input signal as the index. This causes a problem though, because now your "index signal" is now part of the list of signals that the combinator is selecting from!

I'm using this feature as part of an automatic crafting "Automall", and I have a chain of "Automall Modules" where each module gets an increasing index. (The "I" signal in the screenshot.) This signal is moduloed with the signal count, so each module works on one recipe in the list of requests. Because the modules don't actually care about what the size of the signal is, I was able to avoid this problem in my circuit by increasing the value of my requests by 1000000, but this feels like a dirty trick.

I think the Selector Combinator, or at least certain modes of it like Select Index, should be able to filter which wires they are operating on, like the other combinators are able to now. That way the combinator can receive a clean list of signals on one wire, and the index signal on the other wire. Quality Transfer is another mode that might benefit from this separation, but I haven't had a reason to use that mode yet.

Screenshot of the issue:
(I'm still sorting out some bugs in the design [like "I" is supposed to be 1 there and "C" should not be present,] but this issue stood out to me, as there didn't seem to be an obvious way around it besides the trick I mentioned above.)
Screenshot 2024-10-24 120215.png
Screenshot 2024-10-24 120215.png (1.04 MiB) Viewed 453 times
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3017
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.0.10] Selector Combinator "Select Index" mode is difficult to use with signal-based index

Post by boskid »

Are you 100% sure that the index signal is not removed from the signal frame that the select operation is being performed on?
10-24-2024, 21-51-57.png
10-24-2024, 21-51-57.png (236.54 KiB) Viewed 422 times
AntiBlueQuirk
Long Handed Inserter
Long Handed Inserter
Posts: 71
Joined: Wed May 03, 2017 2:57 pm
Contact:

Re: [2.0.10] Selector Combinator "Select Index" mode is difficult to use with signal-based index

Post by AntiBlueQuirk »

I think you are correct. I took another look at my circuit and finally figured out a better way to route the signals, and can confirm that the index signal is properly removed from the signal frame before indexing. I think I was mixing it up with another errant signal that had gotten mixed in. My mistake. (The circuit was driving me a little mad, to be honest.)
Post Reply

Return to “Not a bug”