Page 1 of 1

Return To NPC and watches

Posted: Wed Dec 11, 2024 9:25 am
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

Re: Return To NPC and watches

Posted: Wed Dec 11, 2024 2:06 pm
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.

Re: Return To NPC and watches

Posted: Thu Dec 12, 2024 10:31 am
by effalumper
Gotcha, thanks!