Skip to content

Objects

Zynj-git edited this page Jan 10, 2021 · 12 revisions

Objects

Objects are constructed from entries that have a dot-separated keys field.
The final element in the dot-separated path has its property within the Object assigned the value of the entry's entry field.

  • The presence of # in the keys field omits the entry for Object creation and instead tests it for Attributes.

Example of pathed properties assignment from within the World Information interface:

KEYS                             | ENTRY
john.abilities.magic.alteration  | "Transmutation, Etherealness"
john.traits                      | "Wizard, Sage, Alchemist"

david.abilities.magic.alteration | "Corruption, Corrosive, Flimsy"
david.abilities.melee.fencing    | "Proficient, Agile, Show-off"

In the above example, it creates and accesses all of the paths in the individual Object(s), john and david, until it reaches its final destination.
On the final branch it will automatically assign the value of entry to the final element:

dataStorage["john"] = {"abilities": {"magic": {"alteration": "Transmutation, Etherealness"}}, "traits": "Wizard, Sage, Alchemist"}
dataStorage["david"] = {"abilities": {"magic": {"alteration": "Corruption, Corrosive, Flimsy"}, "melee": {"fencing": "Proficient, Agile, Show-off"}}}

Clone this wiki locally