Hello i have a question
Is there a way to dynamically add priority to a signal?
for example i have a constant combinator with 5 different types of signals example in the image
So signals have different values, but some of them got same signal value
How can i add priority to a signal which for example will be constant combinator, but after fulffiling that signal ( in this case if that item will be built ) and signal will dissapear how to dynamically pass priority to a next one which will be chosen from priority list?
Is that even possible to do? Without building few dozens of combinators?
Prioritizing signals?
Re: Prioritizing signals?
Could the selector combinator help?
https://wiki.factorio.com/Selector_combinator
You can use it to pick:
https://wiki.factorio.com/Selector_combinator
You can use it to pick:
- Highest-numbered signal
- Lowest-numbered (non-zero) signal
- Signal at a given index (0, 1, 2, 3...)
- A random signal from among those present
Re: Prioritizing signals?
issue with selector combinator is, if you have values like 19 20 it will choose the one which is highest, so if
item 1 = 20
item 2 = 19
and priority set by selector is item 1 if it reach 18 it will jump to item 2 and that's not my goal here. Also setting amount of time to a random signal is not the goal here
item 1 = 20
item 2 = 19
and priority set by selector is item 1 if it reach 18 it will jump to item 2 and that's not my goal here. Also setting amount of time to a random signal is not the goal here
Re: Prioritizing signals?
OK, if I'm understanding right, what you're looking for is:
- You have a set of items to produce: 100 yellow belts, 200 inserters, 50 gears, etc.
- You want to pick one to produce until demand is satisfied.
- Even if demand drops below other signals (e.g. 200 inserters falls to 99 inserters), you don't want to change recipes until demand is fully satisfied and the signal drops to 0.
- When the signal drops to 0, you want to pick a new signal to produce.
Re: Prioritizing signals?
thank you for joining discussion, i'm not suree if i cannot gather all things into one, or it's just not possible to achieve
still with latch i would need to set the priority for signal for disabling constant flickering. Anyway i will move to fCPU i think
still with latch i would need to set the priority for signal for disabling constant flickering. Anyway i will move to fCPU i think
Re: Prioritizing signals?
You can do this with 3-4 combinators (depending on whether you just need the highest priority signal, or if you also need to keep the correct count with that signal)
I'll assume your input signal is on green.
I'll assume your input signal is on green.
- Create a constant combinator with the priority of all items.
- Replace the numbers on the input signal with the priorities.
- Connect a decider combinator to both your signal (green) and the constant combinator (red).
- The decider should do: if each (green) > 0 AND each (red) > 0, output each input count (red).
- Select the highest priority signal: A selector combinator that selects the largest number does this.
- You now have selected the highest-priority item. If you need the original count to accompany that signal, one more decider combinator can put the count back (using: if each red > 0, output each green).
Re: Prioritizing signals?
The circuit network is Turing complete; as long as it can be calculated/programmed somehow, the circuit network can do so as well.wilk85 wrote: Wed Dec 31, 2025 5:13 pm thank you for joining discussion, i'm not suree if i cannot gather all things into one, or it's just not possible to achieve
That theoretical view is quite impractical, so here's something more concrete: I'll give some combinator counts to the steps outlined by Kyralessa
That's once constant combinator and maybe an arithmetic one to calculate "want = target - have".Kyralessa wrote: Wed Dec 31, 2025 2:22 pm
- You have a set of items to produce: 100 yellow belts, 200 inserters, 50 gears, etc.
As was already mentioned this could be a selector for picking the highest "want" signal. But you could instead use more complex logic if you wish.
- You want to pick one to produce until demand is satisfied.
The important part. You must latch either the input or output of the selection from the last step. You can do that with e.g. two deciders. Not latching results in the flickering you mentioned.
- Even if demand drops below other signals (e.g. 200 inserters falls to 99 inserters), you don't want to change recipes until demand is fully satisfied and the signal drops to 0.
That's resetting the latch, probably just one decider for detecting you're done and wiring that to the reset input of the latch.
- When the signal drops to 0, you want to pick a new signal to produce.

