The automapper
Posted by Kyle Hankinson November 12th, 2026
MUD Client can draw a map of the game as you walk, built from the room data your MUD sends over GMCP. This post covers how to turn it on, how rooms are laid out, what the map window shows, and the commands that help when a layout goes wrong.
What you need
- A game that sends
Room.Infoover GMCP. Many do; type#gmcpafter moving and look for aRoom.Infoentry with a room number (num) and exits. - GMCP turned on for the world (Edit Connection > Advanced > Enable GMCP; it is on by default).
- A trigger that hands each room to the mapper. The map is built by the
mapUpdate()script function, so a trigger decides when it runs. The Lost Wishes world that comes with MUD Client on Windows already has one, called Map.
The Map trigger
Open the Scripting window, add a trigger, and set:
- Pattern type: Variable updated
- Match string:
Room.Info.num - Action:
// Every time GMCP says you are in a new room, put it on the map.
var room = getGMCP('Room.Info');
if (room) {
mapUpdate(room);
}
Save it and walk around. A Variable updated trigger fires whenever that GMCP value changes, which here means each time you enter a new room. GMCP triggers explains this trigger type in more detail.
What the mapper reads
From each Room.Info message the mapper uses:
num- the room's unique number. Required: a message without one is skipped.name- shown when you hover over the room.area(orareaId) - which area map the room belongs to.exits- each direction and the room number it leads to.coord- optionalx,yandz. When a game sends coordinates, the room is placed exactly there.
If your game has no GMCP room data, you can still feed the mapper yourself: build an object with at least a num and an exits list (for example from the room text, in a trigger) and pass it to mapUpdate().
How rooms are laid out
Each area gets its own grid. North, south, east and west (and the diagonals) move one square; up and down move one level. When a new room arrives, MUD Client places it using the first of these that works:
- The way you walked. You went north from a room already on the map, so the new room goes one square north of it.
- Its own exits. One of the new room's exits leads to a room already on the map, so it is placed next to that one.
- Inside rooms. Rooms entered with words like
enterortentgo into the nearest free square. - A guess. After a teleport, the room goes beside the area and is moved into place the first time you walk into it from a neighbour.
Once placed, a room keeps its square, so the map stays steady while you play. If two rooms ever share a square, the square is split between them.
The map window
Open the map with View > Map. A world's UI can also put the map in a side dock, as the Lost Wishes world does in its right dock.
- The room you are in is drawn in gold, and the map pans to keep it in view as you walk.
- The area name and the level (
Z: 0) show at the top. Page Up and Page Down change level. - Dashed squares are exits you have not explored yet.
- ▲ and ▼ mark up and down exits, and ◆ marks exits that are not compass directions, such as
enterorclimb. - Hover over a room to see its name and any named exits.
- Use the - and + buttons to zoom, click the percentage to reset to 100%, and ⌂ to fit the whole area. Drag to pan.
- Click a room next to the one you are in to walk there. The map does not plan routes across several rooms.
The map shows the area you are in. Walk into another area and it switches to that area's map.
Where the map is saved
Each world keeps its map in a file called map.db inside the world's folder, saved a room at a time as you walk. The file is the same on Mac and Windows, so a world in a shared worlds folder opens with its map on either.
Commands
#rebuildMap- lays out every area again from scratch, starting from each area's lowest room number and following the exits. Use it if an area has become tangled, for example after a lot of teleporting.#logMap- prints the rooms the mapper knows about, with their grid positions, which helps when working out why a room landed where it did.
Tips
- Use
#gmcpto see exactly what your game sends inRoom.Info, including its exit names. - Rooms in dungeons that are rebuilt each visit (sent with an
instance) are drawn while you are there but not saved, so old copies do not pile up. - If a layout looks wrong after an update to the game's areas,
#rebuildMapis usually all it takes.