Skip to content

JSON Schema Editor Guide

DREAMIO supports using a JSON Schema to strictly format the AI-generated status variables. This is particularly useful when you want to ensure the AI output adheres to a specific structure, making it easier to parse or maintain consistency across generations.

Enabling JSON Format

To use the JSON Schema editor, you must first enable JSON formatting for your status variables:

  1. Open the In-Game Options Menu (or the Scenario Creation settings).
  2. Ensure Enable Status is turned on.
  3. Toggle the Format setting from Text to JSON.

Once JSON is selected, the standard "Status Variables" text field will be replaced by the JSON Schema Editor.

Using the Editor

Instead of writing raw JSON code, DREAMIO provides a visual editor to help you define the variables you want the AI to track. The game automatically handles the underlying JSON structure (including setting properties as required and preventing additional properties) so you don't have to worry about the syntax.

Managing Variables

You can easily customize the variables tracked by the AI for your specific adventure:

  • Adding Variables: Click the Add variable button to create a new entry.
  • Naming Variables: Enter a descriptive name for your variable in the text field (e.g., player_health, current_location, quest_objective). The game will automatically format these names to be compatible with JSON structure.
  • Selecting Variable Types: Use the dropdown menu next to the variable name to select its data type (e.g., string, number, boolean, array, object).
  • Nested Variables: If you select object as the variable type, a + button will appear. Click this button to add nested properties within that object. This allows you to create more complex data structures.
  • Removing Variables: Use the provided UI buttons next to each variable to remove ones you no longer need.

Default Variables

By default, the game is configured to track the following information:

  • Current location
  • Current time
  • Contents of player's inventory
  • Current companions
  • Player's attributes

You can modify or remove these default variables, or add your own to fit your scenario.

Tips for Success

  • Keep it Simple: It is best to keep your status variables relatively simple and descriptive. Too many variables or overly complex tracking might confuse smaller local models.
  • Test Your Configuration: After setting your custom variables, play through a few turns to see how the AI handles updating them. If the AI is struggling, try simplifying the variable names or reducing the number of tracked items.
  • Model Compatibility: Note that not all AI models are equally good at adhering to strict JSON schemas. If you find the AI ignoring the structure, you may need to use a more capable model or provide additional guidance in your Narrator Instructions.