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

Devices

Logic Math

Logik Mathematik

PrefabStructureLogicMath Hash1657691323in the hash lookup
Power paintable Game 0.2.6428.27798

Overview

Logic Math (StructureLogicMath) in Stationeers: device, hash 1657691323, 10 W. With build steps, 9 IC10 logic values and connection diagram.

The logic math unit calculates with the values on its two data inputs and puts the result into its Setting, which is read only. Mode picks the operation:

ModeNameModeName
0Add4Mod
1Subtract5Atan2
2Multiply6Pow
3Divide7Log

There is also a data output and a power port of its own; according to the game data it draws 10 W. It is built from the Kit (Logic Processor).

Two practical examples:

  • Kelvin to degrees Celsius: Subtract with the temperature on the first input and a Logic Memory holding 273.15 on the second. 293.15 K becomes 20.
  • Oxygen partial pressure: Multiply with Pressure and RatioOxygen of the same sensor. 100 kPa × 0.21 gives 21 kPa.

For Subtract, Divide, Mod and Pow the order of the inputs matters. If Setting shows the wrong sign, the cables are usually swapped.

For functions of a single value, such as Abs, Round or Sqrt, there is the Math Unary. Once the chain gets longer than three or four units, a chip is easier to follow – see Logic without a chip: reader, writer, memory, compare, math.

IC10 and logic

9 logic values, 9 readable and 2 writable.

  • Power R 1
  • Mode RW 3
  • Error R 4
  • Setting R 12
  • On RW 28
  • RequiredPower R 33
  • PrefabHash R 84
  • ReferenceId R 217
  • NameHash R 268

Example: address by name

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

# Logic Math address by name
define DEVICE 1657691323  # StructureLogicMath
define NAME HASH("Logic Math")  # name in game (labeller)
define TARGET 1  # On 1 = on
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 On TARGET  # set value
j start

Connections

1Data2Data3Data4
Schematic: inputs left, outputs right, waste on top, power and data at the bottom. Position and spacing do not match the model.
  1. 1Data · input
  2. 2Data · input
  3. 3Data · output
  4. 4Power

Slots and modes

Modes: 0 = Add, 1 = Subtract, 2 = Multiply, 3 = Divide, 4 = Mod, 5 = Atan2, 6 = Pow, 7 = Log

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 Processor)

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 (5)

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

LogicUnitProcessor.Input2Index1
LogicUnitProcessor.Input3Index-1
LogicUnitBase.ConnectionTypeFlatExhaustive
LogicUnitBase.Input1Index0
LogicUnitBase.OutputIndex1

See also

Esc
↑ ↓ selectEnter open/ opens search anywhere