AND / OR in condition blocks too restricting. At least, flip grouping around
Moderator: ickputzdirwech
AND / OR in condition blocks too restricting. At least, flip grouping around
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).
(Of course, better still would be proper support for any and/or combinations)
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).
(Of course, better still would be proper support for any and/or combinations)
Re: AND / OR in condition blocks too restricting. At least, flip grouping around
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 ;(
Re: AND / OR in condition blocks too restricting. At least, flip grouping around
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.
- BraveCaperCat
- 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
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.
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.
Re: AND / OR in condition blocks too restricting. At least, flip grouping around
+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.
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.
- Stargateur
- 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
I was also very confused about why I can't do this basic thing.
Re: AND / OR in condition blocks too restricting. At least, flip grouping around
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 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.
My mods: Multiple Unit Train Control, Smart Artillery Wagons
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Re: AND / OR in condition blocks too restricting. At least, flip grouping around
The "painful without ...copy-paste" is the point here. Without copy-paste of parts of the expression, that is only feasible in theory.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.
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

Last edited by imi___ on Thu Oct 31, 2024 8:34 pm, edited 1 time in total.
- BlueTemplar
- 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
We 'just' need copy-paste I guess.
(It's hard to believe now, but Factorio used to not have blueprints !)
(It's hard to believe now, but Factorio used to not have blueprints !)
BobDiggity (mod-scenario-pack)
Re: AND / OR in condition blocks too restricting. At least, flip grouping around
It is perfectly feasible, just painful in practice, I've done it many times.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.
This is definitely possible. Talk to stringweasel who implemented the schedule GUI for Space Exploration space ships.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)
My mods: Multiple Unit Train Control, Smart Artillery Wagons
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
- BraveCaperCat
- 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
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.
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.