Right now I've made a separate data structure containing all variables a quest might need: http://pastebin.com/drqVANik
As you can see each quest may have up to 10 objectives. Right now there are 3 objective IDs: 1 for delivering item, 2 for killing monster class and 3 for killing 1 monster from a defined template (for boss killing).
Every character has a "quest[100]" variable that holds their progress on each quest. (100 quests total - can be changed)
This is what I commented below the definition:
Code: Select all
Players hold the state of each quest within the last digit of this variable. (quest[#]%10-1)
*Amount of monsters slain for objective type 2 is referenced as "quest[#]/10"
*Started quests have state of 1 or higher.
*Completed quests have state 10. (last digit 9, hence the -1)
This ended up being somewhat weird and un-intuitive. I wanted to avoid making a 2d array inside the character structure because of size reasons.
Any other way to do this? Sorry C veterans, I'm pretty new to this
