Original Post
So I am working on an adventure/RPG, and it is quickly becoming apparent to me that the story/quest structure will be the most intricate and difficult part of the game. Here is a snippet from the (rough) design document I have put together to help me think these things through. It shows the different parts of a quest, as far as I have been able to figure them out. id is the unique identifier of the quest prerequisites is various criteria for the quest to be triggered the _text variables are the various dialogues involved in this quest on_complete_criteria specifies the criteria for completing this quest on_accept_state,on_complete_state, and on_decline_state modify the state of the game, based on player actions on_complete_reward and on_decline_reward modify the player based on player actions. prerequisites allow for previous quests to be complete in order for new quests to be triggered, in effect allowing for the nesting of quests to create larger narratives. on_complete_criteria can take any number of events, allowing for the creation of extremely complex quests. Effective use of prerequisites and on_complete_criteria can allow for this structure to be turned into a complete story engine for a fairly complex game. So: Am I missing anything critical? Thanks for your input!
id - "farmerBobApples"
title - "Buy Apples for Farmer Bob"
prerequisites - quests.killedThreeRats.isComplete=true&quests.farmerBobApples.isInitialized=false&quests.farmerBobApples.isComplete=false&player.level<5
intro_text - "Oh, deary me! The cows ate all the apples from my tree, and the Missus will have a fit if I don't get her the fillings for her pie! Can you help an old farmer out?"
prompt_accept_text - "Sure! I'd be happy to help!"
on_accept_text - "Oh thank you so much! Half a dozen apples should be enough."
on_accept_state - quests.farmerBobApples.isInitialized=true
interim_query_text - "Time's a' wastin', youngster! The missus will be home any minute!"
on_complete_criteria - quests.farmerBobApples.isInitialized=true&player.inventory.apples>=6
on_complete_text - "Oh, thank you so much! For your kindness you can have this pair of boots. They don't fit me any more."
on_complete_reward - player.inventory.apples-6&player.inventory.clothing.boots+1
on_complete_state - quests.farmerBobApples.isComplete=true
prompt_decline_text - "No! I hate apples, and you should too!"
on_decline_text - "Well, the world is an imperfect place. If you change your mind, and the missus doesn't throw me out, I'll be here."
on_decline_state - quests.farmerBobApples.isInitialized=false
on_decline_reward - player.statistics.reputation-1