Skip to content

System Commands

Top-level functions available in every script. Commands return ActionResult objects; see Command Results for the model.

Initialize the system and run diagnostics.

Returns: ActionResult (.status, .message; no payload)

StatusKindMeaning
"booting"successThe boot sequence has started.
"already_booted"successThe system is already booted.
boot()

Turn on the power grid after the station has finished booting.

Returns: ActionResult (.status, .message; no payload)

StatusKindMeaning
"activating"successActivation has started.
"already_online"successThe system is already online.
"boot_required"rejectionThe station must finish booting before this operation is available.
activate_power()

Bring the sensor array online. Requires power.

Returns: ActionResult (.status, .message; no payload)

StatusKindMeaning
"initializing"successInitialization has started.
"already_online"successThe system is already online.
"power_required"rejectionThe operation requires an online power system.
activate_sensors()

Access a player-owned entity by its immutable id (e.g. "solar_3", "outpost_home"). The id is auto-generated on creation and never changes: use this in scripts that need to outlive renames. To look up by display name (mutable), use get_component_by_name(name). Returns None if no entity has the given id.

Parameters: name (string): entity id (machine or outpost)

Returns: Component object

clock = get_component("clock")
time = clock.get_time()
print(time)

Look up any addressable player-owned component (machine or outpost) by its display name. Names default to the entity’s id but can be freely renamed from the Computer System tab; uniqueness is enforced across the shared rename namespace. Custom Panels share that namespace but are not components, so they are not returned here. Mutable: get_component(id) is the stable form for long-running scripts. Returns None if no component has the given name.

Parameters: name (string): the entity’s display name

Returns: Component (machine or outpost), or None

ore_bin = get_component_by_name("Iron Stockpile")
print(ore_bin.count("iron_ore"))