- Structure
A DataStorage is a file consisting of DataUnits, which are containers for data. They have a label which is used for retrieval. The data contained in a DataUnit is called contents and consists of fragments, and come in two forms. A fragment can either be a piece of text or a DataUnit. This allows for nested DataUnits if needed. The DataStorage itself is a text or binary file. If It is a text file it will have a clear structure, See (1).
(1) EX: DataUnits, STATUS__P1 and STATUS_P2, with several inner DataUnits that have different fragments.
STATUS_P1 {
HP {
100
}
LVL {
13
}
MANNA {
122
}
GOLD {
98
}
EQUIPPED_WEAPON {
BATTLE_AXE {
DAMAGE {
100
}
QUIRK {
LANDSLIDE
}
}
}
}
STATUS_P2 {
HP {
89
}
LVL {
18
}
MANNA {
200
}
GOLD {
0
}
EQUIPPED_WEAPON {
LONG_SWORD {
DAMAGE {
120
}
QUIRK {
FLAME
}
}
}
}
- Fomatting
The label of a DataUnit can not contain any special characters. they should only us alphanumeric characters amd underscore. The whitespaces used to distinguish a layer from another is very important, not adding enough whitespace will result in a unit being in a lower layer than it should be. Directly changing the DataStorage file should thus be done very carefully.