Questions on Best Practices (Internal Monologues, Sequencer Commands, Panel #s)

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
lcn_mc
Posts: 57
Joined: Wed Jun 29, 2022 1:56 pm

Questions on Best Practices (Internal Monologues, Sequencer Commands, Panel #s)

Post by lcn_mc »

I've got some general questions on various best practices for you knowledgeable folks:

Is there a standard approach for handling the Player character having internal monologues that doesn't involve each dialog step being a clickable choice?
(e.g.: I'd like to have the player having a 'conversation' with themselves, such as thinking through a problem. The player would technically be both the Speaker and Listener.)

I think there's probably an way to do it by creating a new Actor with the same name/portrait as the player and simply not flagging them as the player, but that seems.. inelegant and potentially bug-causing.

Regarding sequences, is there a way to have the sequence fields pull data from / be populated by a Game Object?
(e.g.: I'm using several lines' worth of Sequencer Commands at the ends of conversations to transition to other scenes / events. Copy/pasting the same text all over can't be the right way to do it.)

Relatedly, I think that this is what Sequencer Shortcuts are intended to solve, but I'd appreciate confirmation.

For values used in sequences, such as delays to order commands (e.g.: The '2' in Fade(out,2)), can they be replaced with variables?
(e.g.: If I'm using Fade() commands repeatedly, could I specify a variable, like fadeLength as an int, and use that in the command?)

Does the Response Panel (in the VN Template Standard Dialogue UI) have a panel number? If so, what is it?
(e.g.: I know the subtitle panels are numbered based on their position in the Elements list in the Subtitle Panels subsection of the Dialogue Manager's Standard Dialogue UI component, but the Response Panel is also in there and also has an entry at Element 0, in parity with the Subtitle Panels subsection.)

Said differently, if I wanted to use panel-related sequencer commands on the response panel, what should I be using for the panel number?

As a minor question, will there ever be an addition to the manual for animated portraits with child elements?

I'd love to see that topic fleshed out more with some tutorials and such, in addition to the example project.

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

Re: Questions on Best Practices (Internal Monologues, Sequencer Commands, Panel #s)

Post by Tony Li »

Hi,
lcn_mc wrote: Sun Jul 10, 2022 7:54 pmIs there a standard approach for handling the Player character having internal monologues that doesn't involve each dialog step being a clickable choice?
Yes. See: How To: Bypass Response Menu When Player Has One Choice
lcn_mc wrote: Sun Jul 10, 2022 7:54 pmRegarding sequences, is there a way to have the sequence fields pull data from / be populated by a Game Object?
Yes. You can use sequencer shortcuts and/or reference the keywords 'speaker' and 'listener', which are the GameObjects associated with the current dialogue entry's speaker (actor) and listener (conversant).
lcn_mc wrote: Sun Jul 10, 2022 7:54 pmFor values used in sequences, such as delays to order commands (e.g.: The '2' in Fade(out,2)), can they be replaced with variables?
Yes. Set a Dialogue System variable. For example, in C#:

Code: Select all

DialogueLua.SetVariable("fadeLength", 2.5f);
Then use [var=variable] in the sequence:
  • Sequence: Fade(in, [var=fadeLength])
You can also register C# functions (e.g., GetFadeLength()) with Lua and use [lua(code)] instead of [var=variable].
lcn_mc wrote: Sun Jul 10, 2022 7:54 pmDoes the Response Panel (in the VN Template Standard Dialogue UI) have a panel number? If so, what is it?
It's 0 (zero). But generally you don't need to reference menu panel numbers. Subtitle panel numbers and menu panel numbers correspond to the element numbers in the dialogue UI's Standard Dialogue UI component > Conversation UI Elements lists.
lcn_mc wrote: Sun Jul 10, 2022 7:54 pmAs a minor question, will there ever be an addition to the manual for animated portraits with child elements?
I plan to do another animated portrait tutorial in the future. The Dialogue System Extras page has an Animated Portraits Child Elements Example scene that you can examine.
lcn_mc
Posts: 57
Joined: Wed Jun 29, 2022 1:56 pm

Re: Questions on Best Practices (Internal Monologues, Sequencer Commands, Panel #s)

Post by lcn_mc »

Thank you, Tony! Very much appreciate the quick and accurate replies.

I'll poke this thread if I run into any other questions related to the above.
User avatar
Tony Li
Posts: 21033
Joined: Thu Jul 18, 2013 1:27 pm

Re: Questions on Best Practices (Internal Monologues, Sequencer Commands, Panel #s)

Post by Tony Li »

Glad to help!
lcn_mc
Posts: 57
Joined: Wed Jun 29, 2022 1:56 pm

Re: Questions on Best Practices (Internal Monologues, Sequencer Commands, Panel #s)

Post by lcn_mc »

Side question here if you don't mind, Tony: I noticed that, at least when using the VN Template Standard Dialogue prefab, the Portrait Image attached to the Response Menu Panel always seems to be drawn in front of / on top of the dialog box when selecting from responses. Here's an example, which is displaying the behavior in the editor:
Unity_DialogSys_OverlapExample_071122.jpg
Unity_DialogSys_OverlapExample_071122.jpg (23.91 KiB) Viewed 452 times
(The image above is using my own debug assets, but the same behavior can be observed using the VN Template's default assets.)

I can certainly reposition the Response Panel's portrait image higher in the hierarchy to get it behind the dialog box, but doing so breaks the response panel's animation functionality (that shows/hides/fades the portrait image).

Any way to get the Response Panel's portrait image behind the dialog box? The alternative, I suppose, would just be to create a specifically cropped portrait image.

Thanks for the help.
User avatar
Tony Li
Posts: 21033
Joined: Thu Jul 18, 2013 1:27 pm

Re: Questions on Best Practices (Internal Monologues, Sequencer Commands, Panel #s)

Post by Tony Li »

Hi,

That's just the way the hierarchy is set up for that dialogue UI. You could add an Image in the Response Menu Panel's hierarchy between Portrait Name and Viewport that covers the same area as Text Panel. When the menu is visible, this Image will cover the overlapped area.
Post Reply