Skip to content

Using the map editor

The map editor is how an admin builds the server’s map from inside the game: you fly through the level, pick the game’s own buildings, props, lights and doors from a panel, put them where you want them and change them with the mouse. Every change reaches every player at once and is saved by the server. What the map is and how it is kept is in Building on the map; this page is the editor itself, from opening it to moving your work to another server.

  • You need to be an admin on the server - the game mode decides who is one. A game mode may also open the editor for a player with limits of its own - a building plot, a number of objects - see SetPlayerEditor.
  • The server needs a map: [world] map in server.toml, which is on by default.
  • The panel is drawn by the game’s web engine, which comes with KCD:MP. A game without it cannot open the panel; the chat commands still work there.

Type /editor in the chat. Your character becomes the camera and flies, and the panel opens on the right. /editor again, or the ✕ at the panel’s top, closes it: your character lands wherever you flew to.

To Do
fly W A S D, Space up, C down, Shift faster
look around hold the right mouse button and move the mouse
fly to what is selected F
use the chat Enter, as always - chat commands work while the editor is open

The left mouse button belongs to the world: it selects, drags and places. The panel takes the mouse only while the pointer is over it.

  • The head: how many objects the map holds and its revision (every change counts one), ↺ undo and ↻ redo (also Ctrl+Z / Ctrl+Y), and ✕ to leave.
  • The tool bar: 1 Move, 2 Turn, 3 Scale, 4 Areas, 5 Nav - click one or press its key.
  • World / Local (X): whether the arrows and rings follow the world’s axes or the object’s own.
  • Snap (N), its grid in metres and its angle in degrees: moves land on the grid, turns go in steps of the angle.
  • The status line under the tools: green says what was done, red why the server refused it (another admin’s object, the map’s limit of objects, a game mode’s rule …).
  • Sections: Place, the selected object, Areas, Navigation, Layers and Shortcuts. A click on a section’s title folds it away or opens it again; Shortcuts starts folded and lists every key.

The Place section lists the game’s meshes by folder - click a folder to open it, the path above the list to go back - and its search box finds a mesh by any part of its name across all folders. The game’s unfinished placeholder models (they show plain white) are left out: Show … white placeholder models at the end of the list brings them back, marked white, and finished beside one places the game’s finished model of it instead. A click on a mesh starts placing it:

  1. The mesh follows the pointer over the ground and over other objects (a crate on a table, a lamp on a wall’s top).
  2. Q and E turn it before you place it.
  3. A left click puts it there. You keep placing the same mesh until you press the right mouse button or Stop placing.

Above the folders are the game’s working things: a Light (its colour, reach, strength and style - steady, flickering or pulsing - in the inspector), an Effect (a fire, smoke, a candle’s flame), a Sound playing where it stands, a Marker that only the editor and the game mode see (a spawn point, a gate of a race - its tag is the name the mode looks for) a Door that opens, closes and locks for everyone, and a Seat - a place to sit or a bed to sleep in, on anything (its pose in the inspector; its line points where the sitter looks). The game’s own chairs, benches and beds need no Seat: placed upright at their own size, they are sat on and slept in like the level’s. A chair seats the player on their own; tick its At a table in the inspector for a chair at a table (the arms rest on the table in front of it). Like the level’s own chairs, a chair never blocks a player - they would not get onto or off its seat - while the game mode’s actors still walk round it.

The game’s own ladders (the folder objects/manmade/common_fixtures/ladders/: the village ladders ladder_rustic_225 to ladder_rustic_575 and the two siege ladders) are climbed like the level’s: walk up to one and press the use key. Lean its top against a wall or a loft’s edge - turn it with the ring about its side axis, 5 to 15 degrees as the level’s lean - and keep its foot on the ground (the game offers no climb to a ladder whose foot lies 0.4 m or more under the player’s feet). The climb is always on the open side. A scaled ladder climbs as far as it is long; a stretched one, or one whose Solid is off, is only scenery. The broken and burned ladders are scenery too, as in the game.

A click on an object selects it; Shift or Ctrl with the click adds it to the selection or takes it out; a click on empty ground clears the selection.

  • Move (1): drag an arrow to move along it, or drag the object itself to slide it at its own height.
  • Turn (2): drag a ring to turn about its axis.
  • Scale (3): the box in the middle scales the object as a whole, the box at the end of an arrow stretches it along that axis - a wall made longer, a beam thinner, a barrel taller.
  • G drops the selection to the ground, Ctrl+D copies it beside itself, Delete takes it away.

