A small issue about narration

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Lucian1899
Posts: 15
Joined: Wed Dec 13, 2023 9:23 am

A small issue about narration

Post by Lucian1899 »

Hi there,
Sometimes there are some environmental descriptions in my dialogue, my solution is adding an actor called "narration" to the dialogue database, but here's the problem: I don't want to add a NPC portrait to the "narration", so when narration line appears, the NPC's portrait will disappear, is there any suggestions?Thank you!
User avatar
Tony Li
Posts: 22195
Joined: Thu Jul 18, 2013 1:27 pm

Re: A small issue about narration

Post by Tony Li »

hi,

If it's a single line of dialogue, you can use a bark.

Otherwise, if you need to show multiple lines or if you want to run an actual conversation instead of a bark, then:

1. If your dialogue UI only has visible UI elements for subtitle panels and response menus (and not for the Dialogue Panel container itself), then you can add a subtitle panel without a portrait image to the dialogue UI's StandardDialogueUI component > Subtitle Panels list. The Basic Standard Dialogue UI template is an example of a dialogue UI that only has visible UI elements for subtitle panels and response menus. Then add a Dialogue Actor component to your environmental GameObject, and set its Dialogue UI Settings > Subtitle Panel Number to the element number of in the dialogue UI's StandardDialogueUI component > Subtitle Panels list.

2. If your dialogue UI does have other visible elements, create a new dialogue UI (not just a subtitle panel). Save it as a prefab. Then add an Override Dialogue UI component to your environmental GameObject, and assign the new dialogue UI prefab. Set up this dialogue UI prefab so it only has a visible subtitle panel with no portrait image.

Note: If you use the regular dialogue UI assigned to the Dialogue Manager's Display Settings > Dialogue UI and the actor who is speaking doesn't have a portrait image, then the subtitle panel will deactivate its Portrait Image GameObject while that actor is speaking.
Lucian1899
Posts: 15
Joined: Wed Dec 13, 2023 9:23 am

Re: A small issue about narration

Post by Lucian1899 »

Hi,
Thank you for the reply, but there is still a problem that I could not figure it out. Here is what I did:

1. I duplicate the Subtitle Panel Info object of the Standard Dialogue UI and set it no portrait image.
2.I add a subtitle panel to the dialogue UI's StandardDialogueUI component and assign the new Subtitle Panel Info object to it.
3.I add a Dialogue Actor component to the environmental GameObject, and assign the new Subtitle Panel's number to it.

The problem is, when the environmental description appears, the previous lines all disappear, when NPC speaks, the environmental description disappears, it's kind of like those two subtitle panels do not “merge together”, any help will be appreciated, thank you.
User avatar
Tony Li
Posts: 22195
Joined: Thu Jul 18, 2013 1:27 pm

Re: A small issue about narration

Post by Tony Li »

Hi,

Do the subtitle panels share the same subtitle text GameObject?

Would you please post some screenshots (or PM them to me) that illustrate how your dialogue UI is set up and what's going wrong?
Lucian1899
Posts: 15
Joined: Wed Dec 13, 2023 9:23 am

Re: A small issue about narration

Post by Lucian1899 »

hi,
Yes, they share the same subtitle text GameObject, here are the screenshots, thank you for checking.
Attachments
1.Hierarchy.png
1.Hierarchy.png (22.2 KiB) Viewed 55 times
2.StandarddialogueUI component.png
2.StandarddialogueUI component.png (80.4 KiB) Viewed 55 times
3.Subtitle panel info.png
3.Subtitle panel info.png (76.94 KiB) Viewed 55 times
4.Subtitle panel info 2.png
4.Subtitle panel info 2.png (76.18 KiB) Viewed 55 times
5.Actor component.png
5.Actor component.png (31.99 KiB) Viewed 55 times
User avatar
Tony Li
Posts: 22195
Joined: Thu Jul 18, 2013 1:27 pm

Re: A small issue about narration

Post by Tony Li »

Hi,

Thank you for the information.

There are two ways to handle this:

1. I think this way is easier: Use a single subtitle panel. Use the sequencer command HidePanel(0, portrait) in the narration dialogue entry's Sequence field. This will hide the portrait name and image. In the next non-narration dialogue entry, use this sequencer command: OpenPanel(0). This will show the portrait name and image again.

2. Or use this code: How To: Accumulate Text With Multiple Subtitle Panels and set the subtitle panels' Visibility to Until Superceded.
Post Reply