Decider combinator: Duplicate condition
Moderator: ickputzdirwech
Decider combinator: Duplicate condition
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.
Other idea: Add a duplicate button that is always visible.
Other idea: Make Shift+Right click / Shift+Left click work for conditions.
Re: Decider combinator: Duplicate condition
Honestly, i would rather the ability to type in a logic statement by hand. But something to make strong up conditions is definitely needed.
Re: Decider combinator: Duplicate condition
+1, when inputting some 18+ complex conditions it's a little hard to do.
I would suggest opening a thread for this option too. That way we get more angles and chances of implementation.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.
Re: Decider combinator: Duplicate condition
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.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.
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.
Re: Decider combinator: Duplicate condition
this would be another great use case for the selector combinator as stated in FFF-384evandy 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.
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.
Re: Decider combinator: Duplicate condition
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.
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.