FOnline Engine
Current master GitHub
Documentation Docs/en/reference/map-format/syntax.md

Map File Syntax

Generated reference. Do not edit directly. Update BuildTools/MapFormatInterface.json or the owning engine metadata, then run python BuildTools/docs_map_format.py --write.

Index Syntax Properties Baking Validation Canonical JSON Authoring guide

A map container is a configured prototype file with one or more [ProtoMap] anchors. Each anchor owns nested [$Name/Critter] and [$Name/Item] sections; an explicit map id may replace $Name.

Section forms

Stable ID Syntax Receiver Cardinality Meaning
map-format.section.proto-map [ProtoMap] Map one or more per container Declares map-level properties and starts the context used by following [$Name/Critter] and [$Name/Item] sections.
map-format.section.critter [$Name/Critter] or [<MapId>/Critter] Critter zero or more per declared map Places a critter prototype and applies per-placement Critter property overrides.
map-format.section.item [$Name/Item] or [<MapId>/Item] Item zero or more per declared map Places a map, inventory, or container item and applies per-placement Item property overrides.

Control directives

Directive Sections Syntax Required Default Meaning
$Name ProtoMap $Name = <MapId> no source file basename Selects the Map prototype id and both baked resource basenames. Without $Name the anchor resolves to the source basename; multi-map containers should name every anchor explicitly.
$Parent ProtoMap $Parent = <ParentMapId> [<ParentMapId> ...] no no parents Uses ordinary Map prototype inheritance during prototype baking. Mapper save output is flattened and does not preserve this directive.
$Text <language> ProtoMap $Text <language> = <localized text> no no map text Contributes localized prototype text and is preserved as an extra ProtoMap field by mapper load/save.
$Id Critter, Item $Id = <positive integer> no next available positive id Provides a shared placement identity used by ownership references. Missing, non-positive, or duplicate ids are repaired during load; authored maps should not rely on repair.
$Proto Critter, Item $Proto = <PrototypeId> yes none Resolves the base Critter or Item prototype before placement overrides are applied.

Minimal map

[ProtoMap]
$Name = SmallRoom
Size = 80 80
WorkHex = 40 40

[$Name/Critter]
$Id = 1
$Proto = Guard
Hex = 38 40
Dir = 3

[$Name/Item]
$Id = 2
$Proto = MetalDoor
Hex = 42 40

Within one selected map, placement order is not semantic: the loader processes all critters, then all items. Keep explicit unique ids for stable ownership references and reviewable diffs.

Start typing to search.