Dialogue Conversations

Announcements, support questions, and discussion for the Dialogue System.
IICookieGII
Posts: 17
Joined: Mon Sep 30, 2019 6:04 am

Dialogue Conversations

Post by IICookieGII »

Hi,

I followed the Integration video on YouTube, the part where you add the quest ID to the Quests/Items tab with a description "This is a stub etc" then go to Conversations tab to use the drop down. You access "Explore Circle" and then it shows all the conversations from that quest. My quest which resides over in Quest Machine is called "exploreArea" which i added to the Quest/Items tab but is not showing as a dropdown choice with any of the text I have already put into Quest Machine via the tutorials?

Image

Image

Image

Am I missing something? How do I link conversation Dialogue to a Quest Machine Quest?

Simply put. I think I need a tutorial on how to use the Dialogue Manager with Quest Machine from scratch. As Quest machine does not allow for the player to respond to the Quest Giver in a conversation style? Unless it does and I have missed something? This was the reasoning behind getting the Dialogue Manager.

Is it a case of only use Dialogue Manager for Quests or can I use Quest machine to build the quests and override the conversation using the DIalogue Manager? I am a little confused...

I hope the above makes sense.

*Edit* I saw how to rig Dialogue Conversation into the offer part but the Lua is still not working for me to select the quest??? Still just says "New Conversation 1" *Edit*

Regards,

And thanks in advance!

Cookie
Last edited by IICookieGII on Mon Feb 10, 2020 10:06 am, edited 1 time in total.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue Conversations

Post by Tony Li »

Hi Cookie,

You're on the right track. Quest Machine does not do branching conversations. The Dialogue System's integration with Quest Machine allows Quest Machine to show branching conversations using the Dialogue System.

When the Dialogue System runs a conversation, it uses its own text. It does not pull any text from a Quest Machine quest. If you look at the example dialogue database included with Quest Machine's Dialogue System integration package, you'll see that the conversations have their own text that is independent from any text in Quest Machine.

On the Quest Machine side, you can leave your quests' Dialogue Text empty except for a single Dialogue System Conversation Quest Content that points to a conversation in your dialogue database.

When the Dialogue System conversation runs, it can reach back into Quest Machine to check and set quest states. To do this, it uses commands in a dialogue entry node's Conditions or Script field. For example, if a node sets a quest to the success state, its Script field might contain this command:
  • Script: SetQuestState("myQuest", "success")
where "myQuest" is a Quest Machine quest ID.

It's entirely possible to type this in by hand. However, it's easier to use the "..." button to open dropdown menus that let you compose commands without having to type anything.

The "..." button's dropdowns only know about quests whose names are defined in the Dialogue Editor's Quests/Items section. This is why we add dummy stubs there for quests that are really defined in Quest Machine. This allows the "..." to show the IDs of those quests.
IICookieGII
Posts: 17
Joined: Mon Sep 30, 2019 6:04 am

Re: Dialogue Conversations

Post by IICookieGII »

Riiiiight! I think I see what you mean.... Gotcha, I thought your system had a clever way of using the Quest ID to actually pull all the Text based content out.... lol

Ok, I see what you mean now.
IICookieGII
Posts: 17
Joined: Mon Sep 30, 2019 6:04 am

Re: Dialogue Conversations

Post by IICookieGII »

Hmm, Ok well I am still a little stuck I think. My dropdown in quest machine just says to use "New Conversation 1" and I cannot set the quest stub to appear in the dropdown either? Any idea ?
IICookieGII
Posts: 17
Joined: Mon Sep 30, 2019 6:04 am

Re: Dialogue Conversations

Post by IICookieGII »

Ok, so went a roundabotu way of doing it... I selected create Conversation from Quest Machine instead of setting a quest/item from Dialogue Manager... Is that a reasonable way of doing the same thing?
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue Conversations

Post by Tony Li »

Sure! That's what I usually do, too. If you didn't see the conversation before, then it's possible that you needed to do one of these things:

1. Assign your dialogue database to the Dialogue System Conversation Quest Content so it would know which conversations to show, or

2. Add a Dialogue Manager GameObject to your scene and assign a dialogue database to it. If the Dialogue System Conversation Quest Content doesn't have a database assigned, it will look for a Dialogue Manager in the currently-open scene and use its database to get the list of conversation titles.
IICookieGII
Posts: 17
Joined: Mon Sep 30, 2019 6:04 am

