Need help with a circuit using an item priority list

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
RJ5436
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Jul 03, 2026 6:26 am
Contact:

Need help with a circuit using an item priority list

Post by RJ5436 »

What I'm trying to do:

Have a single assembly machine craft recipes based on 2 variables: A list of end products that are low, and: the set priority of said products. I want to prioritize items to be crafted in a certain order, fulfilling their desired quantity before moving on to the next recipe.


I have 2 constant combinators. 1 of them is my list of desired quantities of end products, multiplied by negative 1. I have that wired up to a decider combinator which compares that value with the actual inventory stockpile and outputs 1 of each item that is low.

The other combinator is the priority list of the desired items, numbered 1 through however many items there are - 1 being the highest priority. How do I pass the priority order through to a selector combinator, but only of the items that are low?
Nidan
Filter Inserter
Filter Inserter
Posts: 379
Joined: Sat Nov 21, 2015 1:40 am
Contact:

Re: Need help with a circuit using an item priority list

Post by Nidan »

RJ5436 wrote: Sat Jul 04, 2026 2:26 am How do I pass the priority order through to a selector combinator, but only of the items that are low?
Split it into smaller tasks you can manage individually.
First, figure out which items are low, which you've already solved.
Second, filter the list of priorities with the output from step one. Since 2.0 you only need one decider for this; in your case, since the output of step one for each item is either 1 or 0/nothing, an arithmetic combinator works as well.
124776 has a solution.

Third, now that you have the items with their priorities, select the lowest. That's a selector combinator.
Post Reply

Return to “Gameplay Help”