Skip to content

Room

A Room is a walkable interior space inside a Ship or Station. It hosts NPCs, control positions (helm, gunner, navigation), and chairs. Rooms form the navigable mesh the player walks across when leaving their ship to explore stations.

Inheritance: component → room. Note: room extends component directly (not destructible) — rooms have no hull state, they exist as long as their containing module exists.

Subtypes:

SubtypeDatatypePurpose
dockingbaydockingbay (extends room)Where ships dock — has assigned ship, dock state, launch position
walkablemodulewalkablemodule (extends module)Module that hosts walkable rooms — has entry/exit positions
dockareadockarea (extends walkablemodule)Walkable module specifically for docking (a station’s “dock floor”)

Note that walkablemodule and dockarea extend the module chain rather than room — but they contain rooms. This page focuses on room itself with brief coverage of its dock-related siblings.

PropertyTypeDescription
.typeroomtypeRoom type enum
.islockedboolRoom is locked (player can’t enter)
.isgrouplocked.{grouptag}boolSpecified group tag locked in this room
.isprivateboolRoom is private (NPC slots only found via direct query)
.iswalkableboolWalkable in principle (false for in-space dockingbays)
.iscurrentlywalkableboolCurrently walkable (false during room animations / navmesh loading)
.haswalkableroomboolThis room OR any contained room is walkable
PropertyTypeDescription
.dockareadockareaThe dock area this room is part of
.buildmodulebuildmoduleThe build module this room is part of
.walkablemodulewalkablemoduleThe walkable module this room is part of
.dynamicinteriornavcontextDynamic interior containing this room
PropertyTypeDescription
.actorslistAll NPCs currently in the room
.slotactor.{slot}entityNPC reserved for the specified slot
.waypointactors.{slot}listNPCs moving toward the slot
.freemissionactorslotboolHas a free mission-actor slot
.slotcontextcomponentWhat contains the NPC slots (for virtual rooms = controllable; else the room)
PropertyTypeDescription
.ischairslot.{slot}boolSlot is a chair-related NPC position
.chairapproachslot.{slot}componentslotApproach slot for the chair
.chairbaseslot.{slot}componentslotBase/anchor chair slot
.chairroomslot.{slot}componentslotRoom slot for chair-NPC reservation
PropertyTypeDescription
.controlposition.{controlposition}.existsboolSpecified control position exists in this room
.controlposition.{controlposition}.roomslotcomponentslotSlot for entities working at this position
.controlposition.{controlposition}.entityentityEntity currently at the position
.controlpositions.listlistAll control positions in the room
.hascontrolpanel.{controlpaneltype}boolRoom has a control panel of the type

Dockingbay is the most modder-relevant room subtype — 30 own properties on top of room’s.

PropertyTypeDescription
.assignedshipshipShip currently assigned to dock here
.pierpierPier module containing this dock
.dockedlistAll ships currently docked
.docksizelistTag list of supported sizes
.shipstorage.capacity / .freeintInternal-storage capacity (S/M ships stored inside)
.dockstatedockstateCurrent state (default / busy / etc.)
.externalboolExternal dock (ship visible while docked)
.isstorageboolInternal storage bay (not surface dock)
.islaunchtubeboolLaunchtube (external + force undock speed)
PropertyTypeDescription
.isdockingallowedboolNot exclusively for undocking
.isundockingallowedboolNot exclusively for docking
.isunitdockingallowedboolUnits may dock
.isunitundockingallowedboolUnits may undock
.isbuildingallowedboolBuilding allowed here
.istradingallowedboolTrading allowed here
.isplayeronlyboolPlayer-only dock
.isshowroomboolShowroom dock
.isventureronlyboolVenturer-only dock
.ishiddenboolHidden from UI
PropertyTypeDescription
.dockslotcomponentslotSlot the docked ship connects to
.todockpospositionWhere ship flies to dock
.launchpospositionWhere ship safely returns to flight
.maxoffset.{sizetag}.position / .rotationposition / rotationAllowed offset to land
.maxoffset.{$ship}.position / .rotationvariousAccounts for ship’s docking software
PropertyTypeDescription
.ventureplatformventureplatformAssociated venture platform

walkablemodule (a module subtype) declares 4 own properties:

PropertyTypeDescription
.hasentryposboolEntry position defined
.entrypospositionDock area entry position
.hasexitposboolExit position defined
.exitpospositionDock area exit position

dockarea (extends walkablemodule):

PropertyTypeDescription
.isventuremoduleboolFor use with venture platforms
.ventureplatformventureplatformAssociated platform
.dock.{docksize}dockingbayAvailable dock for this size (may be occupied)
.freedock.{docksize}dockingbayFree dock for this size

Pattern from vanilla guidance.xml:268, lib_create_ships.xml:127, lib_holomaptarget.xml:227:

