Creating Custom Panels for Different Characters In a Single Conversation

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
ko_games
Posts: 29
Joined: Wed Jan 08, 2020 3:20 am

Creating Custom Panels for Different Characters In a Single Conversation

Post by ko_games »

Hi Tony,

I looked through the forums and found answers to most of my questions, but I still have a few additional ones regarding custom panels.

In my game, I would like for all of the characters to use the exact same dialogue panel. The difference would be that parts of the panel may change color depending on which character is speaking. An example of this is in the game Donut County (see screen shots below. Click arrow to see both).


In the images, you can see that panel is basically the same except that the part where the name background changes to a different color depending on which character is speaking. What would be the best way to create something like this? Do I need to create a new panel for every character and position it in the exact same place? Or is there a simpler way to do this?

Also, if I do have to create multiple panels how do I assign each speaker to the correct panel, so I don't have to use sequence commands everytime.

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

Re: Creating Custom Panels for Different Characters In a Single Conversation

Post by Tony Li »

Hi,

Technically you'll use different subtitle panels for each character -- that is, different StandardUISubtitlePanel components -- but they can share UI elements. Only create unique UI elements for the parts that are different for each character, such as the parts that change color.

To see an example, look at the VN Template Standard Dialogue UI prefab. It has 3 StandardUISubtitlePanel components, but for the most part they all share the same UI elements.

Add all of the StandardUISubtitlePanel components to the StandardDialogueUI component's Subtitle Panels list. Note the panel number of each one (0, 1, 2, etc.). Add a DialogueActor component to each character. Select the actor from the dropdown, and set Dialogue UI Settings > Subtitle Panel Number to the corresponding panel number.

Option: You can also set the character's subtitle color here. This way, you can share the same subtitle text UI element, and it will change color for each character.


Alternatively to all this, you could use a single set of UI elements, add a script with an OnConversationLine() method to the Dialogue Manager. In this method, manually set the colors of the UI elements.
ko_games
Posts: 29
Joined: Wed Jan 08, 2020 3:20 am

Re: Creating Custom Panels for Different Characters In a Single Conversation

Post by ko_games »

Thanks Tony! Seriously, you give the best customer support out of any developer for any asset that I own. Always, very professional and giving a detailed walkthrough on how to do things is extremely helpful, so not as many back and forth emails are required. Keep up the awesome work!
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Creating Custom Panels for Different Characters In a Single Conversation

Post by Tony Li »

Thanks! And always glad to help.
Post Reply