Re: Dialogue Conversations

Post by IICookieGII »

Really sorry! But I have done everything. And I cannot get the Quest Machine to link to Dialogue manager..... Its so annoying.

I have everything linked up and even managed to create a conversation and add all the script triggers i.e. GiveQuest("quest giver", "exploreArea") - Nothing triggers with the quest.. It did when I used Quest Machine on it's own but when I click the "yeah sure" nutton to accept the quest - nothing. The Journal stays empty, the Quest giver continuously has an offerable quest ... ? Where Am I going worng??? lol

Image

Image

Image

The onClick event for the response is empty for the actual button as I assume it is overridden by the Dialogue manager?

Regards,

Cookie
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue Conversations

Post by Tony Li »

Hi,

I had to step out of the office. I'll be back online in about 45 minutes, and I'll reply ASAP.
IICookieGII
Posts: 17
Joined: Mon Sep 30, 2019 6:04 am

Re: Dialogue Conversations

Post by IICookieGII »

No worries. I am out of the office and not accessing the project until back at my desk tomorrow, I will reconvene with this issue tomorrow.

I did see you suggest to either have the dialogue manager object in the hierarchy OR to attach the database and link it in the quest details section.

Literally on the cusp of getting this sorted, then I can push on with adding in my Twine data! 😉

Regards

Cookie
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue Conversations

Post by Tony Li »

I have a suspicion that probably just one tiny step was missed. Here's an example:

QM_DS_Integration_Example_2020-02-10.unitypackage

And this is a step-by-step tutorial of how I put it together:

1. Imported Quest Machine and Dialogue System.

2. Instead of importing the Dialogue System Support package in Quest Machine's Third Party Support folder, I Imported the updated version of the package from the Quest Machine Extra Downloads page. It fixes a bug in which Lua functions could get unregistered when changing scenes. If you're not changing scenes yet, then it's not a concern. This fix is going to be in the next full release of Quest Machine, too.

3. Created a new dialogue database named 'DS Integration Example Dialogue Database'.
  • Added a quest (stub) named 'exploreArea'.
  • Added a conversation titled 'Officer Judd Conversation'. Set the "Yeah sure" node's Script field to:

    Code: Select all

    GiveQuest("Officer Judd", "exploreArea")
    expecting to add a Quest Giver named 'Officer Judd'.
  • Set Conditions on the initial NPC nodes so the right one is followed depending on the player's current quest state. I used the "..." button to fill in the text.
Image

4. Created a new quest database named 'DS Integration Example Quest Database'.

5. Created a new quest named 'Explore Area Quest' and added it to the quest database.
  • Set the ID to 'exploreArea'.
  • Added some nodes to the quest. One node's condition listens for the message 'Explored' + 'Area'.
  • Inspected the main quest properties. In the Offer Text section, added a Dialogue System Conversation element. Assigned the dialogue database. Clicked the round button to the right of the Conversation field to change it from freeform text entry into a dropdown. Selected the conversation.
  • Repeated the process for States > Active > Dialogue Text and States > Successful > Dialogue Text.
Image

6. Created a new scene.

7. Added the Quest Machine prefab. Assigned the quest database. Added a Dialogue System Quest Dialogue UI.

8. Added the Dialogue Manager prefab. Assigned the dialogue database. Added a Dialogue System Quest Machine Bridge.

9. Added an empty GameObject to represent the player. Tagged it 'Player'. Added a Quest Journal to it. Set the ID and Display Name to 'Player'.

10. Added an empty GameObject to represent Officer Judd. Added a Quest Giver to it. Set the ID and Display Name to 'Officer Judd'. Added the 'Explore Area Quest' to its Quests list.

Image

11. Added a Canvas and a UI button to talk to Officer Judd. Configured its OnClick() to call Officer Judd's QuestGiver.StartDialogueWithPlayer method.

12. Added another UI button to explore downtown. Added a Quest Control component. Configured the button's OnClick() to call QuestControl.SendToMessageSystem 'Explored:Area'

Image

If you play the scene and click the button to talk to Officer Judd, you can pick up the quest. Open the Quest Editor window, and inspect the Player GameObject. You'll see that the player has an active copy of the quest:

Image

I didn't add any Journal Text to the quest. But if you were to add that, you should see the text in Quest Machine's journal UI.
Post Reply