The inspector under the selection does the same with numbers - type a value and press Enter:

Field What it is
Place where it stands, in metres (X east, Y north, Z up)
Turn its turn in degrees about Z (yaw), X (pitch) and Y (roll)
Scale its size along its own X, Y and Z (three alike: the whole object)
Solid whether players and the server’s characters bump into it; a solid object also clears the flowers, weeds and tall grass tufts under its floor and walls
Actors what the server’s characters make of it when they find their way: In the way (as its shape says), Blocks (never through), Walkable (they walk on it - a bridge, a ramp), Ignored
Draw distance how far away it is still drawn: 1-255, 100 is normal for its size, 255 as far as the game draws; 0 = the game’s own
LOD ratio how soon the game swaps in the object’s simpler models as players move away: 1-255, 100 is normal; higher swaps sooner and is lighter to draw (a town of many buildings), lower keeps the detailed model farther; 0 = the game’s own
Use prompt words players see on it with the use key, such as “Read the notice”; the game mode hears the key (OnPlayerUseMapObject)
Layer the layer it is on
Material one of the game’s materials in place of the mesh’s own (empty: its own)

Under the fields: Focus (fly to it), Copy, Ground, Delete, and Save as prefab (see Prefabs).

Your own pictures hang on the map like posters, banners and shop signs, and so do the web interface’s surface pages (a notice board, a sign with live text - Make a web interface). Put the pictures in the map folder’s pictures/ folder as PNG files - the file’s name is the picture’s: letters a-z first, then letters, digits, _ and -; at most 2048 pixels a side, 64 pictures and 8 megapixels in all - and type /map pictures reload.

  1. Click a name under Pictures and pages in the Place section.
  2. Point at a wall, or any face of a placed object - the picture stands on that face, facing you.
  3. Q and E turn it about the face; a left click hangs it.

Selected, a picture or page has its own fields: its Size in metres (width and height), how it Shows its see-through parts (Solid on a plain board; See-through, soft or See-through, hard showing the wall behind - a picture with see-through parts starts soft), its Glow (0 lit by the world like everything else, 1 as bright at night as by day) and what it Sits on.

A picture or a page hung on a placed object sits on that object: it moves, turns and stretches with it, and goes when the object is deleted. Take it off lets it go; /map attach <id> <other id> puts any object on another one.

The level’s own buildings, walls, rocks, trees and props come out with the chat, the editor open or not:

  1. Aim the centre of the screen at it.
  2. Type /map remove look. It is gone for everyone - players and the server’s characters walk where it stood. The invisible walls the level keeps around some props (so nobody climbs into a wrecked cart) go with them.
  3. /map near lists what is around you with numbers, the removals too; /map restore <number> puts one back. Looking where a removed thing stood and typing /map remove look again names it and its number.

A building is often several pieces - a facade, a roof, a cloister - taken out one look at a time. From very far away the game draws houses as merged models, so a house taken out can show again at that distance. The story’s shut gates and fences are level layers: /layer, not a removal.

A group you build often - a market stall, a camp, a guard post - is saved once and placed again anywhere:

  1. Select its objects (Shift-click), type a name under the inspector (letters, digits, - and _) and press Save as prefab.
  2. It appears in the Place section’s Prefabs list. Click it, turn it with Q / E, click to place the whole group - one undo takes it all back.
  3. The × beside a prefab deletes the prefab; what was placed from it stays.

As one unit: with the switch above the Prefabs list on, a click places the prefab as one unit - one map object that every player’s game draws as the prefab’s objects. A street of houses stays light for the server and every player (eighty houses are eighty objects, not two thousand), and a unit follows its prefab: save the prefab again under the same name and every unit of it changes at once. A click on any of its objects selects the whole unit; it moves, turns, scales (one size for all of it) and is deleted as one, and its inspector sets whether it is solid, its draw distance, its LOD ratio and its layer. To change one of its objects on its own, press Unpack in the inspector: the unit becomes ordinary objects (one undo puts it back). A prefab that units are placed from cannot be deleted until they are unpacked or deleted. Admins without the editor: /map prefab unit <name> at their feet, /map prefab unpack <id>.

The Areas tool (4) draws named areas on the ground - a town square, an arena, a no-fighting zone - whose rules are the game mode’s (OnPlayerEnterArea).

  • Box: drag on the ground (Shift while dragging: a circle). Circle: drag from its middle. Polygon: click the ground at each corner, then click the first corner again or press Close the outline; Backspace takes the last corner back.
  • Ctrl while dragging draws over an existing area instead of selecting it.
  • Click an area (or its name in the list) to select it; double-click the name to fly there.

