Skip to content

CampaignProgress beta ​

Interface of @v12-engine/engine

ts
export interface CampaignProgress<D extends object = Record<string, unknown>>

How far a campaign has got, as plain data to keep between games: the mission it is at, the missions won and how long each took, the heroes carried out of the last one won, and the game's own state of it (data, of the type D the campaign says: choices made, gold saved up, the units that go on; what each mission won carries, merged in). It says which format it is in, so that what was kept is read again when the format changes

Members ​

at ​

ts
at: string;

The mission to play next

campaign ​

ts
campaign: string;

The campaign it is of, by id

data ​

ts
data: Partial<D>;

The game's own, plain data: what the missions won carried (MissionDef.carry), each mission's keys over the ones before

difficulty ​

ts
difficulty?: string;

The difficulty chosen for it (CampaignDef.difficulties), by name: its missions' computers play on it

done ​

ts
done: Record<string, MissionResult>;

Missions won, by id

format ​

ts
format: number;

The version of the progress file's format, so what was kept is read again when the format changes

heroes ​

ts
heroes: HeroRecord[];

The heroes carried into the next mission