Quests
v4.0
Last updated
v4.0
Last updated
With Game Modules, the Quest
is a Scriptable Object which holds all the data about the quest, while the GameQuest
is the runtime variant that can be serialized, and tracked throughout your game.
Each Quest has at least one Quest Step, and can have more than one. Each Quest Step has at least one Success Quest Condition, but can have more, and can also have one or more Failure Quest Condition, though this is optional.
Technically, a Quest Step does not need a Success Condition. In that case, you would need to manually mark the Quest Step as complete in your code. This is demonstrated in the "Rescue the Puppy" quest in the Party Based RPG demo game.
Quest Events can be sent automatically, allowing other objects to listen and react to changes.
A Quest is deemed successful when all Quest Steps are successful. Quest Steps are successful when each Quest Condition in the success column has been fulfilled.
A Quest is deemed a failure when at least one Quest Step has failed. A Quest Step has failed when at least one Quest Condition in the failure column has been fulfilled. Failure is optional -- Quests do not have to have any failure conditions.
Quest Rewards can be given for success/failure of individual Quest Steps, and the entire Quest itself.
Quests are very flexible. They can be automatically marked as success or failure, or checked manually through your code. They can have only a single step, with a single condition, or many steps, with many conditions. Steps can be required to be completed in order, or can be set to be completed in any order.
And it's easy to get the data you need to create UI for your players, so they can easily see the status of quests that you choose to expose.
The Party Based RPG demo game has three different quests, each with slightly different setups and operations, including how the quests are checked for success / failure, and what happens afterward.
The "Rescue the Puppy" quest, for example, can be completed successfully or as a failure, while the other two can only be completed successfully, and simply continue as an active quest until they are completed.