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.
-
ActivateRW 9 -
LockRW 10 -
SettingR 12 -
PrefabHashR 84 -
ReferenceIdR 217 -
NameHashR 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 startAcademy: devices by name Academy: batch modes IC10 academy IC10 editor
Connections
- 1Data
- 2Data
Building and deconstruction
Grid: small grid (0.5 m) · mounting: on wall or floor
- 1
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.ConnectionType | FlatStraight |
LogicUnitBase.Input1Index | 0 |
LogicUnitBase.OutputIndex | 1 |
See also
- Logic without a chip: reader, writer, memory, compare, mathWith logic readers, writers, compare, math and memory units you build simple controls with no program at all. What each part does, what it costs and when the chip is the better choice.