You are browsing documentation for an older version of the Quest System. Switch to Newest

Quest Prerequisites

This system comes with two types of prerequisite handlers. Quest chains are handled through the Quest Prerequisites variable. I also created a way for you to easily integrate your own custom prerequisites into the system, for example if you want to have a player level requirement from an XP system before they can even accept a quest.

Quest Driven Prerequisite

The PrerequisiteQuests variable on the Quest DataTable is how you define what quests, and what the state of them should be before the current quest is marked as available to the player. A common use of this would be to make Quest Chains. For each quest in your chain you would have a quest prerequisite of the previous quest being completed.

To create a quest prerequisite add a row to the PrerequisiteQuests variable on your data table for the quest. The key you enter should be the RowName of the quest, and the value is the state of that quest.

So for a typical quest chain you would be using the completed quest state of the previous quest in the chain. You do not need to include a list of every quest completed to that point in the chain, just the previous one. This way you can easily change around the order if you need, without having to mess with a bunch of variables across a bunch of quests.

You can also use this logic to let the player accept a certain quest, only after they accept another quest, but before it is completed. Or make a quest only appear, after another quest fails.

Custom Prerequisite

The PrerequisiteOther variable is an onramp for you to easily tap in your own logic from whatever other systems you may be using in your game. A common use of this would be to require a player to reach a certain level before the quest becomes available. Adding an element to this variable will provide you with a map of string to float. The idea here is that you can use the key for your variable, and the value is your required value. You would then write your logic for handling the different possibilities for your variables in the AC_Quest_PlayerState components checkPrerequisitesOther function. Your return value from this function is how you let the rest of the system know whether or not the player has satisfied your custom prerequisites.