Custom text/sound for different NPCs

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
MilziPPG
Posts: 33
Joined: Sat Jun 15, 2019 5:25 am

Custom text/sound for different NPCs

Post by MilziPPG »

Hi Tony,

I'm trying to customise the dialogue system (specifically the WRPG dialogue template, which I think may be the problem) so that different characters can have different text font/size/sounds etc. For example, let's say I'd like one NPC to speak at 10 characters per second and using 8-BIT WONDER font (Default), while I'd like another NPC to speak at 50 characters per second and using the bigjohn font (Panel 1).

I have set up one of NPCs with a Dialogue Actor component with Subtitle Panel Number set to Panel 1, while the other NPC does not have one because it will simply use the Default Subtitle Panel (3rd Picture)

In the WRPG Template Standard Dialogue UI, which is attached to my Dialogue Manager, I have added some extra children gameobjects that will be set as Panel 1 (2nd Picture)

The bottom gameobject (NPC Subtitle Text) is where I set the characters per second to 50 and the font to bigjohn. In the top gameobject (NPC Subtitle Panel Info), I have set the Subtitle Text in the Standard UI Subtitle Panel compent to be NPC Subtitle Text (1st Picture)

Finally, in the WRPG Template Standard Dialogue UI, I have increased the amount of Subtitle Panels to 2 and added the NPC Subtitle Panel Info to it. (I can't add this picture here so I'll put it in a reply to this)

Unfortunately, it isn't working and I'm not entirely sure why. Am I close to it?
Attachments
3.PNG
3.PNG (31.67 KiB) Viewed 744 times
2.PNG
2.PNG (19.42 KiB) Viewed 744 times
Capture.PNG
Capture.PNG (27.26 KiB) Viewed 744 times
MilziPPG
Posts: 33
Joined: Sat Jun 15, 2019 5:25 am

Re: Custom text/sound for different NPCs

Post by MilziPPG »

Here's the last picture of the WRPG Template Standard Dialogue UI subtitle panel elements
4.PNG
4.PNG (32.8 KiB) Viewed 740 times
User avatar
Tony Li
Posts: 20767
Joined: Thu Jul 18, 2013 1:27 pm

Re: Custom text/sound for different NPCs

Post by Tony Li »

It's something particular to the way the WRPG UI is set up. Normally, the GameObject with the StandardUISubtitlePanel script is the parent of its UI elements. WRPG isn't set up like that by default. To use multiple panels, restructure it like this:

Image

Also set both panels' Visibility to Until Superceded.

Here's an example: WRPGPanelsExample_2019-07-30.unitypackage

In the next update (coming soon), I'll make it so this structure isn't required.
MilziPPG
Posts: 33
Joined: Sat Jun 15, 2019 5:25 am

Re: Custom text/sound for different NPCs

Post by MilziPPG »

Brilliant as always, thank you!
Post Reply