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.)
[2.0.10] Selector Combinator "Select Index" mode is difficult to use with signal-based index
-
- 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
Are you 100% sure that the index signal is not removed from the signal frame that the select operation is being performed on?
-
- 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
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.)