Skip to main content

Output Schema

This document describes the structure of the output schema for Drafft Legacy (v1), including scripts, dialogues, actors, quests, items, grids, kanban, and miscellaneous entities.

Structure Overview

The output schema consists of several collections:

  • Scripts: Contains script files and folders.
  • Dialogues: Defines interactive dialogues and their graphical representation.
  • Actors: Represents characters with properties such as name, age, and bio.
  • Quests: Defines game objectives with conditions and properties.
  • Items: Represents in-game objects with associated properties.
  • Grids: Contains structured tabular data.
  • Kanban: Defines a Kanban-style board with lanes and cards.
  • Misc: A category for miscellaneous entries.

Scripts

Each script entry has the following properties:

PropertyTypeDescription
namestringName of the script or folder
typestringCan be Script or Folder
parentstring or nullID of the parent folder or null if root
childrenarrayList of child script/folder IDs (only for folders)
contentstringScript content (if applicable)
iconstringIcon identifier
colorstringColor in hex format
pathstringPath within the structure
isClonablebooleanWhether the script can be cloned
isRemovablebooleanWhether the script can be deleted
isReadOnlybooleanWhether the script is read-only
createdstringCreation timestamp
modifiedstringLast modification timestamp
collectionstringCollection type (always Script)
_idstringUnique identifier
_revstringRevision identifier

Dialogues

Each dialogue entry represents an interactive conversation and contains:

PropertyTypeDescription
namestringName of the dialogue
typestringAlways Dialogue
parentstring or nullParent folder ID or null if root
graphobjectContains nodes and links defining the dialogue flow
dialogueScriptFolderIDstringID of the associated script folder
_idstringUnique identifier
_revstringRevision identifier

Dialogue Graph Structure

The graph object defines the dialogue's structure using nodes and links:

PropertyTypeDescription
idstringUnique identifier for the graph
offsetXnumberHorizontal offset for visualization
offsetYnumberVertical offset for visualization
zoomnumberZoom level percentage
gridSizenumberGrid size for alignment
nodesarrayList of dialogue nodes
linksarrayConnections between nodes

Dialogue Node Structure

Each node represents a dialogue block and contains:

PropertyTypeDescription
idstringUnique identifier for the node
typestringType of the node (default, choice, etc.)
xnumberX-axis position
ynumberY-axis position
extrasobjectAdditional metadata (e.g., script reference)
portsarrayInput and output connection points

Each port represents an interaction point in a node:

PropertyTypeDescription
idstringUnique identifier for the port
typestringInput (in) or output (out) type
parentNodestringID of the parent node
linksarrayList of connected links
labelstringLabel describing the port function

Quests

Each quest defines an in-game objective with the following properties:

| Property | Type | Description | | ------------ | -------- | ------------------- | ------- | ------------------------ | | name | string | Name of the quest | | type | string | Always Quest | | properties | string | | object | Quest-related properties | | conditions | string | | object | Quest-related conditions | | _id | string | Unique identifier | | _rev | string | Revision identifier |