Page 1 of 2

I cant figure out how to edit a couple things :(

Posted: Wed May 11, 2022 2:20 pm
by locksmitharmy
It is probably simple and I am just ignorant, but here it is:
Image
1: I dont want it to show the speakers name by each Subtitle Text, it is redundant for me
2: I never want it to say player in the Portrait Name, I only want it to show the person the player is talking to.

If these arent features outright, can you point me in the direction of the code that changes the Portrait Name aswell as the code that builds the Subtitle Text, I can fix it myself... I just cant find the code :(

Re: I cant figure out how to edit a couple things :(

Posted: Wed May 11, 2022 3:01 pm
by Tony Li
Hi,
locksmitharmy wrote: Wed May 11, 2022 2:20 pm1: I dont want it to show the speakers name by each Subtitle Text, it is redundant for me
Inspect your dialogue UI's subtitle panel(s) and UNtick 'Add Speaker Name'.
locksmitharmy wrote: Wed May 11, 2022 2:20 pm2: I never want it to say player in the Portrait Name, I only want it to show the person the player is talking to.
Tick Only Show NPC Portraits.

Note: If unticking 'Add Speaker Name' doesn't get rid of the prepended name, check your characters' GameObjects for Dialogue Actor components. If 'Set Subtitle Color' is ticked on any Dialogue Actor components, untick Apply Color To Prepended Name.

Re: I cant figure out how to edit a couple things :(

Posted: Wed May 11, 2022 3:37 pm
by locksmitharmy
You are a god among men, thank you so much!

Re: I cant figure out how to edit a couple things :(

Posted: Wed May 11, 2022 3:48 pm
by locksmitharmy
So, I made those changes and the player name still shows up in the portrait name :(

Image

The unticking of Add Speaker Name worked perfectly though, thank you :)

Re: I cant figure out how to edit a couple things :(

Posted: Wed May 11, 2022 4:05 pm
by Tony Li
In your dialogue database, is your player actor's 'Is Player' checkbox ticked?

Does your dialogue UI have a single subtitle panel or multiple?

Re: I cant figure out how to edit a couple things :(

Posted: Wed May 11, 2022 4:13 pm
by locksmitharmy
Yes, Player 'Is Player'

and I just have 1 subtitle panel

Re: I cant figure out how to edit a couple things :(

Posted: Wed May 11, 2022 5:13 pm
by Tony Li
What does your conversation look like? In the Dialogue Editor, try setting the conversation's Actor to Player and Conversant to the NPC. Then make sure the dialogue entry nodes are assigned to the correct actors:

conversationActors.png
conversationActors.png (38.71 KiB) Viewed 469 times

Also try assigning the first dialogue node to the NPC (like the screenshot above) if it's currently assigned to the player.

Re: I cant figure out how to edit a couple things :(

Posted: Wed May 11, 2022 6:13 pm
by locksmitharmy
Im using this as a test dialog so I can figure out all the possible issues I may have:
Image

Re: I cant figure out how to edit a couple things :(

Posted: Wed May 11, 2022 6:16 pm
by locksmitharmy
Ive kinda given up on making the player name disapear, Im having it change color instead... tried following your advice on another thread where you made an OnConversationLine method. its working great for adding color to the subtitle by actor, but not the portrait name :(

it does sometimes, is there an event that fires when the portrait is changed i can listen for?

(sorry, its getting more and more complicated as I play with it, pretty awesome asset)

Re: I cant figure out how to edit a couple things :(

Posted: Wed May 11, 2022 8:14 pm
by Tony Li
Hi,

The only other place I can think of that would make "Player" appear is the response menu. Check if the response menu's Standard UI Menu Panel component points to a PC Name field. If so, delete the PC Name GameObject, or unassign it from the PC Name field if it's the same text element as the subtitle panel's Portrait Name.
locksmitharmy wrote: Wed May 11, 2022 6:16 pmtried following your advice on another thread where you made an OnConversationLine method. its working great for adding color to the subtitle by actor, but not the portrait name
Instead of that script, add a Dialogue Actor to the character's GameObject. Set the Actor dropdown. Tick "Set Subtitle Color", and set the color there.
locksmitharmy wrote: Wed May 11, 2022 6:16 pmit does sometimes, is there an event that fires when the portrait is changed i can listen for?
No, but you can make a subclass of StandardUISubtitlePanel. (See this post to replace the script in-place.) Override the SetPortraitImage() method. Something like:

Code: Select all

public class MySubtitlePanel : StandardUISubtitlePanel
{
    protected virtual void SetPortraitImage(Sprite sprite)
    {
        if (sprite != portraitImage.sprite)
        {
            Debug.Log("Hey! The portrait image is changing.");
        }
        base.SetPortraitImage(sprite);
    }
}