Starship Horizons
Log In
☰
Knowledge Base›NPC Archetypes

NPC Archetypes

An archetype is a role for the NPC who commands a ship: the jobs it does when nobody has ordered anything, how its reflexes differ from the default, a nudge to its temperament, and optionally how good a pilot and gunner it is. Fighter Pilot, Freighter, Pirate and Escort are archetypes. So are the drones: a mine, a turret, a probe and a repair drone each run a Drone: … role.

Three related records sit beside it. Task plans rewrite how a task type is carried out, step by step. Tactics are named sets of numbers a task can fly by. Bots are ready‑made characters a Game Master can seat on a player ship. All four are module content in World/, and all four layer by name: a module loaded later redefines a record of the same name for everyone.

Who an archetype applies to

Only the NPC in command of a vessel acts on its archetype. A crewman with a role who commands nothing does nothing with it until he takes command. Where the commander's role comes from, strongest first:

  1. An archetype= on the spawn, such as an encounter entry or the Role picked in the Game Master's spawn panel.
  2. The occupant's own archetype=, on an <occupant> or <generate> row of the vessel class.
  3. The vessel class's archetype=, used only when the commander has none of his own.

An event can change a role during play with the Role: Set action; a blank name strips the role. Changing a role replaces only the standing jobs the old role gave. Orders from the mission or the Game Master are kept, and they outrank anything an archetype asks for.

A drone or other unmanned hull gets its mind from a processor rather than a person:

<processors>
  <processor name="CPU" archetype="Drone: Mine" autonomous="true" position="0 0 0" />
</processors>

An autonomous processor commands the ship whoever else is aboard. A class may have one; a second is demoted. This block is written in the vessel class file, as there is no editor field for it. A drone with no order and no standing task does nothing.

The XML

<archetype name="Escort" inherits="Pilot,Combat" tags="" bias-strength="0.5">
  <description>Stays with the ship it belongs to.</description>
  <bias valor="0.3" persistence="0.2" />
  <skill piloting="0.65" gunnery="0.55" />
  <task type="Attack" intent="Destroy" tactic="Screen" focus="0.60" />
  <task type="Escort" />
  <reflex type="AutoFire" remove="true" />
  <reflex type="Evade" tactic="Withdraw" />
</archetype>
  • inherits — parents, in order. The role is built from its parents first and itself last, so you write only what differs.
  • <task> — a standing job. Within the chain, the last layer to name a task type replaces the whole entry; nothing merges field by field. focus is its priority, from 0 to 1, and is usually best left to the type's own value (combat 0.70, logistics 0.60, routine patrols 0.20, exploring 0.10). tag picks what the task acts on, duration ends it after that many seconds, and <option> and <property> children carry task‑specific settings.
  • intent — for Attack, what counts as finished: Destroy, Immobilize, Disarm, Blind or Harm. Any other word, Disable included, falls back to fighting until the target is dead.
  • <reflex> — every commander has two standing reflexes, ThreatPosture and AutoFire. A reflex row adds one, changes one, or with remove="true" takes one away. Reflexes only run when nothing more important is.
  • <bias> — nudges to the eight temperament traits (mood, disposition, honor, humor, impulsivity, persistence, social, valor), each −1 to 1. Biases add up down the chain and are applied once, scaled by bias-strength (0.5 unless the role itself says otherwise; it is not inherited).
  • <skill> — piloting and gunnery from 0 to 1, where 1 is as good as the machine allows. The last layer that states a skill sets it. The base game ships four skill layers to inherit from: Rookie, Regular, Veteran and Ace. Gunnery error is an angle suited to close dogfights, so do not give it to starship roles that fight at long range. A hand‑flown hull (wing, rotor or VTV) whose gunnery nobody states aims at 0.55.
  • tags — labels for the editor's list. The game does not read them.

Archetypes in Hydra Studio

