Specifying Order of Operations in Decider Combinators

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
User avatar
Rancara
Burner Inserter
Burner Inserter
Posts: 15
Joined: Fri Jun 27, 2025 4:54 pm
Contact:

Specifying Order of Operations in Decider Combinators

Post by Rancara »

So, I have a problem that feels ~reeeeeealy~ stupid. Like it is impossible that there isn't a way make the interface do what I want to do. It's such a stupidly simple, basic, standard, and obviously needed feature, that there is NO WAY that the devs didn't include it... Yet, as far as I can tell, it's just not there. I'm hoping that someone else knows how, and can tell me. Here is the problem:

When setting complex conditions in decider combinators, the combinator will respect the standard order of operations, namely, and's first and then or's. For example, if I enter...

Code: Select all

       Condition A
-or-
       Condition B
-or-
       Condition C
---and-
       Condition D
---and-
       Condition E
...the combinator check will pass if A is true, or if B is true, or if all of C D and E are true. It is equivalent to the statement, "A | B | (C & D & E)".

But what if that's not what I want? What if I want the statement to work like this: "(A | B | C) & D & E"? I want the statement to pass if D, E, and at least one of A B or C are true.

The only way I have to do this is to use the distributive property of 'and' over 'or' and manually distribute D and E over A, B, and C by dupilacating them for Every. Single. Damn. One! AAAARG! Like So:

Code: Select all

       Condition A
---and-
       Condition D
---and-
       Condition E
-or-
       Condition B
---and-
       Condition D
---and-
       Condition E
-or-
       Condition C
---and-
       Condition D
---and-
       Condition E
There is NO WAY that I can find to easily duplicate conditions D and E, or to copy-paste them into new conditions. Neither does there seem to be a way to just specify the order of operations. You have to manually select/enter the first signal, the operator, and the second signal or constant for every single duplicate. This is INTENSELY irritating, frustrating, and tedious.

Imagine, for example, having to manually click, find, and select 'Iron Ore'. Then select 'Greater Than' from the drop down. Then click and type in '1500'. Then drag it into place next to Condition A, whatever that condition is which you entered earlier. Then Click a couple of 'and's' and 'or's' to the side to set them properly. Now repeat this again to duplicate "Iron Ore > 1500" for Condition B. Then again for Condition C.

But wait! There's more! Now you have to do it again, and again, and again for Condition E! And it just gets multiplicatively worse for every single condition you add to the and-group OR the or-group.

I have GOT to be missing something. There MUST be a feature included in the interface or keybindings SOMEWHERE to either quickly duplicate a condition, or specify operation order, but I just can't find it. I've tried shift-right and shift-left clicking. I've tried cntrl-right and cntrl-left clicking. Shift and Cntrl dragging, Mouse over while using Cntrl-C and Cntrl-V, Cntrl-C and drag... nothing works.

Please help. Does anybody know how to do this? Or is this actually a true case of impossibly bad interface and control design? As in, "as bad as not providing any way to Copy-Paste in a freaking word processor" levels of bad? If it is, then I suppose the next step would be to start a topic in the suggestions forum, but like I said, It seems like there must be a way that I'm missing, so I figure I should ask about it first here in the help forums.


EDIT: I can't resist continuing the joke. But Wait! There's MORE!
Now Imagine you have to do the whole set again for a second combinator, and a third... and maybe even a fourth, as you chain them together in an "If-then, else-if-then, else" selection sequence? Now every condition you add, and every combinator you add for another "else-if" clause doesn't increase the problem multiplicatively... Now you get to make it worse exponentially!

But that's not all. There's even MORE!
Now you need to do it all again for a whole 'nother set of combinators that are controlling a different group of buildings, managing a different set of resources in a similar way! Now everything you add doesn't increase it exponentially... it increases it exponentially... twice!

And don't think that shift-click copying combinator settings will help much. You'll still have to go in manually to each combinator in the new set to change resource signals, adjust constants, and maybe rearrange a few priorities. And you'd better pray you don't miss anything. You get to put yourself through an equivalent hell to programming in good (bad) old C again, but worse, since you can't format of comment your code!

