DialogueManager.DatabaseManager.DefaultDatabase.quests?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
vantubbe
Posts: 2
Joined: Sat Sep 03, 2016 7:57 pm

DialogueManager.DatabaseManager.DefaultDatabase.quests?

Post by vantubbe »

Why is there no accessor for the quests in the DialogueDatabase class? I see items, conversations, everything else etc. I basically want to run queries on the quests by fields within one of my scripts. Find quests that meet certain parameters. Wondering why there are accessors for everything but quests. Thank you!!!!

Mike
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: DialogueManager.DatabaseManager.DefaultDatabase.quests?

Post by Tony Li »

Hi Mike,

Use QuestLog.GetAllQuests(). This returns an array of quest names. Examples:

Code: Select all

using PixelCrushers.DialogueSystem;
...
string[] allQuests = QuestLog.GetAllQuests(); // All quests.
string[] activeQuests = QuestLog.GetAllQuests(QuestState.Active); // Active quests.  
The QuestLog class provides a lot of other useful methods for working with quests, too.

Also, the QuestLog class works across all loaded databases, in case you've used the Extra Databases component or DialogueManager.AddDatabase() to load additional databases into memory.
vantubbe
Posts: 2
Joined: Sat Sep 03, 2016 7:57 pm

Re: DialogueManager.DatabaseManager.DefaultDatabase.quests?

Post by vantubbe »

Perfect, thank you for the help!!
Post Reply