RELOAD

From OHRRPGCE-Wiki
Revision as of 23:38, 5 November 2008 by Pkmnfrk (talk | contribs) (type data)
Jump to navigation Jump to search
  • insert description here

Reload format

File Header

About Formal Specs

Data Meaning
BYTE * 4 Magic word "RELD"
INT Version number (currently 1)
INT Header size (altogether, should be 12)

Body

The body is composed of a single element, known as the "root" element. The root contains all the data in the file, as children. Theoretically, the root could be a string element, with a simple payload, but in practise, it will always be a "container" element.

An Element

Data Meaning
INT Size of element, not including this INT
SHORT Size of tag name. If -1, indicates the tag name is in the string table
BYTE * size Tag name. If the size was -1, this is a SHORT (2 bytes) indicating the string number.
BYTE Type of element. See below for a list.
??? Data. This data is wholly dependent on the Type INT. See below for more details.

The data chunk can be any of the following types.

Element Type 0 (integer)

Data Meaning
INT The integer to be stored.

Element Type 1 (string, inline)

Data Meaning
INT Size of string
BYTE * size The string data

Element Type 2 (string, table)

Data Meaning
SHORT The string number in the string table

Element Type 3 (children)

Children are whole elements said to be "contained" by this one.

Data Meaning
INT Number of children
??? each child element, back to back