Skip to content

Entity type

An Entity type is an NPC’s personality / appearance template — the broad-strokes character archetype. Each NPC has a .type of one of these. Used by Entity role and Control post configs to constrain who can fill what.

Inheritance: dbdata → entitytype.

PropertyTypeDescription
.namestringDisplay name
.rawnamestringRaw text entry reference
.descriptionstringDescription
.iconstringIcon id

Minimal datatype — just localization + icon.

(Verified types vary by DLC; check vanilla libraries/entitytypes.xml for the full list.) Common examples include:

  • entitytype.civilian
  • entitytype.military
  • entitytype.aipilot
  • entitytype.engineer
  • entitytype.shadyguy
  • entitytype.passenger
<do_if value="$npc.type == entitytype.military">
<!-- this NPC is military — treat differently -->
</do_if>

.type is on Entity / NPC.

<do_for_each name="$npc" in="$Station.crew">
<do_if value="$npc.type == entitytype.civilian">
<!-- civilian NPC -->
</do_if>
</do_for_each>
  • Entity type is not the same as entity role. Type is the broad archetype (military / civilian); role is the specific job (engineer / pilot / passenger). One NPC has one type but may have a role.
  • Entity types are db-defined. Mods extending NPCs add types via data files.
  • NPC.type accessor.
  • Entity role.type of role points to entity type.
  • Control post.type accessor for compatible NPCs.