Selector Combinator (Factorio 2.0 preview) deprecated


Adds a combinator that can select from the input sorted by largest/smallest, count inputs, output a random input, and calculate the stack size.

Utilities
1 year, 16 days ago
1.1
1.04K
Circuit network
Owner:
Pigophone
Source:
N/A
Homepage:
N/A
License:
MIT
Created:
1 year, 17 days ago
Latest Version:
0.2.1 (1 year, 16 days ago)
Factorio version:
1.1
Downloaded by:
1.04K users

note - i think this has a bunch of bugs and at the moment I don't have time to fix them. marking as deprecated.

Selector Combinator

Friday Facts #384 debuted a new combinator, the Selector combinator.

This mod implements that combinator, minus the rocket and quality parts.

Features

  • Select Input: Take the input signals, sort them by value descending or ascending, then output the signal at the specified index. You can use a red wire to control which input should be taken from the green wire.

  • Count Inputs: Take the count of input signals and output it.

  • Random Input: At a specified interval of seconds or ticks, a random signal from the input will be chosen and outputted.

  • Stack Size: For each input signal, output the stack size.

Example usages

  • Count Input/Select Input: Cycle through inputs every second

Wire up a box to a combinator in Count Input mode, output count to a combinator multiplying it by 60, output that to a clock which resets on that count, then divide the clock by 60 and wire that to a Select Input combinator. Finally, wire its output to a filter inserter set to filter on the input. It'll pick out items from the box, cycling through each input one a second.

Another way of doing this is with the random mode:

  • Random Input

Limitations

Hovering over the combinator will only show the input signals, not the outputs. You'll have to connect it to a power pole to see the outputs.

The combinator runs code on every tick. Will this blow up your UPS? Probably!

Credits

Some code modified from Cybersyn and Editor Extensions, both of which are licensed under MIT.