Skip to content

EconomyOptions beta ​

Interface of @v12-engine/engine/ai

ts
export interface EconomyOptions

How a brain runs its economy (BrainDef.economy, the seat's AiOptions.economy over it, the economy() module's own under both). Every field has a data form a save keeps; the function forms are the brain's to give again

Members ​

builders ​

ts
builders?: number;

Workers trained past what the bases want, to build with: a worker sent to build is off the mine meanwhile, and a mine with only as many as it serves would gather less. 1 when left out

expandWhen ​

ts
expandWhen?: AiCondition;

When it may expand: a condition (AiCondition, as data or a function). Four minutes in and with a building that trains soldiers, when left out

expansions ​

ts
expansions?: number;

Halls to have past the first, each by a mine nobody has a hall at: the seat's expansions, else none

lumberjacks ​

ts
lumberjacks?: number;

Workers on the other resource, at home only, where workersPer says nothing of it: 3 when left out

saturate ​

ts
saturate?: boolean;

Whether a base wants no more workers on a deposit than it serves (see the file's comment): yes when left out

trainWorkers ​

ts
trainWorkers?: boolean;

Whether its halls train workers up to what the bases want: yes when left out

workers ​

ts
workers?: number;

Workers on the game's money at each base, where workersPer says nothing of it: 8 when left out

workersFlee ​

ts
workersFlee?: boolean;

Whether workers a raid is on walk to a base no enemy is at, and back once theirs is clear: yes when left out

workersPer ​

ts
workersPer?: WorkersPer;

Workers on each resource at each base (WorkersPer): { gold: 5, lumber: 3 } at every base, or a function of the base for one that differs (home, an expansion). What it leaves out is workers and lumberjacks