Quest Subsystem #
The quest system works as follows:
Each quest is composed of 1 to N tasks. Each task has a Tag and an integer value, which represents how many times it must be reported.
To report progress on a task, you simply call the subsystem and provide the task’s Tag along with the amount to report.
Both tasks and quests have a Stage, which defines the activation order and progression of the quest.
The quest starts at Stage 0. The system searches for all tasks with an activation stage of 0 and listens for their reports.
Once all tasks in the current stage have been completed, the quest increments its stage by 1 and repeats the process, looking for tasks that match the new stage.
When there are no remaining tasks, the quest is marked as completed (its state is updated).
This is a highly flexible system.
To create your own quest, you can use the Quest Definition DataAsset, which is structured as follows:
The most relevant functions are the delegates for UI updates and the Report Progress function.
Delegates
Quest Definition.
Report progress