Skip to main content

Output Schema

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

Work in progress!

Collections Overview

The application consists of the following primary collections:

  • Scripts: Contains script files and folders for code components
  • Dialogues: Contains dialogue trees and conversation structures
  • Actors: Contains character definitions and their properties
  • Quests: Available in future versions
  • Items: Available in future versions
  • Misc: Available in future versions
  • Grids: Contains spreadsheet-like data structures
  • Kanban: Contains kanban board task management structures

Common Properties

All objects in every collection share these common properties:

PropertyTypeDescription
namestringName of the object
typestringType of the object (Script, Folder, Dialogue, Actor, Grid, etc.)
parentstring | nullID of the parent object, or null if no parent
iconstringIcon identifier for the UI representation
colorstringColor code in hex format
pathstringPath to the object in the tree structure
isClonablebooleanWhether the object can be cloned
isRemovablebooleanWhether the object can be removed
isReadOnlybooleanWhether the object is read-only
collectionstringThe collection this object belongs to
lockedbooleanWhether the object is currently locked for editing
lockedBystringUsername of who locked the object
modifiedstringTimestamp of last modification
_idstringUnique identifier for the object
_revstringRevision identifier for the object

Scripts Collection

The scripts collection contains executable code, script files, and organizational folders.

Script Object Properties

PropertyTypeDescription
content.scriptstringThe actual script code content
createdstringTimestamp when the script was created
commentsstringUser comments about the script
aliasstringAlternative identifier for the script
editorModestringThe code editor mode (language)

Script Folder Properties

PropertyTypeDescription
childrenarrayArray of IDs of child objects
isDialogueScriptFolderbooleanWhether this folder is for dialogue scripts

Dialogues Collection

The dialogues collection contains conversation trees and interactive dialogue structures.

Dialogue Object Properties

PropertyTypeDescription
content.treeobjectThe dialogue tree structure
content.tree.nodesarrayArray of node objects that make up the dialogue
content.tree.edgesarrayArray of connections between nodes
createdstringTimestamp when the dialogue was created
commentsstringUser comments about the dialogue
aliasstringAlternative identifier for the dialogue
dialogueScriptFolderIDstringID of the associated script folder
dialoggerNodeIDstring | nullID of the associated dialogger node
dialoggerNodeCountnumberCount of dialogue nodes

Dialogue Node Properties

PropertyTypeDescription
idstringUnique identifier for the node
position.xnumberX coordinate position of the node
position.ynumberY coordinate position of the node
typestringType of the node
dragHandlestringCSS selector for the drag handle
data.labelstringLabel text for the node
data.nodeTypestringType of the node (notes, dialogue, etc.)
data.handlesarrayConnection points for the node
data.notesstringMarkdown content for notes nodes
measured.widthnumberWidth of the node
measured.heightnumberHeight of the node
draggingbooleanWhether the node is being dragged

Actors Collection

The actors collection contains character definitions and their properties.

Actor Object Properties

PropertyTypeDescription
content.biostringMarkdown biography of the actor
content.expressionsarrayArray of expression objects for the actor
content.propertiesstringRaw property text in HJSON format
propertiesobjectParsed properties as an object
properties.namestringName of the actor
properties.agenumberAge of the actor
properties.genderstringGender of the actor
editorLanguagestringLanguage format for the editor

Actor Expression Properties

PropertyTypeDescription
namestringName of the expression
permalinkstringURL to the expression image
_idstringUnique identifier for the expression

Quests Collection

Available in future versions

Items Collection

Here’s the schema table for the exported JSON structure:

PropertyTypeDescription
namestringName of the item.
contentobjectContains the actual item data.
content.itemstring | objectRaw text input or a parsed JSON object if the format is valid.
typestringThe type of the document: "Item".
parentnull | stringParent item ID or null if no parent.
iconstringIcon representation of the item.
colorstringHex color code associated with the item.
pathstringPath identifier for the item.
isClonablebooleanIndicates if the item can be cloned.
isRemovablebooleanIndicates if the item can be deleted.
isReadOnlybooleanIndicates if the item is read-only.
createdstring (ISO 8601 datetime)Timestamp of when the item was created.
modifiedstring (ISO 8601 datetime)Timestamp of the last modification.
commentsstringUser comments associated with the item.
collectionstringCollection name to which the item belongs.
lockedbooleanWhether the item is locked for editing.
lockedBystring | nullUser ID of the person who locked the item, if applicable.
aliasstringAlternative name or alias for the item.
editorLanguagestringThe language mode used in the editor (e.g., "yaml").
_idstring (UUID)Unique identifier for the item.
_revstringRevision identifier for tracking changes.

Misc Collection

Available in future versions

Grids Collection

The grids collection contains spreadsheet-like data structures.

Grid Object Properties

PropertyTypeDescription
content.cacheobjectCache data for the grid
content.cellsobjectCell data for the grid
content.commentsobjectComments within the grid
content.columnsarrayColumn definitions
content.dataarray2D array of cell data
content.metaobjectMetadata about the grid
content.styleobjectStyle definitions for cells
content.worksheetIdstringID of the worksheet
content.worksheetNamestringName of the worksheet (Sheet1)
createdstringTimestamp when the grid was created
commentsstringUser comments about the grid
aliasstringAlternative identifier for the grid

Grid Column Properties

PropertyTypeDescription
idstringUnique identifier for the column
titlestringDisplay title for the column
typestringData type of the column
namestringInternal name of the column

Kanban Boards

Kanban

PropertyTypeDescription
namestringName of the Kanban board
typestringAlways Kanban
templatestringBoard template identifier
columnsarrayList of column objects (see below)
settingsobjectUI settings (e.g., showTags, showIcons)
pathstringFile path in the project
iconstringIcon shown in sidebar
colorstringHex color code for the board
commentsstringNotes or comments
collectionstringAlways Kanban
lockedbooleanWhether the doc is locked
lockedBystringUser who locked the doc
isClonablebooleanCan be duplicated
isRemovablebooleanCan be deleted
isReadOnlybooleanWhether the board is editable
createdstringISO date created
modifiedstringISO date last modified
aliasstringOptional short name
_idstringUnique identifier
_revstringRevision identifier

Column Object

Each column holds an array of cards.

PropertyTypeDescription
idstringUnique column identifier
titlestringTitle of the column
typestringAlways column
cardsarrayList of card objects

Card Object

Each card tracks a task or idea.

PropertyTypeDescription
idstringUnique card identifier
typestringAlways card
titlestringTitle of the card
descriptionstringFull description in Markdown
tagsarrayList of string tags (e.g., "Idea")
relatedarrayList of related entity IDs
completedbooleanWhether the task is completed
dueDatestringOptional due date (YYYY-MM-DD)
assignedstringOptional assignee name

Meta Information

The export file also contains metadata about the export itself:

PropertyTypeDescription
_meta.exportedAtstringTimestamp when the export was created
_meta.exportedBystringUsername who created the export
_meta.drafftVersionstringVersion of the application used for the export