The module editor's NPC › Archetypes section lists the module's roles with their parents and the number of standing tasks each resolves to. Opening one shows the resolved role: the inheritance chain, the trait bias with the total each trait ends up at and who contributed it, and every standing task and reflex change marked as inherited, overridden, added or removed here.

Use it to read and check a role, and write the role in archetypes.xml. The editor currently has no working Save, and it has no fields for skill, timetables or a reflex's tactic. The vessel class editor's General section and the occupant dialog each have an Archetype picker, and those save with the vessel class.

Task plans

A task plan replaces the built‑in behavior of one task type with authored steps. It only takes effect when its name is a task type and it says shadows="true"; then every Acquire, say, whether ordered by a mission, a Game Master or an archetype, runs the plan. The base game's Acquire, Deliver, Mine and Resupply are plans. A plan with any other name is never used.

<task-definition name="Deliver" shadows="true" loop="false">
  <steps>
    <step name="Out" primitive="GoTo" tag="target" duration="600">
      <on-fail><action type="GotoStep" … /></on-fail>
    </step>
    <step name="Unload" primitive="TransferCargo" tag="target" flow="Unload">
      <gate><condition type="Duration" value="5" /></gate>
    </step>
  </steps>
</task-definition>

Steps run in order. Each waits for its gate, runs one primitive (GoTo, Dock, TransferCargo, TransferOccupants, Extract, FireWeapons or Scan, or none for a pure wait), and then fires its on‑success or on‑fail actions and its on‑exit actions. A failed step still moves on to the next one unless an action sends it elsewhere. A Duration gate is timed from the step's own start. A step's tag can be this, home, carrier, target or body, or any tag, meaning the nearest object that carries it.

The actions a step may fire are limited to the safe ones (variables, properties, tags, messages, sounds, cargo, docking, animation) unless the plan sets mission-actions="true".

The NPC › Task Plans section of the module editor lists the plans and opens each in the task editor, which does save: it rewrites the module's whole task-definitions.xml, so comments in that file do not survive, but descriptions do. Two of its fields are not acted on yet: a step's Tactic, and the Undock primitive.

Tactics

A tactic is a named bundle of settings for one task type: how far to stand off, how fast to approach, how aggressive to be, when to break off. The base game ships Attack tactics (Bombard, Press, Strafe, Circle, Broadside, Hit‑and‑Run, Screen), Investigate (Cautious, Direct), Dock (Careful, Boarding), Evade (Withdraw) and Explore (Close, Wide). A task names one with tactic=.

<tactic task="Attack" name="Strafe" standoff-reach="0.6" aggression="0.7">
  <description>Runs in, fires, and runs past.</description>
</tactic>

Tactics are written by hand in World/tactics.xml; there is no editor. Names are shared by every module in the game, so a tactic for one kind of hull can be scoped with movement="Leg" (or another movement type): a hull looks for its own movement's version first and falls back to the general one. Ranges written as standoff-reach, orbit-reach and min-reach are fractions of the ship's own weapon range, which keeps one tactic sensible across ships with different guns; an absolute range, if both are given, wins. A name that does not exist, or belongs to another task, leaves the task on its defaults and says so in the log.

An Attack can also offer a menu instead of one tactic: tactics="Strafe, Circle, Hold:0.5". The pilot chooses among the ones his skill allows, sticks with a choice for a while, and gives it up when it stops working. tactic-locked="true" forbids choosing.

Bots

A bot is a named character a Game Master can seat on a player ship during pre‑flight, by dragging it from the BOTS list onto a vessel in the roster. It boards as an occupant: alone, it takes the controls; with players aboard, it stands by.

<bots>
  <bot id="hunter" callsign="Hunter" tags="space">
    <description>…</description>
    <occupant firstname="…" archetype="Fighter Pilot" … />
  </bot>
</bots>

Bots live in World/bots.xml, or in a mission's own <bots> block, which replaces a module bot of the same id. A mission can restrict which bots may be seated with allow-bot on its players (ids or tags), set in the mission editor's bot restrictions. There is no Hydra Studio editor for bots.

Last updated 19 October 2026