stationeers.de Mod workshop · Dominik1199
DE Sign in
  1. Home
  2. Stationeers wiki
  3. Devices
  4. Button

Devices

Button

Taste

PrefabStructureLogicButton Hash491845673in the hash lookup
Power paintable Game 0.2.6428.27798

Overview

Button (StructureLogicButton) in Stationeers: device, hash 491845673. With build steps, 6 IC10 logic values and connection diagram.

The button is the counterpart of the Lever. A lever stays in its position, a button does not. When you press it, Activate and Setting sit at 1 for about 0.55 s and then drop back to 0 on their own. How long you hold the mouse button makes no difference. During that time the button does not accept a second press. Lock locks manual operation.

Activate is listed as writable, but according to the game code a device only acts on a written Activate value while it is switched on – and the button has no on switch. So a chip cannot “press” it. For a pulse from a program, use a Logic Memory instead.

It needs no power and has two data ports. It is built from the Kit (Logic Switch), which also gives you the lever, switch and dial.

Because the button holds no state, the chip has to remember what the last press did. The classic pattern is the toggle: every press flips a stored value, such as “light on” and “light off”. The important part is to react only to the change from 0 to 1. The 0.55 s of a press are a little longer than one chip tick (0.5 s). A program that only checks for “1” therefore often sees the same press twice and flips straight back.

Give every button its own name. If several buttons with the same name are read with batch mode 0, you get the average – one pressed button out of two then reads 0.5.

The academy shows the toggle in code in the lesson button as a toggle. Further controls are covered in Logic without a chip: reader, writer, memory, compare, math.

IC10 and logic

6 logic values, 6 readable and 2 writable.

  • Activate RW 9
  • Lock RW 10
  • Setting R 12
  • PrefabHash R 84
  • ReferenceId R 217
  • NameHash R 268

Example: address by name

Reads Setting, shows the value on the IC housing and writes Activate. Name the device with the labeller first; devices with the same name are addressed together.

# Button address by name
define DEVICE 491845673  # StructureLogicButton
define NAME HASH("Button")  # name in game (labeller)
define TARGET 1  # Activate 1 = activate
alias value r0

start:
yield
lbn value DEVICE NAME Setting 0  # 0 = average of all with this name
bnan value start  # no device with this name
s db Setting value  # show on the housing
sbn DEVICE NAME Activate TARGET  # set value
j start

Connections

12
Schematic: inputs left, outputs right, waste on top, power and data at the bottom. Position and spacing do not match the model.
  1. 1Data
  2. 2Data

Building and deconstruction

Grid: small grid (0.5 m) · mounting: on wall or floor

  1. 1

    Place

    Take back with Hand Drill

Total material

Deconstruction returns

Built with: Kit (Logic Switch)

Material, fire and recycling

Flammable according to game data: flash point 373.2 K (100 °C); Autoignition 573.2 K (300 °C); burn time 5 s

Raw values from the game code (3)

Field names as in the game code, untranslated. Useful for mods and exact limits.

LogicUnitBase.ConnectionTypeFlatStraight
LogicUnitBase.Input1Index0
LogicUnitBase.OutputIndex1

See also

Esc
↑ ↓ selectEnter open/ opens search anywhere