How can I change the font size of a specfic NPC's subtitle?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Lucian1899
Posts: 12
Joined: Wed Dec 13, 2023 9:23 am

How can I change the font size of a specfic NPC's subtitle?

Post by Lucian1899 »

Hi there! Thank you for Dialogue System, it is a wonderful tool!

I'm using WRPG template Dialogue UI in my game, and I really love this template, but could you please help me with two little questions?Thanks a lot!

1. In one case, there are three people in one dialogue, I could change the font size of all subtitles, how could I just change only one NPC subtitle's size?
2.In this template, I let response text remain in subtitle text panel as PC's subtitle, I could just change the font size of response text, how could I change the font size of PC's subtitle?
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: How can I change the font size of a specfic NPC's subtitle?

Post by Tony Li »

Hi,
Lucian1899 wrote: Wed Dec 13, 2023 10:25 am1. In one case, there are three people in one dialogue, I could change the font size of all subtitles, how could I just change only one NPC subtitle's size?
If you don't want to do any programming, you can use the Dialogue Actor component.
  • Make sure the conversation is using the correct GameObject for the NPC. (See Character GameObject Assignments)
  • Add a Dialogue Actor component to the NPC's GameObject.
  • Set the Actor dropdown to the NPC.
  • Tick Dialogue UI Settings > Set Subtitle Color and Apply Color To Prepended Name.
  • Set "Prepend Actor Name Format" to something like:

    Code: Select all

    <size=28>{0}{1}</size>
    This will use font size 28. If you don't want to prepend the NPC's name in front of its dialogue text, remove the "{0}".
Lucian1899 wrote: Wed Dec 13, 2023 10:25 am2.In this template, I let response text remain in subtitle text panel as PC's subtitle, I could just change the font size of response text, how could I change the font size of PC's subtitle?
Same process as above. This may also be helpful: How To: Bypass Response Menu When Player Has One Choice
Lucian1899
Posts: 12
Joined: Wed Dec 13, 2023 9:23 am

Re: How can I change the font size of a specfic NPC's subtitle?

Post by Lucian1899 »

Thank you so much Tony, problem solved!
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: How can I change the font size of a specfic NPC's subtitle?

Post by Tony Li »

Glad to help!
Post Reply