ScoreStatDef beta
Interface of @v12-engine/engine
export interface ScoreStatDefA number the score keeps for each player (RuleSettings.score, defineStat): what it is called, how it adds up, where it comes from, and how it is shown. One with no source is counted by the game's code alone (world.score.add)
Members
byType
byType?: boolean;Kept by what it was counted of too (ScoreCount.type): units killed by unit type, abilities cast by ability
category
category?: string;The tab of the score screen it is in: units, heroes, resources, combat, or the game's own. other when left out
description
description?: string;What the screen says it is, in a tip
format
format?: ScoreFormat;How its number is written: number (when left out), decimal, percent (0 to 1), time (seconds)
from
from?: ScoreSource | readonly ScoreSource[];The events it is counted from
hidden
hidden?: boolean;Counted, and not on the score screen: for the game's own use (an achievement, a mission's goal)
id
id: string;Its own, among the game's stats: world.score.add(player, id, …) names it
kind
kind?: ScoreKind;How it adds up: sum when left out, last for one that only samples
label
label?: string;What it is called on a screen: its id when left out
sample
sample?(world: World, player: PlayerId): number | undefined;A gauge: what it is for a player now (their supply used, their gold), read once a second and at each point of the timeline, and taken as kind says (last when left out). Nothing taken for undefined
timeline
timeline?: boolean;On the timeline: sampled every ScoreSettings.every seconds, for a screen's graph