...Yeah. I think my biggest wish list for the combinator interface right now is:
- Specify order of operations
- Easily duplicate and/or copy-paste conditions with a shift-drag and/or a shift-right shift-left click.
- Add divider lines between groups of conditions purely for visual readability of the list. (This would not affect the behavior or logic present. It would just be for user readability in long lists of conditions.)
jdrexler75
Fast Inserter
Fast Inserter
Posts: 125
Joined: Sat Nov 28, 2020 5:27 pm
Contact:

Re: Specifying Order of Operations in Decider Combinators

Post by jdrexler75 »

Rancara wrote: Fri Jun 27, 2025 5:51 pmWhat if I want the statement to work like this: "(A | B | C) & D & E"? I want the statement to pass if D, E, and at least one of A B or C are true.

The only way I have to do this is to use the distributive property of 'and' over 'or' and manually distribute D and E over A, B, and C by dupilacating them for Every. Single. Damn. One! AAAARG!
Yeah, the decider syntax is extremely limited and so this is the only way to do it in a single decider. Every boolean expression is doable but all the "OR"s have to be factored out. The order of operations cannot be specified because all "OR" branches happen in parallel in the same tick. Sometimes a way to simplify it a little is to calculate the subexpressions in a previous decider, though that adds some latency (usually not a problem but sometimes it is). But even that only makes it slightly less tedious for more complex expressions.

I've always considered making some "decider compiler" mod that can take some more complex expressions and expands them into decider syntax. Even if that's the complete opposite thing of what a modern compiler is supposed to do...

So far I've always been able to come up with other workarounds though, so I never got around to it.
User avatar
Rancara
Burner Inserter
Burner Inserter
Posts: 15
Joined: Fri Jun 27, 2025 4:54 pm
Contact:

Re: Specifying Order of Operations in Decider Combinators

Post by Rancara »

jdrexler75 wrote: Fri Jun 27, 2025 11:38 pm Yeah, the decider syntax is extremely limited and so this is the only way to do it in a single decider. Every boolean expression is doable but all the "OR"s have to be factored out. The order of operations cannot be specified because all "OR" branches happen in parallel in the same tick. Sometimes a way to simplify it a little is to calculate the subexpressions in a previous decider, though that adds some latency (usually not a problem but sometimes it is). But even that only makes it slightly less tedious for more complex expressions.

I've always considered making some "decider compiler" mod that can take some more complex expressions and expands them into decider syntax. Even if that's the complete opposite thing of what a modern compiler is supposed to do...

So far I've always been able to come up with other workarounds though, so I never got around to it.
I see. Well, at least I can feel a bit vindicated from hearing that it probably isn't just me stupidly missing something obvious or not trying something I should have thought of.

On the other hand, bummer.

I wonder what it would take to mod operations order functionality in. I've known it was inevitable I'd start looking into modding for this game sooner or later. That might a bit big of a bite to try and chew as a first though. It sounds like it would require some pretty low-level knowledge of how the game works. Maybe not quite engine level, but probably close. Then again, maybe not.

Maybe I should go to the suggestion forum for now. I can easily visualise how such features could be added seamlessly and intuitively to the existing interface. Maybe I should draw up a concept sketch in Gimp or something... How much attention do suggestions typically get from the people who matter here (a.k.a. the Devs)? Do they pay a lot of attention? Or do such things mostly get ignored?
mmmPI
Smart Inserter
Smart Inserter
Posts: 4551
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Specifying Order of Operations in Decider Combinators

Post by mmmPI »

Rancara wrote: Fri Jun 27, 2025 5:51 pm Please help. Does anybody know how to do this? Or is this actually a true case of impossibly bad interface and control design? As in, "as bad as not providing any way to Copy-Paste in a freaking word processor" levels of bad? If it is, then I suppose the next step would be to start a topic in the suggestions forum, but like I said, It seems like there must be a way that I'm missing, so I figure I should ask about it first here in the help forums.


EDIT: I can't resist continuing the joke. But Wait! There's MORE!
Yes, use multiple combinators and copy paste the combinators :lol:

