Page 1 of 2

Quest Monitor Feedback Loop

Posted: Wed Dec 05, 2018 6:18 pm
by nathanj
Hi Tony,

I'm trying to set up a condition in my quest that can revert quest node states if the player drops an item they were meant to collect to complete a previous node.

So, say there is a gather quest of three pieces of firewood. There are two conditional nodes: one for "Gather" and one for "Return". I would like it that if the player drops a piece of firewood while the "Return" node is active (and the "Gather" is true) that a monitor node reverts the quest node states so "Gather" becomes "active" again and "Return" becomes unassigned.

Image

In the Picture above the "Condition 4" node is supposed to check it the amount drops below the required amount to set the "Gather" node to true (in this case 3 pieces of Firewood) and if so send "Actions", to set "Gather" to "Active" and "Return" to inactive, when it's state becomes "True"

This is slightly complicated in that I'm using USurvival, otherwise I think I could use the Counter system. Maybe I can sync a counter to a USurvival inventory item amount. Is this possible?

I'm petty sure that this is possible with Quest System as there is a continual checker. This is awesome as with Dialogue System we had to use a rather cumbersome Node canvas script to check item states to revert conditions when necessary.

I hope this makes sense. It feels like a very convoluted explanation :?

Thanks
Nathan

Re: Quest Monitor Feedback Loop

Posted: Wed Dec 05, 2018 8:32 pm
by Tony Li
Hi Nathan,

That will require an update to the uSurvival Has Items Quest Condition. You can download the update here:

Quest Machine Extras

The update lets you specify an "At Most" condition. If the player has at most 2 wood (i.e., less than 3), then it loops back to the Gather node:

Image

In the "No Longer Has 3" node's True actions, set the Return node's state back to Inactive.

Re: Quest Monitor Feedback Loop

Posted: Wed Dec 05, 2018 8:37 pm
by nathanj
Tony,

You are the best!

Really really loving Quest Machine. At first I thought it was gonna complicate our workflow but now that I'm getting the hang of it I see how much it will improve our workflow while also adding so much more functionality.

Thank you,
Nathan

Re: Quest Monitor Feedback Loop

Posted: Wed Dec 05, 2018 8:40 pm
by Tony Li
Awesome! Glad to hear it. If any suggestions or feature requests come to mind, please let me know.

Re: Quest Monitor Feedback Loop

Posted: Wed Dec 05, 2018 10:08 pm
by nathanj
Hey again,

Sorry, I'm kind of stuck on something. In this quest I have three items the player is to collect. Each have a checker to monitor if they drop an item before completing the whole quest.

Image

I have a "Gate" node that checks to see if all three nodes are "True" before enabling the "Return" node.

Up to this point everything works. If I collect 3 pieces of firewood the quest is completed. If I drop one it is activated again.

The problem is with the "Return" node once it's been activated. If the first three nodes are "True", the "Return" node is active and I then drop an item, the items node becomes "Active" again but the "Return" node is not returned to "Inactive". I can manually set it to "Inactive"through an Action but then it doesn't return to "Active" once the missing item is collected again.

Sorry to keep distracting you but I can't figure this out.
Nathan

Re: Quest Monitor Feedback Loop

Posted: Wed Dec 05, 2018 10:18 pm
by Tony Li
Hi Nathan,

If FirewoodChecker determines that the player no longer has enough firewood, you can run these actions:
  • Return: inactive
  • Gate: active
  • Firewood: active
  • FirewoodChecker: active
I'm finishing work for the day. If that doesn't do the job, please let me know. I'll recreate the quest over here tomorrow and test it.

Re: Quest Monitor Feedback Loop

Posted: Thu Dec 06, 2018 6:51 pm
by nathanj
I figured out the issue, though i'm not quite sure why this worked. Tony's suggestion was close but changing the "Gate" node to "Inactive" is what was required.

I can not stress how amazing this functionality is for updating quest states in Quest Machine. With Dialogue System we needed to use unique quest checkers in Node Canvas to dynamically monitor inventory item (collecting and dropping) counts with quest states. But now Quest Machine does this out of the box. No extra code or assets.

Super happy right now.

Nathan

Re: Quest Monitor Feedback Loop

Posted: Thu Dec 06, 2018 6:57 pm
by Tony Li
Great! I'll continue to look into this in case there's an edge case. There were a lot of support cases today, so I'm running a little behind.

Re: Quest Monitor Feedback Loop

Posted: Thu Dec 06, 2018 7:01 pm
by nathanj
No worries, Tony

I'm away and running :D

Thank you
Nathan

Re: Quest Monitor Feedback Loop

Posted: Fri Dec 07, 2018 8:35 am
by Tony Li
Hi Nathan,

I just wanted to add one note. If the FirewoodChecker node detects that the player no longer has enough firewood, also set Firestick and Tinder to active.

When you reset Gate, it resets the "number of preceding nodes that are true" tally back to zero. If Firestick is already in the true state, it won't tell Gate that it just turned true, so the tally may never reach 3. However, if you set Firestick to active, then it will immediately check it the player has enough firesticks and tell Gate that it's true.