Map Explorer Map File Format

Map Explorer reads maps from a very simple text file format. The suggested file extension for map files is .map.

The files are opened in the platform character set. That means that only ASCII characters can be portably used (except in comments, where anything goes).

A map file is a sequence of lines. Each line may either be empty, contain just a comment, or contain a tag followed by the necessary attributes. A comment starts with the character #. Tags must be written in lower-case. The following tags are supported:

map name Required. The map name. It is displayed in the title bar.
width number Required. The width of the map. Must be between 1 and 99.
height number Required. The height of the map. Must be between 1 and 26.
basecolor color Set a color for all map squares that are not colored by terrain features or special areas. The default is white (ffffff).
image filename Specify the map image file name within the Vassal DDM mod archive.
bloodrock squares Blood rock.
death_zone squares Zone of Death.
difficult squares Difficult terrain.
exit player squares Exit squares.
forest squares Forest.
haunted squares Haunted.
lava squares Lava.
magic squares Magic circle.
pit squares Pits.
risky squares Risky terrain.
smoke squares Smoke.
solid squares Solid rock.
spikestones squares Spike stones.
start player squares Start areas.
statue squares Statues.
steep_slope squares Steep slope.
summoning squares Summoning circle.
teleporter squares Teleporter.
victory player squares Victory areas.
wall ( direction squares )* Walls.
waterfall squares Waterfall.

The tags width and height must precede any other tags except for map and basecolor.

The following tag attributes are used:

area Either a single square, or a rectangular area defined by two squares separated by a hyphen (no whitespace allowed).
color An RGB color as a hexadecimal number. The first two digits are the red component, the middle two the green component, and the last two the blue component. Examples: ffffff (white), 0000ff (blue), 808080 (medium gray).
direction north, east, south, or west.
name Any string extending to the end of the line. May contain whitespace. Characters are limited to ASCII, at the moment (No accents, etc.)
number A positive integer.
player A or B.
square A map square: an upper-case letter for the row, followed by the column number. No whitespace is allowed between row and column. Columns are counted from the left starting with 1. Rows are counted from the bottom, starting with A (this is why the map height is limited to 26 rows). Examples: A1, M13, U30.
squares One or more areas, separated by spaces.


Just look at any of the .map files included with Map Explorer.