Skip to content

Project data structure

The information about nodes and characters is stored as a JSON file.

JSON format

It consists of three lists: nodes, groups and characters that are in the project.

{
    "nodes": [],
    "characters": [],
    "groups": []
}

Node

Here is an example node. It is a say node with id 66788ed3-459a-46c7-aa16-c5a00d198185. It only has one output that is connected to node with id 8a3cf0bb-95df-4b34-8087-2d7560827309

In the attribute parameters, settings for the node is stored. This node for example uses the character with id d78da38d-a709-4271-be9a-95f5ae91ef34.

The node is in a group with id 6f6d6a2e-09ea-4749-be25-a725404cf87b

{
    "id": "66788ed3-459a-46c7-aa16-c5a00d198185",
    "type": "say",
    "group": "6f6d6a2e-09ea-4749-be25-a725404cf87b",
    "output": [
        {
            "nodeId": "8a3cf0bb-95df-4b34-8087-2d7560827309",
            "socketId": "0"
        }
    ],
    "input": [],
    "parameters": {
        "text": "Hello!",
        "reprompt": "Last time I said Hello!",
        "recap": "Sorry, I could not understand you. I said Hello",
        "voice": "",
        "engine": "",
        "provider": "",
        "character": "d78da38d-a709-4271-be9a-95f5ae91ef34"
    },
    "position": [
        296,
        -7
    ]
}

Character

Here is an example of a character. It has id d78da38d-a709-4271-be9a-95f5ae91ef34. And uses the voice "Justin" from Amazon Polly

{
    "id": "d78da38d-a709-4271-be9a-95f5ae91ef34",
    "name": "Default Narrator",
    "options": {
        "provider": "polly",
        "voice": "Justin",
        "engine": "neural"
    },
    "__typename": "ProjectCodeCharacter"
}

Group

A group only have an ID, a name and a position. If a node belongs to a group it has an attribute group set to the group ID.

{
    "id": "6f6d6a2e-09ea-4749-be25-a725404cf87b",
    "name": "game tutorial",
    "position": [
        1100,
        607
    ]
}

Modifying JSON directly

It is possible to do direct modifications to the project data. This can be useful if you want to use external tools to modify/generate the project code.

  1. Open project in Fabella
  2. Go to File → Export File to save file
  3. Modify file
  4. Load file into Fabella by going to File → Load File

Example basic project

Here is an example of a basic project.

display

The project data is saved as the following. There are no groups, 3 nodes and 1 character.

{
    "groups": [],
    "nodes": [
        {
            "id": "START",
            "type": "start",
            "output": [
                {
                    "nodeId": "66788ed3-459a-46c7-aa16-c5a00d198185",
                    "socketId": "0"
                }
            ],
            "input": [],
            "parameters": {},
            "position": [
                1,
                15
            ]
        },
        {
            "id": "66788ed3-459a-46c7-aa16-c5a00d198185",
            "type": "say",
            "output": [
                {
                    "nodeId": "8a3cf0bb-95df-4b34-8087-2d7560827309",
                    "socketId": "0"
                }
            ],
            "input": [],
            "parameters": {
                "text": "Hello!",
                "reprompt": "Last time I said Hello!",
                "recap": "Sorry, I could not understand you. I said Hello",
                "voice": "",
                "engine": "",
                "provider": "",
                "character": "d78da38d-a709-4271-be9a-95f5ae91ef34"
            },
            "position": [
                296.07050770247923,
                -7.625753809917292
            ]
        },
        {
            "id": "8a3cf0bb-95df-4b34-8087-2d7560827309",
            "type": "end",
            "output": [],
            "input": [],
            "parameters": {
                "clearSession": false
            },
            "position": [
                582.0209209256197,
                -3.4935224049586395
            ]
        }
    ],
    "characters": [
        {
            "id": "d78da38d-a709-4271-be9a-95f5ae91ef34",
            "name": "Default Narrator",
            "options": {
                "provider": "polly",
                "voice": "Justin",
                "engine": "neural"
            },
            "__typename": "ProjectCodeCharacter"
        }
    ]
}