Page 1 of 1

[2.0.58] "Each" signal leaks between OR combinator conditions

Posted: Sat Jun 28, 2025 6:20 pm
by SuperBananaBomb

06-28-2025, 03-27-52.png
06-28-2025, 03-27-52.png (344.38 KiB) Viewed 425 times
The top condition is false (due to Deny signal being 0), but the "Each" signal is picking up all inputs from the Green wire.
The bottom condition is true, but it is not reading the Green wire. Yet, because of the top condition, the "Each" signal gets substituted with all inputs from the Green wire and they all pass the 0 = 0 condition.

From this experiment, it seems the "Each" condition is global to the combinator, and not separately considered for each OR condition. I can see that being by-design, but I was not expecting signals to leak from one OR condition to another; I was expecting them to be independent like individual combinators would. If we split this into 2 combinators, one for each OR condition, then there is no output signal.


06-28-2025, 11-19-26.png
06-28-2025, 11-19-26.png (233.05 KiB) Viewed 425 times
06-28-2025, 11-19-36.png
06-28-2025, 11-19-36.png (234.08 KiB) Viewed 425 times

Re: [2.0.58] "Each" signal leaks between OR combinator conditions

Posted: Sat Jun 28, 2025 8:52 pm
by boskid
Well, that is not a bug. There is one set of "each" signal substitutes and it is used throughout all conditions.

Re: [2.0.58] "Each" signal leaks between OR combinator conditions

Posted: Sat Jun 28, 2025 9:17 pm
by robot256
It makes sense to me since I know how Each works. It seems like the only way to communicate that to the user would be to synchronize the R/G boxes on all Each entries in a given combinator.

Re: [2.0.58] "Each" signal leaks between OR combinator conditions

Posted: Sun Jun 29, 2025 11:15 am
by sparr
Synchronizing those checkboxes would reduce the functionality of the combinator. There is no obvious/simple way to "fix" this without eliminating other ways the combinator could be used intentionally.

Re: [2.0.58] "Each" signal leaks between OR combinator conditions

Posted: Sun Jun 29, 2025 12:16 pm
by robot256
sparr wrote: Sun Jun 29, 2025 11:15 am Synchronizing those checkboxes would reduce the functionality of the combinator. There is no obvious/simple way to "fix" this without eliminating other ways the combinator could be used intentionally.
I meant only for the entries where the Each signal is selected. It would be a rather invasive bespoke piece of code to check "is this signal Each, and are there other Each signals that should be changed at the same time" every time the R/G boxes are clicked. But the Each signal already changes the entire operation of the combinator in a totally unique way.

Re: [2.0.58] "Each" signal leaks between OR combinator conditions

Posted: Sun Jun 29, 2025 2:11 pm
by Tertius
This "linking" of the EACH signals is useful. Think it this way. It enables you to create signals from nothing on one wire as well as compare to 0 (usually not possible with EACH), if these signals are present on the other wire. It's the only place in Factorio where you're able to have a collection of signals with value 0 to work with.
What you describe as leak and give the example, is what others like me do explicitly use. I would interpret this behavior as just given and meant to be implemented this way.

Re: [2.0.58] "Each" signal leaks between OR combinator conditions

Posted: Sun Jun 29, 2025 2:56 pm
by robot256
Tertius wrote: Sun Jun 29, 2025 2:11 pm This "linking" of the EACH signals is useful. Think it this way. It enables you to create signals from nothing on one wire as well as compare to 0 (usually not possible with EACH), if these signals are present on the other wire. It's the only place in Factorio where you're able to have a collection of signals with value 0 to work with.
What you describe as leak and give the example, is what others like me do explicitly use. I would interpret this behavior as just given and meant to be implemented this way.
This is amazing and I stand corrected. The existing behavior is great and should not be changed. OP just needs to build a second combinator so the two halves of their condition are executed on different sets of signals.