
[Q] What is the mapfile format?

[A] The first line, which can be blank, is the name of the map
page. Then comes forty lines, each of forty characters. These
contain the letters A-P and represent the colors of the 1600 hexes
of the map page. The colors are coded as follows:

    A  Black    E  Red       I  Dark Grey     M  Light Red
    B  Blue     F  Magenta   J  Light Blue    N  Light Magenta
    C  Green    G  Brown     K  Light Green   O  Light Yellow
    D  Cyan     H  White     L  Light Cyan    P  Bright White

Then comes any lines that the map may contain (roads, rivers,
etc). These take the following form:

$aaaa-bbbb-cd-e

aaaa is the starting hex, bbbb is the finishing hex. Either of
these can be between 0001 and 1600. c&d refer to whether or not the
line crosses into another page. More specifically, they refer to
where the map page of bbbb is in relation to the map page of aaaa
(which is always the current map page).  Think of the adjoining
pages like this:

                    1

                1   2   3

                    3

c is the horizontal and d is the vertical, so if cd=22 then the
line is contained entirely within the current map page. If c=1 then
the line goes off to the left. If c=3 then the line goes right.
Likewise, if d=1 then the line goes to the next page up, and if d=3
then the line goes south.

Then, finally, come the locations. These take the form:

@aaaa-b-Name

aaaa is the hex of the location. b is either 1 or 2 depending on
whether or not you want a small or large font for the Name which is
displayed on the map. One thing to be aware of is that small font
locations get a marker, a small square which precisely situates the
location within a single hex. If a large font is used, you don't
get this.

You can attach files or menus to a location using this form:

@aaaa-b-Name:file.txt   or   @aaaa-b-Name:file.mnu

You can also create links to different map locations or different
maps entirely using this form:

@aaaa-b-Name:<mapdir-mappage-cccc>

Mapdir is the main directory of the map you are linking to (for
example: sample, this referring to the sample world). Mappage is
the filename of the map page you are linking to w/o the .map
extension (for example: n000e000). cccc is the hex number that you
are linking to (for example: 0123).

