Page 1 of 1

Dialogue Entry - False Condition (need help)

Posted: Mon Feb 22, 2021 7:29 pm
by Grayson
I'm trying to following Tony's advice on using the Hub method when an NPC has multiple conversation threads and using the condition of quest status to determine with node to trigger. However, every time I add a node the conditions don't seem to trigger correctly. I know my code is returning the correct quest status' so I must be setting up the conditions wrong.

Below is the dialogue entry. Since only 2 out of the 3 conditions evaluate to the intended result (the 3rd one returns true) I want the conversation to pass to the next node - which I believe should be the text in red on the 2nd link to line. However, it goes to the 1st line. I tried setting the false condition action to Block but that seems to stop everything. Is passthrough correct or do I have something else screwed up?
false.jpg
false.jpg (52.78 KiB) Viewed 641 times

Re: Dialogue Entry - False Condition (need help)

Posted: Mon Feb 22, 2021 8:14 pm
by Tony Li
Hi,

Are you using your own quest system and custom C# method CheckQuestStatus() registered with Lua?

If so, keep the Dialogue Editor window open on that conversation while you're playing. The current node will be shown in green. Links to nodes whose Conditions are true will be green. Links to nodes whose Conditions are false will be red.

If you're using the Dialogue System's quest system, I recommend using the "..." to build the Conditions instead. This will use the correct functions and comparison values.

For conditions, False Condition Action - Block is the default value. I suspect that you'll want to keep it set to Block. Take this example:

passthrough.png
passthrough.png (9.22 KiB) Viewed 639 times

Say A1's Condition is false, and B's Conditions is true.

If A1's False Condition Action is Block, then as soon as it sees that A1's Condition is false, it will stop checking the A1 branch and immediately check B. Since B is true, it will show B.

On the other hand, if A1's False Condition Action is Passthrough, it will pass through A1 to check A2's Condition. If A2's Condition is true, it will show A2. Otherwise it will check B and show it.

That's the logic. Technically, it checks all possible nodes and then makes a decision. But it's easiest to think of it going one by one like I described above.

Re: Dialogue Entry - False Condition (need help)

Posted: Mon Feb 22, 2021 11:58 pm
by Grayson
Thanks....I think I was doing it all wrong. Tried a quick example based on your guidance and it worked. I will now go back and fix my other conversation HUBs! This way makes much more sense :D

Re: Dialogue Entry - False Condition (need help)

Posted: Tue Feb 23, 2021 8:09 am
by Tony Li
Glad to help!