Two Dialogue Styles? What Do?

Announcements, support questions, and discussion for the Dialogue System.
User avatar
Littlenorwegians
Posts: 32
Joined: Sun Aug 04, 2024 3:06 pm

Two Dialogue Styles? What Do?

Post by Littlenorwegians »

Hello! Me again.

So, in brief, I need a way to have two types of dialogue systems.
There's one style that takes place on the overworld, that has been solved already.

Now, the second one is much in the style of Metal Gear Solid.
Image


Basically two talking sprites. With an active animation while text is on screen (Typewriter effect).
I'm afraid to make a fool of myself so,

1) What is the method to have two dialogue managers in a scene and have them play nice. Should I be doing it in some different way?

2) Any tutorial or something recommended to get this result?
User avatar
Tony Li
Posts: 22108
Joined: Thu Jul 18, 2013 1:27 pm

Re: Two Dialogue Styles? What Do?

Post by Tony Li »

Hi,

You only need one Dialogue Manager.

Decide which dialogue UI is going to be used more often. Assign this one to the Dialogue Manager's Display Settings > Dialogue UI field.

Then, when you set up Dialogue System Triggers for conversations that will use the MGS-style UI, assign the MGS-style UI to the Dialogue System Trigger's Actions > Start Conversation > Override Dialogue UI field. To make this UI, you can start with a copy of one of the existing prefabs such as the Focus dialogue UI.

Or, if the MGS-style UI is only going to be used with one or more specific characters, you can add an Override Dialogue UI component to those characters and assign the MGS-style UI to those components.
User avatar
Littlenorwegians
Posts: 32
Joined: Sun Aug 04, 2024 3:06 pm

Re: Two Dialogue Styles? What Do?

Post by Littlenorwegians »

Right, so I am one step closer.
Image

One problem/challenge I am having. Which is the "emotion states" and how to do them.

Basically you have a default idle animation. Where the character is blinking.
Then there's a default talk animation.
But there's also the states of happy, sad and angry. Which have their own respective talk animations.
Happy_idle. Happy_talk. Basically. And the talk happens as long as the typewriter is going.

I use sprite sheets to achieve this and ideally I would like to swap out sprite sheets but have characters animate the same way. Ideally.


How do I set this up? Thank you tons for the help. :)
User avatar
Tony Li
Posts: 22108
Joined: Thu Jul 18, 2013 1:27 pm

Re: Two Dialogue Styles? What Do?

Post by Tony Li »

Hi,

Please see Animated Portraits in the manual and the Animated Portrait Example (direct download) on the Dialogue System Extras page. And let me know if you have any questions about it.
User avatar
Littlenorwegians
Posts: 32
Joined: Sun Aug 04, 2024 3:06 pm

Re: Two Dialogue Styles? What Do?

Post by Littlenorwegians »

Thanks @TonyLi

I've set things up as best I can but I'm having some issues. Highlighted my setup in this video.


(Pardon the audio at the end)

But yeah, I'm a little stuck. Honestly trying as best I can, but I figure it's quicker to ask while I work.
User avatar
Tony Li
Posts: 22108
Joined: Thu Jul 18, 2013 1:27 pm

Re: Two Dialogue Styles? What Do?

Post by Tony Li »

Hi,

1. In your dialogue database, assign a static portrait image to each actor's Portrait Sprites section.

2. Create GameObjects for Calico and Brindle if you haven't already.

3. Add Dialogue Actor components to the Calico and Brindle GameObjects.
  • Set the Actor dropdown to the corresponding actor.
  • Assign the actor's portrait image animator controller to Dialogue UI Settings > Portrait Animator Controller. It doesn't matter what's assigned to the CalicoPortrait and BrindlePortrait GameObjects' Animator components. When each actor speaks a line, their Dialogue Actor component will assign its Dialogue UI Settings > Portrait Animator Controller to the Animator component.
4. Inspect the subtitle panels' Standard UI Subtitle Panel components, and set Visibility to Always From Start.
User avatar
Littlenorwegians
Posts: 32
Joined: Sun Aug 04, 2024 3:06 pm

Re: Two Dialogue Styles? What Do?

Post by Littlenorwegians »

Thank you!! :D Real close now. A few remaining problems;

1) I use TextMeshPro. The current standard UI Subtitle panels that I have only support 'text'. Can't find a TMPRO or other variant of the UI Subtitle panel so what do I do?

2) The sequence logic is a little iffy. You can see in this video it is very late to end. And if I hit the continue button at any point, he never goes back to idle, making it very easy to break the logic.
User avatar
Tony Li
Posts: 22108
Joined: Thu Jul 18, 2013 1:27 pm

Re: Two Dialogue Styles? What Do?

Post by Tony Li »

Hi,
Littlenorwegians wrote: Sun Sep 29, 2024 8:05 am1) I use TextMeshPro. The current standard UI Subtitle panels that I have only support 'text'. Can't find a TMPRO or other variant of the UI Subtitle panel so what do I do?
Enable TextMesh Pro Support. If you're using a typewriter effect, remember to add a TextMeshProTypewriterEffect component, not a UnityUITypewriterEffect.
Littlenorwegians wrote: Sun Sep 29, 2024 8:05 am2) The sequence logic is a little iffy. You can see in this video it is very late to end. And if I hit the continue button at any point, he never goes back to idle, making it very easy to break the logic.
Use the 'required' keyword. Example:

Code: Select all

AnimatorPlay(Happy_talk, speakerportrait);
required AnimatorPlay(Happy_idle, speakerportrait)@Message(Continued)
Or, if you want to stop the talking animation when the typewriter effect finishes:

Code: Select all

AnimatorPlay(Happy_talk, speakerportrait);
required AnimatorPlay(Happy_idle, speakerportrait)@Message(Typed)
(I used the special keyword 'speakerportrait' to refer to the speaker's Portrait Image GameObject, but it's fine to specify CalicoPortrait and BrindlePortrait if you prefer.)
User avatar
Littlenorwegians
Posts: 32
Joined: Sun Aug 04, 2024 3:06 pm

Re: Two Dialogue Styles? What Do?

Post by Littlenorwegians »

Wonderful, wonderful. Thank you so very much :mrgreen:

Everything now seems to be working 100%. I'll keep expanding and testing the system and get back here in case there is anything.
User avatar
Tony Li
Posts: 22108
Joined: Thu Jul 18, 2013 1:27 pm

Re: Two Dialogue Styles? What Do?

Post by Tony Li »

Sounds good! Glad to help.
Post Reply