SquadOptions beta
Interface of @v12-engine/engine/ai
export interface SquadOptionsHow 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
home?: number;How near home it fights on whatever the odds: there is nowhere to fall back to. 20 when left out
micro
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
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
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
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
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)