While you you cannot derive subclasses from Quest, you can add data to its tagDictionary. Example use:
Code: Select all
quest.tagDictionary.AddTag("Difficulty", "Hard");
if (quest.tagDictionary.ContainsTag("Difficulty"))
{
Debug.Log("This quest is: " + quest.tagDictionary.GetTag("Difficulty", "Medium"); // If no tag, assume Medium.
}
1. Assign a delegate method to QuestGeneratorEntity.generatedQuest. This method will be called after generating the quest. You can use it to add more data or otherwise adjust the quest.
Side note: You can also assign a delegate method to QuestGeneratorEntity.updateWorldModel to add more information to the world model than what it normally sees in its Quest Domains. This method is called just before sending the world model to the quest generator.
2. Or derive a subclass of PlanToQuestBuilder and assign it to QuestGeneratorEntity.questGenerator.planToQuestBuilder.
When an NPC generates a quest, it follows these steps:
- Builds a world model.
- Passes the world model to the quest generator, which determines a sequence of Actions to take (called a plan).
- Passes the plan to PlanToQuestBuilder, which turns the Actions into a Quest object and returns it to the NPC.
- The NPC adds the quest to its Quest Giver component's Quests list.