Skip to content

WorldOptions beta ​

Interface of @v12-engine/engine

ts
export interface WorldOptions extends WorldChecks

What a world is made of (new World): its ground and ways, its game, its players, its systems and hooks, and what it checks of itself

Members ​

areas ​

ts
areas?: AreaDef[];

Parts of the map the rules watch

hooks ​

ts
hooks?: HookDef[];

Hook handlers. The engine's own (coreHooks) when left out

listeners ​

ts
listeners?: ListenerDef[];

How the game reacts to events, subscribed in this order once the world is made

log ​

ts
log?: Logger;

The logger the world's own is made under (world.log): the root one when left out

logLevel ​

ts
logLevel?: LogLevel;

The least an entry of the world's log must matter to be said (Rules.log)

ts
navigation: Navigation;

The navigation units on the ground walk by

onError ​

ts
onError?: ErrorPolicy;

What becomes of a part of the game that throws (Rules.onError): it throws on, when left out

players ​

ts
players: PlayerInit[];

The players of the world, in order, from which its Players are made

randomRaces ​

ts
randomRaces?: readonly string[];

The races one is drawn from for a player given random: all of the game's when left out

registry ​

ts
registry: Registry;

The game's definitions: unit types, abilities, orders and the rest

seed ​

ts
seed?: number;

Seed for the world's random generator; 1 when left out

sequences ​

ts
sequences?: SequenceDef[];

Scripts of steps the game can start, by id

sidePaths ​

ts
sidePaths?: SidePaths;

The navigations the sides plan their routes on, of what each knows (Rules.paths: 'seen'). None when left out

systems ​

ts
systems: (world: World) => System[];

Makes the systems of the world, once it is made: what keeps state of its own keeps it for this world

terrain ​

ts
terrain: Terrain;

The ground the world stands on

tickRate ​

ts
tickRate?: number;

Simulation steps per second

timers ​

ts
timers?: TimerDef[];

What the game can set to go off later, by id

waterNavigation ​

ts
waterNavigation?: Navigation;

Where boats go (UnitTypeDef.naval): the deep water. None for a map without, and boats go on the ground