Meta Structure
DialogueDatabase{
"settings":
{
"ui":{
#IF USING_GS_UI
"windowOpenUiProfile": "../DisplayProfiles/SoftFade.uianimprofile",
"profileImageUiProfile": "../DisplayProfiles/AvatarChange.uianimprofile"
#ENDIF
},
"sequencing":{
"defaultDelay": "0.5",
"defaultContinue": "instant",
"defaultTypewriterSpeed": "6"
}
},
"actors":
{[
{
"actorName": "perry",
"actorDisplayName": "Perry",
"profileImages":{[
{
"profileAttitude": "default",
"imagePath": "../image/path/i.png"
}
]},
"poses":{[
{
"poseAttitude": "default",
"poseName": "idleStand"
}
]}
}
]},
"sequences":
{[
{
"sequenceId": "0001",
"sequenceName": "FirstSequence",
"nodes":{[...]}
}
]}
}
Sequences
Outline
You’ve upset Perry so they’ve confronted you.
You can antagonize Perry further, driving them to be angry with you.
Or you can apologize. They’ll brush you off normally, but if your charisma is high enough, you’ll leave on good favour.
Delays in the conversation pace between nodes.
Text can remain open, or close, then reopen at next text.
"nodes":{[
{
"id": "0001",
"type": "start",
"connections":
{
{
"to":"0002",
"conditions":{}
}
}
},
{
"id": "0002",
"type": "text",
"actor": "perry",
"actorTargetId": "perryStandingOnTheBalcony",
"text": "How dare you!?",
"closeText": "false",
"continue": {
"type": "displayAndDelay",
"delay": "default"
},
"connections":
{
{
"to":"0003",
"conditions":{}
}
}
},
{
"id": "0003",
"type": "options",
"options":
{[
{
"optionNumber": "0001",
"text":"Because I can!",
"connections": {[
{
"to":"0004",
"conditions":{}
}
]}
},
{
"optionNumber": "0002",
"text":"I'm so sorry!",
"connections": {[
{
"to":"0005",
"conditions":{}
},
{
"to":"0006",
"weight", "10",
"conditions":{[
"greaterThan":{
"checkValue": "charisma"
"evaluationValue": "10"
}
]}
}
]}
}
]}
},
{
"id": "0004",
"type": "SetRecord",
"recordName": "PerryAngry",
"recordValue": "1",
"connections":
{
{
"to":"etc..",
"conditions":{}
}
}
},
{
"id": "0005",
"type": "text",
"actor": "perry"
"text": "How can I forgive you after that?",
"closeText": "true",
"continue": {
"type": "waitForInput",
},
"connections":
{
{
"to":"etc...",
"conditions":{}
}
}
},
{
"id": "0006",
"type": "text",
"actor": "perry"
"text": "Charisma Success: Oh, that's okay, you were doing your best.",
"closeText": "true",
"continue": {
"type": "afterSeconds",
"time": "3.5"
"connections":
{
{
"to":"etc...",
"conditions":{}
}
}
}
]}
Types
Systemic
Start
Restart
Jump to New Sequence = “name/id“
Jump to Specific Node = “name/id“
Random
Dialogue
Text
Performance
Sound
Options
Actions
SetRecord
Trigger Something…
Sequence 2
Outline
You return to Perry. They greet you based on their disposition.
The delay in image/pose change makes a painful gap between when they talk to you.
"nodes":{[
{
"id": "0001",
"type": "start",
"connections":
{
{
"to":"0002",
"conditions":{}
},
{
"to":"0003",
"conditions":{[
"checkRecord":{
"recordName":"PerryAngry",
"evaluation":"equalTo",
"recordValue":"1"
}
]}
}
}
},
{
"id": "0002",
"type": "text",
"actor": "perry",
"targetActorId": "perryInTheWorkshop",
"text": "What do you need?",
"closeText": "false",
"continue": {
"type": "displayAndDelay",
"delay": "default"
},
"connections":
{
{
"to":"0005",
"conditions":{}
}
}
},
{
"id": "0003",
"type": "performance",
"actor": "perry",
"pose": "aggravated",
"profileImage": "aggravated",
"continue": {
"type": "displayAndDelay",
"delay": "0.1"
}
"connections":
{
{
"to":"0004",
"conditions":{}
}
}
},
{
"id": "0004",
"type": "text",
"actor": "perry",
"targetActorId": "perryInTheWorkshop",
"text": "Oh, it's you again...",
"closeText": "false",
"continue": {
"type": "displayAndDelay",
"delay": "default"
},
"connections":
{
{
"to":"0005",
"conditions":{}
}
}
}
]}
Notes
Whenever a sequence hits a dead end, it closes the dialogue.
Maybe we add an “onEnd” possible processing.
Condition branches will select the most elaborate first, stepping down until no condition. Connection “Weight“ will manually set prio.
I have gone for categorical “types”, but we may want to just go hyper granular and do one type per node.
So “Performance” would become:
ProfileImage
Pose (body idle anim)
Expression (facial idle anim)
Emote (one and done full animation)
PathTo
Actions would become:
SetRecord
AffectStats
AffectCurrency
Affect Inventory/Equipment
Enable/Disable Entity
Start/Stop Animation
Start/Stop Timeline
Change PhantomPriority, Enable/Disable Cam
etc.
Options can have conditions, and if they are not met, they will not be available. Options Nodes will require at least ONE non-conditional.
(Or we just exit with no options, like no continuation to a chain.)
actorTargetId is to allow for multiple performers of the same name in a level, but target the particular sequence to THAT particular version of the actor. This is for performance commands, and for inworld speech bubble tracking.
Conditions
Any node can have any number of conditions.
Has can always be !Has.
Numerical conditions always have the operators: greater, less, equal, not-equal
Record
HasItem
StatsValue
HasCurrency
HasEquipped
HasStatusEffect