Skip to content

Terrain and painting ​

Shape the ground, add cliffs, and paint it with your game's tiles or grounds of your own. Every brush is on the tool strip in the scene and in the Terrain panel (left rail).

Raise and lower the ground ​

  1. Press H (or click the height icon on the tool strip). Press H again to cycle through raise, lower, smooth, flatten, set height, roughen, terraces and erode.
  2. Set size, strength and softness on the bar beside the strip, or use [ ] (size) and ; ' (strength).
  3. Drag on the map. Hold Shift to do the opposite (raise lowers).
  4. For Set height or Flatten, press I (or Ctrl+click) to take the height under the pointer.

Erode slides what is steeper than the Talus (0.5 a cell) down to its foot. Brushes can be round or square, and reach up to 16 cells from their middle (a sixteenth of the longer side on maps past 256).

Make cliffs and ramps ​

  1. Press C for the cliff brushes.
  2. Drag to raise a cliff level; Shift lowers one.
  3. Pick the ramp brush from the same family to join two levels.

Cliff faces are rock under the top's ground. To change their look, see Change how cliffs look.

Paint the ground ​

  1. Press B for paint.
  2. Pick a tile from the swatches in the Terrain panel (or I on the map to take the tile under the pointer).
  3. Drag to paint, or pick Fill to fill a patch, or Replace to swap one tile for another everywhere.
  4. To paint only where it is steep or high ("rock on everything steep"), set the brush's steeper than or higher than.

Recent under the swatches has the last eight tiles you painted with.

Clear trees and grass as you draw ​

Tick Clear scenery and grass on the brush's bar (or in the Terrain panel) and every brush that draws on the ground (heights, cliffs and ramps, water, paint, a layer of cells, pathing) takes away the trees and doodads under it and cuts the grass and bushes there, as it goes. Units, buildings, mines, bridges and gates stay. One Undo brings the stroke's ground, trees and grass back together. It is off until you tick it, and the editor remembers it, not the map.

Paint by height and slope automatically ​

  1. Open the Terrain panel's Rules fold.
  2. Add bands: each a tile, a height range and a slope range in degrees (leave a limit empty for none). For example: snow high, rock steep, grass low and flat.
  3. Press Apply to paint the map once, or tick Keep live to repaint after every ground change.

Bands are tried in order; the first that fits a cell paints it. A cell no band fits keeps its paint, so hand painting still works.

