Multiple Dialogue UIs

Announcements, support questions, and discussion for the Dialogue System.
hipsterdufus
Posts: 95
Joined: Thu Aug 12, 2021 6:39 pm

Multiple Dialogue UIs

Post by hipsterdufus »

Hello! I'm wondering if there's a good way to manage multiple Dialogue UI's? Just by looking at things, I think I could simply change the Dialogue UI component reference on Dialogue System Controller before triggering the dialogue? Or is there a way the system can manage it for me? I already have my normal dialogue system working for conversations but I would like to explore using the dialogue database for other slightly different use cases - things such as a quick popup message with yes/no options or just displaying informational text without portraits. Thank you!
User avatar
Tony Li
Posts: 21987
Joined: Thu Jul 18, 2013 1:27 pm

Re: Multiple Dialogue UIs

Post by Tony Li »

Hi,

In many cases, you can use the same dialogue UI but just show the content in a different subtitle panel. To show content in a specific subtitle panel, use the [panel=#] markup tag in your dialogue text, or add a Dialogue Actor component to one of the conversation's participants and set its subtitle panel number. (You can also use the SetPanel() sequencer command.)

If you want to use an entirely different dialogue UI, you can call DialogueManager.UseDialogueUI() before starting the conversation. But it's probably easier to use an Override Dialogue UI or Override Display Settings component on one of the participants. For example, you could add an actor named Information, a corresponding GameObject as a child of the Dialogue Manager with a Dialogue Actor set to Information, and an Override Dialogue UI component that points to a different UI.
hipsterdufus
Posts: 95
Joined: Thu Aug 12, 2021 6:39 pm

Re: Multiple Dialogue UIs

Post by hipsterdufus »

Thank you, I'll try it out tomorrow.
hipsterdufus
Posts: 95
Joined: Thu Aug 12, 2021 6:39 pm

Re: Multiple Dialogue UIs

Post by hipsterdufus »

Hello, I've added a Dialogue Actor and specified a different response menu which is working.

I had one question which was if I could disable the nametag for this Dialogue Actor and it looks like that will be possible if I declare another subtitle panel just like I declared a different response menu so hopefully that works. Hopefully I can also disable the typewriter effect per subtitle panel.

But one more issue is I can't change the size of the background panel (Main Panel) since that is shared for all subtitle panels. Would I have to create a new UI if I want to have different backgrounds or display locations for each subtitle panel?
User avatar
Tony Li
Posts: 21987
Joined: Thu Jul 18, 2013 1:27 pm

Re: Multiple Dialogue UIs

Post by Tony Li »

Hi,
hipsterdufus wrote: Sat Aug 21, 2021 10:50 amI had one question which was if I could disable the nametag for this Dialogue Actor and it looks like that will be possible if I declare another subtitle panel just like I declared a different response menu so hopefully that works. Hopefully I can also disable the typewriter effect per subtitle panel.
Yes, you can do that.
hipsterdufus wrote: Sat Aug 21, 2021 10:50 amBut one more issue is I can't change the size of the background panel (Main Panel) since that is shared for all subtitle panels. Would I have to create a new UI if I want to have different backgrounds or display locations for each subtitle panel?
Yes. Either do that or write some code to switch background panels.
hipsterdufus
Posts: 95
Joined: Thu Aug 12, 2021 6:39 pm

Re: Multiple Dialogue UIs

Post by hipsterdufus »

Thank you. Only issue I'm having at the moment is when I set the portrait Image and Name fields to None, it still doesn't remove the character portrait or names so they are still being displayed. I tried disabling the Portrait Panel base object in the OnOpen event, and enabling it in the OnOpen event in the normal subtitle panel, but I think both of those OnOpenEvents are getting called whether or not the subtitle is being used so only one gets executed. Any tips?
User avatar
Tony Li
Posts: 21987
Joined: Thu Jul 18, 2013 1:27 pm

Re: Multiple Dialogue UIs

Post by Tony Li »

Hi,

Can you post screenshots of your UI setup in the Hierarchy window? Do the Portrait Image and Portrait Name show the current actor's content (image and name)? What if you remove the Portrait Image and Portrait Name GameObjects?
hipsterdufus
Posts: 95
Joined: Thu Aug 12, 2021 6:39 pm

Re: Multiple Dialogue UIs

Post by hipsterdufus »

Sure, I notice that when I trigger the conversation with the Dialogue Actor component both subtitle game objects become active instead of just the new subtitle game object. When I talk to a regular NPC, only the one subtitle game object is active.

Let me know if these screenshots are enough.
Attachments
Dialogue hierarchy when game is running and the tv subtitle is displaying
Dialogue hierarchy when game is running and the tv subtitle is displaying
Capture4.PNG (13.52 KiB) Viewed 1282 times
The Dialogue Actor component that specifies to use the new subtitle panel number (Panel 1?)
The Dialogue Actor component that specifies to use the new subtitle panel number (Panel 1?)
Capture3.PNG (31.5 KiB) Viewed 1282 times
Standard dialogue ui with 2 subtitles and 2 menus
Standard dialogue ui with 2 subtitles and 2 menus
Capture2.PNG (42.23 KiB) Viewed 1282 times
Dialogue manager in the hierarchy when it's not being shown. The UI is preloaded and not instantiated.
Dialogue manager in the hierarchy when it's not being shown. The UI is preloaded and not instantiated.
Capture.PNG (16.85 KiB) Viewed 1282 times
User avatar
Tony Li
Posts: 21987
Joined: Thu Jul 18, 2013 1:27 pm

Re: Multiple Dialogue UIs

Post by Tony Li »

Hi,

If the regular Subtitle Panel's Visibility is set to Always From Start, try setting it to Always Once Shown. Then make sure not to use it in conversations involving Television.
hipsterdufus
Posts: 95
Joined: Thu Aug 12, 2021 6:39 pm

Re: Multiple Dialogue UIs

Post by hipsterdufus »

Yes that was it, thank you very much.
Post Reply