Rancara wrote: Sat Jun 28, 2025 12:00 am Maybe I should go to the suggestion forum for now. I can easily visualise how such features could be added seamlessly and intuitively to the existing interface. Maybe I should draw up a concept sketch in Gimp or something... How much attention do suggestions typically get from the people who matter here (a.k.a. the Devs)? Do they pay a lot of attention? Or do such things mostly get ignored?
Enthuasiam for new proposition is always nice to see, sometimes you think you have a great idea, and it's true, but it also happenss that other players had the same idea too, so there's a step you can do before posting a suggestion is looking at the existing suggestions.

Everyone thinks their way of adding the new button is intuitive and ergonomic, including the devs, and yet sometimes people don't get it. It's less likely to be ignored if it doesn't sound like someone's joking on the bad game design in a situation that is in fact caused by player mistake, looking at other suggestion is also a way to see if what you think is a good idea has already been proposed by someone that has a valid use case and is explaining factually how it's not caused by their inexperience. May even spare you the time on GIMP if there's already something similar proposed :)
Check out my latest mod ! It's noisy !
User avatar
Rancara
Burner Inserter
Burner Inserter
Posts: 15
Joined: Fri Jun 27, 2025 4:54 pm
Contact:

Re: Specifying Order of Operations in Decider Combinators

Post by Rancara »

mmmPI wrote: Sat Jun 28, 2025 5:52 amEnthuasiam for new proposition is always nice to see, sometimes you think you have a great idea, and it's true, but it also happenss that other players had the same idea too, so there's a step you can do before posting a suggestion is looking at the existing suggestions.

Everyone thinks their way of adding the new button is intuitive and ergonomic, including the devs, and yet sometimes people don't get it. It's less likely to be ignored if it doesn't sound like someone's joking on the bad game design in a situation that is in fact caused by player mistake, looking at other suggestion is also a way to see if what you think is a good idea has already been proposed by someone that has a valid use case and is explaining factually how it's not caused by their inexperience. May even spare you the time on GIMP if there's already something similar proposed :)
Good advice. Thank you. I'd add a like to that post if this forum had that functionality, but apparently it doesn't. So this brief thank-you will have to do.
mmmPI
Smart Inserter
Smart Inserter
Posts: 4551
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Specifying Order of Operations in Decider Combinators

Post by mmmPI »

Rancara wrote: Sat Jun 28, 2025 8:49 am Good advice. Thank you. I'd add a like to that post if this forum had that functionality, but apparently it doesn't. So this brief thank-you will have to do.
Thanks x), to be a bit more specific, the thing you mention to re-order the logic condition inside combinator is also occuring for train schedule or platform schedule , albeit it's a bit different the design proposal for the UI may be the same, or the desired behavior, i found 128487 which has several links or this 105090 for train schedule. Or this viewtopic.php?t=129496 for " decider combinators" which sound like what you were going to propose, if it can give an idea about previous similar suggestions, if you have a different use case, and other player have other use case, and many players have use cases, maybe some of them are valid and can contribute to convince the devs to consider a change for those players :)
Check out my latest mod ! It's noisy !
sparr
Smart Inserter
Smart Inserter
Posts: 1520
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: Specifying Order of Operations in Decider Combinators

Post by sparr »

I wrote https://mods.factorio.com/mod/combinator-codify so that I could copy and paste parts of combinator settings. It's not perfect, but it made setting up space platform logic a lot easier for me. If more folks were giving feedback on it, I'd probably work on it more. One of the things I'd like to work on is more concise programmer-y representations, which a contributor also started working on, so you could do things like A&(B|C) and it would do the necessary duplication for you.
ndh
Inserter
Inserter
Posts: 34
Joined: Sat Apr 29, 2023 7:19 pm
Contact:

Re: Specifying Order of Operations in Decider Combinators

Post by ndh »

jdrexler75 wrote: Fri Jun 27, 2025 11:38 pm I've always considered making some "decider compiler" mod that can take some more complex expressions and expands them into decider syntax.
I just wrote a mod that does exactly that. See viewtopic.php?p=675725#p675725. Not published yet, currently gauging interest.
Post Reply

Return to “Gameplay Help”