[Solved] Custom font for each NPC
[Solved] Custom font for each NPC
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.
Re: Custom font for each NPC
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.
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.
Re: Custom font for each NPC
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 (34.36 KiB) Viewed 1172 times
Re: Custom font for each NPC
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.
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.
Re: Custom font for each NPC
Yes! Thanks a lot Tony! That works.
Re: Custom font for each NPC
Awesome! Happy to help.