[Solved] Custom font for each NPC

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
greggaede
Posts: 7
Joined: Sun Jul 01, 2018 10:28 am

[Solved] Custom font for each NPC

Post by greggaede »

Hi Pixel Crushers team! I'm new to the forum, and would like to say I love the Dialogue System. I don't know if this has been asked in here yet, but is there a way to use a different font for different NPCs, sort of like in this topic, only with fonts? Thanks for the help!
Last edited by greggaede on Wed Jul 11, 2018 2:45 pm, edited 1 time in total.
User avatar
Tony Li
Posts: 21984
Joined: Thu Jul 18, 2013 1:27 pm

Re: Custom font for each NPC

Post by Tony Li »

Hi,

Thanks for using the Dialogue System!

You could set up a unique subtitle panel for each font. Then add a Dialogue Actor component to each NPC and select the panel number from the dropdown.

Alternatively, you could make a copy of the ActorSubtitleColor script (which is now included in the Dialogue System core package) and change the font of the subtitle panel's Text element with each line.
User avatar
greggaede
Posts: 7
Joined: Sun Jul 01, 2018 10:28 am

Re: Custom font for each NPC

Post by greggaede »

Hi Tony, thanks for the quick response! I attempted to set up the first suggestion you mentioned, and was able to find the Dialogue Actor component. There I can see the list of subtitle panels from 0 to 15, but I'm not sure how to add a new subtitle panel to the list. How exactly do you set up a unique subtitle panel, as you suggested? I tried making a duplicate of the NPC Subtitle Panel, but I couldn't seem to get it to show up in the list. I'm not sure if i'm in the right place. Here's a screenshot. :)
Attachments
Screenshot.jpg
Screenshot.jpg (34.36 KiB) Viewed 1168 times
User avatar
Tony Li
Posts: 21984
Joined: Thu Jul 18, 2013 1:27 pm

Re: Custom font for each NPC

Post by Tony Li »

Hi,

Try these steps:

1. In the Hierarchy, click on NPC Subtitle Panel.

2. Press Ctrl+D to duplicate it. (Command+D if you're on a Mac.)

3. Rename the copy "Subtitle Panel 2". Inspect its Subtitle Text child GameObject and change the font.

4. Inspect Letterbox Template Standard Dialogue UI. Expand Conversation UI Elements > Subtitle Panels. Drag Subtitle Panel 2 onto the Subtitle Panels header to add it to the list as Element 2. This associates it with Panel 2.

5. Inspect the NPC's Dialogue Actor component. Set Dialogue UI Settings > Subtitle Panel Number to Panel 2.
User avatar
greggaede
Posts: 7
Joined: Sun Jul 01, 2018 10:28 am

Re: Custom font for each NPC

Post by greggaede »

Yes! Thanks a lot Tony! That works.
User avatar
Tony Li
Posts: 21984
Joined: Thu Jul 18, 2013 1:27 pm

Re: Custom font for each NPC

Post by Tony Li »

Awesome! Happy to help.
Post Reply