[SOLVED]Bridge Quests with conversations

Announcements, support questions, and discussion for the Dialogue System.
mschoenhals
Posts: 118
Joined: Thu Dec 19, 2019 7:38 am

[SOLVED]Bridge Quests with conversations

Post by mschoenhals »

How do I get a Quest Giver to give the next quest using both Quest Machine and Dialogue System?

Right now I have an NPC who provides the quest "exploreBoatAndReturn" and it works well with the Dialogue System conversation. When the player completes this quest, I would like the conversation to switch to the new quest "retrieveStuds."

I'm assuming that there needs to be an entry in the script section of the success node of the conversation. Right now I have:
SetQuestNodeState("exploreBoatAndReturn", "Return", "success")

Is there an and statement that would take the player to the next quest?
Last edited by mschoenhals on Tue Aug 18, 2020 9:49 am, edited 1 time in total.
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Bridge Quests with conversations

Post by Tony Li »

Let's take this as an example:

qm_ds_continue.png
qm_ds_continue.png (21.67 KiB) Viewed 580 times

The first node ("Go explore the boat") checks if the state of exploreBoatAndReturn is inactive. If so, it offers the quest.

The second node ("How's the boat") checks if the state of exploreBoatAndReturn is active. If so, it asks the player for an update.

The third node ("Retrieve some studs") checks if exploreBoatAndReturn is successful and retrieveStuds is inactive. If so, it offers the retrieveStuds quest.

In the "How's the boat" branch, the last node sets exploreBoatAndReturn to success. Then it links to an empty node that does nothing. That empty node links to "Retrieve some studs". (This empty node is important to delay evaluation of the conditions on "Retrieve some studs". more info)

I set it up like this so that "Retrieve some studs" could happen in one of two ways:

1. If the player gets to the "Thanks for exploring" node, the conversation will smoothly flow into "Retrieve some studs".

2. If the player somehow completes the exploreBoatAndReturn quest without getting to this node -- maybe he can talk to another NPC to complete it -- then the player can still pick up the retrieveStuds quest when he talks to this NPC again.
mschoenhals
Posts: 118
Joined: Thu Dec 19, 2019 7:38 am

Re: Bridge Quests with conversations

Post by mschoenhals »

In your example you show both quests under one conversation. When looking at the demo, I see that the conversations are kept separately (Harvest Carrots, Pesky Rabbits). I can't figure out how these 2 separate conversations link. The method you show in this thread would work for most of my quests as most of my NPCs give 1 or 2 quests but I do have a select few that provide many. I'm thinking that keeping the conversations separate would be a cleaner approach to NPCs with several quests, correct? How is that done?
mschoenhals
Posts: 118
Joined: Thu Dec 19, 2019 7:38 am

Re: Bridge Quests with conversations

Post by mschoenhals »

So, working on the option of all the quests appearing in one conversation, I setup this one:
(edit) I see my image isn't showing so I'm providing a link instead:
https://www.dropbox.com/s/3ep6f018k3f9j ... n.jpg?dl=0

What happens in game play, is the player can complete the first quest but when going back to the NPC, the quest ends and the alert icon appears above the NPC. I have to go back to the NPC, select yes to the new quest, and then there's a blank conversation response from the Player first, then the NPC outlines the new quest.

The "good job exploring..." has this condition:
CurrentQuestState("exploreBoatAndReturn") == "success"

"Yes, give me more" has no conditions.

The <Check> has this condition:
CurrentQuestState("exploreBoatAndReturn") == "success"
I believe the check is the blank response issue. I have this one set to Passthrough.

The "There's a Green Goblin on..." has this condition:
CurrentQuestState("exploreBoatAndReturn") == "success"
and it's set to Block.

How do I get rid of the blank response needed by the player? Is it possible to have the next quest offered without having to leave the conversation and come back to the NPC?
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Bridge Quests with conversations

Post by Tony Li »

Hi,

Set the <Check> node back to Block instead of Passthrough.

Set the Sequence field to: Continue()
mschoenhals
Posts: 118
Joined: Thu Dec 19, 2019 7:38 am

Re: Bridge Quests with conversations

Post by mschoenhals »

Most of the conversation appears to be working, however, when the Quest has been completed and the player returns to the NPC, the old Quest Machine UI pops up with the title of the first quest (explore the boat). During game play, in the Quest Editor, the runtime is at Successful.