A selected area has a Name (what the game mode uses), a Label players see when they walk in if Shown is on, its Height (bottom and top in metres), a Colour for the editor (a hex value such as 40c060), its Layer, and Actors: Nothing, Keep out (the server’s characters walk around it) or Floor (they walk a floor at its bottom - a raised stage).

The Nav tool (5) is about the server’s walking characters.

  • Nav view (V) draws where they can walk around you.
  • Path test: click two points on the ground and see the path they would take, and how long it is.
  • Nav link: click where a link starts and then where it leads - a jump, a gap, a ladder their walk cannot join by itself; Shift on the second click makes it one way. Click a link to select it; Delete the link removes it.

Every object is on a layer - base unless you say otherwise. The Layers section lists them with a switch each: a layer switched off hides all of its objects for everyone at once, such as an event’s build put up and taken down with one click. New into is the layer new objects go on. A game mode can also show a layer to some players only (SetPlayerMapLayer).

Several admins can have the editor open at once. Each sees the others’ work as it happens and who is editing (and how much they have selected) at the bottom of the panel. Undo and redo are each admin’s own: yours never takes back someone else’s change. An object another admin has selected is theirs while it stays selected - change it and the status line says who has it.

There is nothing to save by hand: every change is written by the server as you make it, and is kept through a restart or a crash.

  • /map save writes the map files at once (before stopping a server by force, for instance).
  • The map is backed up once a day, the newest 14 kept; /map backup makes one now and /map backups lists them.
  • Mistakes in a session: Ctrl+Z. Anything older: a backup or an export.

Build on a test server, then move the result to the live one - both on the same level:

  1. On the test server: /map export <name>. The whole map - objects, removals, areas, navigation links, layers and your pictures - is written as one file into the map folder’s exports/.
  2. Copy that file into the live server’s map folder, under exports/.
  3. On the live server:
    • /map import <name> replace makes the live map the same as the test server’s. The old map is backed up first, and players see the change at once - no restart. Anything built on the live server meanwhile is replaced too.
    • /map import <name> merge adds the test server’s objects beside the live map’s own - for one new building or camp. Merging the same file twice places everything twice.
  4. /map hash gives the same number on both servers after a replace.

Or stop the live server, copy the whole map folder over and start it again. More on the files: Building on the map.

Everything above has a chat command for admins - useful on a game without the web engine, or for exact work:

Command
/map place <mesh> [scale] a mesh at your feet, facing your way (/map place light, effect, sound, marker, door, seat [pose] for the working things)
/map place picture <name> [width], /map place surface <page> [width] a picture or a page in front of you
/map near [radius] what is around you, with numbers
/map move <id> <dx> <dy> <dz>, /map turn <id> <degrees>, /map scale <id> <scale> change one object
/map delete <id> delete one
/map attach <id> <other id> put one on another (0 takes it off)
/map remove look, /map restore <id> the level’s own objects
/map layer <name> on|off switch a layer
/map pictures [reload] list the pictures, or read the folder again
/map export, /map import, /map backup, /map save see above

/help lists them all.

  • The panel does not open: that copy of KCD:MP is missing its web engine; the chat commands still work.
  • A click goes through an object: an object with Solid off has no collision, so the editor uses its box instead - a picture hung on one lands on that box.
  • A building is solid where it looks a little different: with Solid on, KCD:MP uses the game’s own collision of an object, also when the game keeps a building’s in another piece. Some objects have none anywhere; for those it makes one from the object’s shape, slightly simplified on a very detailed building. Turn Solid off for decorations players should walk through.
  • Short grass shows through a floor: a solid object clears the flowers, weeds and tall grass tufts under it, but not the level’s short grass. Raise the floor a little above the ground, or build on a path or bare ground.
  • “Nothing to place it on there”: the pointer is on the sky; aim at the ground or an object.
  • A removed house shows again from far away: the game’s far-view models, see above.
  • “Nothing there to take out” while looking at a wall or a rock: the game cannot tell which piece of the level that spot belongs to, and /map remove look takes nothing rather than a guess (a guess could take the bush in front instead). Look at the same thing from another spot or another part of it.
  • A red line in the panel: the server’s reason - another admin’s object, a limit of the map, or a game mode’s rule (OnMapEdit).