Avoid presenting player response in certain situation

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Timeslip
Posts: 39
Joined: Fri Apr 05, 2019 6:31 am

Avoid presenting player response in certain situation

Post by Timeslip »

Hi Tony,

I'm trying to avoid showing player response options in conversations in which the outcome should be automatically determined by a stat or skill check and there are no other options. In the below example, the player is in a situation and the outcome will be decided by their resolve stat.
DialogueExample.jpg
DialogueExample.jpg (42.65 KiB) Viewed 323 times
Since responses are generated if the acting actor is the player, I've created a separate actor to attribute the bottom two conversation fragments to, with the intention of copying the data from the original player actor (particularly user entered name and portrait) for display purposes. Would this work, or is there a preferable way to deal with this?
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Avoid presenting player response in certain situation

Post by Tony Li »

Hi,

You may find it easier to do one of two things:

1. Inspect the Dialogue Manager and UNtick Input Settings > Always Force Response Menu. If there's only one response, the conversation will auto-select this response instead of showing it in a menu. (You can force single responses to show a menu by including the "[f]" (force) markup tag in the node's text.


2. Or include the "[auto]" markup tag in the nodes' text. If a response node has [auto], the conversation will auto-select it instead of showing a menu, even if more than one response is currently available.
Timeslip
Posts: 39
Joined: Fri Apr 05, 2019 6:31 am

Re: Avoid presenting player response in certain situation

Post by Timeslip »

Always force menu is unticked, but you sent me a class before to handle showing invalid entries, when there was a choice. Perhaps there is a conflict in the functionality.

I tried putting [auto] in the node text, but it did not select the correct link, based on the player's stats. It seems like it might have picked the first node, rather than the correct one. I may not have explained the situation very well.
Dialogue2.png
Dialogue2.png (23.6 KiB) Viewed 314 times
In the image, the player is in node A. Their resolve stat has already been checked from the database and has a value of 3. If their resolve is >= 6, I'd like it to automatically move to node B, if less than 6, it should move to node C.

Here's the node's data for B. Node C is similar, except the condition is < 6.
Dialogue3.png
Dialogue3.png (20.52 KiB) Viewed 314 times
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Avoid presenting player response in certain situation

Post by Tony Li »

Hi,

Here's a patch: (back up your project first)

DS_AutoTagPatch_2020-10-08.unitypackage

The [auto] tag takes precedence over whether the response is valid or invalid. The patch makes it so that valid/invalid takes precedence over [auto].

Side note: In B, are you checking any values that were set in A? If so, please see: Conversations Evaluation Conditions One Extra Level Ahead.
Post Reply