Logic Types - Niilo007/Stationeers-Research GitHub Wiki


Device Logic Variables

Power

Can be read to return if the device is correctly powered or not, set via the power system, return 1 if powered and 0 if not

Default behaviour

Type Min Max Read Write
bool 0 1
  • True (1) if device on and has power.

Open

1 if device is open, otherwise 0

Default behaviour

Type Min Max Read Write
bool 0 1
  • 1 = Open
  • 0 = Closed

Mode

Integer for mode state, different devices will have different mode states available to them

Default behaviour

Type Min Max Read Write
int
  • Generic variable, check device specific behaviours.

Error

1 if device is in error state, otherwise 0

Default behaviour

Type Min Max Read Write
bool 0 1
  • True if missing a required connection.
  • True if integrated IC is in an error state.

Pressure

The current pressure reading of the device

Default behaviour

Type Min Max Read Write
float 0
  • Pressure in kPa.

Temperature

The current temperature reading of the device

Default behaviour

Type Min Max Read Write
float 0

PressureExternal

Setting for external pressure safety, in KPa

Default behaviour

Type Min Max Read Write
float 0
  • External pressure in kPa.

Activate

1 if device is activated (usually means running), otherwise 0

Default behaviour

Type Min Max Read Write
  • Generic variable, check device specific behaviours.

Lock

1 if device is locked, otherwise 0, can be set in most devices and prevents the user from access the values

Default behaviour

Type Min Max Read Write
bool 0 1
  • Disables some or all user inputs when true.
  • 0 = Unlocked
  • 1 = Locked

Charge

The current charge the device has

Default behaviour

Type Min Max Read Write
float

Horizontal

Horizontal setting of the device

Default behaviour

Type Min Max Read Write
float
  • Horizontal angle in degrees.

Vertical

Vertical setting of the device

Default behaviour

Type Min Max Read Write
float
  • Vertical angle in degrees.

Setting

A variable setting that can be read or written, depending on the device

Default behaviour

Type Min Max Read Write
int 0 100
  • Normally unused by the device itself.
    • Some devices use Setting for some variable, like pump speed.

Reagents

Total number of reagents recorded by the device

Default behaviour

Type Min Max Read Write
0

RatioOxygen

The ratio of oxygen in device atmosphere

Default behaviour

Type Min Max Read Write
float 0 1
  • Molar ratio.

RatioCarbonDioxide

The ratio of Carbon Dioxide in device atmosphere

Default behaviour

Type Min Max Read Write
float 0 1
  • Molar ratio.

RatioNitrogen

The ratio of nitrogen in device atmosphere

Default behaviour

Type Min Max Read Write
float 0 1
  • Molar ratio.

RatioPollutant

The ratio of pollutant in device atmosphere

Default behaviour

Type Min Max Read Write
float 0 1
  • Molar ratio.

RatioVolatiles

The ratio of volatiles in device atmosphere

Default behaviour

Type Min Max Read Write
float 0 1
  • Molar ratio.

RatioWater

The ratio of water in device atmosphere

Default behaviour

Type Min Max Read Write
float 0 1
  • Molar ratio.

PressureInternal

Setting for internal pressure safety, in KPa

Default behaviour

Type Min Max Read Write
float 0
  • Internal pressure in kPa.

Maximum

Maximum setting of the device

Default behaviour

Type Min Max Read Write
int 100 100

Ratio

Context specific value depending on device, 0 to 1 based ratio

Default behaviour

Type Min Max Read Write
float 0 1

Quantity

Total quantity on the device

Default behaviour

Type Min Max Read Write
  • Generic variable, check device specific behaviours.

PowerPotential

How much energy the device or network potentially provides

Default behaviour

Type Min Max Read Write
float

PowerActual

How much energy the device or network is actually using

Default behaviour

Type Min Max Read Write
float

PowerRequired

Power requested from the device and/or network

Default behaviour

Type Min Max Read Write
float 0

On

The current state of the device, 0 for off, 1 for on

Default behaviour

Type Min Max Read Write
bool 0 1
  • Turns the device on or off.
    • 0 = Off
    • 1 = On

Volume

Returns the device atmosphere volume

Default behaviour

Type Min Max Read Write
int 1 100
  • Sound volume of a speaker. (1% - 100%)
  • Sometimes used to show internal volume of devices, in liters.

PressureSetting

The current setting for the internal pressure of the object (e.g. the Hardsuit Air release), in kPa

Default behaviour

Type Min Max Read Write
float 0
  • Pressure setting in kPa.

