Automatic bark conversations

Announcements, support questions, and discussion for the Dialogue System.
kimosabe
Posts: 22
Joined: Tue Aug 09, 2022 7:19 pm

Automatic bark conversations

Post by kimosabe »

Hi,

I'm trying to accomplish 2 NPCs having an automatic conversation using bark UI. (The game also includes conversations using a dedicated dialogue UI with responses.)

The problem is, if I choose 'Bark' from the DialogueSystemTrigger, I have to sequence the whole conversation myself with OnBarkEnd. What I would like instead is for them to play out the whole conversation without any user interaction.

To achieve this I've setup my characters this way:

Image

And the dialogue like this:

Image

Which works perfect, unless for the fact that when the conversation starts, the dialogue UI also pops up and I have to click in order for their conversation to progress. How could I change it so it automatically goes through the conversation?
User avatar
Tony Li
Posts: 21679
Joined: Thu Jul 18, 2013 1:27 pm

Re: Automatic bark conversations

Post by Tony Li »

Hi,

Add an Override Dialogue UI component and a Bark Dialogue UI component to one of the NPCs. Assign the Bark Dialogue UI to the Override Dialogue UI's UI field.
kimosabe
Posts: 22
Joined: Tue Aug 09, 2022 7:19 pm

Re: Automatic bark conversations

Post by kimosabe »

Tony Li wrote: Tue Feb 14, 2023 10:38 am Hi,

Add an Override Dialogue UI component and a Bark Dialogue UI component to one of the NPCs. Assign the Bark Dialogue UI to the Override Dialogue UI's UI field.
Thank you for the response, it does prevent the UI from opening up, but now it only display the first dialogue message from the conversation. Any idea why that is?

My gameobjects are setup like this:

Image

With the 2 new components being added to the one with the dialogue trigger:

Image

When I run the game, the npc with these components attached says the first line from the conversation but after that nothing else.
User avatar
Tony Li
Posts: 21679
Joined: Thu Jul 18, 2013 1:27 pm

Re: Automatic bark conversations

Post by Tony Li »

Hi,

Does this conversation require continue button clicks?

You can set the Dialogue Actors' Subtitle Panel Number and Menu Panel Number back to Default since you're using Bark Dialogue UI.
kimosabe
Posts: 22
Joined: Tue Aug 09, 2022 7:19 pm

Re: Automatic bark conversations

Post by kimosabe »

Tony Li wrote: Tue Feb 14, 2023 12:37 pm Hi,

Does this conversation require continue button clicks?

You can set the Dialogue Actors' Subtitle Panel Number and Menu Panel Number back to Default since you're using Bark Dialogue UI.
No, it does not require continue button. I would like for the conversation to play out automatically.
User avatar
Tony Li
Posts: 21679
Joined: Thu Jul 18, 2013 1:27 pm

Re: Automatic bark conversations

Post by Tony Li »

If you set the Dialogue Actors' Subtitle Panel Number and Menu Panel Number back to Default since you're using Bark Dialogue UI, does it work the way you want? Alternatively, assign the Basic Standard Dialogue UI prefab to the Override Dialogue UI component.
kimosabe
Posts: 22
Joined: Tue Aug 09, 2022 7:19 pm

Re: Automatic bark conversations

Post by kimosabe »

Tony Li wrote: Tue Feb 14, 2023 3:37 pm If you set the Dialogue Actors' Subtitle Panel Number and Menu Panel Number back to Default since you're using Bark Dialogue UI, does it work the way you want? Alternatively, assign the Basic Standard Dialogue UI prefab to the Override Dialogue UI component.
If it set them both back to default, and use the 'override dialogue UI' and 'bark dialogue UI' I get this result:

Image

If I set the subtitle panel number to 'use bark UI', w/o any overrides scripts. It works but my normal dialogue UI comes up and I have to click to manually progress the dialogue

Image

My goal is to have the second result but w/o any UI popping up, just having an automatic dialogue play out between 2 characters.
User avatar
Tony Li
Posts: 21679
Joined: Thu Jul 18, 2013 1:27 pm

Re: Automatic bark conversations

Post by Tony Li »

Try these settings:

NPCs' Dialogue Actor components:
  • Subtitle Panel Number: Use Bark UI
  • Menu Panel Number: Default (doesn't really matter; it's not used in this case)
Remove Bark Dialogue UI.

Add Override Dialogue UI. Assign Basic Standard Dialogue UI prefab to Override Dialogue UI's UI field.
kimosabe
Posts: 22
Joined: Tue Aug 09, 2022 7:19 pm

Re: Automatic bark conversations

Post by kimosabe »

Unfortunately it still won't continue past the first message

Image

Is there a method I can call from a custom C# script that just continues the conversation? That way I can just have it continue the conversation every X seconds until it's done.
User avatar
Tony Li
Posts: 21679
Joined: Thu Jul 18, 2013 1:27 pm

Re: Automatic bark conversations

Post by Tony Li »

You can manually continue the conversation, but it might be best to get to the bottom of what's going on.

To manually continue after 3 seconds, set the dialogue entry node's Sequence field to: Continue()@3

To get to the bottom of the issue, here are two approaches:

1. Instead of using a bark UI, use an overhead subtitle panel:
How To: Overhead Conversation Bubble Text
You'll still want to use an Override Dialogue UI and assign Basic Standard Dialogue UI.

2. Or check the bark UI's StandardBarkUI component. If it's configured to wait for a continue button press, untick the option. Also check the Dialogue Manager GameObject's Subtitle Settings > Continue Button dropdown and the conversation's properties (Menu > Conversation Properties in the Dialogue Editor window). Make sure the conversation's properties aren't overriding the Continue Button dropdown to require continue button clicks.
Post Reply