Conditional logic for "Talk to different NPC" from QuestGiver

Announcements, support questions, and discussion for Quest Machine.
Post Reply
mroshaw
Posts: 96
Joined: Wed Jan 19, 2022 4:10 am

Conditional logic for "Talk to different NPC" from QuestGiver

Post by mroshaw »

Hi again!

I have a quest that is given by a QuestGiver NPC, call him "Dave", called "Go talk to the witch in town". The "witch" is another NPC QuestGiver who will dish out a bunch of other quests, once I've talked to her to complete Dave's quest. I'm trying to set up the dialog and conditional logic to make this happen.

I have a quest set up where Dave isthe QuestGiver. The quest is issued to the player as part of the "success" action of the previous quest, using the "Give quest to player" action, out of the box. This all works great, and dialog and journal are populated as I want.

How do I configure dialog for my "witch" NPC, so that she can also talk about the quest, but obviously with different dialog than if I were to talk to the original QuestGiver? Once I've figured this out, presumably, I can then include success criteria of "Discussed Quest" where the target is my "witch" QuestGiver?

Can both QuestGivers have the same quest, and if so, how do I create distinct dialog for each?

Many thanks again for your help!
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Re: Conditional logic for "Talk to different NPC" from QuestGiver

Post by Tony Li »

Hi,

If you're using the Dialogue System in combination with Quest Machine, I recommend handling it in Dialogue System conversations.

If you're not using Quest Machine, please see the Demo scene's Food Delivery quest. If you're playing the Demo scene, first complete the Villager's Harvest Carrots quest. This will make the Food Delivery quest available. The quest's "Talk to Captain" node requires the player to talk to a different NPC whose Quest Giver ID is "Pirate".

If you examine the quest in the Quest Editor, you'll see that the Talk to Captain node's Quest Node Info > Speaker is set to "Pirate". If you talk to the pirate captain while this node is true, the quest dialogue UI will show the node's active dialogue text.

There is also a parallel node named "Farmer Waiting". If you talk to the villager, it will show this node's active dialogue text, which contains a reminder to go talk to the pirate captain.
mroshaw
Posts: 96
Joined: Wed Jan 19, 2022 4:10 am

Re: Conditional logic for "Talk to different NPC" from QuestGiver

Post by mroshaw »

Superb, thanks again Tony!

I really think on the basis of your assets alone, the Unity Asset Store review system needs to allow review scores cranked up to 11! :)
mroshaw
Posts: 96
Joined: Wed Jan 19, 2022 4:10 am

Re: Conditional logic for "Talk to different NPC" from QuestGiver

Post by mroshaw »

This just works, so, so well!

My biggest challenge now is to decide whether to keep going down this route, or sort myself out and buy your Dialogue asset. If it's half as good as Quest Machine, it feels like a solid investment!
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Re: Conditional logic for "Talk to different NPC" from QuestGiver

Post by Tony Li »

Hi,

Thanks! Feel free to try the Dialogue System's evaluation version:

https://www.pixelcrushers.com/dialogue- ... n-version/

It's a bigger beast than Quest Machine, so there's a bit of a learning curve. But there are a lot of tutorial videos.
Post Reply