Change "Show Invalid Responses" Based on Scene and Input Question

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
xemanon
Posts: 6
Joined: Sat Feb 19, 2022 4:11 pm

Change "Show Invalid Responses" Based on Scene and Input Question

Post by xemanon »

Hi! I have two questions:

1) Is there a way to change "show invalid responses" option on the dialogue manager conditionally, such as based on what scene we're on? Or more specifically, is there a way to set this option via a script?

2) I have my Input Manager on my Dialogue Manager as shown (attached an image). I noticed that when I press the "Space" button to continue a conversation in Unity, the mouse will jump to the center. And when I try the same on an uploaded web build, the mouse functionality disappears until I press "Esc." Is there a way to keep the Spacebar-continuing-conversation functionality while also letting the Mouse stay as it was? This isn't a big issue, but I was wondering.

3) Edit: One last question, what is the proper way to change an actor's display name in a conversation for the entire conversation? I've tried putting

Code: Select all

Actor["name of actor in database"].Display_Name = "updated display name"
in the script of a dialogue node but it does not change for me. Nevermind, it seems to work now! Don't put spaces in your character's names :)

Thank you for any help in advance.
Attachments
Screenshot 2022-05-01 193314.jpg
Screenshot 2022-05-01 193314.jpg (60.29 KiB) Viewed 811 times
User avatar
Tony Li
Posts: 22148
Joined: Thu Jul 18, 2013 1:27 pm

Re: Change "Show Invalid Responses" Based on Scene and Input Question

Post by Tony Li »

xemanon wrote: Sun May 01, 2022 7:35 pm1) Is there a way to change "show invalid responses" option on the dialogue manager conditionally, such as based on what scene we're on? Or more specifically, is there a way to set this option via a script?
Yes, see the info in How To: Do Skill Checks -- more specifically, this linked post.
xemanon wrote: Sun May 01, 2022 7:35 pm2) I have my Input Manager on my Dialogue Manager as shown (attached an image). I noticed that when I press the "Space" button to continue a conversation in Unity, the mouse will jump to the center. And when I try the same on an uploaded web build, the mouse functionality disappears until I press "Esc." Is there a way to keep the Spacebar-continuing-conversation functionality while also letting the Mouse stay as it was? This isn't a big issue, but I was wondering.
Remove Space from the Input Device Manager's Key Codes To Check. Otherwise, when the Input Device Manager detects that you've pressed Space, it will switch to Keyboard mode, which will try to hide and lock the cursor in the center of the screen. You'll probably also want to remove Return for the same reason.
xemanon wrote: Sun May 01, 2022 7:35 pm3) Edit: One last question, what is the proper way to change an actor's display name in a conversation for the entire conversation? I've tried putting

Code: Select all

Actor["name of actor in database"].Display_Name = "updated display name"
in the script of a dialogue node but it does not change for me. Nevermind, it seems to work now! Don't put spaces in your character's names :)
Spaces are allowed in actors' Names. You just need to replace them with "_" when they're used as the index (lookup key) in the Actor[] Lua table, like:

Code: Select all

Actor["name_of_actor_in_database"].Display_Name = "updated display name";
More info: Lua table indices

Also, the Dialogue System Extras has a Discover Name Example that demonstrates how to change a display name in the middle of a conversation and have it take effect immediately. (Actor display names are cached at the beginning of the conversation, so just changing the Display Name field won't make it take effect right away.)
xemanon
Posts: 6
Joined: Sat Feb 19, 2022 4:11 pm

Re: Change "Show Invalid Responses" Based on Scene and Input Question

Post by xemanon »

Yes, see the info in How To: Do Skill Checks -- more specifically, this linked post.
Hi, I'm trying out the package and information provided in the linked post still, though I am currently a bit confused. I see that there's a script attached that uses a basic dialogue UI, how would one go about using it if we are using a edited version of the JRPG prefab? Alternatively, is there a specific lines of code that could just toggle the `Show Invalid Responses` checkmark on the Dialogue Manager (don't care about having to change it in the middle of a conversation, just the scene we're on)?
Remove Space from the Input Device Manager's Key Codes To Check. Otherwise, when the Input Device Manager detects that you've pressed Space, it will switch to Keyboard mode, which will try to hide and lock the cursor in the center of the screen. You'll probably also want to remove Return for the same reason.
Thank you, I think this worked. I removed both Space and Enter and checked "Auto Focus".
Spaces are allowed in actors' Names. You just need to replace them with "_" when they're used as the index (lookup key) in the Actor[] Lua table, like:
Thank you, yes I was unclear, this was what I found as well. I originally had it as Actor["First Last"] = "new name" but it should have been Actor["First_Last"]=...
The Extras is useful!
User avatar
Tony Li
Posts: 22148
Joined: Thu Jul 18, 2013 1:27 pm

Re: Change "Show Invalid Responses" Based on Scene and Input Question

Post by Tony Li »

Hi,
xemanon wrote: Mon May 02, 2022 8:12 pm
Yes, see the info in How To: Do Skill Checks -- more specifically, this linked post.
Hi, I'm trying out the package and information provided in the linked post still, though I am currently a bit confused. I see that there's a script attached that uses a basic dialogue UI, how would one go about using it if we are using a edited version of the JRPG prefab? Alternatively, is there a specific lines of code that could just toggle the `Show Invalid Responses` checkmark on the Dialogue Manager (don't care about having to change it in the middle of a conversation, just the scene we're on)?
It should work the same for an edited JRPG prefab, too. Are you seeing any issues?

If you want to toggle "Show Invalid Responses" at runtime, set DialogueManager.displaySettings.inputSettings.includeInvalidEntries.
Post Reply