Proposed mech config file format
Posted: Sun Oct 12, 2008 1:31 pm
This is a draft, so I will edit this first post as needed. Please quote any parts of this if commenting.
The mech config file is supposed to store a mech loadout as used in the table-top game. It is intended to be extendable. A binary format has been chosen for speed of loading and to reduce parsing. The file is split into markers. Each marker starts with a 16-bit value describing the marker length, followed by the 4-byte marker name, and finally the data.
The general file layout starts with a file content marker, which contains a 2-byte version number, the file length, and the zero-terminated file type name "MechVM Mech Config". The next markers give general information on the mech: mech tonnage, engine type and rating, heat sink type and count, jump jet count. Then there is a marker for each mech section, giving the internal structure, front and rear armor, and critical sections referring to weapons and equipment by number. Finally, there is a marker for each weapon, referencing weapon and ammo critical sections and flags. The flags store whether the weapon is front or rear-firing, whether it is hooked up to a targetting computer or similar equipment, and weapon groups. Markers storing user-defined config names and text descriptions are optional.
I still have to research how to adapt the file for vehicles, aerofighters and battleships.
The mech config file is supposed to store a mech loadout as used in the table-top game. It is intended to be extendable. A binary format has been chosen for speed of loading and to reduce parsing. The file is split into markers. Each marker starts with a 16-bit value describing the marker length, followed by the 4-byte marker name, and finally the data.
The general file layout starts with a file content marker, which contains a 2-byte version number, the file length, and the zero-terminated file type name "MechVM Mech Config". The next markers give general information on the mech: mech tonnage, engine type and rating, heat sink type and count, jump jet count. Then there is a marker for each mech section, giving the internal structure, front and rear armor, and critical sections referring to weapons and equipment by number. Finally, there is a marker for each weapon, referencing weapon and ammo critical sections and flags. The flags store whether the weapon is front or rear-firing, whether it is hooked up to a targetting computer or similar equipment, and weapon groups. Markers storing user-defined config names and text descriptions are optional.
I still have to research how to adapt the file for vehicles, aerofighters and battleships.