Display NPC Portrait & Subtitle During Response

Announcements, support questions, and discussion for the Dialogue System.
Artemis
Posts: 6
Joined: Wed Nov 03, 2021 6:52 am

Display NPC Portrait & Subtitle During Response

Post by Artemis »

Hi,

I've actually gone through the documentation and this forum and tried some of the proposed solutions, but it didn't work out for me. I'm basically stuck, but it's probably because of my limited knowledge.

I am using the 'JRPG Template Custom Dialogue UI' template, and am trying to modify it such that the NPC's portrait and subtitle remain displayed during the responses. I've also read about the 'reminders' in other threads, but it appears that it isn't in this template which uses the 'StandardDialogueUI' type/class.

So, with the 'JRPG Template Custom Dialogue UI' template, is it possible to have the the NPC portrait and subtitles remain while the response menu is displayed?

Thank you.
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Display NPC Portrait & Subtitle During Response

Post by Tony Li »

Hi,

To only show the NPC portrait and name, tick the subtitle panel's Only Show NPC Portraits checkbox:

onlyNpcPortrait1.png
onlyNpcPortrait1.png (86.11 KiB) Viewed 1331 times

And UNassign the Response Menu Panel's PC Image and PC Name fields so they don't use the image and name UI elements:

onlyNpcPortrait2.png
onlyNpcPortrait2.png (84.51 KiB) Viewed 1331 times

Showing the subtitle panel and response menu at the same time requires a few more steps:

onlyNpcPortrait3.png
onlyNpcPortrait3.png (116.8 KiB) Viewed 1331 times
  • Add a VerticalLayoutGroup to Text Panel. On all VerticalLayoutGroups, tick Control Child Size and untick Child Force Expand.
  • Add a VerticalLayoutGroup to Subtitle Panel.
  • Add a Layout Element to Continue Button and tick Ignore Layout. This will allow you to freeform position the button where you want.
  • Remove the ScrollRect from Response Menu Panel and add a VerticalLayoutGroup. Remove its child Scroll Rect, Viewport, and Scrollbar -- promoting the Content element to be a direct child of the Response Menu Panel.
Artemis
Posts: 6
Joined: Wed Nov 03, 2021 6:52 am

Re: Display NPC Portrait & Subtitle During Response

Post by Artemis »

Hi Tony,

Thank you very much for the quick response. Ah yes, I've done the first two steps based on your responses in other threads. The third step is looking promising. I will try that out and let you know how it goes, or if I mess something up.
Thanks again!
Artemis
Posts: 6
Joined: Wed Nov 03, 2021 6:52 am

Re: Display NPC Portrait & Subtitle During Response

Post by Artemis »

Hi Tony,

I implemented the modifications to the subtitle and response menu, and it works now as I had hoped: The NPC Portrait and subtitle remains while the response menu is displayed. Thank you so much for your assistance again. It is very much appreciated.

I have one additional question following from this change. I am using animation (instead of tint) on the response menu button template. After clicking on the response menu item (button), the entire response menu seems to linger a second or two before disappearing. I had tried reducing the duration of the animation for the button states, but it didn't seem to make a difference. So, the question is, is there any setting anywhere in the Dialogue System that controls when the response menu (animated button states) is made invisible after an item is clicked?

Thank you.
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Display NPC Portrait & Subtitle During Response

Post by Tony Li »

Hi,

The dialogue UI's menu panels and subtitle panels can be configured to wait until their hide/close animations finish before letting the conversation move on. Try unticking the response menu panel's Wait For Close checkbox.
Artemis
Posts: 6
Joined: Wed Nov 03, 2021 6:52 am

Re: Display NPC Portrait & Subtitle During Response

Post by Artemis »

Hi Tony,

Thanks for the tip. My response menu's 'Wait For Close' is unchecked.

Here's a link to a short video clip of what I'm seeing, where the conversation moves on to the next subtitle after a selection is made in the response menu, but the response menu remains for a while:



I've also attached a screenshot of my Response Menu panel's setting. Perhaps that might give a better idea of what I'm seeing. If that's expected behaviour, that's fine too, of if you have other ideas on how to approach it. Thanks in advance.
Attachments
Screenshot 2021-11-11 at 12.30.29 PM.png
Screenshot 2021-11-11 at 12.30.29 PM.png (171.37 KiB) Viewed 1292 times
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Display NPC Portrait & Subtitle During Response

Post by Tony Li »

Hi,

Do you see any difference if you tick Wait For Close?

I suspect you'll see a difference in timing. The response menu will still take some time to disappear, but the next subtitle ("Not a whole lot at this time") will not appear until the response menu disappears.

This may not be what you're looking for. If you want the response menu to disappear immediately after clicking a response button:

1. Examine the response menu panel's animator. It's probably waiting for the "Hide" animation state to finish, but the animation clip assigned to the Hide state doesn't actually do anything to your panel. You may need to adjust the animation clip.

2. Or, if you just want the menu to disappear immediately without playing Show/Hide animations (e.g., fade in/out), you can remove the response menu panel's Animator component and set Show Animation Trigger and Hide Animation Trigger to blank strings.
Artemis
Posts: 6
Joined: Wed Nov 03, 2021 6:52 am

Re: Display NPC Portrait & Subtitle During Response

Post by Artemis »

Hi Tony,

Thank you for the suggestions, I will try them out and see if any get me closer to reducing or eliminating the delay in the response menu closing. And you're right, I'd prefer the next subtitle line to start right after a response has been selected.

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

Re: Display NPC Portrait & Subtitle During Response

Post by Tony Li »

Happy to help! Suggestion #2 above will probably work best for what you want.
Artemis
Posts: 6
Joined: Wed Nov 03, 2021 6:52 am

Re: Display NPC Portrait & Subtitle During Response

Post by Artemis »

Hi Tony,

I managed to get it to work like I had hoped with your tips. I did not do #2, but in the same area. The response menu item buttons use the standard Unity button animations. So, based on your hunch, I sped up the 'disabled' state animation to the point that the response menu disappears within an appropriate time frame (after the animations are completed).

Thank you so much again for all your quick responses and great solutions. And thank you for this amazing asset! :)
Post Reply