In other languages: Čeština Deutsch Français 日本語 Polski Русский Українська 简体中文

Decider combinator: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
Jaegen (talk | contribs)
m Typo
History: 2.0.67 wire connection point offset
 
(11 intermediate revisions by 9 users not shown)
Line 2: Line 2:
{{:Infobox:Decider combinator}}
{{:Infobox:Decider combinator}}


The Decider combinator is part of the circuit network and one of three types of combinators available in the game (with the other two being the [[constant combinator]] and [[arithmetic combinator]]). It is used to make comparisons of signals on the network. Signals can be compared using the following:
The '''decider combinator''' is part of the circuit network and one of four types of combinators available in the game (with the other three being the [[constant combinator]], [[arithmetic combinator]], and [[selector combinator]]). It is used to make comparisons of signals on the network.


[[File:decider_combinator_anim.png]]
[[File:Decider_combinator_gui.png|400px]]
 
*"is greater than" (<span style="color:#00FF00">></span>)
*"is less than" (<span style="color:#00FF00"><</span>)
*"greater than or equal to" (<span style="color:#00FF00">>=</span>)
*"less than or equal to" (<span style="color:#00FF00"><=</span>)
*"is equal to" (<span style="color:#00FF00">=</span>)
*"is not equal to" (<span style="color:#00FF00">!=</span>)
 
As shown in the picture below showing the GUI, the signal on the left is being compared to that of the right.
 
[[File:decider_combinator_gui.png|350px|GUI of the decider combinator.]]


== Function ==
== Function ==
The internal logic process has three steps:
The decider combinator allows specifying a list of conditions on the left side of the GUI and a list of outputs on the right side of the GUI. Generally whenever the conditions are satisfied the outputs are activated.


# Values for each individual input signal(s) (items of the same name) on the red and green wires are summed within the combinator.
A condition consists of a "first" input signal, a comparison (>, <, =, >=, <=, !=), and a "second" input signal or constant. Additionally, for each input signal the input wires to read the signal from can be specified. If both red and green are checked, the input values are summed.
# The decider combinator GUI specifies a "first" input signal, a comparison (>, <, =, >=, <=, !=), and a "second" input signal or constant.
# If the comparison returns true, the output is one or more signals with a value of 1 or the unchanged input value(s), or a single signal carrying either a sum of input signals or the number of passed tests. ([[#output_table|see table below]])