TemperatureSetting

The current setting for the internal temperature of the object (e.g. the Hardsuit A/C)

Default behaviour

Type Min Max Read Write
float 0
  • Temperature setting in Kelvin.

TemperatureExternal

The temperature of the outside of the device, usually the world atmosphere surrounding it

Default behaviour

Type Min Max Read Write
float 0
  • External temperature in Kelvin.

Filtration

The current state of the filtration system, for example Filtration = 1 for a Hardsuit sets filtration to On

Default behaviour

Type Min Max Read Write
bool 0 1

AirRelease

The current state of the air release system, for example AirRelease = 1 for a Hardsuit sets Air Release to On

Default behaviour

Type Min Max Read Write
bool 0 1

RequiredPower

Idle operating power quantity, does not necessarily include extra demand power

Default behaviour

Type Min Max Read Write
float -1
  • Usually shows -1 if power connection is missing.
  • Shows how much power the device uses.
  • Sometimes not accurate for monitoring actual power usage.

PowerGeneration

Returns how much power is being generated

Default behaviour

Type Min Max Read Write
float 0
  • Shows how much power the device is generating, in watts.

Color

Whether driven by concerns for clarity, safety or simple aesthetics, {LINK:Stationeers;Stationeers} have access to a small rainbow of colors for their constructions. These are the color setting for devices, represented as an integer.

0: Blue
1: Grey
2: Green
3: Orange
4: Red
5: Yellow
6: White
7: Black
8: Brown
9: Khaki
10: Pink
11: Purple

It is an unwavering universal law that anything higher than 11 will be purple. The {LINK:ODA;ODA} is powerless to change this. Similarly, anything lower than 0 will be Blue.

Default behaviour

Type Min Max Read Write
int 0 11

Idle

Returns 1 if the device is currently idle, otherwise 0

Default behaviour

Type Min Max Read Write
bool 0 1
  • True if the device is not doing anything.
  • False if the device is moving, or processing.

ElevatorSpeed

Current speed of the elevator

Default behaviour

Type Min Max Read Write
float 1.5 20
  • The desired speed of the elevator carriage.
  • Recommended to change from default value to the fastest possible.
  • All elevator pieces share the same value.
    • This means writing to one changes them all.

ElevatorLevel

Level the elevator is currently at

Default behaviour

Type Min Max Read Write
int -1
  • Shows the floor the carriage is on.
    • Value of -1 means the carriage is missing.
  • Writing to the value will move the carriage to that floor.

PositionX

The current position in X dimension in world coordinates

Default behaviour

Type Min Max Read Write
float
  • World coordinate.

PositionY

The current position in Y dimension in world coordinates

Default behaviour

Type Min Max Read Write
float
  • World coordinate.

PositionZ

The current position in Z dimension in world coordinates

Default behaviour

Type Min Max Read Write
float
  • World coordinate.

VelocityMagnitude

The current magnitude of the velocity vector

Default behaviour

Type Min Max Read Write

VelocityRelativeX

The current velocity X relative to the forward vector of this

Default behaviour

Type Min Max Read Write
float

VelocityRelativeY

The current velocity Y relative to the forward vector of this

Default behaviour

Type Min Max Read Write
float

VelocityRelativeZ

The current velocity Z relative to the forward vector of this

Default behaviour

Type Min Max Read Write
float

RecipeHash

Current hash of the recipe the device is set to produce

Default behaviour

Type Min Max Read Write
int
  • The RecipeHash is the same as the PrefabHash of the target item.

CompletionRatio

How complete the current production is for this device, between 0 and 1

Default behaviour

Type Min Max Read Write
float 0 1
  • Crafting progress of the machine (0% - 100%).

RequestHash

When set to the unique identifier, re quests an item of the provided type from the device

Default behaviour

Type Min Max Read Write
int

ClearMemory

When set to 1, clears the counter memory (e.g. ExportCount). Will set itself back to 0 when actioned

Default behaviour

Type Min Max Read Write
bool 0 1

ExportCount

How many items exported since last ClearMemory

Default behaviour

Type Min Max Read Write
int 0
  • How many stacks the machine has exported.

ImportCount

How many items imported since last ClearMemory

Default behaviour

Type Min Max Read Write
int 0
  • How many stacks the machine has imported.

Output

The output operation for a sort handling device, such as a stacker or sorter, when in logic mode the device will only action one repetition when set zero or above and then back to -1 and await further instructions

Default behaviour

Type Min Max Read Write
int -1 1
  • Value of -1 means the device is waiting for the logic to be written to.

