I’m working on a small open world game, let’s use Skyrim as a reference.
This is my idea of how to track the quests and progress, and I would like to hear your opinion, maybe I have overlooked something, maybe my idea is completely wrong, if you have a better way of doing it please let me know.
I want to have a main story with some side quests, the side quests and main story can be started and finished at the players pace, so the player can have multiple active quests at once.
I have a data table with all the quest information, here I will store things like name, description, Quest giver, location of the quest giver, actors to spawn that are needed for the quest
Now I want to know what would be a good way of keeping track of all these quests, most importantly how saving and loading would work.
Currently I want to do it this way:
I have a variable called progressTracking (set of names), here I would add every action that has happened that can affect the world or missions, so if I completed the mission where I kill the dragon i would add dragonKilled to it.
Now some quests might become available only after another one has been completed, for example having killed the dragon, those would check if the variable progressTracking has a dragonKilled entry for example, if it does exist the quest will become available.
This should allow me some flexibility within the quest, like branching where I could kill the dragon or spare it’s life, so instead I would add dragonSpared to progressTracking
This variable would be saved on saveGame, if the variable is empty, it means it’s a new game, so I will start my intro etc.
When restarting the game the progressTracking will load, let’s say some progress has been made in the game
I have killed the dragon, so on load I will destroy the dragon, I have saved the princess, so I will spawn her as available quest giver, the house I have bought burned down, I will replace the mesh of my house to a burned one.
I will also have some missionNameCompleted entries, among these I will have a slayDragonCompleted (that’s the quest name) which will indicate that that quest has been completed, if that quest has been completed a quest speakToTheKing will become available.
On loadGame I will spawn the king in the castle, to whom I can speak, if the entry is dragonKilled he’ll congratulate me, if the entry is dragonSpared he’ll say what a bad job I did
The progressTracking variable is quest agnostic, it will hold a tag of everything that happened in the world
Do you have any better ideas on how to track quests? Anything I might have overlooked?