I'm having some trouble with a decider combinator:
Basically, I'm trying to burn away excess material on Gleba. I'm comparing the logistic network contents to set values, hoping to output any item that has more than the set amount. However, the output for some reason is "belt" instead of the bio items that the combinator is watching. Any idea why this is so?
The "Anything" output description says that the first signal matching the condition will be output. There's no condition on belts in my inputs. Based on the description alone, I'd say it's a bug, but it would seem weird that such a basic bug would go unnoticed for so long.
Here's my save (~50 MiB): https://xoft.cz/factorio/First%20-%20we ... output.zip
The decider combinator is next to the player on Gleba.
Decider combinator weird "anything" output
Re: Decider combinator weird "anything" output
That isn't how the "anything"-thing works (and i'm not even sure exactly how it works) - you need something else anyway.
Try this:
Assume the red signal provides how much of each item you have and the green signal provides the amount of items you want in storage at maximum. This combinator will then forward the signal only if red is greater than green, which you can use to your liking - for example on filter inserters. This will work for outputting multiple signals.
Try this:
Assume the red signal provides how much of each item you have and the green signal provides the amount of items you want in storage at maximum. This combinator will then forward the signal only if red is greater than green, which you can use to your liking - for example on filter inserters. This will work for outputting multiple signals.
Re: Decider combinator weird "anything" output
"Anything" outputs the first and only the first signal, if any signal passes, the one it outputs doesn't have to be one that passed.
"Everything" will forward all signals if all of them pass.
"Each" will process each signal independently, forwarding it only if it passes.
What you probably want here, is to use a Decider combinator in AND mode with a Constant Combinator.
For example on the Constant Combinator, output "Spoilage = 500, Jellynut seeds = 100, ...", put that on the green wire.
On the Decider Combinator, on the green wire have the constant combinator, and on the red wire the "stuff in storage" signal. Then do something like "Each
(green) > 0" to filter to only things defined in the constant combinator, AND Each (red) > Each (green) to filter to only those in excess of defined. Output Each = 1.
"Everything" will forward all signals if all of them pass.
"Each" will process each signal independently, forwarding it only if it passes.
What you probably want here, is to use a Decider combinator in AND mode with a Constant Combinator.
For example on the Constant Combinator, output "Spoilage = 500, Jellynut seeds = 100, ...", put that on the green wire.
On the Decider Combinator, on the green wire have the constant combinator, and on the red wire the "stuff in storage" signal. Then do something like "Each
(green) > 0" to filter to only things defined in the constant combinator, AND Each (red) > Each (green) to filter to only those in excess of defined. Output Each = 1.
Re: Decider combinator weird "anything" output
As far as I understand the ANY operator as output, it chooses from the complete input set if used with one of the ordinary comparison operators, and from the matching input set if used with the EACH operator as comparison operator. It gets really complicated, if you use multiple conditions and one (or even more) are with EACH.
The first part of the popup help text "the first input signal..." applies to ordinary comparison operators, and the second part "..the first signal that passed all conditions..." means all that passed an EACH.
The first part of the popup help text "the first input signal..." applies to ordinary comparison operators, and the second part "..the first signal that passed all conditions..." means all that passed an EACH.
-
- Burner Inserter
- Posts: 19
- Joined: Wed Nov 20, 2024 3:09 am
- Contact:
Re: Decider combinator weird "anything" output
I see several different aspects here.
a) reaching your goal - fellow members already replied helpfully.
b) logical correctness of the output (rather than being a bug) - a dispute
c) whether the in-game description/documentation is helpful - what I want to focus on.
Here quoting the the full description of the Anything (Virtual Signal)
This is logically correct, just as the sentence "Either my name is Lighthouse or the moon is made of cheese.". But I think the description and the actual output could be rephrased for easier reading.
There is an input signal that passes all conditions and it is not part of the output. Why should "[...]or the first signal that passed all conditions[...]" be part of the description? (This is not rhetorical - I actually would like to understand: Does that part make a difference in other cases that we didn't consider here?)
IMHO The description of the output could be something like "Independent of what signal passed the condition, the output is the first input signal (ordered ascending by an internal signal ID)". Actually I am not sure of the "internal signal ID" part, but as you can see in my example: the red signal has a smaller ID than the green ("first" connection ID) but the output is part of the green set anyway.
a) reaching your goal - fellow members already replied helpfully.
b) logical correctness of the output (rather than being a bug) - a dispute
c) whether the in-game description/documentation is helpful - what I want to focus on.
Here quoting the the full description of the Anything (Virtual Signal)
and a simplified sample:If any of the input signals meet the condition, it will pass. It is false when there are no inputs.
Outputs the first input signal, or the first signal that passed all conditions, respecting signal order in both cases.
This is logically correct, just as the sentence "Either my name is Lighthouse or the moon is made of cheese.". But I think the description and the actual output could be rephrased for easier reading.
There is an input signal that passes all conditions and it is not part of the output. Why should "[...]or the first signal that passed all conditions[...]" be part of the description? (This is not rhetorical - I actually would like to understand: Does that part make a difference in other cases that we didn't consider here?)
IMHO The description of the output could be something like "Independent of what signal passed the condition, the output is the first input signal (ordered ascending by an internal signal ID)". Actually I am not sure of the "internal signal ID" part, but as you can see in my example: the red signal has a smaller ID than the green ("first" connection ID) but the output is part of the green set anyway.
- Attachments
-
- simplified case.png (62.93 KiB) Viewed 378 times
-
- Long Handed Inserter
- Posts: 76
- Joined: Sat Nov 28, 2020 5:27 pm
- Contact:
Re: Decider combinator weird "anything" output
The signal order has long been a question of mine, I don't think it's explained anywhere, and I haven't been able to influence it.Lighthouse wrote: ↑Tue Dec 10, 2024 10:55 pm IMHO The description of the output could be something like "Independent of what signal passed the condition, the output is the first input signal (ordered ascending by an internal signal ID)". Actually I am not sure of the "internal signal ID" part, but as you can see in my example: the red signal has a smaller ID than the green ("first" connection ID) but the output is part of the green set anyway.
But I do know that whenever I try to rely on signal order, the game consistently picks the one I didn't want
So I've never been successful in using the "any" signal, and already rework the logic to use "each" plus an extra condition.
Re: Decider combinator weird "anything" output
Because it is necessary, albeit worded poorly. Both halves of the tooltip talk about different things.Lighthouse wrote: ↑Tue Dec 10, 2024 10:55 pm Here quoting the the full description of the Anything (Virtual Signal)[...] Why should "[...]or the first signal that passed all conditions[...]" be part of the description?If any of the input signals meet the condition, it will pass. It is false when there are no inputs.
Outputs the first input signal, or the first signal that passed all conditions, respecting signal order in both cases.
----------My attempt at rewording it wrote:When used as condition, it will pass if any of the input signals meet the condition. It is false when there are no inputs.
When used as output, it outputs the first input signal, or, if the conditions use Each, the first signal that passed all conditions, respecting signal order in both cases.
It is roughly the same order as within the signal picker UI, exceptions may exist. You can't influence it.jdrexler75 wrote: ↑Wed Dec 11, 2024 12:15 am The signal order has long been a question of mine, I don't think it's explained anywhere, and I haven't been able to influence it.
Re: Decider combinator weird "anything" output
I had some similar issues some weeks ago and reported a bug. Thanksfully I got an explanation from boskid how the new deciders work in 2.0:
Deciders have 2 operation modes:
- 'normal' mode:
normal mode is active when there is NO 'each' condition on input side. So only when using 'Any', 'Everything' or an individual input signal. Normal mode deciders will PASS ALL input signals if one condition becomes true. That means that also signals will pass that do not meet the condition. On output side you can still select which passed values you want to output (red wire, green wire)
- 'each' mode:
each mode is active as soon as one 'each' condition is on input side. Each mode deciders will only pass EACH signal that meets the corresponding condition.
OPs problem explained: Decider is in normal mode as only individual signal conditions are there. One condition becomes true, so ALL signals are passing to the output side. The 'Any' selector then outputs the very first signal it catches from all the passed signals. The order of the signals is equal to the order of the signals in the signal picker UI.
Solution to your problem would be the already mentioned way with a constant combinator and checking red vs. green wire signals like this:
Deciders have 2 operation modes:
- 'normal' mode:
normal mode is active when there is NO 'each' condition on input side. So only when using 'Any', 'Everything' or an individual input signal. Normal mode deciders will PASS ALL input signals if one condition becomes true. That means that also signals will pass that do not meet the condition. On output side you can still select which passed values you want to output (red wire, green wire)
- 'each' mode:
each mode is active as soon as one 'each' condition is on input side. Each mode deciders will only pass EACH signal that meets the corresponding condition.
OPs problem explained: Decider is in normal mode as only individual signal conditions are there. One condition becomes true, so ALL signals are passing to the output side. The 'Any' selector then outputs the very first signal it catches from all the passed signals. The order of the signals is equal to the order of the signals in the signal picker UI.
Solution to your problem would be the already mentioned way with a constant combinator and checking red vs. green wire signals like this:
-
- Burner Inserter
- Posts: 19
- Joined: Wed Nov 20, 2024 3:09 am
- Contact:
Re: Decider combinator weird "anything" output
Ah, thanks, feng! Now I understand why the description is the way it is. For me the description text still does not seem helpful.
With this in mind I guess the original use case could be implemented like this:
Some ideas on the "order by ID" part: I guess the corresponding field is "order" in the data.raw?
yumako-mash
order = "a[organic-processing]-c[yumako-mash]"
spoilage
order = "c[nutrients]-a[spoilage]"
Assuming the ordering is alphanumerical... but actually its my first time of looking at this data.raw and I am no modder, so this is really more of a question than a deeper insight.
With this in mind I guess the original use case could be implemented like this:
Some ideas on the "order by ID" part: I guess the corresponding field is "order" in the data.raw?
yumako-mash
order = "a[organic-processing]-c[yumako-mash]"
spoilage
order = "c[nutrients]-a[spoilage]"
Assuming the ordering is alphanumerical... but actually its my first time of looking at this data.raw and I am no modder, so this is really more of a question than a deeper insight.
Re: Decider combinator weird "anything" output
https://lua-api.factorio.com/latest/types/Order.htmlLighthouse wrote: ↑Wed Dec 11, 2024 4:04 pm I guess the corresponding field is "order" in the data.raw?