Skip to content

ProductionPlanOptions beta ​

Interface of @v12-engine/engine/ai

ts
export interface ProductionPlanOptions

How the production plan goes about it (BrainDef.plans.production, the production() module; the data of it in AiOptions.composition and research)

Members ​

composition ​

ts
composition?: Composition | ((ai: Brain) => Composition);

The army it wants (Composition), or a function of the brain giving it. Even shares of every soldier type it can train when left out

counters ​

ts
counters?: number;

How much what answers the enemy's army seen pulls the shares about: 0 not at all, 1 (left out) as much as a share; a type that cannot hit what they field is not trained while they field it

priority ​

ts
priority?: number;

How important training and research are to the purse (Purse): 0 when left out, under every want that saves

queue ​

ts
queue?: number;

How many may queue at one building: 2 when left out

research ​

ts
research?: string[] | ((ai: Brain) => string | undefined);

Upgrades to research, in order, by id (the first it can is next), or a function of the brain giving the next; what the army it has uses most when left out

researchSpare ​

ts
researchSpare?: number;

Money to have left over before researching: 200 when left out (research is a luxury)

supplyAhead ​

ts
supplyAhead?: boolean;

Whether to want one more of what provides supply when what it would train next does not fit: yes when left out

supplyMargin ​

ts
supplyMargin?: number;

Supply to keep free beyond the next unit's, so that the farm is up before it is needed: 4 when left out

train ​

ts
train?: boolean;

Whether it trains soldiers at all: yes when left out. Workers and heroes are the economy's and the hero module's

upkeepSpare ​

ts
upkeepSpare?: number;

Money free past which upkeep is not read (it would lie idle else): UPKEEP_SPARE (600) when left out

upkeepTier ​

ts
upkeepTier?: number | false;

The tier of the game's upkeep (Rules.upkeep: 0 none, 1 the first) the composition trains no further into: a soldier that would take the supply used past it waits, and no supply is wanted past it, unless the money would lie idle (upkeepSpare). What is wanted outright (a wave's, a build order's) is trained all the same. UPKEEP_TIER (1) when left out; false reads no upkeep