#Change Inserter Filter based on number of items in chest

1 messages · Page 1 of 1 (latest)

left bloom
#

Hoping I'm making this clear - is it possible to use combinators or some other mechanism to toggle the activation of an inserter pulling items from a chest or belt dynamically based on the contents of another chest/belt/building?

IE inserter will pull copper ore from a belt if its less than 500 in a chest, and if iron on the same belt drops below 500 it will switch to moving iron ore.

fallow fiber
#

Yes, what have you tried? Should just need two decider combinators I think

jovial charm
#

or one if you're clever

left bloom
jovial charm
#

can do something like
chest -> selector(min) -> decider each < 500 -> each(1) -> inserter

left bloom
#

I was able to get it to work like this:

jovial charm
#

oh, 50, not 500

left bloom
#

Wired the chest to the input on the comb, the output to the inserter, and then the inserter set to enable if anything =1

#

this was just a test

jovial charm
#

what you've shown will set the filters for iron and copper if either are below 50

left bloom
#

increasing the quantity it stopped working

#

it will fill all of one till the other reaches 250

#

breaking it back out to 2 deciders resulted in filling the chest to 250 of each kind.

left bloom
jovial charm
#

what exactly do you want it to do?
just fill iron and copper up to the desired amount?
or to try and fill the lower value first until ful, then others?
or to just always work on the lowest?

jovial charm
left bloom
#

I want the inserter to dynamically see what item from a list of many are missing from a chest, enable itself to fill only that item from a mixed belt to a set amount, and then disable until any one of that item gets to a certain minimum threshold

jovial charm
#

so you want a latch, and to lock out any other item types until it's done?

#

are all the high and low values the same?

left bloom
#

I essentially want what a requestor chest does - set a stack of items to whatever defined values until it reaches that value then stops requesting more

#

except I want the inserter to do the actual pulling from a belt to place into the chest, only when that item is low enough in the chest.

jovial charm
#

will there be more than 5 item types?

left bloom
#

no

jovial charm
#

ah, easy

left bloom
#

hopefully not

#

i have spent a not insignificant amount of time on this

jovial charm
#

in a constant combinator put in how many of each item you want
iron ore(50), copper ore(50), green chip(1250), steel plate(400)
wire it to a decider on green
wire the chest to the same decider on red
(R)each < (G)each -> each(1)
wire the decider output to the inserter

left bloom
#

(R)each < (G)each -> each(1)

Can you model this? Maybe i'm not understanding what you mean

#

aaah, the chest and constant need to be different color wires

jovial charm
#

yes

left bloom
#

okay it is working exactly as expected.

jovial charm
#

wire colours are a useful 2.0 feature

#

there are ways to make it work for >5 item types
and to do exact fill
and pretty much whatever else you'd want it to do, ie latching

left bloom
#

the exact fill would be useful

#

but in my specific usecase i don't think it matters

#

i'm not using stackers

jovial charm
#

to do exact fill it'd need to either set the hand size to the smallest filter available, or to read the belt and choose the item based off that

#

i normally read the belt (normally a chest in my case, chest -> train)

left bloom
#

that's very interesting

#

would it require an additional combinator to control the stacksize?

jovial charm
#

normally
source has (each)item AND destination needs (each)item -> anything(how much is wanted) will select one signal that is available to be moved
then a second decider each > 0 -> each(1),stackcount to set the filter (each(1)) and hand size (stackcount)