Map Editor Documentation

Creating a Map

Sizes, biomes, generated starting layouts, spawn points, the environment block and what a saved map actually contains.

Page 3 of 12

New maps start one of two ways: an empty grid at the size and biome you choose, or a generated layout you then edit. Generating first is usually faster, even for a map that ends up nothing like the generated one, because the generator places gold, trees, water and neutral camps in a distribution that plays sensibly and gives you something to react to.

Size and biome

SizeTilesTypical use
Small961v1, tight
Medium1281v1 and 2v2
Large1602v2, 3v3
Huge2564v4, free-for-all, exploration maps

Size is fixed after creation. Everything else can change.

The biome sets the ground textures, the water and sky palettes, the tree species, the default weather and the rock colour. It is a look, not a rule set: no unit, building or ability behaves differently in one biome than another. The one exception is that cave biomes suppress the sky and mount an enclosure overhead, because an open sky above a cave reads badly from any camera angle that can see the horizon.

Spawn points

A spawn point is where a seat's camera starts. By default it is also where that seat's town hall goes, offset so the 4x4 hall is centred on the point rather than hanging off it.

Those two roles can be separated. A seat can carry its own camera position, so the match opens looking at something other than the base: a defended chokepoint on a Tower Defense map, or a hero standing away from the buildings. And a map can turn off starting bases entirely with a rule rather than by accident. Previously, placing a single player-owned building anywhere in a map removed every seat's automatic base, which is a surprising way to lose seven town halls.

Two seats is the normal minimum. One is legal if the map declares a roster of one seat, and there are two things to get right when you do; see Players and Teams.

The environment block

The Environment panel sets the map's weather, time of day, sky colours, light tint and air thickness. Each field starts at its biome default and is stored only when you change it, so a map you never opened the panel on carries no environment data at all and saves to exactly the bytes it would have before.

One field on that panel changes how the map plays, and the panel labels it:

Time of day is a balance decision. Night subtracts from every unit's sight radius, so a night map is a different game from the same map at noon.

Because it changes the simulation, time of day is stored in the map and applied identically on every machine in a match. It is never a graphics setting, and there is no way for one player in a match to see a different time of day from another. The cycle speed control sits alongside it: zero freezes the map at whatever time you picked, one is the normal cycle, and higher values run the sun faster for a map that wants visible day and night phases inside a short match.

Everything else on the panel is presentation. Weather, sky, tint and fog are free to differ between machines, which is why a low graphics profile can turn weather off without affecting the match.

Cross-biome ground textures

The Tileset panel sources each of the thirty ground texture slots separately. Six layers (rock, dirt, forest floor, grass, water, shore) with five variants each, and any slot can take its texture from any biome. Jungle grass over desert dirt with cave rock is one map, and it costs nothing at runtime because the number of textures the ground shader samples does not change.

Two behaviours to know about, both of which the panel warns you about rather than leaving you to discover:

Only the first variant of each layer appears in 2D. The 3D renderer picks a variant per irregular patch of ground, so mixed variants really do intermix organically. The 2D renderer draws the first variant and nothing else, because the canvas version of that irregular sampler measured about 316 ms per chunk and was rejected. Sourcing ground_1 from another biome shows up everywhere. Sourcing ground_3 from another biome shows up in 3D only.

The scenery ring outside the map is graded from the average colour of your ground textures. Change where the ground comes from and the ring has to be regraded to match, or the edge of the playable area reads as a coloured rectangle from any distant camera. The editor does that regrade for you and tells you it has.

What a saved map contains

The file is compact and mostly run-length encoded. Terrain is a string of runs per row. Elevation and ramps are two more strings in the same format, and both are left out entirely when the map is flat, which is why every map authored before elevation existed still reads and re-saves byte for byte. The same rule applies to the environment block and the tileset block: default means absent, absent means default.

Entities are stored as a type id, a position and an owner, plus whatever properties you set on them. A map that sets no properties writes no properties.

Two fields are easy to confuse and must not be. Mercenary camps go in mercCamps, not in buildings. A camp written into buildings spawns as an invulnerable prop with no hireable stock: it looks right, sits in the right place and does nothing. That is the single quietest failure in the format, and it is the reason the validator has a rule for it.

Saving

Drafts save to your browser and to your account. Neither is the published map; publishing is a separate step covered in Publishing, and it runs the full validator first.