The decider combinator can handle [[Circuit network#Logic signals|logic signals]].
If more than one condition is added, it is possible to change the connection of those using the logical operators AND and OR. An AND condition will result in true if all terms are true. An OR condition will return true if at least one of the terms is true.


Further notes:
Each output has the option to specify a constant value, or to take the input count from specified wires. If both red and green are checked, the input values are summed.


* Using the Everything output with "Input count" will pass all non-zero input values to the output as long as the condition is true. Using the Everything output with "1" will output 1 ONLY for all non-zero inputs.
The decider combinator can handle [[Circuit network#Logic signals|logic signals]]. <span id="output table"></span>The following table shows how different combinations of logic signals can be used:
* The Each input will re-apply the comparison for each input signal individually, and will pass the selected output for each input that passes the conditional.
* The Everything input functions as a logical AND, and will return true only if ALL non-zero inputs pass the conditional, and returns true if there are no inputs at all (so "everything ≠ 0" always passes).
* The Anything input functions as a logical OR, and will return true if ANY non-zero input passes the conditional, and returns false if there are no inputs at all (so "anything = 0" always fails). If used for output, Anything will return one of the signals that matched.
* When "Input Count" is selected the output will match the input for the selected signal if the first parameter is not Each. If the first parameter is Each then "Input Count" refers to the value of the input signal that is currently being iterated, so the result will be the sum of all inputs if the output signal is not Each. If the output signal is also Each then every input signal that passes the test is simply forwarded while those that fail the test are discarded.
 
<span id="output table"></span>The following table shows how different combinations of the first input parameter and the output can be used.


{| class="wikitable" style="text-align: center"
{| class="wikitable" style="text-align: center"
|+Different output results when the test passes
|+Different output results when the conditions pass
|-
! ↓Output&nbsp;&nbsp;Input→ !! <span style="color:#FFFF99">Each</span> !! <span style="color:#99FF99">Anything</span>, <span style="color:#FF6666">Everything</span>, or a specific signal
|-
!style="text-align: left"| <span style="color:#FF6666">Everything</span>: 1
|rowspan="2"| - || every input signal is forwarded but set to 1
|-
|-
!style="text-align: left"| <span style="color:#FF6666">Everything</span>: Input count
! align=right | Input&nbsp;→
| every input signal is forwarded
!! rowspan=2 | No <span style="color:#FFFF99">Each</span> condition
!! rowspan=2 | <span style="color:#FFFF99">Each</span> condition present
|-
|-
!style="text-align: left"| Specific signal: 1
! align=left | ↓&nbsp;Output
| number of input signals<sup>†</sup> || the specific signal with value 1
|-
|-
!style="text-align: left"| Specific signal: Input count
!style="text-align: left"| <span style="color:#FF6666">Everything</span>
| sum of inputs<sup>†</sup> || the specific signal is forwarded
| Evaluated on every signal that has a non-zero sum on the selected wires<sup>†</sup>
| -
|-
|-
!style="text-align: left"| <span style="color:#FFFF99">Each</span>: 1
!style="text-align: left"| <span style="color:#99FF99">Anything</span>
| each input signal<sup>†</sup> is forwarded but set to 1 ||rowspan="2"| -
| Evaluated on one signal that has a non-zero sum on the selected wires<sup>†</sup>
| Evaluated on one signal that passes the <span style="color:#FFFF99">Each</span> conditions
|-
|-
!style="text-align: left"| <span style="color:#FFFF99">Each</span>: Input count
!style="text-align: left"| <span style="color:#FFFF99">Each</span>
| each input signal<sup></sup> is forwarded
| -
| Evaluated on <span style="color:#FFFF99">Each</span> passing signal
|-
|-
!style="text-align: left"| <span style="color:#99FF99">Anything</span>: 1
!style="text-align: left"| Specific signal
|rowspan="2"| - || one input signal<sup>†</sup> is forwarded but set to 1
| Evaluated on the specified signal
|-
| Evaluated on <span style="color:#FFFF99">Each</span> passing signal, but the results are output on the specified signal instead
!style="text-align: left"| <span style="color:#99FF99">Anything</span>: Input count
| one input signal<sup>†</sup> is forwarded
|-
|-
|}
|}


signals that passed the test only
<sup></sup> wires can be selected even if a constant value is specified


With both the arithmetic and decider combinator, there is one tick (60th of a second) of latency before the output signal is ready to be used as an input into a circuit network.
With both the arithmetic and decider combinator, there is one tick (60th of a second) of latency before the output signal is ready to be used as an input into a circuit network.


== History ==
== History ==
{{history|2.0.67|
* Fixed combinator's red and green wires would overlap when built vertically.}}
{{history|2.0.36|
* Decider combinator output constant can be changed.
}}
{{history|2.0.7|
* Received a UI overhaul.
** Now displays input signals when configuring combinators.
** Signals used by combinators can now be filtered between red, green, or both.
** Multiple and/or operations can be performed in a single decider combinator.
}}
{{history|1.1.13|
{{history|1.1.13|
* Decider combinator can output an Anything signal, which returns exactly one matching signal.}}
* Decider combinator can output an Anything signal, which returns exactly one matching signal.}}
Line 82: Line 73:
* Combinators show input and output in alt mode.
* Combinators show input and output in alt mode.
* More virtual signals for combinators.
* More virtual signals for combinators.
* Constant combinator can be rotated.
* Decider combinator "input count" option makes the combinator copy the count of the specified output signal from the input signals, instead of copying the count from the condition.
* Decider combinator "input count" option makes the combinator copy the count of the specified output signal from the input signals, instead of copying the count from the condition.
* New combinator graphics. }}
* New combinator graphics. }}
Line 95: Line 85:
* Introduced}}
* Introduced}}


