Decider combinator: Duplicate condition

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

ndh
Inserter
Inserter
Posts: 29
Joined: Sat Apr 29, 2023 7:19 pm
Contact:

Decider combinator: Duplicate condition

Post by ndh »

grafik.png
grafik.png (82.99 KiB) Viewed 305 times


I absolutely love the new decider combinators. I am knee deep in combinators right now, and it's great!
However, creating complex conditions can be tedious.

Suggestion: Add a way to copy-paste and/or duplicate a condition.

Idea: Reuse the Delete button for conditions. When the player holds Ctrl, the Delete button is changed to a Duplicate button. Clicking it would copy the condition under the mouse cursor, and insert a duplicate after that condition.
grafik.png
grafik.png (39.03 KiB) Viewed 305 times



Other idea: Add a duplicate button that is always visible.

Other idea: Make Shift+Right click / Shift+Left click work for conditions.
evandy
Fast Inserter
Fast Inserter
Posts: 240
Joined: Mon Apr 15, 2019 2:54 am
Contact:

Re: Decider combinator: Duplicate condition

Post by evandy »

Honestly, i would rather the ability to type in a logic statement by hand. But something to make strong up conditions is definitely needed.
Kabury
Burner Inserter
Burner Inserter
Posts: 16
Joined: Wed Apr 07, 2021 5:41 pm
Contact:

Re: Decider combinator: Duplicate condition

Post by Kabury »

+1, when inputting some 18+ complex conditions it's a little hard to do.
evandy wrote: Sat Jun 21, 2025 11:46 pm Honestly, i would rather the ability to type in a logic statement by hand. But something to make strong up conditions is definitely needed.
I would suggest opening a thread for this option too. That way we get more angles and chances of implementation.
ndh
Inserter
Inserter
Posts: 29
Joined: Sat Apr 29, 2023 7:19 pm
Contact:

Re: Decider combinator: Duplicate condition

Post by ndh »

evandy wrote: Sat Jun 21, 2025 11:46 pm Honestly, i would rather the ability to type in a logic statement by hand. But something to make strong up conditions is definitely needed.
That's an interesting idea! I would see that rather in the context of a mod than in the base game, since it's very technical.

But it would be cool to have a textual representation and be able to transform it, use copy-paste. It could even support more complex expressions like `A and (B or C)` and transform it into the Backus Naur form required by the game.
User avatar
Brathahn
Fast Inserter
Fast Inserter
Posts: 143
Joined: Sat Aug 02, 2014 1:50 pm
Contact:

Re: Decider combinator: Duplicate condition

Post by Brathahn »

evandy wrote: Sat Jun 21, 2025 11:46 pm Honestly, i would rather the ability to type in a logic statement by hand. But something to make strong up conditions is definitely needed.
this would be another great use case for the selector combinator as stated in FFF-384
Since the scope of the Selector combinator is quite broad, there is also room for further functions we could give it, if you have some ideas, we would welcome them.
ndh
Inserter
Inserter
Posts: 29
Joined: Sat Apr 29, 2023 7:19 pm
Contact:

Re: Decider combinator: Duplicate condition

Post by ndh »

I just spent a couple hours coercing Copilot into writing a parser and AST transformer for the decider combinator DSL. I call it decolang.

It can parse expressions like red(T) = 23 or ip > 10 and cp > 4 and (T != 112 or P > 5).

It also normalizes an expression like P=1 and (X=0 or A=3) into P=1 and X=0 or P=1 and A=3.

And it has this fancy for loop syntax: any T=i*32 for i in 1..3 maps to T=32 or T=64 or T=96, and all T=count*10 for count in 1..2 maps to T=10 and T=20.

Further plan: Make this into a mod. The user would type a decolang expression in the deco description. Then use a tool from the mod to select the deco. The mod would parse the description, normalize the expression, then create a blueprint. The user can then apply that blueprint to the deco, which would update the deco's conditions.
Post Reply

Return to “Ideas and Suggestions”