Loading all quests data from the database

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Accurina
Posts: 3
Joined: Fri Jun 16, 2023 7:07 am

Loading all quests data from the database

Post by Accurina »

Hello,

I am trying to create a custom UI for the quest log. My goal is to load variables out of the dialogue database and display this data in a custom UI inside the quest log. I’m guessing that I need to load the entire quest list from pixelcrushers.questmachine to start, but I’m unable to get the quest list.

See image below. For example: I would like to load the data for both of these quests out of the database so I can create a button with text displaying quest.Heading.text. What would be the best method to do so?
Attachments
Capture.PNG
Capture.PNG (11.56 KiB) Viewed 423 times
User avatar
Tony Li
Posts: 21679
Joined: Thu Jul 18, 2013 1:27 pm

Re: Loading all quests data from the database

Post by Tony Li »

Hi,

Your post is in the Quest Machine section. Are you using Quest Machine for your quests, or only the Dialogue System?
Accurina
Posts: 3
Joined: Fri Jun 16, 2023 7:07 am

Re: Loading all quests data from the database

Post by Accurina »

Sorry for the mixup, only the dialogue system is being used.
User avatar
Tony Li
Posts: 21679
Joined: Thu Jul 18, 2013 1:27 pm

Re: Loading all quests data from the database

Post by Tony Li »

[I moved this thread from the Quest Machine forum section.]

Hi,

Can you use the StandardUIQuestLogWindow? The Dialogue System ships with several UI prefabs that use StandardUIQuestLogWindow. (See Quest UIs.) If you need to modify its functionality, you can make a subclass of StandardUIQuestLogWindow or the abstract QuestLogWindow class.

If that doesn't fit your needs, you can use the QuestLog class to get quest info. In particular, use QuestLog.GetAllQuests() to get the quest list, or QuestLog.GetAllQuestsAndGroups() if you're using quest groups.
Accurina
Posts: 3
Joined: Fri Jun 16, 2023 7:07 am

Re: Loading all quests data from the database

Post by Accurina »

Thank you for your help! I should be fine for now with being able to load the quest data from there.
User avatar
Tony Li
Posts: 21679
Joined: Thu Jul 18, 2013 1:27 pm

Re: Loading all quests data from the database

Post by Tony Li »

Glad to help!
Post Reply