AND / OR in condition blocks too restricting. At least, flip grouping around

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

imi___
Inserter
Inserter
Posts: 32
Joined: Sat Jun 22, 2024 9:31 am
Contact:

AND / OR in condition blocks too restricting. At least, flip grouping around

Post by imi___ »

I know that the devs already stated, that the AND / OR setup is not supposed to support full free bracket configurations (sadly), but could you please at least turn the current grouping around?

Currently, you can only have OR-combined blocks of AND's. That never felt useful for me in practical cases. I always needed AND-combined blocks of OR's.
For example, this platform should have enough fuel AND enough oxidizer AND (item a OR item b OR item c OR whatever).
10-31-2024, 16-40-20.png
10-31-2024, 16-40-20.png (36.3 KiB) Viewed 1563 times

(Of course, better still would be proper support for any and/or combinations)
imi___
Inserter
Inserter
Posts: 32
Joined: Sat Jun 22, 2024 9:31 am
Contact:

Re: AND / OR in condition blocks too restricting. At least, flip grouping around

Post by imi___ »

PS: There is - of course - the workaround of placing combinators that do the OR combining into one signal and then use "Circuit Condition" to test for that signal. But well... I was hoping to actually get RID of these things with the new combinator UI ;(
Tinyboss
Filter Inserter
Filter Inserter
Posts: 564
Joined: Sun Nov 16, 2014 12:11 pm
Contact:

Re: AND / OR in condition blocks too restricting. At least, flip grouping around

Post by Tinyboss »

Without addressing the merit of your suggestion to flip the grouping, it would be such a universally breaking change that I can't imagine they'd ever choose to do it.
User avatar
BraveCaperCat
Filter Inserter
Filter Inserter
Posts: 427
Joined: Mon Jan 15, 2024 10:10 pm
Contact:

AND / OR in condition blocks too restricting. At least, allow flip grouping around

Post by BraveCaperCat »

What if you could order the "and" and "or" conditional statements however you want?
Creator of multiple mods, including Quality Assurance - My most popular one.
Go check them out with the first and second links!
I'll probably be wanting or giving help with modding most of the time I spend here on the forum.
User avatar
MeduSalem
Smart Inserter
Smart Inserter
Posts: 1688
Joined: Sun Jun 08, 2014 8:13 pm
Contact:

Re: AND / OR in condition blocks too restricting. At least, flip grouping around

Post by MeduSalem »

+1.

I had exactly the same issue a few days ago when I tried to set it up a route from Fulgora to Nauvis exactly like you want to and realized this a serious limitation to setting up some proper conditions. ^^

Because I definitely only want my platforms to only start moving if they have enough of both fuel ingredients. So you need the AND bracket on them.

But at the same time I wanted to allow the platform the freedom to make a trip if the "OR" sub-condition of the payload is full-filled at least partially. Like if I have enough Science Packs... start moving even if I don't have loaded enough Electromagnetic Plants yet, or vice versa.

But turned out you can't set it up like that.
User avatar
Stargateur
Fast Inserter
Fast Inserter
Posts: 198
Joined: Sat Oct 05, 2019 6:17 am
Contact:

Re: AND / OR in condition blocks too restricting. At least, flip grouping around

Post by Stargateur »

I was also very confused about why I can't do this basic thing.
robot256
Smart Inserter
Smart Inserter
Posts: 1122
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: AND / OR in condition blocks too restricting. At least, flip grouping around

Post by robot256 »

If you have to pick one ordering (a AND b) OR (c AND d) is the only way to make every behavior possible. You can make anything by expanding the boolean terms--this often means duplicating certain conditions within multiple ANDed blocks. This is painful without schedule entry copy-paste but it is mathematically consistent.

The only way to make (A or B) AND (C or D) do anything is to invert the output. The "true" condition of all your checks would be when the train should STAY in the stop. This would be an enormous change.

I worry that making programmable evaluation groupings (parentheses) would make the UX totally encumbered.
imi___
Inserter
Inserter
Posts: 32
Joined: Sat Jun 22, 2024 9:31 am
Contact:

Re: AND / OR in condition blocks too restricting. At least, flip grouping around

Post by imi___ »

robot256 wrote: Thu Oct 31, 2024 6:01 pm If you have to pick one ordering (a AND b) OR (c AND d) is the only way to make every behavior possible. You can make anything by expanding the boolean terms--this often means duplicating certain conditions within multiple ANDed blocks. This is painful without schedule entry copy-paste but it is mathematically consistent.

The only way to make (A or B) AND (C or D) do anything is to invert the output. The "true" condition of all your checks would be when the train should STAY in the stop. This would be an enormous change.

I worry that making programmable evaluation groupings (parentheses) would make the UX totally encumbered.
The "painful without ...copy-paste" is the point here. Without copy-paste of parts of the expression, that is only feasible in theory.

I rather prefer a solution that helps and makes the game more enjoyable to play with.

Hm... I wonder.. Is it possible to set the conditions in any expression via LUA code? In this case, a mod could provide an UI. (Idea is, that mods are kindof "allowed" to have a bit more clunky UI to be accepted. And they can be a testing ground for the devs to do it in a non-clunky way) (Edit: Just thought of it and even if you can't setup any boolean expression, you can always do the cnf expansion in LUA :D )
Last edited by imi___ on Thu Oct 31, 2024 8:34 pm, edited 1 time in total.
User avatar
BlueTemplar
Smart Inserter
Smart Inserter
Posts: 3234
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

Re: AND / OR in condition blocks too restricting. At least, flip grouping around

Post by BlueTemplar »

We 'just' need copy-paste I guess.
(It's hard to believe now, but Factorio used to not have blueprints !)
BobDiggity (mod-scenario-pack)
robot256
Smart Inserter
Smart Inserter
Posts: 1122
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: AND / OR in condition blocks too restricting. At least, flip grouping around

Post by robot256 »

imi___ wrote: Thu Oct 31, 2024 7:05 pm The "painful without ...copy-paste" is the point here. Without copy-paste of parts of the expression, that is only feasible in theory.
It is perfectly feasible, just painful in practice, I've done it many times.
Hm... I wonder.. Is it possible to set the conditions in any expression via LUA code? In this case, a mod could provide an UI. (Idea is, that mods are kindof "allowed" to have a bit more clunky UI to be accepted. And they can be a testing ground for the devs to do it in a non-clunky way)
This is definitely possible. Talk to stringweasel who implemented the schedule GUI for Space Exploration space ships.
User avatar
BraveCaperCat
Filter Inserter
Filter Inserter
Posts: 427
Joined: Mon Jan 15, 2024 10:10 pm
Contact:

Re: AND / OR in condition blocks too restricting. At least, allow flip grouping around

Post by BraveCaperCat »

The devs should just allow us to click some additional button to switch the order of specific "or" and "and" conditions. A secondary option, to negate a condition would also be useful.
Creator of multiple mods, including Quality Assurance - My most popular one.
Go check them out with the first and second links!
I'll probably be wanting or giving help with modding most of the time I spend here on the forum.
Post Reply

Return to “Ideas and Suggestions”