Plant

Performs the planting action for any plant based machinery

Default behaviour

Type Min Max Read Write
bool 0 1
  • Used to tell the harvie to plant a seed into a tray.

Harvest

Performs the harvesting action for any plant based machinery

Default behaviour

Type Min Max Read Write
bool 0 1

TotalMoles

Returns the total moles of the device

Default behaviour

Type Min Max Read Write
float 0
  • The amount of gas, given in moles.

RatioNitrousOxide

The ratio of Nitrous Oxide in device atmosphere

Default behaviour

Type Min Max Read Write
float 0 1
  • Molar ratio.

PrefabHash

The hash of the structure

Default behaviour

Type Min Max Read Write
int
  • Unique for each device, item and structure type.

ForceWrite

Forces Logic Writer devices to rewrite value

Default behaviour

Type Min Max Read Write
bool 0 1

SettingInput

TBA

Default behaviour

Type Min Max Read Write

SettingOutput

TBA

Default behaviour

Type Min Max Read Write

Combustion

The assess atmosphere is on fire. Returns 1 if atmosphere is on fire, 0 if not.

Default behaviour

Type Min Max Read Write
bool 0 1

CombustionLimiter

Retards the rate of combustion inside the machine (range: 0-100), with 0 being the slowest rate of combustion and 100 being the fastest

Default behaviour

Type Min Max Read Write
int 0 100

Throttle

Increases the rate at which the machine works (range: 0-100)

Default behaviour

Type Min Max Read Write
int 0 100

Rpm

The number of revolutions per minute that the device's spinning mechanism is doing

Default behaviour

Type Min Max Read Write
float 0

Stress

Machines get stressed when working hard. When Stress reaches 100 the machine will automatically shut down

Default behaviour

Type Min Max Read Write
float 0 100

Flush

Set to 1 to activate the flush function on the device

Default behaviour

Type Min Max Read Write
bool 0 1

RatioLiquidNitrogen

TBA

Default behaviour

Type Min Max Read Write
float 0 1
  • Molar ratio.

VolumeOfLiquid

The total volume of all liquids in Liters in the atmosphere

Default behaviour

Type Min Max Read Write
float 0
  • Volume of liquid in liters.

RatioLiquidOxygen

TBA

Default behaviour

Type Min Max Read Write
float 0 1
  • Molar ratio.

RatioLiquidVolatiles

The ratio of Liquid Volatiles in device's Atmosphere

Default behaviour

Type Min Max Read Write
float 0 1
  • Molar ratio.

RatioSteam

The ratio of Steam in device's Atmosphere

Default behaviour

Type Min Max Read Write
float 0 1
  • Molar ratio.

RatioLiquidCarbonDioxide

TBA

Default behaviour

Type Min Max Read Write
float 0 1
  • Molar ratio.

RatioLiquidPollutant

TBA

Default behaviour

Type Min Max Read Write
float 0 1
  • Molar ratio.

RatioLiquidNitrousOxide

TBA

Default behaviour

Type Min Max Read Write
float 0 1
  • Molar ratio.

SignalStrength

Returns the degree offset of the strongest contact

Default behaviour

Type Min Max Read Write
float -1
  • Signal strength given in degrees of error.
    • -1 = Contact has not been resolved or no contact.
    • 0 = Perfectly aimed at contact.

SignalID

Returns the contact ID of the strongest signal from this Satellite

Default behaviour

Type Min Max Read Write
int
  • The identifier of a contact.
  • Not to be confused with ContactTypeId.

InterrogationProgress

Progress of this sattellite dish's interrogation of its current target, as a ratio from 0-1

Default behaviour

Type Min Max Read Write
float -1 1

TargetPadIndex

The index of the trader landing pad on this devices data network that it will try to call a trader in to land

Default behaviour

Type Min Max Read Write
int

SizeX

Size on the X (right) axis of the object in largeGrids (a largeGrid is 2meters)

Default behaviour

Type Min Max Read Write
int -1 9
  • Size of a trader ship.
  • -1 = No contact.

SizeZ

Size on the Z(Forward) axis of the object in largeGrids (a largeGrid is 2meters)

Default behaviour

Type Min Max Read Write
int -1 9
  • Size of a trader ship.
  • -1 = No contact.

MinimumWattsToContact

Minimum required amount of watts from the dish hitting the target trader contact to start interrogating the contact

Default behaviour

Type Min Max Read Write
float -1
  • Minimum power needed to start interrogating a contact.
  • -1 = No contact.

