Page 1 of 2

Quickest way to set up basic NES/SNES-style RPG dialogue?

Posted: Sat Jul 25, 2020 3:53 pm
by karakori
Just downloaded the asset and excited to start using it. I've started going through the tutorials and documentation, so apologies if this is covered and I'm getting ahead of myself, but I'm wondering what the quickest route might be to setting up a very basic, barebones old-school RPG dialogue window template with simple yes/no choices and little beyond that.

With regards to functionality, I've got the On Use/On Trigger Enter part of it figured out (for old-school press key to speak to NPC interaction). I've got the font I want. My understanding is I can modify the typewriter effect and attach a typing sound too.

I guess my main concern is the UI aesthetic: I'm wondering which of the included templates, if any, would be the easiest to strip down to get something that looks like this:

Image
Image

?

Obviously I'd have to supply my own window sprites, but I just mean in terms of template with least baggage like having to remove/disable character portraits, etc. that I could still use as a foundation to build on.

On that note, if I want to remove stuff like portraits, are there toggles for that in the inspector, or should I be disabling the UI game objects in the prefab itself?

Another small question, for multi-line dialogue, I would like to either have no Continue button or a blinking arrow - is anything like this covered in the manual?

Thanks again for making this great asset!

Edit:

I see now there's something called the JRPG template and now I feel stupid! I'm guessing this is my best option.

Re: Quickest way to set up basic NES/SNES-style RPG dialogue?

Posted: Sat Jul 25, 2020 7:31 pm
by Tony Li
Hi,

Thanks for using the Dialogue System! "JRPG" covers a lot of games, so the JRPG template prefab may or may not be the best fit for what you want. If you want NPC subtitles to appear in a separate window from the player response menu, the Basic Standard Dialogue UI template might be a better starting point.

You can simply delete the elements that you don't want, such as the portrait name and portrait image GameObjects.

For the continue button, you can remove its Text object and replace the button's image with a down arrow image.

The Dialogue UI Tutorial may also be helpful, particularly the video version. The last half of the video puts together a visual novel style UI with an image-only continue button. You can also make the button image's alpha value zero to make it transparent, and adjust it to cover the entire UI. This way the player can click anywhere in the panel to continue.

A lot of it is just standard Unity UI stuff. For example, if you want to play a sound whenever the player navigates response buttons (e.g., between Yes and No), add a standard Event Trigger. Add an OnSelect() event, and configure it to play a sound on an Audio Source.

If you want a right-pointing arrow next to the current selection, set the response button's Transition type to Sprite Swap. Assign a transparent image to the Normal state and an image with a right-pointing arrow to the Selected state.

Setting up the UI is probably the most complex part of the Dialogue System, and necessarily so because there are many designs for dialogue UIs out there, from movie style letterbox, to Oxenfree style bubbles, to old school JRPG, etc. So if you have any questions about any of it, just ask.

Re: Quickest way to set up basic NES/SNES-style RPG dialogue?

Posted: Sat Jul 25, 2020 8:11 pm
by karakori
Thank you very much Tony for your prompt and thorough response!

Re: Quickest way to set up basic NES/SNES-style RPG dialogue?

Posted: Sat Jul 25, 2020 9:02 pm
by Tony Li
Glad to help!

Re: Quickest way to set up basic NES/SNES-style RPG dialogue?

Posted: Sat Jul 25, 2020 9:58 pm
by karakori
Sorry to be back so soon with another question :|

I've added an audio file for my typewriter effect - is there a way to modify the pitch/volume of the sound, the way you can when you place the audio file as a game object in the hierarchy? I tried adding the audio file to the template prefab hierarchy so I could edit it there, but the audio clip field only accepts files from the assets folder.

Apologies if this has nothing to do with the asset and is something to do with Unity I should probably already know.

Re: Quickest way to set up basic NES/SNES-style RPG dialogue?

Posted: Sat Jul 25, 2020 11:58 pm
by karakori
And... a second question, then I should stop be annoying for a little while.

I'm having trouble getting the player to freeze on conversation start. When I add a dialogue system events to my player and attach my player controller script, the dropdown in the function list doesn't populate. Maybe my player controller script is poorly coded - this is my assumption, I'm a big-time C#/Unity novice.

Image

I've tried pausing game speed on conversation start, but I can still change my character's direction, even though they're frozen in place. Couldn't seem to get it to disable the animator from the things I tried.

Assuming the above don't work, is there something I could put in my player controller script?

I already have a "player can move" boolean set up from my previous attempt at a dialogue system I had made myself.

So is there something I could put in, like

if (conversationStarted)
{
canMove = false;
}

?

Re: Quickest way to set up basic NES/SNES-style RPG dialogue?

Posted: Sun Jul 26, 2020 7:33 am
by Tony Li
Hi,

Add an Audio Source to the Subtitle Text (i.e., the same GameObject as the typewriter effect) and adjust its settings. The typewriter effect will use this Audio Source instead of creating a new, default one.

Assign your player GameObject to the Dialogue System Events component. Then the dropdown should populate.

Re: Quickest way to set up basic NES/SNES-style RPG dialogue?

Posted: Sun Jul 26, 2020 9:42 am
by karakori
Tony Li wrote: Sun Jul 26, 2020 7:33 am Hi,

Add an Audio Source to the Subtitle Text (i.e., the same GameObject as the typewriter effect) and adjust its settings. The typewriter effect will use this Audio Source instead of creating a new, default one.

Assign your player GameObject to the Dialogue System Events component. Then the dropdown should populate.
D'oh! Not sure why I thought you were assigning the movement script in the video and not the game object. I need to pay closer attention.

re: audio, I guess I didn't understand the distinction in Unity bwtn audio clip and audio source. It works perfectly now.

Thank you so much Tony, it really means a lot.

Re: Quickest way to set up basic NES/SNES-style RPG dialogue?

Posted: Sun Jul 26, 2020 10:27 am
by Tony Li
Happy to help! Thank you very much for the kind review!

Re: Quickest way to set up basic NES/SNES-style RPG dialogue?

Posted: Sun Jul 26, 2020 9:48 pm
by karakori
I know I promised to stop asking questions but they just keep coming to me :p

As I'm making a 2D top-down game, one challenge I face is getting the NPC to look at the player when interacting with them (and also making it so that the player can only interact with an object or NPC when facing them rather than just being in a "trigger zone").

While this doesn't explicitly relate to the Dialogue System, I did want whatever C# method I come up with (and by "come up with" I mean google extensively) to easily be able to plug into the Dialogue System. As a Unity/C# novice, I'm in a bit over my head what with raycasts, quaternions, etc.

In your experience Tony, what approach do you think would be best for me to explore? A Proximity Sensor on the player? OnTriggerEnter on the NPC? And what C# approach might work best with either of those? I know you have a tutorial that covers a sidescroller view example, but I feel that having 4 directions complicates matters a bit more...