Best practice for setting conversation

Announcements, support questions, and discussion for Quest Machine.
Post Reply
Keeko
Posts: 33
Joined: Mon Feb 01, 2021 8:08 pm

Best practice for setting conversation

Post by Keeko »

I am currently building a quest and have a question around whether or not i am approaching this correctly.
Capture.JPG
Capture.JPG (53.62 KiB) Viewed 1330 times
In my image, I have circled a location where I would like conversations to take place before those nodes are set. Currently, I have a group of Dialogue system triggers on the quest giver that check the statuses of those nodes to decide what current conversation should be activated. This seems like it would get quite complex with big quests as I can see no way to set which conversation will next run when the player interacts with the quest giver (only an option to start a conversation straight away)

Is there any advice on this one?
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Best practice for setting conversation

Post by Tony Li »

In some respects it comes down to personal preference, but I recommend writing a single conversation for the entire quest. Go down different branches of the conversation tree based on current quest node states.

Make liberal use of group nodes wherever they make sense, and also keep in mind that you can link from one conversation to another. So you could have one main, short entrypoint conversation that links to other three conversations for gathering, farming, and combat.
Keeko
Posts: 33
Joined: Mon Feb 01, 2021 8:08 pm

Re: Best practice for setting conversation

Post by Keeko »

What are group nodes?
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Best practice for setting conversation

Post by Tony Li »

In the Dialogue System, a group node is a dialogue entry node whose Group checkbox is true:

groupNode.png
groupNode.png (4.75 KiB) Viewed 1323 times

The Dialogue System's data structure is the same as a commercial dialogue writing application called Chat Mapper. I'll just paste in their description of group nodes:
Group nodes are used to create sub-trees within the overall conversation tree. This is useful from an organizational standpoint but also becomes very valuable in defining conditions as you will see in defining condition priorities. Groups can be thought of as simplified dialogue nodes and contain some of the same fields. Group nodes can also be added, arranged, and linked just like dialogue nodes. [S]cripts defined on group nodes will be executed just like script assigned to dialogue nodes.
Here's an example that uses groups:

groupNodes.png
groupNodes.png (30.36 KiB) Viewed 1323 times

The first group node (<Hub>) acts as a central return point for conversations that can loop back to the beginning. You typically see this in investigative conversations (e.g., "Tell me about...").

The second group node (<Heard Ghosts>) has a condition. If this condition is true (in this case, if the player heard ghosts), it adds the two blue responses on the right to the response menu. Without the <Heard Ghosts> group node, you'd have to put the same condition on both of the blue nodes on the right.

So in both cases group nodes help organize the conversation more tidily.
Keeko
Posts: 33
Joined: Mon Feb 01, 2021 8:08 pm

Re: Best practice for setting conversation

Post by Keeko »

Is it possible to refer to a quest node with a dropdown instead of manually typing its ID, with the dialogue system that was a major boon to the speed of setting quest state from the tree?
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Best practice for setting conversation

Post by Tony Li »

Not in the current version. I didn't include it because you can reference other quests, and those quests may not be assigned to the quest database yet. In the next update, I'll check if the current scene has a Quest Machine GameObject with quest database(s) assigned. If so, then it will attempt to show dropdowns when possible; otherwise it fill show text entry fields.
Keeko
Posts: 33
Joined: Mon Feb 01, 2021 8:08 pm

Re: Best practice for setting conversation

Post by Keeko »

Amazing! Looking forward to that.
Post Reply