Skip to content

Units & Companions

Units are the characters in the world — your colonists, enemies, and neutral NPCs. In Overseer Mode, you select and command units to build, demolish, and explore.

Each unit has a race and a faction. Race determines base stats (speed, view radius, sprite) via data-driven assets/races.ron. Faction determines behavior class. Any race can belong to any faction.

RaceHPEPNotes
Dwarf12080Colony default. Generated dwarven names.
Goblin6040Hostile default. Goblin name culture.
Skeleton400Hostile default. Uses goblin name culture.
Human10060Neutral default. Human name culture.
Deer8050Wild. No generated names.
WolfWild. No generated names.
FactionBehavior
ColonySelectable, commandable, possessable by the player
HostileAttacks on sight
NeutralNon-hostile — future trading
WildPassive fauna

Each unit has three core stats displayed in the HUD and unit panels:

StatDescription
Health (HP)Hit points. Unit dies at 0. Base value depends on race.
Energy (EP)Energy pool for actions and sprint. Base value depends on race.
LevelExperience level, shown as a badge in the HUD and unit cards.

Units execute commands from a queue. Available commands:

CommandDescription
MoveToPathfind to a target tile
BuildPlace a block at a tile using an item
DemolishRemove a block at a tile
PickupPick up an entity (dropped item)

Commands are queued sequentially. Hold Shift + right-click in Overseer Mode to append to the queue instead of replacing it.

Units use A* pathfinding to navigate to their target. The pathfinder respects:

  • Block movement rules (blocks_movement property)
  • Surface transitions (step up/down, walk, fall)
  • Z-level navigation via stairs

Using kinswardctl, you can assign multi-waypoint routes:

Terminal window
kinswardctl unit-plan <entity_id> 5,0,1 5,5,1 0,5,1

The global TaskQueue holds pending tasks. When a unit becomes idle, it automatically picks the nearest pending task from the queue and pathfinds to execute it.

Task types: Build, Demolish, Pickup.

Tasks can be created by:

  • Right-clicking in Overseer Mode
  • Zone operations (bulk build/demolish)
  • kinswardctl commands (task-add, zone-build, zone-demolish)

Companions are Colony units that follow behavioral patterns:

BehaviorDescription
FollowFollow a specific entity (typically the player)
StationStay in place

Use kinswardctl companion commands or the in-game companion system:

Terminal window
# List all companions
kinswardctl companion-list
# Set a companion to follow
kinswardctl companion-behavior <entity_id> follow
# Call all companions to follow
kinswardctl companion-call-all
# Dismiss all (station in place)
kinswardctl companion-dismiss-all

Units of sentient races (those with name cultures — Dwarf, Goblin, Skeleton, Human) receive 0–3 random traits at spawn. Traits are descriptive for now — stat modifiers will come with the attribute system.

TraitCategoryRarityEffect
Hardyphysical0.15Tough constitution, resistant to cold and disease
Quick Learnermental0.12Picks up skills faster
Night Owllifestyle0.12More productive at night
Clumsyphysical0.10Prone to accidents, slower at tasks
Strong Backphysical0.10Can carry heavier loads
Keenphysical0.08Sharp senses, extended field of view
Frailphysical0.08Weak constitution, takes more damage
FirstbornbirthrightspecialStarting player character only — not randomly assigned

Manage traits via kinswardctl:

Terminal window
kinswardctl traits # list all traits
kinswardctl unit-add-trait <ID> hardy # add trait
kinswardctl unit-remove-trait <ID> clumsy # remove trait

Sentient units receive generated names from racial syllable tables (defined in assets/names.ron). Dwarves get names like “Thorin Ironforge”, goblins like “Snagnak Rotfang”. Animals get descriptive names (“Deer #1”).

The world itself also receives a generated name (e.g. “Stormreach”) from the World culture table, visible via kinswardctl game-info.

In debug mode, new units can be spawned via kinswardctl:

Terminal window
# Spawn a dwarf colony unit at (10, 5, 1) — name auto-generated
kinswardctl spawn dwarf 10 5 1
# Spawn with explicit name and faction
kinswardctl spawn goblin 5 5 1 --faction hostile --name "Grikash"
# Spawn and possess (take direct control)
kinswardctl spawn dwarf 0 0 1 --controlled

Races: dwarf, goblin, skeleton, human, deer, wolf. Factions: colony (default), hostile, neutral, wild.

You can possess a Colony unit to take direct control in Adventure Mode. While possessing a unit, WASD moves that unit instead of the default player character.

Terminal window
kinswardctl possess <entity_id> # take control
kinswardctl possess # release