RELOAD common formats

From OHRRPGCE-Wiki
Jump to navigation Jump to search

This page documents some RELOAD-based data encodings that are used in multiple file formats.

Extra data vector[edit]

Holds an array/vector of extra data in run-length compressed format. Is always optional, if missing may fallback to some other obsolete extra data encoding, or else default to [0, 0, 0].

Used in Z and Slicetree_n_n.reld and L#Future format. The root node name differs in these file formats.

  • extra/extravec int - The value is the length of the extra data array. The children encode at most length extra values in order from the first; fewer may be encoded in which case the missing ones default to 0. Each child is one of:
    • int int - append an integer value
    • repeat int - the previous value is repeated this many additional times. If there is no previous value, 0 is used.

For example:

 <extra>6
   <repeat>2</repeat>
   <int>10</int>
   <repeat>1</repeat>
 </extra>

is the array [0, 0, 10, 10, 0, 0]