Closed cailyn-codes closed 4 years ago
1) Build in an editor similar to MapEditor using a small scripting language for in-game commands and dialogue choice requirements 2) Export to CSV 3) Load at game-time and convert to C#
(ignore the hyperlinking -- it is a product of markdown)
(totally willing to keep expanding these as needed)
This all sounds good to me. We'll want a comprehensive list of commands. Currently, since our encounters are hardcoded, we can write lambda functions to do anything. Our CSV scripting language should be fairly powerful to match.
/// Generates an encounter with this structure
///
/// Encounter
/// |
/// Page 0
/// / \
/// Page 1 Page 2
/// \ /
/// Page 3
///
{
"encounters": [
{
"encounter_id": 0,
"conditions" : [
"!encounter_complete 0"
],
"town_name": "Smithsville",
"dialogue_tree": [
{
"id": 0,
"text": "Welcome to these here parts",
"avatar_name": "Sheriff",
"buttons": [
{
"text": "Howdy, Sheriff.",
"conditions": [],
"effects": [],
"next_page_id": 1
},
{
"text": "Can we trade?",
"conditions": [
"!has food 20"
],
"effects": [
"@give scrap 30"
],
"next_page_id": 2
}
]
},
{
"id": 1,
"text": "You should check out the store later.",
"buttons": [
{
"text": "Will do!",
"conditions": [],
"effects": [],
"next_page_id": 3
}
]
},
{
"id": 2,
"text": "That seems mighty fair to me!",
"avatar_name": "Sheriff",
"buttons": [
{
"text": "See ya later.",
"conditions": [],
"effects": [],
"next_page_id": 3
}
]
},
{
"id": 3,
"text": "Well it's been nice talking to you.",
"buttons": []
}
]
}
]
}