GameDevProject-S20 / Pre-Production

Pre-Production work for Split Ends!
0 stars 1 forks source link

[1] SPIKE: Discuss refactor of dialog/ encounters to support locations feeling like resolvable stories #135

Closed cailyn-codes closed 4 years ago

cailyn-codes commented 4 years ago
arie-rose commented 4 years ago

Proposed Changes

Dialogue

Encounters

Proposed Design Workflow

Workflow

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#

List of requirements

List of commands

(ignore the hyperlinking -- it is a product of markdown)

(totally willing to keep expanding these as needed)

zzucco commented 4 years ago

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.

arie-rose commented 4 years ago
/// 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": []
    }
   ]
  }
 ]
}