WattsReachingContact

The amount of watts actually hitting the contact. This is effected by the power of the dish and how far off-axis the dish is from the contact vector

Default behaviour

Type Min Max Read Write
float -1
  • How much power is reaching a contact, in Watts.
  • -1 = No contact.

ContactTypeId

The type id of the contact

Default behaviour

Type Min Max Read Write
int

SoundAlert

Plays a sound alert on the devices speaker

Default behaviour

Type Min Max Read Write
int 0 45
  • Id of a sound alert to play.
  • See related constants.
  • Show detailed list:
    Constant Value Description Length Looping
    Sound.None 0 NA NA
    Sound.Alarm2 1 Electronic Horn 1.38s
    Sound.Alarm3 2 Monotone Beeps 0.49s
    Sound.Alarm4 3 Rising Frequencies Beeps 0.224s
    Sound.Alarm5 4 Long Echo Beeps 7.16s
    Sound.Alarm6 5 Shriek And Bell 1.37s
    Sound.Alarm7 6 Constant Frequency Beeps 0.316s
    Sound.Music1 7 Classical Music 4min 41.2s
    Sound.Music2 8 Jazzy Music 2min 30s
    Sound.Music3 9 Calm Music 1min 55.6s
    Sound.Alarm8 10 Messy Sharp Pulses 9.695s
    Sound.Alarm9 11 Rising Fast Beeps 4.923s
    Sound.Alarm10 12 Air Raid Klaxon 13.331s
    Sound.Alarm11 13 Rising Whoops 5.265s
    Sound.Alarm12 14 Dial Up Sounds 9.452s
    Sound.Danger 15 "Danger! Danger! Danger!" 3.103s
    Sound.Warning 16 "Warning! Warning! Warning!" 2.92s
    Sound.Alert 17 "Alert! Alert! Alert!" 3.034s
    Sound.StormIncoming 18 "Storm, Incoming." 2.125s
    Sound.IntruderAlert 19 "Intruder alert." 1.1295s
    Sound.Depressurising 20 "Depressurising." 1.31s
    Sound.Pressurising 21 "Pressurising." 1.002s
    Sound.AirlockCycling 22 "Airlock, Cycling." 1.892s
    Sound.PowerLow 23 "Power, Low." 1.543s
    Sound.SystemFailure 24 "System, Failure." 1.858s
    Sound.Welcome 25 "Welcome! Enjoy your stay." 2.86s
    Sound.MalfunctionDetected 26 "Malfunction, Detected." 2.127s
    Sound.HaltWhoGoesThere 27 "Halt, Who goes there." 1.4387s
    Sound.FireFireFire 28 "Fire! Fire! Fire!" 2.396s
    Sound.One 29 "One." 0.78s
    Sound.Two 30 "Two." 0.54s
    Sound.Three 31 "Three." 0.83s
    Sound.Four 32 "Four." 0.82s
    Sound.Five 33 "Five." 0.82s
    Sound.Floor 34 "Floor." 0.82s
    Sound.RocketLaunching 35 "Rocket launching." 1.46s
    Sound.LiftOff 36 "Lift off." 0.93s
    Sound.TraderIncoming 37 "Trader vessel, Incoming." 2.05s
    Sound.TraderLanded 38 "Trader vessel, Landed." 1.93s
    Sound.PressureHigh 39 "Warning, Pressure high." 1.91s
    Sound.PressureLow 40 "Warning, Pressure low." 2.33s
    Sound.TemperatureHigh 41 "Warning, Temperature high." 2.44s
    Sound.TemperatureLow 42 "Warning, Temperature low." 2.45s
    Sound.PollutantsDetected 43 "Warning, Pollutants detected." 2.43s
    Sound.HighCarbonDioxide 44 "Warning, High CO2 levels, detected." 3.19s
    Sound.Alarm1 45 Resonating Klaxon 1.73s

SolarIrradiance

TBA

Default behaviour

Type Min Max Read Write
0
  • The amount of heating from sunlight in Watts.

ReferenceId

TBA

Default behaviour

Type Min Max Read Write
int
  • Unique for every structure and item in the world.

Slot Logic Variables

Occupied

returns 0 when slot is not occupied, 1 when it is

Default behaviour

Type Min Max Read Write
bool 0 1
  • True if the slot is occupied.
  • 0 = Slot empty.
  • 1 = Slot occupied.

OccupantHash

returns the hash of the current occupant, the unique identifier of the thing

Default behaviour

Type Min Max Read Write
int
  • Gives the PrefabHash of the item in the slot.
  • 0 = Slot is empty.

