Z

From OHRRPGCE-Wiki
Jump to: navigation, 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 - (any number of) value is id; 1 - 9999
        • name string - (optional)
        • extra int - (optional: extra data is 0 if missing) one for each extra data 0-2. The value is the extra slot number
          • 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
          • 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.