Last major questions!

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

Last major questions!

Post by MilziPPG »

First of all Tony, I want to thank you again for making the Dialogue System and Quest Machine. They're both excellent products and I really enjoy using them! Second of all, thank you for being so helpful, responsive, and so friendly! It makes using your products that much more enjoyable.

With that all being said, I'm getting really close to get the fundamentals of how I want the Dialogue System to work in my project but I've just got a few things that I'm not 100% and just want to ask if they are possible or not.

1) I'm using the Top-Down Engine (I've mentioned this far too many times, sorry!) and one of the scripts that is on the Dialogue Manager is called "Pause Top Down During Conversation" and it has two bools - "Pause During Conversations" and "Disable Input During Conversations". I have "Disable Input During Conversations" as I want animations playing in the background and other things going on. The only problem is that the continue button, which is mapped to the Spacebar, is also disabled which means I am unable to continue the dialogue. Is it possible to make sure that all input is disabled APART from the Spacebar (or any other button I wish to have)?

2) The next question is, is it possible to have dialogue text not appear in the same box if I want to have them separated? What I mean by this is let's say I have a piece of dialoague that reads,

"Hi. Did you see the weather today? It was nice"

Normally, what will happen is that all that text will appear in one box. However, how can I have it if I want some parts of the text separate so that the dialogue box deletes the first part of the text and then shows the next part of the text. I'll try show this visually.

Current -

Hi. Did you see the weather today? It was nice.

Desired -

Hi. (Once Hi is said and the player presses continue, the text is deleted but the dialogue box still stays, and then the next sentence appears)

Did you see the weather today? (Again, player presses continue, text is deleted, dialogue box stays there, and then next sentence appears)

It was nice.

If you need more information for this question, I'll try give you a more visual example by sending you a video or something!

3) This question is about the fade in/fade out animation of the dialogue box. In one of my test sequences, I have an NPC walk a set path once a quest is complete. The player interacts with the NPC, the dialogue box fades in, it shows a piece of text, it then abruptly disappears instead of fading out, the NPC walks, then the dialogue box reappears but it doesn't fade in. I'm using SetEnabled to disable the whole canvas but should I be doing something else just to make the canvas fade in/out?

4) The last thing isn't a question but a possible bug (with the Top Down Engine). So, if you run, not walk, into an NPC whose dialogue is triggered by going into their trigger box, once the dialogue box disappears, the Top-Down Character's state is in run, even if you don't hold down the run button. I've only tested this out in the 2D version of the engine but I can send you a video of me doing it in case you're unable to reproduce it.

I'm really sorry about the length of this but these are the last few things that are bugging me (apart from the typewriter effect but there seems to be loads of information on that so I'll do that separately). Thank you so much in advance!
User avatar
Tony Li
Posts: 21684
Joined: Thu Jul 18, 2013 1:27 pm

Re: Last major questions!

Post by Tony Li »

Hi,
MilziPPG wrote: Wed Jul 03, 2019 4:22 pm1) I'm using the Top-Down Engine (I've mentioned this far too many times, sorry!) and one of the scripts that is on the Dialogue Manager is called "Pause Top Down During Conversation" and it has two bools - "Pause During Conversations" and "Disable Input During Conversations". I have "Disable Input During Conversations" as I want animations playing in the background and other things going on. The only problem is that the continue button, which is mapped to the Spacebar, is also disabled which means I am unable to continue the dialogue. Is it possible to make sure that all input is disabled APART from the Spacebar (or any other button I wish to have)?
I need to research this. TDE is doing something funny with input.
MilziPPG wrote: Wed Jul 03, 2019 4:22 pm2) The next question is, is it possible to have dialogue text not appear in the same box if I want to have them separated?
You can string together multiple dialogue entry nodes spoken by the same character. So instead of:

[Hi. Did you see the weather today? It was nice.]

You can have:

[Hi.] --> [Did you see the weather today?] --> [It was nice.]

By default, when you add a child node it alternates speakers (e.g., alternating between gray and blue nodes). If you hold down Shift while adding the node, it will keep the same speaker as the previous node. You can also swap the speaker and listener on an existing node by clicking the up&down button next to the Actor and Conversant dropdowns in the node's Inspector view.
MilziPPG wrote: Wed Jul 03, 2019 4:22 pm3) This question is about the fade in/fade out animation of the dialogue box. In one of my test sequences, I have an NPC walk a set path once a quest is complete. The player interacts with the NPC, the dialogue box fades in, it shows a piece of text, it then abruptly disappears instead of fading out, the NPC walks, then the dialogue box reappears but it doesn't fade in. I'm using SetEnabled to disable the whole canvas but should I be doing something else just to make the canvas fade in/out?
Use the SetDialoguePanel() sequencer command.
MilziPPG wrote: Wed Jul 03, 2019 4:22 pm4) The last thing isn't a question but a possible bug (with the Top Down Engine). So, if you run, not walk, into an NPC whose dialogue is triggered by going into their trigger box, once the dialogue box disappears, the Top-Down Character's state is in run, even if you don't hold down the run button. I've only tested this out in the 2D version of the engine but I can send you a video of me doing it in case you're unable to reproduce it.
If you examine the PauseTopDownDuringConversations.cs script, there is a FixAnimators() method at the bottom. It stops the player's animation and footstep particles. It assumes the animator parameters are named "Speed", "Walking", and "Running". If your character's animator parameters are different, let me know. I might be able to make it a little more flexible in the next update. Or you can make a subclass of the script and override FixAnimators() to stop your character.
Fenda
Posts: 6
Joined: Thu Jul 04, 2019 3:45 am

