Skip to content

MapModeOptions beta ​

Interface of @v12-engine/engine/server

ts
export interface MapModeOptions

How a mode is made from a map (mapMode)

Members ​

ai ​

ts
ai?: GameMode['ai'] | null;

How a computer player in a seat plays: against everyone else's base when left out, null for none

brain ​

ts
brain?: ModeBrain;

Which brain plays a seat of the computer: the first the game lists when left out

onStart ​

ts
onStart?: (world: World, context: {
        map: GameMap;
        settings: Record<string, string>;
    }) => void | Promise<void>;

What the game does once a world is made from the map, before anyone plays (the game's start, as a page or startServer runs it): the units at each start, the first wave sent. Nothing when left out

seats ​

ts
seats?: ModeSeat[];

The seats a player may take. One for each player of the map with a start when left out