== See Also ==
== See also ==
* [[Arithmetic combinator]]
* [[Constant combinator]]
* [[Tutorial:Combinator tutorial|Combinator tutorial]] (description of combinator logic gates)
* [[Circuit network]]
* [[Circuit network]]
* [[Combinators]]
** [[Arithmetic combinator]]
** [[Constant combinator]]
** [[Selector combinator]]
* [[Tutorial:Combinator tutorial|Combinator tutorial]]
* [[Tutorial:Circuit network cookbook|Circuit network cookbook]]
* [[Tutorial:Circuit network cookbook|Circuit network cookbook]]


{{LogisticsNav}}
{{LogisticsNav}}
{{C|Circuit network}}
{{C|Circuit network}}

Latest revision as of 04:13, 8 October 2025

Decider combinator

Recipe

0.5
+
5
+
5
1

Total raw

8
+
10
+
5

Map color

Health

150
195 240
285 375

Stack size

50

Rocket capacity

50 (1 stack)

Energy consumption

1 kw (electric)

Mining time

0.1

Prototype type

decider-combinator

Internal name

decider-combinator

Required technologies

Produced by

Consumed by

The decider combinator is part of the circuit network and one of four types of combinators available in the game (with the other three being the constant combinator, arithmetic combinator, and selector combinator). It is used to make comparisons of signals on the network.

Function

The decider combinator allows specifying a list of conditions on the left side of the GUI and a list of outputs on the right side of the GUI. Generally whenever the conditions are satisfied the outputs are activated.

A condition consists of a "first" input signal, a comparison (>, <, =, >=, <=, !=), and a "second" input signal or constant. Additionally, for each input signal the input wires to read the signal from can be specified. If both red and green are checked, the input values are summed.

If more than one condition is added, it is possible to change the connection of those using the logical operators AND and OR. An AND condition will result in true if all terms are true. An OR condition will return true if at least one of the terms is true.

Each output has the option to specify a constant value, or to take the input count from specified wires. If both red and green are checked, the input values are summed.

The decider combinator can handle logic signals. The following table shows how different combinations of logic signals can be used:

Different output results when the conditions pass
Input → No Each condition Each condition present
↓ Output
Everything Evaluated on every signal that has a non-zero sum on the selected wires -
Anything Evaluated on one signal that has a non-zero sum on the selected wires Evaluated on one signal that passes the Each conditions
Each - Evaluated on Each passing signal
Specific signal Evaluated on the specified signal Evaluated on Each passing signal, but the results are output on the specified signal instead

wires can be selected even if a constant value is specified

With both the arithmetic and decider combinator, there is one tick (60th of a second) of latency before the output signal is ready to be used as an input into a circuit network.

History

  • 2.0.67:
    • Fixed combinator's red and green wires would overlap when built vertically.
  • 2.0.36:
    • Decider combinator output constant can be changed.
  • 2.0.7:
    • Received a UI overhaul.
      • Now displays input signals when configuring combinators.
      • Signals used by combinators can now be filtered between red, green, or both.
      • Multiple and/or operations can be performed in a single decider combinator.
  • 1.1.13:
    • Decider combinator can output an Anything signal, which returns exactly one matching signal.
  • 0.15.0:
    • Added additional operators to the Decider Combinator and Circuit Conditions.
  • 0.13.0:
    • Connected wires are highlighted when hovering over a combinator connected to the circuit network.
    • Combinators show input and output in alt mode.
    • More virtual signals for combinators.
    • Decider combinator "input count" option makes the combinator copy the count of the specified output signal from the input signals, instead of copying the count from the condition.
    • New combinator graphics.
  • 0.12.5:
    • Combinators now emit light.
  • 0.12.2:
    • Combinators no longer turn off when no wires are connected.

See also