Page 1 of 1

Custom text/sound for different NPCs

Posted: Tue Jul 30, 2019 4:32 pm
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?

Re: Custom text/sound for different NPCs

Posted: Tue Jul 30, 2019 4:37 pm
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 955 times

Re: Custom text/sound for different NPCs

Posted: Tue Jul 30, 2019 8:39 pm
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.

Re: Custom text/sound for different NPCs

Posted: Wed Jul 31, 2019 5:38 am
by MilziPPG
Brilliant as always, thank you!