Counter craft.png
Counter unlock.png
Counter.png
Counter wiring ui.png

Counter painted with Yellow 1/Spring Green 1

Basic Information[edit | edit source]

The Counter is a logic gate that can be wired in between activation devices (for example Number Pads, Industrial Number Pads, Sensors, Switches or Pressure Plates) or other logic gates (including Inverter Gates, Flip-Flop Gates, Delay Gates and/or Number Comparison Gates) and other logic gates or activatable wireable objects, for example doors, trapdoors, wicket gates, block phasers, loot spawners, mob spawners, lamps, beacons or fans. As its name implies, it can be used to keep a count of things/events.

Counters start with a count of 0, and add or subract values from the count that they receive on their "Add" or "Subtract" inputs. They send this count as their output. They can be reset to 0 via a separate "Reset" input.

How to obtain this Gate[edit | edit source]

Counters can be crafted in your Crafting Menu, but only after their crafting recipe has been unlocked for free in your Crafting Menu (that can be opened by typing "q" as the default key).

These gates cannot be obtained from any Creatures or randomly spawning Treasure Chests. They can be bought as part of building kits for customizable Blueprints for QBits. Please note that none of these purchases will unlock the crafting recipe in the Crafting Menu.

Unlocking the crafting recipe[edit | edit source]

To unlock the crafting recipe for Counters for free in your Crafting Menu (to be opened by "q" as the default key), you'll need to craft or obtain:

How to craft[edit | edit source]

To craft 8 Counters at a time in your Crafting Menu, you'll need:

How to use[edit | edit source]

General usage[edit | edit source]

To use a Counter, it must be placed into the game world and wired to activation devices (or other gates) and one or more receiving wireable object/s like other gates, arc signs, doors, wicket gates, trap doors, lamps, beacons, arc signs or machines.

You can fully rotate Counters into all directions by pointing your cursor at them, then pressing and holding R (as the default key) and then moving the mouse while holding down the left mouse button. The chosen rotation angle can be "locked" too by simply typing "r" while looking at an already rotated item, so that all items of the same stack in the chosen quickslot will then face the same direction when being placed.

Like most other placeable items, Counters can be painted, with the primary color influencing the color of the board, and the secondary color influencing the four posts attached to the board. They can also be put into displays, where they will be shown at a reduced size.

Counters can be picked up without the need to equip any Power Cells if you match or outrank the permission level of the gate that has been defined by its owner. Of course you won't be able to pick up such objects on game worlds, on player claims or in Adventures where your Permission rank is not sufficient (mainly when you are merely a visitor), which can only be changed by the owner of the game world, the respective claim owner or Adventure creator.

How to wire[edit | edit source]

To wire Counters, equip an Wiring Tool and point your cursor at the Counters that you have placed into the world. Their "Receive" Connectors will become visible then and you will be able to connect them to the "Send" Connector of activation devices and/or of other logic gates. Also wire their "Send" Connector to the "Receive" connector of another wireable device, e.g. another logic gate or an activatable object like a door or lamp. Wiring Output Hotspot Focused.png Wiring Input Hotspot Focused.png

Type "n" (as the default key) to inspect the wiring window of the Counters if you wish to type a code word into the receiving array that you should then also use in the sending array of the activation device/s to connect them or use non-default trigger settings.

  • A Counter has three input fields: "Add", "Subtract" and "Reset", and one output field. It keeps an internal count (starting at 0), and sends this count as the output every time it receives any input event (even if the count itself does not change).
    • The "Add" field takes the value of its input event and adds it to the count. A "true" value is treated as 1 and a "false" value is treated as 0. Note that you can perform subtraction with the "Add" field by sending it negative numbers.
    • The "Subtract" field works the same as the "Add" field, except it subtracts the value it receives from the count instead of adding it. A "true" value is treated as 1 and a "false" value is treated as 0. Note that you can perform addition with the "Subtract" field by sending it negative numbers.
    • The "Reset" field will reset the count to 0 whenever it receives a "true" input event.
  • While you can wire a Counter directly to an activation device such as a door, it is usually more useful to wire it to something that uses numeric input instead of only "true"/"false", e.g. Counters, Number Comparison Gates, Arc Signs or Arc Portals.
  • you can write code words into the arrays for "sends" and "receives" and then use these same code words in the correlating arrays of the activation devices and/or the objects that you want to activate/deactivate
  • Edit Button.png by clicking on this icon, the Counter can be renamed (30 characters). This can be useful for documenting more complex circuits.
  • Access Control Lock.png by clicking on this icon, access to the Counter can be restricted by changing the permission settings so only players that match or outrank the set permission rank can use or even take the gate

Example: counting how many times someone passes through your door[edit | edit source]

This section gives step-by-step instructions how to wire a Sensor, a Counter and an Arc Sign to display the number of people who have passed through a door (or passed through the Sensors field, anyway):

  • Equip a Wiring Tool and place the Sensor under your door and the Counter and Arc Sign where-ever you want.
  • Aim at the Sensor and press "n" to open the wiring window. Write "doorway_sensor_output" (or any other name you want) in the "Sends" field, increase the height so the sensor field would include the doorway (if you buried it two blocks under the door, set it to 3), remove the check under "Creatures" and save.
  • Aim at the Counter and press "n" to open the wiring window. Set the fields as follows:
    • Write "doorway_sensor_output" (or whatever name you used in the Sensor wiring window) in the "Add" field - this will make the counter increase by 1 every time a player enters the sensor field, since "true" is treated as 1.
    • Write "doorway_counter_value" (or any other name you want) to the "Sends" field
    • Save your changes.
  • Aim at the Arc Sign and press "n" to open the wiring window. Set the fields as follows:
    • Write "doorway_counter_value" (or whatever name you used in the "Sends" field in the Counter) in the "Input 1" field - this connects the arc sign to the counter so it can use count sent by it.
    • Write "Player count: {1}" in the "Output Message" field. The "{1}" part says "use the value from 'Input 1' here", so the count sent by the Counter will be shown.
    • Save your changes.
  • You are now done - walk through your door and see the count increase!
  • If you want to reset the count, add a Switch and wire its output to the "Reset" input of the Counter using the wiring tool.

Trivia[edit | edit source]

  • The count of the Counter gate is stored as a signed 32-bit integer, which can only hold values between -2147483648 and 2147483647. If your count increases beyond 2147483647, it will overflow and start from -2147483648 again, and vice versa. This is unlikely to be a problem in any practical use of the gate.
Community content is available under CC-BY-SA unless otherwise noted.