If I close the old Quest Machine UI pop up, the conversation then comes in to offer the next quest.
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Bridge Quests with conversations

Post by Tony Li »

Hmm, it shouldn't show the Explore the Boat quest if it's successful. It should show quests that are ready to be offered.

When you turn in the Explore the Boat quest, does it close the Quest Machine UI at the same time that it shows the Dialogue System conversation?
mschoenhals
Posts: 118
Joined: Thu Dec 19, 2019 7:38 am

Re: Bridge Quests with conversations

Post by mschoenhals »

No, the Quest Machine UI opens first and when I click on close, then the conversation pops up and carries on. A warning message comes up in the console right after I close the Quest Machine UI window:

Dialogue System: Another conversation is already active. Not starting 'Red Dress Woman Conversation'.
UnityEngine.Debug:LogWarning(Object)
PixelCrushers.DialogueSystem.DialogueSystemController:StartConversation(String, Transform, Transform, Int32) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Manager/DialogueSystemController.cs:776)
PixelCrushers.DialogueSystem.DialogueSystemController:StartConversation(String, Transform, Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Manager/DialogueSystemController.cs:851)
PixelCrushers.DialogueSystem.DialogueManager:StartConversation(String, Transform, Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Manager/DialogueManager.cs:439)
PixelCrushers.QuestMachine.DialogueSystemSupport.DialogueSystemQuestDialogueUI:ShowConversation(QuestParticipantTextInfo, String) (at Assets/Plugins/Pixel Crushers/Quest Machine/Third Party Support/Dialogue System Support/Scripts/Quest UIs/Dialogue System Quest Dialogue UI/DialogueSystemQuestDialogueUI.cs:191)
PixelCrushers.QuestMachine.DialogueSystemSupport.DialogueSystemQuestDialogueUI:ShowConversationContent(QuestParticipantTextInfo, DialogueSystemConversationQuestContent) (at Assets/Plugins/Pixel Crushers/Quest Machine/Third Party Support/Dialogue System Support/Scripts/Quest UIs/Dialogue System Quest Dialogue UI/DialogueSystemQuestDialogueUI.cs:180)
PixelCrushers.QuestMachine.DialogueSystemSupport.DialogueSystemQuestDialogueUI:ShowContents(QuestParticipantTextInfo, List`1) (at Assets/Plugins/Pixel Crushers/Quest Machine/Third Party Support/Dialogue System Support/Scripts/Quest UIs/Dialogue System Quest Dialogue UI/DialogueSystemQuestDialogueUI.cs:514)
PixelCrushers.QuestMachine.DialogueSystemSupport.DialogueSystemQuestDialogueUI:ShowOfferQuest(QuestParticipantTextInfo, Quest, QuestParameterDelegate, QuestParameterDelegate) (at Assets/Plugins/Pixel Crushers/Quest Machine/Third Party Support/Dialogue System Support/Scripts/Quest UIs/Dialogue System Quest Dialogue UI/DialogueSystemQuestDialogueUI.cs:602)
PixelCrushers.QuestMachine.QuestGiver:ShowOfferQuest(Quest) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestGiver.cs:643)
PixelCrushers.QuestMachine.QuestGiver:StartMostRelevantDialogue() (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestGiver.cs:594)
QuestGiverCustom:OnCloseActiveQuest() (at Assets/Plugins/Pixel Crushers/Quest Machine/Quest Custom Scripts/QuestGiverCustom.cs:31)
UnityEngine.EventSystems.EventSystem:Update()
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Bridge Quests with conversations

Post by Tony Li »

Would it be possible for you to send a reproduction project to tony (at) pixelcrushers.com? If so, please include the steps I need to follow to reproduce the issue.

Did you add the Dialogue System Quest Dialogue UI component to the Quest Machine GameObject? Which checkboxes are ticked?
mschoenhals
Posts: 118
Joined: Thu Dec 19, 2019 7:38 am

Re: Bridge Quests with conversations

Post by mschoenhals »

Ok, I sent you a stripped version of the project. Just run it, approach the NPC and head down after. You'll see the issue after you return to the NPC.

I thought it might be related to a custom Quest Giver script you helped me with in this thread:
http://www.pixelcrushers.com/phpbb/view ... f=9&t=2804
However, when I removed it, the only change was that you need to approach the NPC again (won't trigger without walking away).

Yes, I have the Dialogue System Quest Dialogue UI on the Quest Machine prefab and both checkboxes are ticked.
Post Reply