Quantity

returns the current quantity, such as stack size, of the item in the slot

Default behaviour

Type Min Max Read Write
int 0
  • Gives the amount of the item in a slot (stack size).
    • For some items such as filters it gives the durability of the filter from 0 - 100.
  • Empty slot will show as 0.

Damage

returns the damage state of the item in the slot

Default behaviour

Type Min Max Read Write
float 0 1
  • Damage ratio of the item in the slot.
  • 0 Is no damage, 1 Is 100% damage.
  • Empty slot will show as 0.

Pressure

returns pressure of the slot occupants internal atmosphere

Slot Types
alt text

Default behaviour

Type Min Max Read Write
float
  • Pressure in kPa.

Temperature

returns temperature of the slot occupants internal atmosphere

Slot Types
alt text

Default behaviour

Type Min Max Read Write
float

Charge

returns current energy charge the slot occupant is holding

Slot Types
alt text

Default behaviour

Type Min Max Read Write
float

ChargeRatio

returns current energy charge the slot occupant is holding as a ratio between 0 and 1 of its maximum

Slot Types
alt text

Default behaviour

Type Min Max Read Write
float 0 1

Efficiency

returns the growth efficiency of the plant in the slot

Slot Types
alt text

Default behaviour

Type Min Max Read Write
float -1 1
  • -1 Slot empty.
  • Shows plant growth efficiency (0 - 1).

Health

returns the health of the plant in the slot

Slot Types
alt text

Default behaviour

Type Min Max Read Write
float -1 1
  • -1 Slot empty.
  • Shows plant health (0 - 1).
    • 1 = 100% health, 0 = 0% health.

Growth

returns the current growth state of the plant in the slot

Slot Types
alt text

Default behaviour

Type Min Max Read Write
int -1 6
  • The growth stage of the plant in the slot
  • -1 Slot empty.
  • 0 Freshly planted, If conditions are okay, will immediately go to stage 1.
  • 1
  • 2
  • 3
  • 4 Fruiting stage for some plants.
  • 5 Seeding stage for some plants / fruiting stage for some plants.
  • 6 Seeding stage for some plants.

Class

returns integer representing the class of object

Default behaviour

Type Min Max Read Write
int 0 34
  • The class of the item in the slot.
  • Empty slot will show as 0.

PressureWaste

returns pressure in the waste tank of the suit in this slot

Slot Types
alt text

Default behaviour

Type Min Max Read Write
float
  • Pressure in kPa.

PressureAir

returns pressure in the air tank of the suit in this slot

Slot Types
alt text

Default behaviour

Type Min Max Read Write
float
  • Pressure in kPa.

MaxQuantity

returns the max stack size of the item in the slot

Default behaviour

Type Min Max Read Write
int 0 500
  • Shows the maximum stack size of the item in the slot.
  • 0 = Empty slot.

Mature

returns 1 if the plant in this slot is mature, 0 when it isn't

Slot Types
alt text

Default behaviour

Type Min Max Read Write
int -1 1
  • -1 Slot empty
  • 0 Not mature
  • 1 in fruiting stage
  • 1 In seeding stage

PrefabHash

returns the hash of the structure in the slot

Default behaviour

Type Min Max Read Write
int
  • Gives the PrefabHash of the item in the slot.
  • 0 = Slot is empty

Open

TBA

Slot Types
alt text

Default behaviour

Type Min Max Read Write
bool 0 1
  • The open/closed state of a device in the slot.
    • 1 = Open
    • 0 = Closed

On

TBA

Slot Types
alt text Appliance

Default behaviour

Type Min Max Read Write
bool 0 1
  • The on/off state of a device in the slot.
    • 1 = On
    • 0 = Off

Lock

TBA

Slot Types
alt text

Default behaviour

Type Min Max Read Write
bool 0 1
  • The Locked/Unlocked state of a device in the slot.
    • 1 = Locked
    • 0 = Unlocked

Seeding

Whether a plant is seeding (ready to harvest seeds from). Returns 1 if seeding or 0 if not.

Slot Types
alt text

Default behaviour

Type Min Max Read Write
int -1 1
  • -1 Slot empty or plant not seeding
  • 0 In seeding stage with no seeds
  • 1 Seeding

SortingClass

TBA

Default behaviour

Type Min Max Read Write
int 0 7

FilterType

TBA

Slot Types
alt text

Default behaviour

Type Min Max Read Write
int 0 8192

⚠️ **GitHub.com Fallback** ⚠️