Re: Last major questions!

Post by Fenda »

I was about to post another thread but thought it made more sense to jump in on this one.
1) I'm using the Top-Down Engine (I've mentioned this far too many times, sorry!) and one of the scripts that is on the Dialogue Manager is called "Pause Top Down During Conversation" and it has two bools - "Pause During Conversations" and "Disable Input During Conversations". I have "Disable Input During Conversations" as I want animations playing in the background and other things going on. The only problem is that the continue button, which is mapped to the Spacebar, is also disabled which means I am unable to continue the dialogue. Is it possible to make sure that all input is disabled APART from the Spacebar (or any other button I wish to have)?
I'm also running into this issue. I'd like to keep the world "alive" whilst in a dialogue but prevent the player moving around. However, the Spacebar does not work for the Continue button.

I'd also like the player to be able to select between options using predefined keys too (e.g. A/B on a controller). How would we go about that? It seems that "disabling input during conversations" prevents mouse selection of conversation options too?
User avatar
Tony Li
Posts: 21684
Joined: Thu Jul 18, 2013 1:27 pm

Re: Last major questions!

Post by Tony Li »

It was a one line change. :roll: I forgot that TopDown Engine assumes no other assets will use Unity UI input, so it turns it off when it's not using it. The Dialogue System Extras page now has an updated TDE support package (direct download) that enables Unity UI input during conversations.
Fenda wrote: Thu Jul 04, 2019 3:58 amI'd also like the player to be able to select between options using predefined keys too (e.g. A/B on a controller). How would we go about that? It seems that "disabling input during conversations" prevents mouse selection of conversation options too?
The update above should fix it. If you want to tie responses to specific buttons like this:

Image

Then assign explicitly-positioned response buttons to the StandardUIMenuPanel's Buttons list instead of using a Button Template. Add an image to each button, such as the A/B/X/Y images above, and add a UIButtonKeyTrigger to assign a hotkey to each response button. You can use the Key Codes JoystickButton0 - JoystickButton 3.

If you want a response to use a specific button, use the [position=#] markup tag.
MilziPPG
Posts: 33
Joined: Sat Jun 15, 2019 5:25 am

Re: Last major questions!

Post by MilziPPG »

Well, this is all pretty much on point! The new script works like a charm, SetDialoguePanel() works perfectly too. It's exactly what I wanted!

I tried doing what you suggested for having with having different nodes but it doesn't seem to work.
Dialogue.PNG
Dialogue.PNG (237.42 KiB) Viewed 1267 times
Dialogue Database.PNG
Dialogue Database.PNG (29.12 KiB) Viewed 1267 times
The Dialogue Database has the two parts of the conversation in different nodes but it still appears in the same panel so I'm not sure what's wrong.

And with the running, I actually meant that the player's speed is still the same as it is in the running state if they run into a dialogue trigger, I didn't mean the animation. Sorry for not being more clear! Thanks for everything so far!
User avatar
Tony Li
Posts: 21684
Joined: Thu Jul 18, 2013 1:27 pm

Re: Last major questions!

Post by Tony Li »

MilziPPG wrote: Thu Jul 04, 2019 4:15 pmI tried doing what you suggested for having with having different nodes but it doesn't seem to work.
On your subtitle panel, is Accumulate Text ticked? If so, untick it to show only the current node's text.

If you want to normally accumulate text but at some points you want to clear it and only show the current node's text, use the ClearSubtitleText() sequencer command.
MilziPPG wrote: Thu Jul 04, 2019 4:15 pmAnd with the running, I actually meant that the player's speed is still the same as it is in the running state if they run into a dialogue trigger, I didn't mean the animation.
Hmm, the code in PauseTopDownDuringConversations should stop the player's movement by clearing the movement input, in addition to stopping its animation. Can you reproduce the same issue in the example scene? (You'll need to untick Pause During Conversations and tick Disable Input During Conversations.)
MilziPPG
Posts: 33
Joined: Sat Jun 15, 2019 5:25 am

Re: Last major questions!

Post by MilziPPG »

Unticking Accumulate Text worked! Absolutely brilliant!

In terms of the potential bug, I'll record a video and post it up here :)
MilziPPG
Posts: 33
Joined: Sat Jun 15, 2019 5:25 am

Re: Last major questions!

Post by MilziPPG »

Sorry! Here's the video. So I start off the video by walking and then by running (you can see the difference between the two animations). If I run into the quest giver (not walk), I then stay in my running state, though the animation is the walking animation. The only way I can then get out of it is by pressing the shift key (which is my toggle run button). Here's what it looks like! -

https://youtu.be/v6v6D9dm8Sk
User avatar
Tony Li
Posts: 21684
Joined: Thu Jul 18, 2013 1:27 pm

Re: Last major questions!

Post by Tony Li »

Hi,

I just put an update on the Dialogue System Extras page. (direct download)

If you notice any other abilities failing to stop, let me know. It should handle all of the built-in abilities now. If you've written custom abilities, you can make a subclass of PauseTopDownDuringConversations and override the SetPlayerComponents method to turn them off if necessary.
MilziPPG
Posts: 33
Joined: Sat Jun 15, 2019 5:25 am

Re: Last major questions!

Post by MilziPPG »

Thank you very much Tony!
Post Reply