VN-style with multiple NPCs visible?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Cyllya
Posts: 1
Joined: Sun Oct 14, 2018 10:39 pm

VN-style with multiple NPCs visible?

Post by Cyllya »

Howdy. I'm new to Unity and currently trying to figure out how to get the Dialogue System to make something like this: Text area along the bottom of the screen, NPC portraits above it, only one subtitle is visible at a time but all the NPCs participating in the conversation (up to four) will have portraits remain visible, the NPCs who aren't currently speaking will be darkened slightly, player portrait is never visible. (Examples of an existing game that uses something like this: here, here, here. Attached one of them, in case the links don't work.) There might be some cases where someone joins the conversation partway through, but for the most part, they should all be in place at the start of the conversation.

So the first thing I need to figure out is how to get all the portraits visible at once.

When I tried the "Allow Open Subtitle Panels On Start Conversation" option, it just made the player and one conversant visible. Seems like the "multicharacter UI' on the Extras page doesn't really work any more. I'm thinking about having the portraits as separate game objects rather than part of the subtitle panel, not sure how that will go.

Advice?

Thanks :)
Attachments
image.png
image.png (193.74 KiB) Viewed 1709 times
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: VN-style with multiple NPCs visible?

Post by Tony Li »

Hi! Here's an example: VNFocusUIExample_2018-10-18.unitypackage

It looks like this:

Image

It assumes some familiarity with getting around in the Unity editor, working with Unity UI, and the basics of the Dialogue System. (See Dialogue System tutorials.) A Setup.txt file explains how it was set up. If you have any questions about it, or about customizing your own UI, just let me know!
Ashrane
Posts: 2
Joined: Wed Dec 05, 2018 7:40 am

Re: VN-style with multiple NPCs visible?

Post by Ashrane »

Thanks for your unitypackage. :D
It helps me too !
Sorry for my question, I'm new in Dialogue System :
I would like to have only one portait name.
Indeed, in your example, the names of the characters appear on the characters.
I would like it all to arrive in my name box and the name changes when the person speaking changes.
Could you help me, please ?

Sorry for my English, I'm French. :roll:

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

Re: VN-style with multiple NPCs visible?

Post by Tony Li »

Hello,

Welcome to the Dialogue System!

The VN Focus UI Example (linked above) uses one shared name box for all characters. To do this, each subtitle panel points to the same Text element:

sharedPortraitName.png
sharedPortraitName.png (49.46 KiB) Viewed 1579 times
Ashrane
Posts: 2
Joined: Wed Dec 05, 2018 7:40 am

Re: VN-style with multiple NPCs visible?

Post by Ashrane »

Oh, I understand how it works ! :o :idea: :lol: Thanks a lot. :D
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: VN-style with multiple NPCs visible?

Post by Tony Li »

Glad to help!
ioruko
Posts: 5
Joined: Thu Aug 20, 2020 12:10 pm

Re: VN-style with multiple NPCs visible?

Post by ioruko »

Tony Li wrote: Thu Oct 18, 2018 11:08 am Hi! Here's an example: VNFocusUIExample_2018-10-18.unitypackage

It looks like this:

Image

It assumes some familiarity with getting around in the Unity editor, working with Unity UI, and the basics of the Dialogue System. (See Dialogue System tutorials.) A Setup.txt file explains how it was set up. If you have any questions about it, or about customizing your own UI, just let me know!
Hello, sorry to bother you in an old post, I'd like to ask if there is a method to darken the sprites while unfocused instead of turning down the alpha?
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: VN-style with multiple NPCs visible?

Post by Tony Li »

Sure, instead of animating the alpha value, animate the RGB color values toward zero.
ioruko
Posts: 5
Joined: Thu Aug 20, 2020 12:10 pm

Re: VN-style with multiple NPCs visible?

Post by ioruko »

Oh, thanks for your super fast reply! I'll look up how to do it, I'm new to Unity in general.
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: VN-style with multiple NPCs visible?

Post by Tony Li »

Some of the UIs focus and unfocus by animating the Alpha value of a component called Canvas Group. The Canvas Group component applies an alpha (transparency) value to the UI elements in its hierarchy. If Alpha is 1, it's fully opaque. If Alpha is zero, it's fully transparent. The animations were created in the Unity editor's Animation window.

The portrait images have an Image component. Image components have a Color value, that is normally solid white, meaning it tints the sprite with full color (full red, full green, full blue, full opaque alpha). If you change the change the Color's red/green/blue values from the maximum 255 to the halfway point of 128, it will darken the image by 50%. You can use the Animation window to create a new animation that changes the Color's values instead of the Canvas Group's Alpha.
Post Reply