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

Decider combinator: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
Added notes about Each, Anything, Everything specials
Mefisto1029 (talk | contribs)
 
(51 intermediate revisions by 25 users not shown)
Line 1: Line 1:
{{Languages}}
{{Languages}}
{{Logic
{{:Infobox:Decider combinator}}
|health      =50
 
|energy      =2 kw electric
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.
|cps          =60
 
|input       =Time, 0.5 + Copper cable, 5 + Electronic Circuit, 5
== Function ==
|raw          =Time, 8 + Iron Plate, 5 + Copper Plate, 10
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.
|technologies =Circuit network
 
|producers    =Manual + Assembling machine 1 + Assembling machine 2 + Assembling machine 3
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.


[[File:DeciderSprite.png]]
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 {{PAGENAME}} is part of the circuit network and one of three types of combinators available in the game. It is used to make comparisons of signals on the network. Signals can be compared using "is greater than" (>), "is less than" (<) or "is equal to" (=).
{| class="wikitable" style="text-align: center"
Input contacts are to the left in the above picture, outputs on the right.
|+Different output results when the conditions pass
|-
! align=right | Input&nbsp;→
!! rowspan=2 | No <span style="color:#FFFF99">Each</span> condition
!! rowspan=2 | <span style="color:#FFFF99">Each</span> condition present
|-
! align=left | ↓&nbsp;Output
|-
!style="text-align: left"| <span style="color:#FF6666">Everything</span>
| Evaluated on every signal that has a non-zero sum on the selected wires<sup>†</sup>
| -
|-
!style="text-align: left"| <span style="color:#99FF99">Anything</span>
| 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>
| -
| Evaluated on <span style="color:#FFFF99">Each</span> passing signal
|-
!style="text-align: left"| Specific signal
| 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
|-
|}


== Function ==
<sup>†</sup> wires can be selected even if a constant value is specified
The internal logic process has three steps:


1) Values for each individual input signal(s) (items of the same name) on the red and green wires are summed within the combinator.
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.


2) The Decider combinator GUI specifies a "first" input signal, a comparison (>, <, =), and a "second" input signal or constant.
== History ==
{{history|2.0.36|
* Decider combinator output constant can be changed.
}}


3) If the comparison returns true, the output is a new signal (any name) with either the same value as "first" input signal, or 1.
{{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.
}}


4) Using the Everything output with input -> output will pass all nonzero 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.
{{history|1.1.13|
* Decider combinator can output an Anything signal, which returns exactly one matching signal.}}


5) 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.
{{history|0.15.0|
* Added additional operators to the Decider Combinator and Circuit Conditions.}}


6) The Everything input functions as a logical AND, and will return true only if ALL non-zero inputs pass the conditional.
{{history|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. }}


7) The Anything input functions as a logical OR, and will return true if ANY non-zero input passes the conditional.
{{history|0.12.5|
* Combinators now emit light.}}


The decider combinator can handle [[Virtual signals#Logic signals|special signals]].
{{history|0.12.2|
* Combinators no longer turn off when no wires are connected.}}


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|0.12.0|
* Introduced}}


== See Also ==
== See also ==
* [[Arithmetic combinator]]
* [[Constant Combinator]]
* [[Combinator Tutorial]]
* [[Circuit network]]
* [[Circuit network]]
* [[Combinators]]
** [[Arithmetic combinator]]
** [[Constant combinator]]
** [[Selector combinator]]
* [[Tutorial:Combinator tutorial|Combinator tutorial]]
* [[Tutorial:Circuit network cookbook|Circuit network cookbook]]
{{LogisticsNav}}
{{C|Circuit network}}

Latest revision as of 09:00, 29 May 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.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