Skip to content

Objects

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

Objects

Objects are constructed and managed from entries.
Objects are recognizable by their dot-separated keys path in the World Information interface.
Objects provide a flexible and dynamic framework for displaying information to the AI on-demand and by fine-tuned condition(s).
An Object's condition(s) and functionalities are determined from within its self-contained <root>._synonyms path.

Click for Details
  • Objects execute their attribute functions if the condition(s) within <root>._synonyms qualifies.
  • By default, <root>._synonyms consists of <root>#[t] to execute the trailing positional attribute when <root> is mentioned.
  • Properties and values of an Object are only displayed if permission from the whitelist or contextual synonyms conditions is obtained.
Objects consist of three core components:
Info Dump
  • <root> - is the identifier and access point of the Object.

    • <root> can be arbitrarily named as the script is agnostic to its existence.
    • e.g john in john.character is the <root> of the Object.
  • <paths> - is any of the child Object(s) in the paths of <root>.

    • e.g character in john.character is a path of john.
    • <paths> holds the values to present when qualified.
      • e.g John within john.character is the value of the path.
    • <paths> are displayed to the AI simultaneously as its values.
      • Label your <paths> with an identifier to the value it holds.
      • e.g john.character hints that it contains a character, John
  • _synonyms - is an internal path that holds the condition(s) the Object should adhere to.

    • By default, <root> becomes the <root>._synonyms with an automatic application of the #[t] attribute.
      • An example is john._synonyms defaulting to john#[t]
    • <root>._synonyms can hold individual conditions per line-break and run separate functions on demand.
      • The lowest positioned line is the one executed if qualified.

Basic Object Creation

There are three methods of Object creation to facilitate various workflows.
For first time setups, ensure that the properties created are added to the whitelist!

World Information Interface

  • Manipulation of Objects via the World Information interface.

  • Dot-separated keys assign the entry's content to the Object.

  • ! prefixed keys is an alternate method that parses the entry's content into dot-separated entries.

    Click for Examples
    • Dot-separated
      keys entry
      john.character John
      john.traits Wizard, Sage, Alchemist
      john.type Legendary Mage
      john.outfit Withered Robe
      john.status Stunned
      john.effects Radiant Light
      [{"character": "John", "traits": "Wizard, Sage, Alchemist", "type": "Legendary Mage", "outfit": "Withered Robe", "status": "Stunned", "effects": "Radiant Light"}]
    • ! Prefixed
      keys entry
      !john [{"character": "John", "traits": "Wizard, Sage, Alchemist", "type": "Legendary Mage", "outfit": "Withered Robe", "status": "Stunned", "effects": "Radiant Light"}]
      [{"character": "John", "traits": "Wizard, Sage, Alchemist", "type": "Legendary Mage", "outfit": "Withered Robe", "status": "Stunned", "effects": "Radiant Light"}]

Input Commands

  • Manipulation of Objects via the input field.
  • See the list of commands.
    • /set imitates the behavior of dot-separated paths.
    • /from imitates the behavior of ! prefixed entries.

External Editors and Importing

  • As Objects are handled via worldEntries, importing .JSON files into AI Dungeon is an option.
  • Create and fill in the mandatory keys, entry, and optional isNotHidden and id fields.
  • Use the formats described in World Information Interface for the file's keys and entry fields.

Clone this wiki locally