Skip to content
Contribute

map.obj.xml · map objects

XML for the map’s object layer: loose objects, settlements and references to groups and units.

Documented edition: Imperivm HD · Partial documentation

map.obj.xml describes the object layer of a saved map. It differs from map.xml metadata and terrain grid files.

The document root is mapobject. The documented writing structure includes scriptobj objects, settlement blocks containing their objects, and group and partyunit sections.

Field Documented description
class Object class name
num Global writing counter, starting at zero, in document order
player Owner index plus one; do not treat it as a zero-based index
healthperc, stamina Object state fields; their complete ranges and units are not generalized here
inventorysize, slotN Inventory size and slot data
x, y Object position
flags Object flags; not every bit’s meaning is described here
dir.x, dir.y Object direction components

Settlement blocks can include id, player, classoffirstbuilding, maxpopulation, extrasentries, maxgold, maxfood, population, gold, food, icon and name, together with their scriptobj objects.

Group sections contain obj references through num, and partyunit also uses num. Keep those references consistent when changing numbering or objects.

This is a partial description of map writing, not complete saved-game serialization. Do not automatically transfer settlement attributes between those contexts.

The complete reader is not documented here. Group and partyunit sections are not covered by the same file examples as objects and settlements, and some objects can omit player. Preserve that omission when its meaning is unknown.

Suggest a better description

Write how you would explain this entry. Your proposal will be held in a private inbox for review.

0 / 4000

Proposals are not published automatically. Do not include personal information in your description.