Skip to content

SquadOptions beta ​

Interface of @v12-engine/engine/ai

ts
export interface SquadOptions

How a squad behaves around its task (SquadsOptions, ai.squads.make(name, units, options)): when it regroups, reinforces, retreats. Plain data, kept in a save

Members ​

home ​

ts
home?: number;

How near home it fights on whatever the odds: there is nowhere to fall back to. 20 when left out

micro ​

ts
micro?: boolean;

Whether the micro module (micro(), C2) fights for it once it is in a fight: focus fire, kiting, fleeing, siege. Yes when left out; false for a squad left to its units (a scout, a mission's guards on an order of the game's)

regroupWhen ​

ts
regroupWhen?: number | false;

The share of its units strayed (spread) at which it stops to regroup, on its way and out of a fight: 0.4. false never

reinforce ​

ts
reinforce?: boolean;

Whether it makes up what it lost since its task began from the pool (the idle fighters nothing holds): no when left out

retreatAt ​

ts
retreatAt?: number | false;

Its odds in a fight (Strength.odds) under which it falls back home, away from home: 0.3. false fights on to the last (a mission's guards)

spread ​

ts
spread?: number;

How far from its middle a unit may be before it counts as strayed: what a regroup brings in. Grows with the squad when left out (8, and three times the square root of its size above that: 12 for sixteen units)