Chain dialogues

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
GenesisEnd
Posts: 5
Joined: Fri Mar 17, 2023 3:29 pm

Chain dialogues

Post by GenesisEnd »

Hello Tony,

Is it possible to chain dialogues?

Thanks
User avatar
Tony Li
Posts: 22093
Joined: Thu Jul 18, 2013 1:27 pm

Re: Chain dialogues

Post by Tony Li »

Hi,

Yes, there are several ways to do that. What do you want to do?
GenesisEnd
Posts: 5
Joined: Fri Mar 17, 2023 3:29 pm

Re: Chain dialogues

Post by GenesisEnd »

Hello Tony,
I would like to use the dialogue system as way to move through different dialogues.
For example:
You enter a tavern and want to start a conversation with anyone in the tavern.
I need will need a different dialogue for each person, but i want to have the versatility that your system provides in order to list all of those dialogues.
User avatar
Tony Li
Posts: 22093
Joined: Thu Jul 18, 2013 1:27 pm

Re: Chain dialogues

Post by Tony Li »

There are several ways to interpret that, and I'm sure there's a way to do any of them. It sounds like you want to show a conversation that lists all of the NPCs that you can talk to. From that conversation, the player can choose an NPC to talk to, and the Dialogue System will switch to that conversation. If so, use a cross-conversation link. To set up a cross-conversation link, inspect a node. From the "Links To:" dropdown, select "(Another Conversation)". Then you could set it up like this:

tavernSimple.png
tavernSimple.png (20.01 KiB) Viewed 545 times

Each of the 3 "Talk to X" player responses links to a different conversation.

If you don't know ahead of time which NPCs will be in the tavern, you can set up conditions like this:

tavernFancy.png
tavernFancy.png (46.84 KiB) Viewed 545 times

The nodes on the left have Conditions that require the NPC to be in the tavern. If so, the conversation will choose the left node. Otherwise it will choose the right node.
GenesisEnd
Posts: 5
Joined: Fri Mar 17, 2023 3:29 pm

Re: Chain dialogues

Post by GenesisEnd »

This is amazing, that was exactly what i needed.
The system doesn't cease to amaze me, great job and thanks a lot the quick response.
User avatar
Tony Li
Posts: 22093
Joined: Thu Jul 18, 2013 1:27 pm

Re: Chain dialogues

Post by Tony Li »

Happy to help!
mel
Posts: 5
Joined: Thu May 30, 2024 11:43 am

Re: Chain dialogues

Post by mel »

Hi Tony, this post was really helpful. Thank you.
An additional question I had - say I want to link a conversation to another conversation that uses a different UI (I have separate dialogue UIs for regular convos vs text message exchanges). Is there a way I am able to do this using linked conversations? Or do you have suggestions for a graceful way I could handle this?
User avatar
Tony Li
Posts: 22093
Joined: Thu Jul 18, 2013 1:27 pm

Re: Chain dialogues

Post by Tony Li »

Hi,

There are two ways you could do that:

1. Stop the first conversation and start the second one. When starting a conversation (e.g., the second one), there are 3 ways to specify a different dialogue UI:
  • Add an Override Dialogue UI component to one of the two primary participants.
  • Assign the other dialogue UI to the Dialogue System Trigger's Actions > Start Conversation > Override Dialogue UI field.
  • Or pass the other dialogue UI to the C# method DialogueManager.StartConversation().
2. Or keep the conversation going and assign the dialogue UI to DialogueManager.conversationView.dialogueUI in an OnLinkedConversationStart() method on a script on the Dialogue Manager.
Post Reply