Different Subtitle Panel Each Conversation

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
squirmonkey
Posts: 6
Joined: Tue Jul 12, 2022 2:42 pm

Different Subtitle Panel Each Conversation

Post by squirmonkey »

Hello,

I've just gotten started using this system and it looks very helpful and powerful!

I'm trying to get the conversations set up the way I need them. I've configured it so that every piece of dialogue requires a click to continue, there's no dialogue choices, and dialogue subtitles always appear.

I'd like to get it so that I can assign characters to subtitle panels on a per-conversation basis. I'd thought the best way to do this was with sequencer commands. I tried using this sequencer command in the Start node of my conversation:

Code: Select all

SetPanel(Arcett, 1);
SetPanel(Yova, 2)
When I do this, the characters correctly appear in the places I instructed (I'm using the VN template where the assignment of subtitle panels seems to control where the characters names and portraits appear), but the dialogue for the first part of the conversation only appears during the fade-in. Once the fade-in is complete, the first line of dialogue and the continue button both disappear, and there's no way to advance the conversation.

I am not sure how to proceed. Is there something wrong with my sequencer commands? Or is there something I need to configure differently about the conversation? Or is there a better way to achieve this goal?

Any help you can provide would be greatly appreciated.

Best,
--Squirmonkey
squirmonkey
Posts: 6
Joined: Tue Jul 12, 2022 2:42 pm

Re: Different Subtitle Panel Each Conversation

Post by squirmonkey »

Just an update as I work on it longer.

It turns out the character Arcett wasn't being moved properly, he just happened to be in the right spot because of the "player character" flag being set on him.

If I unset the flag, Yova moves to the correct place and delivers her first line, while Arcett appears in the "default npc" position. Then Arcett jumps to his assigned position, begins to deliver his line, and then the text and continue button disappear again as described before.

Hopefully this additional information is helpful
User avatar
Tony Li
Posts: 22138
Joined: Thu Jul 18, 2013 1:27 pm

Re: Different Subtitle Panel Each Conversation

Post by Tony Li »

Hi,

It may be because subtitle panel 0's Visibility is set to Always From Start. This tells subtitle panel 0 to try to determine which actor will use the subtitle panel. Then subtitle panel 0 will show that actor's portrait while the dialogue UI opens.

Try this:
  • Inspect your dialogue UI. On the main dialogue UI GameObject, tick the StandardDialogueUI component's Conversation UI Elements > Wait For Main Panel Open.
  • On the subtitle panels, tick Wait For Open and Wait For Close, and UNtick Clear Text On Close.
  • If any subtitle panel's Visibility dropdowns are set to Always From Start, change them to something else such as Always Once Shown.
  • It sounds like your player actor subtitle are showing up. But if they aren't, see this article.
If that doesn't do exactly what you're looking for, let me know.

Another option is to set the panels before the conversation starts:

setPanelsBeforeConversation.png
setPanelsBeforeConversation.png (27.13 KiB) Viewed 592 times

To do this, you'll want to set up a GameObject for each actor if it doesn't already have one. Add a Dialogue Actor component, and set the Actor dropdown. The SetPanel() sequencer command will set the panel number on the actor's Dialogue Actor component. When the conversation starts, it will use the panel number specified on the Dialogue Actor component.
squirmonkey
Posts: 6
Joined: Tue Jul 12, 2022 2:42 pm

Re: Different Subtitle Panel Each Conversation

Post by squirmonkey »

Hi Tony! Thanks for your response.

The changes you've suggested have helped with the issue of the text disappearing (presumably that was the effect of the Clear on Close box combined with the movement).

However, after I've done your changes the sequence is as follows:
Yova appears in the correct position and delivers her line
Arcett appears in the correct position and delivers his line

But I'd like both characters to be visible when the first line is delivered. Is there a way to have the SetPanel command execute immediately rather than waiting for the actor's next line?

I would try doing as you suggest and making the changes before the conversation, but that has the following hurdles:
- My conversation is triggered through a custom script, not through a Dialogue System Trigger
- I would like the assignment of positions to be a function of the conversation itself, rather than of the invocation of the conversation (so that I could invoke different conversations with this same piece of code, and have the positions assigned correctly)
- None of my characters are associated with a GameObject, so I can't give them Dialogue Actor components.

Is there some other way to accomplish this?

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

Re: Different Subtitle Panel Each Conversation

Post by Tony Li »

It's a little funky, but you can hang an empty node off <START> whose Dialogue Text is a single blank character. Assign the node to the actor who isn't showing up immediately (Arcett?). Put the SetPanel() sequencer commands in this node or the <START> node. If you require the player to click the continue button, put the keyword 'required' in front of the SetPanel() commands, and add the command "Continue()".

Set the subtitle panels' Visibility to Always Once Shown.
squirmonkey
Posts: 6
Joined: Tue Jul 12, 2022 2:42 pm

Re: Different Subtitle Panel Each Conversation

Post by squirmonkey »

Hey Tony,

That did work, but it's a little too messy for me. It means I need a throwaway dialogue line for every character I want to appear except whichever one speaks first, and there could be a few in any given conversation. While it's not hard to do, I worry that over many conversations I'll end up making mistakes, and introducing bugs in the conversation assets themselves.

Instead, I added a custom sequencer command, SetPanelNow, that just sets the panel and then instantly updates the graphics so I don't have to wait for that actor to have a line, and it's working great! Odds are I wrote some minor bugs in doing that, but at least the bugs will be in the code, instead of the conversations.

Thanks for your help!
User avatar
Tony Li
Posts: 22138
Joined: Thu Jul 18, 2013 1:27 pm

Re: Different Subtitle Panel Each Conversation

Post by Tony Li »

That's a much better solution. I was hesitant to suggest a programming solution, so I'm glad you're handy with programming.
Post Reply