Jump to navigation Jump to search

.Z lumps hold the zonemap for a map, including zone triggers ("zone info"). It is a RELOAD document.

Although the tree structure of the document is strict, the order in which the elements appear is irrelevant.

  • zonemap
    • w int - dimensions of the whole map
    • h int
    • zones
      • zone int - One for each non-trivial zone. (Zones with no tiles or non-default data are removed). The value is the ID, which must be unique: 1 - 9999, or special zone 10000 and up.
        • name string - (optional)
        • extravec Extra data vector - (optional) Extra data vector. If extravec is missing then extra data is a length 3 array described by the extra nodes (This is a WIP feature)
        • extra int - obsolete (optional) One for each extra data 0-2, or defaulting to 0 if omitted. The value is the extra slot number. extra nodes are ignored if extravec exists.
          • int int - integer value stored in the extra slot
        • ...more to be added
    • rows
      • y int - one row of the map
        • zone int - value is id; 1 - 9999 or higher
          • spans string - a byte stream which run-length encodes the tiles in this row in this zone. Starting from X=0, each byte gives a length of a run of tiles in or out of the zone, alternating, starting with out. The length of the stream might be even or odd. Zero bytes are allowed arbitrarily, and used to encode runs of more than 255 tiles.