Return To NPC and watches

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
effalumper
Posts: 4
Joined: Wed Dec 11, 2024 9:09 am

Return To NPC and watches

Post by effalumper »

Hi there,

I hit what appeared to be a bug recently - I wanted to view the state of a quest in the watches tab. However, the quest did not show up when I added all quests there; and trying to add a specific quest didn't show the quest in question in the list. I eventually figured out it was because the quest was in state 'return to NPC' at the time when the 'watchable quests' list was generated. I fixed this in Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Editor/Dialogue Editor/DialogueEditorWindowWatchSection.cs as follows:

- List<string> questNames = new List<string>(QuestLog.GetAllQuests(QuestState.Abandoned | QuestState.Active | QuestState.Failure | QuestState.Success | QuestState.Grantable | QuestState.Unassigned));
+ List<string> questNames = new List<string>(QuestLog.GetAllQuests(QuestState.Abandoned | QuestState.Active | QuestState.Failure | QuestState.Success | QuestState.Grantable | QuestState.ReturnToNPC | QuestState.Unassigned));

This seems to fix it at least... but is there a good reason why that state was omitted there? And thinking about it, perhaps GetAllQuests((QuestState)-1) would be a better fix for future proofing reasons.

If this is not a bug, and there is a good reason to omit the state there, I wonder if you could explain a little or point me towards some documentation that would enlighten me! Thanks,


Andy
User avatar
Tony Li
Posts: 23256
Joined: Thu Jul 18, 2013 1:27 pm

Re: Return To NPC and watches

Post by Tony Li »

Hi Andy,

It was an oversight. I'll make sure it appears in the next version. ReturnToNPC wasn't one of the original "official" quest states. It was added much later, and at the time I was on the fence as to whether or not to treat it like a real quest state. Since then, it got overlooked in the Watches tab.
effalumper
Posts: 4
Joined: Wed Dec 11, 2024 9:09 am

Re: Return To NPC and watches

Post by effalumper »

Gotcha, thanks!
Post Reply