Page 1 of 1

How do I include player responses in response panel?

Posted: Tue Oct 20, 2020 10:19 am
by rakkar
Using WRPG Template Standard Dialogue UI

The player's responses are highlighted in-line in the conversation. However, after selecting a response, the response is no longer on-screen. If there are multiple lines of dialogue back and forth between the conversants, it becomes disjointed to re-read, where I can only read the text of one of the speakers. Especially where the text includes an answer to a question.

Screenshots for an example:
Reponses1.PNG
Reponses1.PNG (65.46 KiB) Viewed 1001 times
Reponses2.PNG
Reponses2.PNG (47.32 KiB) Viewed 1001 times
In Responses1.PNG I selected the player's text "There were elves that lived here once. Where are they?" However, that text is missing in Respones2.png.

What I would like to do is include that text, and prefix the line of text so it's clear that was the player talking at that time. For example, differently color the text, or prefix it with "PlayerName:" where PlayerName comes from the game (Lua)

How would I do this? Thanks in advance.

Re: How do I include player responses in response panel?

Posted: Tue Oct 20, 2020 10:29 am
by Tony Li
Hi,

Inspect the Dialogue Manager. Tick Subtitle Settings > Show PC Subtitles During Line, and UNtick Skip PC Subtitles After Response Menu.

Then inspect your dialogue UI's Subtitle Panel Info. Tick Add Actor Name.

Side note: If you want, you can set the response node's Menu Text to a short paraphrase and Dialogue Text to an expanded version. For example:
  • Menu Text: "What of the elves?"
  • Dialogue Text: "There were elves that lived here once. Where are they?"
The Menu Text will appear when showing the clickable responses. When the player clicks a response, the Dialogue Text will appear in its place.

Re: How do I include player responses in response panel?

Posted: Tue Oct 20, 2020 3:33 pm
by rakkar
Thanks for the quick response, and I especially appreciate the suggestion.

Re: How do I include player responses in response panel?

Posted: Tue Oct 20, 2020 4:02 pm
by Tony Li
Happy to help!

Re: How do I include player responses in response panel?

Posted: Tue Oct 20, 2020 4:31 pm
by rakkar
How would I make it so wherever in the script instead of "Player" it shows a variable set from the game code?

Is there a way so that every time I show the player's portrait, it selects the intended male or female version?

Preferably the portrait selection and name are only set once, at the beginning of the game.
Portrait.png
Portrait.png (29.03 KiB) Viewed 992 times

Re: How do I include player responses in response panel?

Posted: Tue Oct 20, 2020 4:42 pm
by rakkar
*Edit* I figured this one out, change continue button to optional. Leaving the post in case it helps others.

Re: "Tick Subtitle Settings > Show PC Subtitles During Line, and UNtick Skip PC Subtitles After Response Menu."

This introduces a problem where now I have to click twice for each of the player's responses. Once to select the response I want, then again to press continue.

Is there a way to get it to add the player's response instantly, and not show continue? I'd like the player's dialogue to be included in the text, but no additional button presses than before.

Re: How do I include player responses in response panel?

Posted: Tue Oct 20, 2020 4:58 pm
by Tony Li
rakkar wrote: Tue Oct 20, 2020 4:31 pmHow would I make it so wherever in the script instead of "Player" it shows a variable set from the game code?
Set the Player actor's Display Name:

Code: Select all

DialogueLua.SetActorField("Player", "Display Name", "Rakkar");
Side note: You can include [var=variable] and [lua(code)] tags in the Display Name, such as "[var=Rank] Rakkar".
rakkar wrote: Tue Oct 20, 2020 4:31 pmIs there a way so that every time I show the player's portrait, it selects the intended male or female version?
Set the Player's "Current Portrait" field. Example:

Code: Select all

DialogueLua.SetActorField("Player", DialogueSystemFields.CurrentPortrait, "pic=2");
These values are recorded in saved games, so you only need to set it once.
rakkar wrote: Tue Oct 20, 2020 4:42 pmRe: "Tick Subtitle Settings > Show PC Subtitles During Line, and UNtick Skip PC Subtitles After Response Menu."

This introduces a problem where now I have to click twice for each of the player's responses. Once to select the response I want, then again to press continue.

Is there a way to get it to add the player's response instantly, and not show continue? I'd like the player's dialogue to be included in the text, but no additional button presses than before.
Set the Dialogue Manager's Default Player Sequence to: Continue()