Control post
A Control post is a job position on a Controllable — pilot, engineer, trade officer, defence NPC, etc. Each post defines which skills matter for the assigned entity’s combined-skill.
Inheritance: dbdata → controlpost.
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
.name | string | Display name |
.rawname | string | Raw text entry reference |
.description | string | Description |
.icon | string | Icon id |
.type | entitytype | Entity type for this post |
.tag | tag | Tag for this post |
.skilltypes | list | Relevant skill types |
.skillrelevance.{skilltype} | int 0..100 | Per-skill contribution percentage |
.skillrelevance.<skillname> | int | Shortcut by skill name |
.isindependent | bool | Ownership independent of host object |
Vanilla control posts
Section titled “Vanilla control posts”The common post enum values used in vanilla:
controlpost.aipilot— AI pilotcontrolpost.captain— Player’s captain on player-flown shipcontrolpost.engineer— Engineercontrolpost.defencenpc— Defence officercontrolpost.tradenpc— Trade officercontrolpost.shiptrader— Shiptrader (shipyard)controlpost.shadyguy— Black-market dealer
Common patterns
Section titled “Common patterns””Assign an actor to a control post”
Section titled “”Assign an actor to a control post””<assign_control_entity actor="$pilot" object="$ship" post="controlpost.aipilot" init="true" transfer="true"/>Pattern from vanilla cpu_ship_manager.xml:264. See NPC → Actions.
”Find which actor is at a post”
Section titled “”Find which actor is at a post””<set_value name="$pilot" exact="$ship.controlentity.{controlpost.aipilot}"/>The .controlentity.{controlpost.X} accessor lives on Controllable.
”Read skill relevance for a post”
Section titled “”Read skill relevance for a post””<do_for_each name="$skill" in="controlpost.aipilot.skilltypes"> <write_to_logbook text="$skill.name + ': ' + controlpost.aipilot.skillrelevance.{$skill} + '%'"/></do_for_each>Common gotchas
Section titled “Common gotchas”- ⚠
.skillrelevance.{skill}returns a percentage (0..100), not a fraction. Divide by 100 for multipliers. - ⚠
.isindependentcontrols ownership inheritance. Crew at a non-independent post belong to the host’s faction; independent post crew keep their own ownership (typical for mission actors). - ⚠ Control posts are db-defined. Modders rarely add new posts — most additions go through entity roles.
Related
Section titled “Related”- NPC — entities assigned to posts.
- Controllable —
.controlentity.{post}accessor. - Entity type —
.typereference. - Assignment — sibling but for subordinate roles.