WantData beta
Interface of @v12-engine/engine/ai
export interface WantDataSomething a computer player wants built or trained, as plain data (a map's file, a rule's action, a seat's options): a type, how many, under what condition, where, how important. WantData is what a save keeps; Want is the same with the function forms
Members
by
by?: string;Who wants it, for the report: order, production, economy, a goal's or a rule's id
count
count?: number;How many of it to have, those on their way counted: 1 when left out
id
id?: string;Its name: what the memory, the report and drop know it by. Made up when left out
keep
keep?: boolean;Whether the want stands: kept once met, and short again when what it made is lost, so that it is built anew. Wants of a brain's or a seat's options stand; one added as the game goes is dropped once met, unless it says so
near
near?: Vec2 | string;Where: a point, or the name of an entity the map or rules named. Home when left out
placement
placement?: PlacementName;How its spot is chosen (PlacementName): what the type declares, the brain's table, or the role's default when left out
priority
priority?: number;Wants are taken most important first, and the most important one that cannot be paid for saves up: 0 when left out
rebuild
rebuild?: boolean;For a standing want: whether a building lost is built again (the plan's rebuild when left out)
siteTimeout
siteTimeout?: number;Seconds without a spot for it before a want that does not stand is given up: the plan's siteTimeout when left out
spare
spare?: number;Money to have left over after paying for it: a luxury that waits for gold to spare. 0 when left out
type
type: string;The unit type wanted: a building, or a unit (whose buildings the plan puts up; the production plan trains it)
when
when?: AiConditionData;Only while this holds (AiConditionData, as a rule's): a tower after the first attack, a second hall past five minutes
within
within?: number;How far from there at the most: 22 when left out