Page 4 of 6

Re: Quest Generation (Domains)

Posted: Wed Feb 20, 2019 10:47 am
by dlevel
Well, I see that the Quest Indicator has the marks for when the NPC has a quest, I can't find how to set a new mark when a quest is finished. Is that implemented or not yet?

Re: Quest Generation (Domains)

Posted: Wed Feb 20, 2019 1:46 pm
by Tony Li
If you're talking about procedurally-generated quests, it's added automatically when you tick the Quest Generator Entity's Require Return To Complete checkbox.

Re: Quest Generation (Domains)

Posted: Wed Feb 20, 2019 2:18 pm
by dlevel
yeah this is ticked, I mean for the Quest Indicator UI and QuestIndicatorManager that has only 2 states as seen in the screenshot below. I would like to have a new indicator for when a quest is completed. Wouldn't it need a state for "Quest Completed" and choose from there another prefab for indicator

https://ibb.co/VQsBxc3

Re: Quest Generation (Domains)

Posted: Wed Feb 20, 2019 2:53 pm
by Tony Li
Quest Machine only automatically sets the two in your screenshot: Has Quest To Offer and Has Quest But Cannot Offer. This is because these are the only two that Quest Machine can be truly sure about. For handwritten quests, you must use the SetIndicatorQuestAction to show additional indicators.

You can assign any prefab or GameObject that has a Quest Indicator UI to an NPC's Quest Indicator Manager component. The default prefab that ships with Quest Machine has these assignments:

Image

You can add up to 10 custom indicators, too. Let's say you assign a "completed" indicator as custom 0. Then set the action like this:

Image

For procedural quests, it requires extra scripting. (Assign a method to the generatedQuest event to add a SetIndicatorQuestAction.) If you're talking about procedural quests, I suppose I could add an option. But I'm not sure how it would differ from the Talk indicator set by the Require Return To Complete checkbox. Any suggestions?

Re: Quest Generation (Domains)

Posted: Wed Feb 20, 2019 4:06 pm
by dlevel
Yes I m talking about procedurally generated quests. Well I have setup the indicators I just need an option to assign them when a quest is finished so the NPC has an exclamation mark above his head (I have setup my own prefabs for indicators) :)

Re: Quest Generation (Domains)

Posted: Wed Feb 20, 2019 4:54 pm
by Tony Li
I can implement this in one of two ways. I'd like to take your feedback into account.

1. Add an option to Quest Generator Entity to show a specific quest indicator when a quest has reached the Success state.
  • Pros: Only need to set it once (on the Quest Generator Entity)
  • Cons: Applies to all of that NPC's generated quests without exception
2. Or add an option to Action assets. When the action is complete, set the quest giver's indicator.
  • Pros: Can set different indicators per action (or none)
  • Cons: Need to configure indicator individually on each action; applies to all NPCs who use that action in a quest
Any preference?

Re: Quest Generation (Domains)

Posted: Wed Feb 20, 2019 5:53 pm
by dlevel
What about having a new state in Quest Indicator Manager that we set another indicator for the NPC when the quest completes (I guess there is a check already for completed quests)? This way everything is in one place and beautiful, check my photo below.

https://ibb.co/0ZWMkMt

so the ideal result would be, 2 quests are available from the Quest Generator Entity (NPC), it has the "offer" indicator (like it works now), you get both quests and you finish 1, then the NPC would then enable the "completed" indicator (even though 1 more quest is not finished), you get the reward from the finished quest, and the "completed" indicator disappears until you finish the 2nd quest that will enable "completed" indicator again.

Other than that, the 1st way you mentioned kinda seems to work the same way but you will set the "completed" indicator inside the Quest Generator Entity if I understood correctly, which is totally fine too :)

Re: Quest Generation (Domains)

Posted: Wed Feb 20, 2019 7:50 pm
by Tony Li
Isn't that the same as what the "Require Return To Complete" checkbox does, except it uses the Talk indicator instead of a Complete indicator?

I could add the dropdown in your picture and use that instead of the Talk indicator.

Re: Quest Generation (Domains)

Posted: Thu Feb 21, 2019 3:44 am
by dlevel
I tested again to be sure, the Talk indicator is not activated when you finish a quest with Require Return To Complete, while the quest is indeed completed and can get the reward. I checked the gameobject in runtime and it's not enabling the Talk prefab (check photo below).

https://ibb.co/j47P9sH

Re: Quest Generation (Domains)

Posted: Thu Feb 21, 2019 9:27 am
by Tony Li
Are you using the default Quest Indicator UI prefab? If not, is a child GameObject assigned to the Talk indicator?

Image

Does the Demo scene work correctly? The Knight NPC offers a procedurally-generated quest, typically to kill some Orcs. If you accept the quest, then as soon as you kill the Orcs the Knight's indicator should change to a question mark (which is assigned to the Talk field).