Project File Format - nospoone/monologue GitHub Wiki
Monologue's project file format is a simple, "one object" JSON file. It is split into multiple sections:
Project
"project" : {
"name" : "Holobunnies",
"state" : {
"position" : {
"x" : 0,
"y" : 0
},
"zoom" : 1,
"currentTree" : 0
},
"variables" : [{
"displayName" : "Variable 1",
"origin" : "game",
"validation" : "int",
"set" : true,
"get" : true,
"id" : 0
}],
"languages" : [{
"displayName" : "English (en-US)",
"code" : "enUS"
}, {
"displayName" : "Français (fr-CA)",
"code" : "frCA"
}],
"treeCategories" : [{
"displayName" : "Tree Category",
"id" : 0
}]
}
Top Level
Property |
Purpose |
name |
Project name. Used in the title bar. |
state |
Stores the state the editor is in (to load it back up when it restarts) |
variables |
Stores the project-defined variables |
languages |
Stores the languages available for the project |
treeCategories |
Stores the categories the trees can be sorted under. |
state
Property |
Purpose |
position |
Stores the X/Y position of the canvas |
zoom |
Stores the canvas zoom |
currentTree |
Stores which tree (its id ) is currently visible |
variables
Property |
Purpose |
displayName |
Stores the name the variable is shown as |
validation |
Used to determine the variable's type |
get |
Used to determined if the variable can be evaluated through a branch node |
set |
Used to determined if the variable can be set through a set node |
id |
Used to identify the variable |
languages
Property |
Purpose |
displayName |
Stores the language name |
code |
Used to identify the language |
treeCategories
Property |
Purpose |
displayName |
Stores the tree category name |
id |
Used to identify the tree category |
Trees
"trees": [{
"id": 0,
"categoryId": 0,
"displayName": "Test Tree",
"nodes": [{
"id": 0,
"type": "xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx",
"nodetype": "normal",
"elements" : {},
"conditions" : {},
"editor": {
"x": 0,
"y": 0
}
}]
}]
Top Level
Property |
Purpose |
id |
Used to identify the tree |
categoryId |
Used to determine which category this tree belongs to |
displayName |
Stores the name the tree is displayed as |
nodes |
Stores nodes as an array |
nodes
Property |
Purpose |
id |
Used to identify the node |
type |
GUID of this node's type - used by Monologue to show the correct node type |
nodetype |
Used to determine of which type this node is. Can be normal , set or branch . |
editor |
Stores the X/Y position of the node, relative to the top left of the tree. |
conditions |
Stores every possible branch of this node. |
set |
Stores set variable informations. |
elements |
Stores all data related to this node. |
nodes.conditions
Property |
Purpose |
link |
Which node (its id ) this condition is linked to |
condition |
Which condition to use for the comparaison (only for branch , can be > , >= , <= , < == , != ) |
variable |
Which variable (its id ) this node compares to. |
value |
Which value to compare to |
nodes.set
Property |
Purpose |
variable |
Which variable (its id ) this operation applies to. |
value |
Which value to user for the operation. |
operation |
Which operation to perform on the variable (can be = , - , + ) |
Translations
"translations": [{
"enUS": [{
"flag": "$T0N0",
"content": "I like trains"
}]
}, {
"frCA": [{
"flag": "$T0N0",
"content": "J'aime les trains"
}]
}]
Top Level
Property |
Purpose |
{languageCode} |
Used to identify the language |
{languageCode}
Property |
Purpose |
flag |
Flag used when exporting the Firetongue TSVs |
content |
Content for the flag |