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

Announcements, support questions, and discussion for the Dialogue System.
locksmitharmy
Posts: 7
Joined: Wed May 11, 2022 2:10 pm

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

Post 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 :(
User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

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

Post 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.
locksmitharmy
Posts: 7
Joined: Wed May 11, 2022 2:10 pm

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

Post by locksmitharmy »

You are a god among men, thank you so much!
locksmitharmy
Posts: 7
Joined: Wed May 11, 2022 2:10 pm

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

Post 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 :)
User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

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

Post 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?
locksmitharmy
Posts: 7
Joined: Wed May 11, 2022 2:10 pm

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

Post by locksmitharmy »

Yes, Player 'Is Player'

and I just have 1 subtitle panel
User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

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

Post 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 487 times

Also try assigning the first dialogue node to the NPC (like the screenshot above) if it's currently assigned to the player.
locksmitharmy
Posts: 7
Joined: Wed May 11, 2022 2:10 pm

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

Post by locksmitharmy »

Im using this as a test dialog so I can figure out all the possible issues I may have:
Image
locksmitharmy
Posts: 7
Joined: Wed May 11, 2022 2:10 pm

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

Post 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)
User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

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

Post 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);
    }
}
Post Reply