Ok, I think that the problem when I reset the databases is that the Quest Giver's assigned quests are removed. So when I go to initialise a conversation again they don't have any assigned quests.
Is there a global command I can call it generate all possible quests for Quest Generator Entities?
I understand that this is kind of a weird scenario as it's only really for testing purposes.
Under what circumstance are you resetting the databases? To give you a good answer, I should get a better understanding of the purpose first.
To give you a fast answer, on the other hand... you can call the QuestGeneratorEntity's GenerateQuest() method. To make sure all QuestGeneratorEntities have quests, you can use this code:
It's just for testing purposes. I'm loading up entities in the environment and moving them in an out of domains to play around with the dynamics of the system.
The reset is simply for testing purposes so I can reset everything and try different combinations to see the results.
Is it possible for an NPC to offer written and procedural quests?
I can set a condition for written quests to only be active during certain times but is there a way to assign a priority to either written or procedural quests?
Sorry for all the questions. I'm just trying to get everything inline and sorted before I start writing everything.
Yes, an NPC can have written and procedural quests. The Quest Generator Entity component's "Max Quests To Generate" value only applies to procedural quests. If you add written quests, they won't count toward the value.
When you talk to an NPC that has more than one quest to offer/discuss, Quest Machine always shows a list of all of the offerable/active quests. This includes written and procedural quests. When the player chooses a quest from the list, it plays the dialogue for that quest.
If you need it to behave differently, such as only showing the top priority quest, you'll need to get your programmer to write a subclass that overrides the QuestGiver script's RecordQuestsByState() method -- for example to pare the list down to only the top priority quest.