Valid dialogue option not showing

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Sellsword
Posts: 3
Joined: Mon Jul 27, 2020 6:00 pm

Valid dialogue option not showing

Post by Sellsword »

Hi,

First off - thank you so much for this wonderful tool, and your incredible support of your product. It's incredibly useful and got me past a huge logjam in my designing.

I'm working on a 'Choose Your Own Adventure' style project with mostly simple dialogue trees, and I'm working to add a feature that allows players to accrue currency through play that they can spend on additional, otherwise locked, dialogue options.

I've used Quests to hold the currency, and variables to add them at appropriate points. And in my current scene, I used the Conditions field to add a "Currency >= 3 " condition to require the player to have the requisite amount for the choice to be valid. In this setup, if the player does not have the correct amount, the option is shown but is un-clickable. This is the expected behavior.

My problem is, if the player DOES have the required currency (ie - the response is valid), the option doesn't show at all.

I looked through similar threads to see if anyone had this problem, but didn't see anything quite like it. I saw reference to a script you offered some people to assist with showing invalid choices, though I'm not sure if this would apply here, or where I would place said script.

Any help or advice you could provide would be greatly appreciated. The more I learn about DS, the more powerful I see that it is, it's practically a text-based game engine all on it's own!
Sellsword
Posts: 3
Joined: Mon Jul 27, 2020 6:00 pm

Re: Valid dialogue option not showing

Post by Sellsword »

Looks like this was actually an easy fix. In case anyone has this issue, the mistake I made was not calling it a Variable in the Conditions field. So the correct string for me was "Variable["Currency"] >= 3" which enabled it to function properly.

EDIT: Also, because game covers multiple scenes, it looks like making sure to have 'Include Invalid Entries' checked in the starting scene and not just the scene where the conditional conversation occurs is necessary. When running the game starting from the first scene (where it was not checked), the conditional option did not show when the condition was not met, but it does show if I start directly from the second scene. Another thing for people to check if they're running into this (though I'm guessing more experienced folk already knew this).

Again, thanks for the great tools!
Last edited by Sellsword on Mon Jul 27, 2020 8:14 pm, edited 2 times in total.
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Valid dialogue option not showing

Post by Tony Li »

Hi,

Thanks for using the Dialogue System! I'm glad you got that all sorted out. BTW, if you're not already using the "..." button to open dropdown menus for the Conditions and Script fields, it's a big help. You can select a variable from the dropdown, click Apply, and it will automatically generate the Lua code without you having to type anything. I use it all the time to prevent typos and misspellings.
Sellsword
Posts: 3
Joined: Mon Jul 27, 2020 6:00 pm

Re: Valid dialogue option not showing

Post by Sellsword »

Tony,

Thanks, and trying '...' is exactly what let me to realize my mistake! I overlooked it the first time around.
Post Reply