Page 1 of 1

Changing Portrait Position for Non-Protagonist Characters in VN Dialogue Template

Posted: Tue Aug 20, 2024 8:41 am
by will_888
Hello,
I’m working with the VN Dialogue Template in the Dialogue System, and I’ve encountered an issue regarding the positioning of character portraits during dialogues.

In my current setup, when I set the character to "Player," the portrait positioning works as expected. However, when two characters who are not the protagonist are speaking, their portraits always appear on the right side of the screen, regardless of their roles or who is speaking.

Here’s what I’ve done so far:

- I’ve set up the actors and conversants correctly in the database.
- I’ve checked the settings and configurations related to portrait display.
- I've tried using LUA scripting to set the Actor to Player Character, both in the dialogue slot and in the Dialogue System Trigger field (before Starting Convo):
Actor["Goofy"].IsPlayer = true

Despite these configurations, the issue persists, and I’m unable to get the portraits of non-protagonist characters to switch positions dynamically.

Could you please guide me on how to resolve this issue? Specifically, I’d like to know how to ensure that the portraits of non-protagonist characters can be positioned correctly during dialogues, similar to how it works with the Player character.
I also wish this behaviour to continue working when the character on the screen are 3 or even 4 (protagonist(s) on the left, NPCs on the right).

Any assistance or advice on this matter would be greatly appreciated.

Thank you!

Re: Changing Portrait Position for Non-Protagonist Characters in VN Dialogue Template

Posted: Tue Aug 20, 2024 9:22 am
by Tony Li
Hi,

Each position is represented by a subtitle panel. The default VN template has 3 subtitle panels, numbered 0, 1, and 2:
  • Subtitle Panel 0: On the right. Default panel for NPCs (i.e., actors whose Is Player checkbox is unticked).
  • Subtitle Panel 1: On the left. Default panel for Player actors.
  • Subtitle Panel 2: Middle-right.
You can add your own additional panels, too. If you do, remember to assign them to the Standard Dialogue UI component's Conversation UI Elements > Subtitle Panels list and note their panel numbers.

There are three ways to specify an actor's position in a dialogue UI:
  • Add a Dialogue Actor component to the actor's GameObject and set Dialogue UI Settings > Subtitle Panel Number. (See also: Character GameObject Assignments)
  • Use the [panel=#] markup tag to switch an actor to a different panel for a single dialogue entry.
  • Use the SetPanel() sequencer command to switch an actor to a different panel for the remainder of the conversation. If the actor's GameObject has a Dialogue Actor component, the Dialogue Actor's subtitle panel number is also changed, so it will continue to use the new panel in subsequent conversations, too.
The Dialogue System Extras page has a VN-style example scene (direct download) that demonstrates these techniques.