Skip to content

Entity role

An Entity role is an NPC’s specific job — pilot, engineer, marine, passenger, missionactor, etc. Roles define what an NPC does on board (gameplay-wise) and gate skill-tier displays / hireability.

Inheritance: dbdata → entityrole.

PropertyTypeDescription
.namestringDisplay name
.rawnamestringRaw text entry reference
.femalenamestringFemale variant
.pluralnamestringPlural form
.descriptionstringDescription
.tagtagDefined tag for this role
.typeentitytypeUnderlying entity type
.hirableboolCan be hired by player
.isindependentboolOwnership independent of host
.tierslistTier level values (integers)
.tier.{level}.namestringTier display name
.tier.{level}.rawnamestringRaw text reference
.tier.{level}.levelintLower-bound level value
.iconstringIcon id

Common examples:

  • entityrole.pilot
  • entityrole.aipilot
  • entityrole.captain
  • entityrole.engineer
  • entityrole.marine
  • entityrole.passenger
  • entityrole.missionactor
  • entityrole.shiptrader
<set_value name="$role" exact="$npc.role"/>
<do_if value="$role == entityrole.marine">
<!-- this is a marine -->
</do_if>
<set_value name="$Marines"
exact="$ship.people.marine.list"/>
<set_value name="$Count"
exact="$ship.people.marine.count"/>

.people.<role>.list / .count accessors on Controllable — vanilla shortcut syntax (.marine is the rolename).

<do_if value="entityrole.engineer.hirable">
<!-- can hire engineers -->
</do_if>
<do_for_each name="$tier"
in="entityrole.marine.tiers">
<write_to_logbook
text="'Marine tier: '
+ entityrole.marine.tier.{$tier}.name"/>
</do_for_each>
  • Role vs type vs control post — three distinct concepts. Role is the job (engineer / marine). Type is the archetype (military / civilian). Control post is the seat on the ship (controlpost.engineer is the post; entityrole.engineer is the role). Often parallel but conceptually distinct.
  • .hirable=false blocks player hiring. Missionactor roles are non-hirable; engineer roles are hirable.
  • .tiers are integer thresholds. Each tier defines a lower-bound; values between thresholds belong to the lower tier.
  • .people.<rolename> uses literal rolename, not {$role}. $ship.people.engineer.count works; $ship.people.{$myvar}.count requires {$myvar} style. Don’t mix.