Factorio

Factorio

View Stats:
pat Jan 27 @ 3:31am
Circuit condition: total contents, regardless of what it is
Ok, I know how to set up a circuit condition such as "enable if coal < 1000", but is there a wildcard character? i.e., "enable if there are more than 1000 items in the chest". Therefore, if there are 300 iron ore, 300 copper ore and 400 coal, it's enabled.
< >
Showing 1-15 of 15 comments
zerassar Jan 27 @ 3:43am 
I don't think you can wildcard but you can do a combinator. I think that's the logic device.

Then in that set a few conditions with AND for all of them. Set the output value as desired. I use green and set it to 1.

Wire the storage to the input.
Wire whatever you're controlling to the output.

On the item you're controlling I'd then set it to check the value of green for enabled
It's the any signal, i believe its the yellow asterisk, it's in the tab with all the numbers iirc.
Fel Jan 27 @ 4:26am 
An arythmetic combinator doing "each + 0" outputing on a specific signal of your choice (but not "each) gives you the total of all of the input signals.
You wire the chest to the input and the inserter (or whatever it was that needed that total) to the output, then use the signal you used for the output for your condition.
pat Jan 27 @ 4:27am 
Originally posted by Nonotorious:
It's the any signal, i believe its the yellow asterisk, it's in the tab with all the numbers iirc.

Thanks! I'll give that a try.
Khaylain Jan 27 @ 4:47am 
Originally posted by pat:
Originally posted by Nonotorious:
It's the any signal, i believe its the yellow asterisk, it's in the tab with all the numbers iirc.

Thanks! I'll give that a try.
This will not do what you want. Try what Fel wrote instead. That should actually give you what you want AFAIK.
kangzoel Jan 27 @ 5:23am 
arithmetic combinator: each + 0, output whatever
Emmote Jan 27 @ 5:39am 
Doesn't the Red Asterisk (everything) also do this?
Last edited by Emmote; Jan 27 @ 5:39am
Originally posted by Emmote:
Doesn't the Red Asterisk (everything) also do this?

I tried the red one when sorting scrap on fulgora and it didn't work but the yellow one did. I think the difference is the red one will output literally everything in the network whereas the yellow is anything so anything>1000 will output any item signal over 1k.
Fel Jan 27 @ 7:13am 
Originally posted by Emmote:
Doesn't the Red Asterisk (everything) also do this?
Everything (red asterisk) is only used in decider combinators, requires that all of the non-zero signals meet the condition (individually but every single one) for it to be true.
As output, outputs all of the input signals as-is, regardless of if they met a condition.

Anything (green asterisk) is also only used in decider combinators, requires that at least one of the non-zero signals meet the condition (also individually and done for all of them) for it to be true.
As output, only outputs one of the the input signals (the first based on the order when you see them all, and when several of the same with different quality are present then the lowest quality is used).

Each (yellow asterisk) is used in all combinators except constant combinators (although not on all functions for the selector) and does whatever is asked (checking conditions or math) for each non-zero signal separately.
When used as output (only available in decider and arythmetic combinators if you used it as one of the signals to work with) it sends each individual signal that passed the checks, or the result for each individual math operation done.
pat Jan 27 @ 8:15am 
I didn't find a yellow asterisk. I tried the green one, but that didn't really help.

As far as the combinators go, I honestly haven't gotten into them yet and their complication starts to get beyond my interest level. And please don't tell me they're not that complicated. Everything is relative and they're simply a part of the game that I don't find interesting. I'll find another way to accomplish what I'm trying to do.
Fel Jan 27 @ 8:23am 
I already gave you a solution that works earlier, it is the thing I use every time I need something like that (adding up all of the signals into one) so I'm more than certain that it works.
https://steamcommunity.com/sharedfiles/filedetails/?id=3415787250
Khaylain Jan 27 @ 10:39am 
Originally posted by Emmote:
Doesn't the Red Asterisk (everything) also do this?
No. Neither the red asterisk or the yellow will do that. Both of those operate on each signal by themselves. One of them (don't remember which right now) requires that all signals match the condition, while the other requires that only one of the signals match the condition.
At least unless I'm misremembering wildly.
Khaylain Jan 27 @ 10:40am 
Originally posted by pat:
I didn't find a yellow asterisk. I tried the green one, but that didn't really help.

As far as the combinators go, I honestly haven't gotten into them yet and their complication starts to get beyond my interest level. And please don't tell me they're not that complicated. Everything is relative and they're simply a part of the game that I don't find interesting. I'll find another way to accomplish what I'm trying to do.


Originally posted by Khaylain:
Originally posted by pat:

Thanks! I'll give that a try.
This will not do what you want. Try what Fel wrote instead. That should actually give you what you want AFAIK.


Originally posted by Fel:
An arythmetic combinator doing "each + 0" outputing on a specific signal of your choice (but not "each) gives you the total of all of the input signals.
You wire the chest to the input and the inserter (or whatever it was that needed that total) to the output, then use the signal you used for the output for your condition.


Read!
RiO Jan 27 @ 11:26am 
Originally posted by Emmote:
Doesn't the Red Asterisk (everything) also do this?

No. When used on a decider the 'everything' signal checks whether the condition holds for all present (i.e. non-zero) signals. It does not pre-aggregate the signals for one check.

The use of 'everything' and 'anything' signals with decider combinators, maps logically to the universal and existential quantification from predicate logic. 'everything' maps to 'for all' aka ∀, and 'anything' maps to 'for some' (or 'there exists some') aka ∃.

(∀x: x > 0) : "for all x, it holds that x is greater than 0"
(∃x: x > 0) : "there exists some x, for which it holds that x is greater than 0."

The use of 'each' with decider combinators, meanwhile, is a vectorization: for each signal it runs the decider's tests separately and produces separate output, which is then aggregated back together. (In a way, it turns the decider into a map-reduce fold operation executed over a set of signals.)
Last edited by RiO; Jan 27 @ 11:36am
Defektiv Jan 30 @ 12:54pm 
I achieved this on my space platforms for keeping the belts moving by using a decider combinator for each item on the belt, and setting the condition for each one there (if asteroid > 50 or whatever). Then I run the outputs into a constant combinator and that hooks up to the inserter, assembler or whatever. In my case its the inserter to dump contents into space so if any of the items gets outside their set condition the inserter filter gets updated with that item and it pulls it off the belt until the condition is met again. It's not exactly the same as a condition for total items but it works like it.
< >
Showing 1-15 of 15 comments
Per page: 1530 50

Date Posted: Jan 27 @ 3:31am
Posts: 15