Make a ground from a picture, a pattern or a mix ​

  1. Under the swatches, pick New ground from a picture… (a PNG, JPEG or WebP), New ground from a pattern… (grass, dirt, gravel, sand, rock, snow, cobbles, mud, moss, ice, lava, planks, flagstones and more, or your game's own) or New ground mixed of two….
  2. The Ground editor opens. Set its size, turn, seams, tint, brightness, contrast and saturation; for a pattern, its own sliders and Another for a new seed.
  3. Optional: Add a layer to lay patterns or pictures over it (over, multiply, add, lighten, darken), everywhere, in patches, or by lightness.
  4. Set Where it meets another: how deep its border blends, crisp and ragged or soft.
  5. Paint with it.

Right-click a swatch to open its Ground editor again, rename it, or remove it (its paint goes; undo brings it back). Save as a picture turns a pattern into a file. A texture already in the project becomes a ground with Paint the ground with it (Assets panel), or from Pictures to paint with under the swatches.

Blend borders between tiles ​

  1. Open Look (right rail) › Borders of tiles.
  2. Pick two tiles (or a tile and unpainted ground, or ground and water for a shore).
  3. Pick a texture or a pattern for where they meet. See-through parts show the tiles.
  4. Adjust… sets its size, turn, seams and look.

Change how cliffs look ​

  1. Open Look › Cliffs.
  2. Pick a texture or a pattern for the faces. Under picks every cliff, or only cliffs whose top is painted with a given tile.
  3. Adjust… opens the Ground editor, with Shape: a style (rough, strata, columns, boulders, eroded, or your game's), depth, detail, variation, rounded corners, and rocks along the walls.
  4. To paint different looks on different walls, press Add a look, set it up, then Paint it on the walls. Erase takes looks off.

As the game's removes the map's own cliffs; Plain draws grid-style walls.

Stop units walking or building somewhere ​

  1. Open the Terrain panel's Pathing.
  2. Pick No building (units still walk), Wall (nothing walks or builds) or Clear.
  3. Paint. Walls show magenta and no-building yellow while the brush is picked.

View › Where one walks (Shift+P) and Where one builds (Shift+B) show the result.

Paint a layer of cells (grass, bushes, blight) ​

Your game declares its layers (defineCellLayer).

  1. Open the Terrain panel. Each layer has a section of its own, under its name (Grass, Bushes).
  2. Click a value of a layer to pick its brush (No grass takes it away).
  3. Paint. View › Layers of cells (Shift+Y) shows them always.

A layer of grass or bushes also has the Patch tool, its Styles, and the Grass and bushes fold for its look and each style's rules. See Grass and bushes in the editor.

Carve a road along a path ​

  1. Draw a path with the path tool (L).
  2. In the Inspector, press Carve: the land under it is smoothed along and levelled across, eased into the land on each side.
  3. Or tick Carves its bed to keep it carved as you move the path: set its width, depth, ground, banks, and water for a river.

A carved bed follows the path's points as you drag them; the land underneath stays as you painted it.

Make a fair map with symmetry ​

  1. Pick a symmetry at the top of the Terrain panel (or Map › Symmetry): mirrored across x, z or both, a half turn, or quarter turns.
  2. Paint and place as usual: every brush stroke and everything put down is mirrored.
  3. With the select tool, tick Move the mirrors too to drag mirrored copies together.

Make a map from a generator ​

  1. Open File › New map from a generator… (a game must have a generator).
  2. Set the size, players, symmetry, seed (🎲 for another) and the generator's own sliders.
  3. Watch the preview, then press Make.

Map › Regenerate makes it again with the next seed. See Maps.

Resize or shift the map ​

  1. Open the Terrain panel's Size section.
  2. Grow or cut each side. What falls off the edge is dropped, and everything else moves along.
  3. Offset shifts everything by whole cells, keeping the size.

Heightmap reads or writes a heightmap, and New land makes new land from a seed.

Save a brush ​

  1. Set a brush the way you like it.
  2. Press Save at the end of its bar. Type a name in the list to save it under that name.
  3. Pick it from the list later; × forgets it.

In code ​

ts
// brushes and painting
editor.paintCells('bushes', 1)

// patches of grass and their styles: editor.styles (see Grass and bushes in the editor)
editor.paintPathing(BLOCKS_WALK)
editor.saveBrushPreset('Big soft raise')
editor.useBrushPreset('Big soft raise')
editor.setPrefs({ clearUnderBrush: true }) // Clear scenery and grass

// grounds of the map's own
editor.groundFromPicture(file)
editor.groundFromTexture('textures/moss.png')
editor.setGround(id, { blendDepth: 0.1 })
editor.addGroundLayer(id, layer)

// paint by height and slope
editor.setTerrainRules({ bands, live: true })
editor.applyTerrainRules()

// cliffs
editor.look.setCliff({ shape: { style: 'strata', rocks: { density: 1 } } })
editor.look.addCliffLook(look)

// roads
editor.brushes.carvePath(pathId, { bank: 2, smooth: 4, tile: 'dirt' })
editor.doc.markers.setPath(pathId, { profile: { width: 3, depth: 0.5, water: 1 } })

// size and generators
editor.offsetMap({ x: 8, z: 0 })
editor.openGenerated(options)
editor.regenerate(seed)

resizeMap(map, sides, [mapLooksResizer]) resizes a map file without the editor.

Reference ​

Brush families ​

KeyFamilyBrushes
HHeightRaise, lower, smooth, flatten, set height, roughen, terraces, erode
CCliffsCliff up and down, ramps
VWaterWater, shallows, dry land, Flood (Water)
BPaintBrush, fill, replace
TThingsScatter; erase (everything, things, doodads, camps, a kind of the game's)

Grounds of the map's own ​

A ground is kept in the map (environment.tiles, MapTile), painted after the game's tiles, and drawn the same in play. A game's own tiles take the same fields in their look (TileLook).

FieldWhat it is
scaleHow many cells its picture covers
turnIts turn
seamlessEdges blended or mirrored, for a picture that does not tile
blendDepthHow deep its border with another ground blends
heightA height picture (light is high) for the border blend
adjustTint, brightness, contrast, saturation
patternA pattern made in code, with its params
mixTwo grounds mixed in patches of noise
layersPatterns or pictures laid over it (MapGroundLayer)

In code: editor.groundFromPattern, groundPatternToPicture, groundFromMix, setGroundMix, setGroundLayer, removeGroundLayer, moveGroundLayer, removeGround; on a MapEditor, addTile, setTile, removeTile. The game's tiles are Rules.tiles (defineTile) with their look in GameView.ground.tiles.

Kept with the map ​

WhatWhere
PathingGameMap.pathing: BLOCKS_BUILD or BLOCKS_WALK a cell
Cell layersGameMap.cells; read with terrain.cellAt(layer, x, z)
Height and slope rulesGameMap.editor.terrainRules (TerrainBand, TerrainRules)
Cliffs' lookMapEnvironment.cliff (MapCliff)
Tile bordersMapTransition
How it was generatedGameMap.generated
A path's bedMapPath.profile (PathProfile)

At run time, world.setCells(layer, cells, value) changes a cell layer, and world.nav.addObstacle blocks the way. The heights go from -4 to 16 unless the game says otherwise (MapEditorDef.heights).