In Factorio Space Age building Space Ships is a core part of the game. Gathering space rocks to process into raw materials is the most fundamental part of ship building. But how do you stop your ship filling up with just one type of space rock chunk?

The solution involves a Space Age feature of reading belt contents.

Hook ups

I design my ships typically with one big belt for all collectors to deposit their Asteroid chunks onto with no splits or other joins. This is because reading the belt contents only works for a single continuous belt sector. I could use circuits to sum up multiple sections but after a while this design constraint just becomes habit and you remove items with filtered inserters rather than splitters.

💡
I use the mod Circuit Visualizer to make it easier to see which circuit nodes hook up to what.

The first step on our journey, assuming we've placed collectors and have them outputting onto a belt, is to connect a single segment of belt to the input of a Decider combinator. Red or green doesn't matter, just be consistent (I used red here). Set the belt to Read belt contents - Hold (all belts) and this will provide the contents of that belt as an output to the circuit network to be used for conditional logic.

Constant combinators hooked up to green input of Decider

In order to tell the Decider how many chunks of each type we want I used a Constant combinator. This Constant was hooked up to the Deciders green input.

Constant combinator. How many? Of what chunk type?

Next we want to configure the Decider combinator to compare the number of chunks on the belt vs the number of chunks we'd like on the belt.

The decider decides which output signals are sent to the Asteroid collectors

Now we can evaluate RED vs GREEN like so: IF RED INPUT (chunks on belt) IS < GREEN INPUT (chunks we want) THEN OUTPUT CHUNK TYPE. We can do this using the EACH operator represented by the yellow icon with 3 lines.

The Decider will only output a chunk signal if the conditional is TRUE for EACH chunk type.

The green wire connects all Asteroid collectors together.

Next, hook up the output of the Decider to all Asteroid collectors at once. The configure each collector with SET FILTERS to allow the circuit network to control them.

Notice that the collector is disabled because all requested chunks are present on the belts

And there we have it. Each Asteroid collector will now only collect the chunk types required to fulfil the conditional logic