Quest System
As part of Moonfarer's development we identified a need for a quick to use system for creating quests.
The quests can be simple, like 'collect 3 apples' or more complex like 'travel to this location, talk to an NPC, kill three monsters, then return to the NPC'.
I decided on using a visual scripting approach since it makes it very quick to see the structure of a quest and it's branches.
Quest Flow
This is an example of a simple quest. Upon reaching this location the player is given a quest to meet all the villagers (well, two of them anyway). The quest starts at the left most node labelled 'Entry Point' and follows the white execution line until it reaches a node that requires a specific state.
The 'Wait Until True' nodes only pass execution on to the next node if its condition is met. The two conditions in the blue comment boxes are for a gameplay flag to be set. When the player meets the NPC the flag is set and the node moves on to the 'Complete Log Entry' node which marks that objective complete.
Finally once both conditions have been met the 'Wait Until True' node in the green box will succeed, completing the quest.
Quest Log
The quest log is a list that represents journal entries to the player. There are three different states for a quest log entry. Pending, Completed, and Failed. When a task like 'Meet Alda' has been given to the player it will appear in the UI via the journal screen.