New to Dialogue System, can't run response dialogue

Announcements, support questions, and discussion for the Dialogue System.
Nippy
Posts: 12
Joined: Mon Mar 22, 2021 7:33 pm

New to Dialogue System, can't run response dialogue

Post by Nippy »

Hey! I'm having big trouble in starting a response dialogue.
I simply want to start a dialogue where the player talks to a trader.
The trader says hello, what can I do for you?
1. Show me your items 2. Bye

But the dialogue starts, the trader greets and it runs randomly to 2.. I cant pick anything and the dialogue dont stop.
P2.png
P2.png (35.85 KiB) Viewed 1248 times
P1.png
P1.png (58.28 KiB) Viewed 1248 times
This is the crossing point:
P3.png
P3.png (29.16 KiB) Viewed 1247 times
Please can anyone tell me how to solve this? I tried it for 3 hours and I'm really fucked up :D
User avatar
Tony Li
Posts: 21984
Joined: Thu Jul 18, 2013 1:27 pm

Re: New to Dialogue System, can't run response dialogue

Post by Tony Li »

Hi,

Select Menu > Conversation Properties.
In the Inspector window, set the Actor dropdown to Player.
Set the Conversant dropdown to Trader.

Then inspect each node. (You can skip the <START> node.)
For the NPC nodes, set the Actor dropdown to Trader.
For player response nodes, set the Actor dropdown to Player.

You'll know that it's a player response node if it's blue instead of gray.
Nippy
Posts: 12
Joined: Mon Mar 22, 2021 7:33 pm

Re: New to Dialogue System, can't run response dialogue

Post by Nippy »

Thanks for the quick answer!
I created also a new conversation and changed everything as you said, but it just skips to the end without showing an option to pick from.
I'm alos using the JRPG Template, it drives me a bit crazy, because this is the most generic function and I cant run it :D
P4.png
P4.png (47.25 KiB) Viewed 1240 times
User avatar
Tony Li
Posts: 21984
Joined: Thu Jul 18, 2013 1:27 pm

Re: New to Dialogue System, can't run response dialogue

Post by Tony Li »

Hi,

Check your Dialogue System Trigger. Make sure the Conversation dropdown is set to "New Conversation 4".

Then check the Dialogue Manager GameObject. Make sure the correct Dialogue Database is assigned.
User avatar
Tony Li
Posts: 21984
Joined: Thu Jul 18, 2013 1:27 pm

Re: New to Dialogue System, can't run response dialogue

Post by Tony Li »

A few more tips:

- Click on the "Hello traveller" node. In the Inspector window, make sure the "Links To:" section points to both blue nodes.

- Try assigning the Basic Standard Dialogue UI as a test.

- Temporarily set the Dialogue Manager's Other Settings > Debug Level to Info. This will log a lot of info to the Console window. You can trace through to get an idea of what's going on. When it shows each node, it will log something like:

Dialogue System: Trader says 'Hello traveller...'

Before that line, it will determine what the possible follow-up nodes are. Look for lines such as:

Dialogue System: Add Link 'Yes'
Dialogue System: Add Link 'No'
Nippy
Posts: 12
Joined: Mon Mar 22, 2021 7:33 pm

Re: New to Dialogue System, can't run response dialogue

Post by Nippy »

Thanks, it works now, sometimes it's better going to bed than stick to the monitor :D
Another question, if I create now a variable bool and set it to false, how can I link this bool to my script?
So I can trigger "Open Trader Shop" or not on the end of conversation?

EDIT:
Already found it, holy maccaroni, it's that easy to work with your System, thanks so much that you have created all of this :o

For future others, do in any Script that runs the behaviour that will be triggered in dialogue system event on conversation end:

using PixelCrushers.DialogueSystem;
...
bool myBool = DialogueLua.GetVariable("theBoolVariableInDialogueAsStringHere").AsBool;

and this DialogueLua do it's magic thingy to grab the correct bool :D
I asked myself if there could be some interference when you named 2 bools variables the same name?
But I guess it is filtered out by just checking the active dialogue?
Nippy
Posts: 12
Joined: Mon Mar 22, 2021 7:33 pm

Re: New to Dialogue System, can't run response dialogue

Post by Nippy »

What is the option or where do I have to tick to make the Trader question disappear and show only the possible responses?
Actually it overlaps
P5.png
P5.png (34.82 KiB) Viewed 1234 times
User avatar
Tony Li
Posts: 21984
Joined: Thu Jul 18, 2013 1:27 pm

Re: New to Dialogue System, can't run response dialogue

Post by Tony Li »

Hi,
Nippy wrote: Tue Mar 23, 2021 6:05 amI asked myself if there could be some interference when you named 2 bools variables the same name?
Dialogue database variables are global. If you try to define two variables with the same name, the Dialogue Editor will highlight their names in red.

If you need 2 similar bools, you can use different names, such as "Trader.OpenShop" and "Doctor.OpenShop".

If you use "." in the name, then dropdown menus will show the variables in a submenu for nicer organization. For example, if you define variables named "Trader.OpenShop", "Trader.Gold", and "Trader.Discount", then they will all appear in a submenu "Trader".

Alternatively, you can define custom fields in your actors. For example, the Trader actor could have custom fields named "OpenShop", "Gold", and "Discount".
Nippy wrote: Tue Mar 23, 2021 6:33 amWhat is the option or where do I have to tick to make the Trader question disappear and show only the possible responses?
Inspect the NPC Subtitle Panel. Change its Visibility dropdown to Only During Content.
Nippy
Posts: 12
Joined: Mon Mar 22, 2021 7:33 pm

Re: New to Dialogue System, can't run response dialogue

Post by Nippy »

Hey, is there any already scripted way to stretch the height size of the panel for the response buttons than using a scroll bar? Or do I have to program it myself?
p7.png
p7.png (28.09 KiB) Viewed 1214 times
And is it possible to instantly trigger an event when player clicks on yes? So it won't appear as line, the trader shops opens instantly? There is only a response menu timeout event.
User avatar
Tony Li
Posts: 21984
Joined: Thu Jul 18, 2013 1:27 pm

Re: New to Dialogue System, can't run response dialogue

Post by Tony Li »

Hi,

The response menu panel is just plain old Unity UI. You can set it to stretch by using a Content Size Fitter whose Vertical value is set to Preferred.

In most of the prefabs that use a scroll bar, the content section already has a Content Size Fitter. It's just constrained by its parent ScrollRect. If you move it out of the ScrollRect, it will be able to stretch higher.

For the "open shop" response, try setting the Sequence to: None()
Post Reply