Simple way to prevent asteroid collector from overfilling
Posted: Fri Nov 01, 2024 7:27 am
You probably have noticed that space is filled with lots of asteroids, way much more than what you can consume with your spaceship x).
This often leads to throwing asteroid overboard, but when doing this it means asteroid collector was inefficient in its grabbing. This is particularly painful in late game when you want to grab promethium chunk as fast as you can and you don't want your collectors to grab some ice or iron which you have wayyyyyy too much of.
Another thing that lead me to this build was the observation that asteroid grabbers have quite the inventory space, particularly as their quality increases.
I then decided to make it so that asteroid collector would fill in from every ore, but not overfill, and would leave room to collect the most precious ones at all time :
This works using overflow, the constant combinator holds value for the 3 common chunks that are just 5 under the largest number possible to represent with circuits. This can be obtained in game easily by writing 2^31-X as value for the different signals. ( with X = 5 in the example )
The asteroid collector is set to "read content" and "set filter", but it won't set filter based on its own content if you do not forward the signal with an arithmetic combinator.
The content of the collector and the very large value in the constant are summed, and then those sums are used to "set filter".
This means when the collector has more than X of a asteroid chunks, the sum 2^31-X+[current count] will overflow and instead of being a large number it will be a negative number, which will disable the filter.
This means with only 1 arithmetic combinator and 1 constant combinator per asteroid collector, you can have a nice inventory filter to limit intake.
Now you could refine it to make it even more efficient and only use a single constant combinator in the whole ship for all collector, and only a single arithmetic per asteroid collector. But that require more wiring and is left as an exercice for the reader
It works well with an inserter that output onto a wired belt which read & hold the value for all belts which can use the same trick to limit the number of asteroid chunks on it.
This often leads to throwing asteroid overboard, but when doing this it means asteroid collector was inefficient in its grabbing. This is particularly painful in late game when you want to grab promethium chunk as fast as you can and you don't want your collectors to grab some ice or iron which you have wayyyyyy too much of.
Another thing that lead me to this build was the observation that asteroid grabbers have quite the inventory space, particularly as their quality increases.
I then decided to make it so that asteroid collector would fill in from every ore, but not overfill, and would leave room to collect the most precious ones at all time :
This works using overflow, the constant combinator holds value for the 3 common chunks that are just 5 under the largest number possible to represent with circuits. This can be obtained in game easily by writing 2^31-X as value for the different signals. ( with X = 5 in the example )
The asteroid collector is set to "read content" and "set filter", but it won't set filter based on its own content if you do not forward the signal with an arithmetic combinator.
The content of the collector and the very large value in the constant are summed, and then those sums are used to "set filter".
This means when the collector has more than X of a asteroid chunks, the sum 2^31-X+[current count] will overflow and instead of being a large number it will be a negative number, which will disable the filter.
This means with only 1 arithmetic combinator and 1 constant combinator per asteroid collector, you can have a nice inventory filter to limit intake.
Now you could refine it to make it even more efficient and only use a single constant combinator in the whole ship for all collector, and only a single arithmetic per asteroid collector. But that require more wiring and is left as an exercice for the reader
It works well with an inserter that output onto a wired belt which read & hold the value for all belts which can use the same trick to limit the number of asteroid chunks on it.