Colored gauge with small combinator footprint
Posted: Mon Sep 12, 2022 4:41 pm
Here is my version of a red/yellow/green colored gauge to visualize something like steam level or accumulator charge.
I only found gauges with huge amounts of combinators, so I tried to make one with less. Part of the logic works by exploiting the hardcoded Factorio color priority.
In the arithmetic combinator, set the input signal. For the picture below, that would be A for accumulator charge. In the blueprint it is steam .
And in the constant combinator set the scale with signal S. Set it to the maximum expected value divided by 10, that would be 100/10 = 10 for accumulator charge or 25000/10 = 2500 for a steam storage tank.
An additional feature is the overflow color: If the maximum amount is exceeded, the color of the whole gauge changes to the overflow color defined in the constant combinator. In the blueprint, it is cyan. If you don't define any, the gauge becomes white, and another interesting overflow color is magenta. You cannot use blue, because this will overwrite the yellow part.
I only found gauges with huge amounts of combinators, so I tried to make one with less. Part of the logic works by exploiting the hardcoded Factorio color priority.
In the arithmetic combinator, set the input signal. For the picture below, that would be A for accumulator charge. In the blueprint it is steam .
And in the constant combinator set the scale with signal S. Set it to the maximum expected value divided by 10, that would be 100/10 = 10 for accumulator charge or 25000/10 = 2500 for a steam storage tank.
An additional feature is the overflow color: If the maximum amount is exceeded, the color of the whole gauge changes to the overflow color defined in the constant combinator. In the blueprint, it is cyan. If you don't define any, the gauge becomes white, and another interesting overflow color is magenta. You cannot use blue, because this will overwrite the yellow part.