<do_if value="$Component.isclass.dockingbay
and not $Component.isstorage">
<!-- usable surface dock (not internal storage) -->
</do_if>

The not .isstorage check is important — internal storage bays look like dockingbays but aren’t where the player lands.

”Detect dynamic-interior room readiness”

Section titled “”Detect dynamic-interior room readiness””

Pattern from npc_state_machines.xml:7348:

<do_if value="$NextParent.isclass.room
and $NextParent.iswalkable
and not $NextParent.iscurrentlywalkable">
<!-- room is animating / loading — wait -->
</do_if>

NPCs use this to avoid pathing into rooms that are mid-animation.

”Verify a macro is a room (mission setup)”

Section titled “”Verify a macro is a room (mission setup)””

Pattern from gm_prisonbreak.xml:184-187:

<do_if value="typeof $PrisonMacro == datatype.macro
and $PrisonMacro.isclass.room">
<!-- valid prison-room macro -->
</do_if>

“NPC waiting until dock is default state”

Section titled ““NPC waiting until dock is default state””

Pattern from npc_state_machines.xml:2509, 2576:

<do_if value="$NPC.assignedcontrolled.parent.isclass.dockingbay
and $NPC.assignedcontrolled.parent.dockstate
== dockstate.default">
<!-- dock is in normal idle state — NPC can act -->
</do_if>

“Find dock areas while building stations”

Section titled ““Find dock areas while building stations””

Pattern from finalisestations.xml:630:

<do_if value="$PlannedModules.{$ModuleCounter}.isclass.dockarea">
<!-- count this as a dock area in the plan -->
</do_if>

There is no event_room_X family. Standard component events:

EventWhenNotes
event_object_destroyedRoom destroyed (containing module destroyed)Rare — rooms rarely destroyed independently

For NPC-in-room observation, see NPC Events (event_entity_entered space= with the room).

  • Room extends component directly, NOT destructible. No .hull — if the containing module is destroyed, the room is gone.
  • .iswalkable vs .iscurrentlywalkable. The first is “can in principle be walked”; the second adds the runtime state (navmesh loaded, animation idle). For NPC pathing use .iscurrentlywalkable.
  • Internal storage bays are dockingbays. find_object_component class=class.dockingbay returns BOTH surface docks and internal storage. Filter with not .isstorage for player-relevant docks.
  • .assignedship is the ASSIGNED ship, not the currently docked. A ship may have reserved the dock while still in transit. Use .docked for ships actually on the pad.
  • .dockstate == dockstate.default is the “idle” state. Any other state means the dock is busy with arrival / departure / cycling. NPCs wait for default.
  • controlposition properties read from the parent’s controllable. For virtual rooms (ships with no walkable interior), .slotcontext is the controllable; for real rooms, it’s the room itself.
  • Dockingbay positions are in the dock’s local coords. .todockpos and .launchpos are offsets relative to the dock, not sector coordinates.
  • Permissions stack with the station’s overall permissions. A dock with .isplayeronly=false may still reject the player if the parent station is hostile. Read both levels.

Example 1: Find a free dock on a station for a specific ship size

Section titled “Example 1: Find a free dock on a station for a specific ship size”
<do_for_each name="$DA" in="$Station.modules">
<do_if value="$DA.isclass.dockarea">
<set_value name="$dock"
exact="$DA.freedock.{tag.dock_m}"/>
<do_if value="@$dock">
<write_to_logbook
text="'Free M dock: ' + $dock.knownname"/>
<break/>
</do_if>
</do_if>
</do_for_each>

Example 2: List all NPCs in the player’s currently-docked station

Section titled “Example 2: List all NPCs in the player’s currently-docked station”
<do_if value="@player.ship.dock">
<set_value name="$Station"
exact="player.ship.dock.parent"/>
<do_for_each name="$mod" in="$Station.modules">
<do_if value="$mod.haswalkableroom">
<do_for_each name="$actor" in="$mod.actors">
<write_to_logbook
text="$actor.knownname"/>
</do_for_each>
</do_if>
</do_for_each>
</do_if>

Example 3: Identify whether the player is in a private room

Section titled “Example 3: Identify whether the player is in a private room”
<do_if value="@player.entity.controlled
and player.entity.controlled.isclass.room
and player.entity.controlled.isprivate">
<write_to_logbook
text="'Player in a private room'"/>
</do_if>
  • Walkable interior pipeline: Architectural overview Walkable rooms — when interiors are loaded, navmesh build, NPC respawn.
  • Docking lifecycle: Architectural overview Dock cycledockstate transitions and how NPCs and the engine coordinate landing.
  • Control posts vs control positions: Architectural overview Control mapping — controlpost (the job) vs controlposition (the physical seat in a room).