Examples - Circuitry Wiki

Examples

This is a collection of examples of how you can use circuitry for basic things.

Displaying items in a storage container

This example is the most used one, in one form or another - people want to be able to see the amount of items in their containers. We'll start by placing down a container and a sign next to it.
We will be using storage box for this example, but any inventory works, even player's.
Now we need a gate that can count items in our inventory. This gate is called "Break Inventory", let's place it down.
Connect the container/inventory output to the gate. In the gate's outputs we can see an output called "Item Count (All stacks)"
Now we can connect our item count through "To String" gate to the sign, and we're done!
Now the sign will display the amount of items in the container.


Here's a video version of this example:
Warning
Video version uses advanced signs
If you're unfamiliar with their functionality, please refer to this page: [CLICK HERE]

Automatically flushing fluid tank

You can automatically flush a tank when it gets filled up.
Let's place down everything we need:
  • Fluid tank
  • "Equals" gate (either number version, or the universal version)
  • "Ceil (Round Up)" gate

Now grab fluid tank's "Fluid Stored" output and connect it to "Ceil (Round Up)" gate.
But why do we need that? Because due to some funky fluid mechanincs, the fluid tank is never actually "full". It gets stuck at ~399.4321 out of 400, which will break our circuit.
If you open the tank's interface it will display as "400" - that's the same thing that our "Ceil" gate will do, round it up to 400.
Now grab "Ceil"'s output and connect it to input A of "Equals" gate, then grab "Capacity" output of fluid tank and connect it to input B
All that's left is to connect output of "Equals" gate to the tank's "Flush tank" input.
That's it, now when you try filling up the tank, it will automatically flush when it's full.

More examples

You can check what people made in our discord server!
But on the wiki that's all we have for now!

You might be interested in