-
Notifications
You must be signed in to change notification settings - Fork 9
Objects
Zynj-git edited this page Jan 10, 2021
·
12 revisions
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 thekeysfield omits the entry for Object creation and instead tests it for Attributes.
There are four methods of Object creation to facilitate various workflows.
- Via 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" - Via the
/setcommand.-
/setis used to quickly assign a value to the specific property. /set john.abilities.magic.alteration Transmutation, Etherealness
-
- Via the
/fromcommand.-
/fromallows the assignment of an Object from a JSON- line. /from john [{"abilities": {"magic": {"alteration": "Transmutation, Etherealness"}}, "traits": "Wizard, Sage, Alchemist"}]
-
- Via external editors and spreadsheets.
- Create a Spreadsheet with four horizontal fields/columns named
keys,entry,isNotHidden, andid. - Fill in the rows of the columns in the expected format.
- Export as a
.cvsfile then use a.cvsto.JSONconverter. - Import the
.JSONfile to AI Dungeon via the World Information interface.
- Create a Spreadsheet with four horizontal fields/columns named
In all of the preceding examples, it results in the assignment and creation of the Objects and values within the path.
It creates and accesses all of the paths in the individual Object(s), john and david, until it reaches its final destination.
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"}}}-
List of Attributes
- [d] Descriptor
- [f] Filter
- [i] Ignore
- [l] Length
- [p] Positional
- [m] Memory Positional
- [t] Trailing Positional
- [r] Random Selector
- [x] Exclude