Links

Quests

v4.0

Quest Object Hierarchy

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.
While one Quest Step is required, each Quest can have multiple steps. Each Quest Step requires one Success Condition, but can have any number, and can have any number of optional Failure Conditions

Quest Events

Quest Events can be sent automatically, allowing other objects to listen and react to changes.

Success and Failure

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.

Additional Options

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.
Last modified 8mo ago