MapFile beta
Interface of @v12-engine/engine
export interface MapFileA map the way it is written to a file: JSON, with the layers packed
Members
author
author?: string;Who made the map (GameMap.author)
bounds
bounds?: CellRect;The part of the map play happens in, in cells (GameMap.bounds)
cameras
cameras?: MapCamera[];The saved views of the map (GameMap.cameras); left out when there are none
camps
camps: MapCamp[];The creeps that guard spots (GameMap.camps)
cells
cells?: Record<string, string[]>;The game's layers of cells (GameMap.cells), by id, a line of text for each row as the layers above. Left out for none
cliffHeight
cliffHeight: number;How much higher a level stands than the one below (GameMap.cliffHeight)
data
data?: Record<string, unknown>;Left out when the game keeps nothing with the map
day
day?: MapDay;The hour the game starts at and whether it moves (GameMap.day)
definitions
definitions?: GameData;The map's own definitions (GameMap.definitions)
depth
depth: number;The map's depth in cells
description
description: string;The map's description (GameMap.description)
doodads
doodads?: MapDoodad[];The scenery of the map (GameMap.doodads); left out when there are none
editor
editor?: Record<string, unknown>;Left out when the editor keeps nothing with the map
environment
environment?: MapEnvironment;What the map looks like beyond its ground: its water, light, sky (GameMap.environment)
explored
explored?: boolean;Whether the whole map starts explored (GameMap.explored)
forces
forces?: MapForce[];The map's teams, named (GameMap.forces)
format
format: number;The file format's version (MAP_FORMAT when written), which the reader brings older files up from
game
game?: string;The game the map was made for, by the id of its module (GameMap.game); any game when left out
generated
generated?: GeneratedWith;How the map was made when a generator made it: the seed and options (GameMap.generated)
ground
ground: string[];The layers of the ground, a line of text for each row (since format 3: before, one line for the whole layer): two people who change different rows change different lines, which git merges. The heights by corner, a row of the corners along x for each z; the rest by cell, a row of cells for each z
itemTables
itemTables?: MapItemTable[];The tables of what drops when something dies (GameMap.itemTables)
levels
levels: string[];The cliff levels, a line of text per row of cells (GameMap.levels)
loading
loading?: string;What the loading screen says (GameMap.loading)
meantFor
meantFor?: string;Who the map is for, as lists show it (GameMap.meantFor)
name
name: string;The map's name (GameMap.name)
objects
objects: MapObject[];What stands on the map when the game begins (GameMap.objects)
pathing
pathing?: string[];What is kept off cells by hand (GameMap.pathing), a line of text for each row as the layers above. Left out for none
paths
paths?: MapPath[];The named lines of the map (GameMap.paths); left out when there are none
players
players: MapPlayer[];The players who can take part (GameMap.players)
points
points?: MapPoint[];Left out when there are none
preview
preview?: string;A small picture of the map as a data URL, for lists of maps (GameMap.preview)
races
races?: string[];The races a lobby offers on the map, by id (GameMap.races)
ramps
ramps: string[];The ramp flags, a line of text per row of cells (GameMap.ramps)
randomGroups
randomGroups?: MapRandomGroup[];The groups that placed things can be drawn from (GameMap.randomGroups)
regions
regions?: MapRegion[];Left out when there are none, as files made before regions were have none
silence
silence?: string[];The map's checks it does not want, by their rules' ids (GameMap.silence)
tiles
tiles: string[];The paint layer, a line of text per row of cells (GameMap.tiles)
tileset
tileset: string[];See GameMap.tileset. Since format 2
water
water: string[];The water layer, a line of text per row of cells (GameMap.water)
width
width: number;The map's width in cells