I’m working on this thing and I have a system for in-game events that lets me create branching chains of decisions, skill checks etc. It looks something like this:
list.distress[1] = {
stage_type = "dice",
dice_type = "detect",
dice_difficulty = 0.4,
failure = 2,
success = 3
}
list.distress[2] = {
stage_type = "end",
title = "An uneventful journey",
description = "Nothing of importance happened."
}
list.distress[3] = {
stage_type = "choice",
title = "A distress signal!",
description = "You have detected an emergency signal from a vessel. Someone may be in trouble. Or they are setting an ambush...",
choices = {}
}
list.distress[3].choices[1] = {text = "Investigate", result = 4}
list.distress[3].choices[3] = {text = "Ignore it", result = 5}
list.distress[4] = {
stage_type = "dice",
dice_type = "luck",
dice_difficulty = 0.5,
failure = 6,
success = 7
}
…and so on. This particular bit checks the player’s ability to use comms and then either tells them nothing happened, or gives them a choice to investigate or ignore a distress signal, the later option having two different outcomes depending on blind luck.
I was thinking that there has to be a better way to create these events than just typing out this mess. I’m sure I could write a a nice little program to do this, but it would definitely take me more time than I would save. Typing the data into an excel sheet would be enough, but I have no idea how I’d go about exporting that. I even looked up what JSON is (as I felt like I saw that format mentioned a lot in similar topics), but that looked like it would be even more work than just writing this directly.
Is there a good existing framework that would help me out here?