Skip to content

Project layout

A mapbuilder project is a source directory (by default mapdata/) with this structure:

mapdata/
├── mapbuilder.toml          # configuration, see Configuration
├── maps/                    # one directory per generated file
│   ├── grplugin-phoenix/
│   │   ├── 000-colors.d/    # per-profile variants
│   │   │   ├── bright.txt
│   │   │   └── dark.txt
│   │   ├── 001-symbols.txt  # copied as-is
│   │   └── 100-EDDM/
│   │       ├── 101-ground.jinja    # rendered template
│   │       └── 107-taxilanes.jinja
│   └── topsky-phoenix/
│       └── …
├── gis/                     # your data files, referenced from mapbuilder.toml
└── kml/

Maps

Each directory below maps/ produces one output file. Which file it goes to, and for which profile, is set in the [profiles] section of mapbuilder.toml:

[profiles.TWR_DAY]
maps = [
    { map = "grplugin-phoenix", target = "EDMM/Plugins/GRPlugin/TWR_PHX_DAY/GRpluginMaps.txt" },
]

mapbuilder goes through a map directory in alphabetical order, including all subdirectories, and appends the content of every file to the output:

File Treatment
*.txt Copied as-is
*.jinja Rendered as a template
other files Skipped with a warning

Prefix files and directories with numbers (100-EDDM/, 107-taxilanes.jinja) to control the order in the output. Order matters: plugins draw maps in file order within a layer, and colour and symbol definitions have to come before the maps that use them.

Per-profile variants

Sometimes a part of a map differs between profiles, for example colours for a day and a night profile. Put the variants into a directory ending in .d, named after the profile:

000-colors.d/
├── TWR_DAY.txt      # used for profile TWR_DAY
├── bright.txt       # used for profiles with the alias "bright"
└── dark.txt

For each profile, mapbuilder uses the first file it finds, trying the profile name first and then the profile's aliases in order, each as .txt and then .jinja. If no file matches, the directory is skipped for that profile with a warning. Several profiles can share a variant through a common alias.

Output

Every generated file starts with a header naming the map and profile:

// grplugin-phoenix TWR_DAY
// Auto-generated by mapbuilder. Do not edit manually.
//VERSION:1791234567

The //VERSION: line is only added for maps with add-version = true; it contains the build time and lets the plugins pick the newest copy of a maps file.

When writing the file, mapbuilder:

  • separates the content of the individual source files with a blank line,
  • removes indentation at the beginning of lines, so you can indent templates freely,
  • collapses several blank lines into one.

Output files are written in the ISO-8859-1 (Latin-1) encoding that EuroScope expects; .txt source files are read in the same encoding.