Different Conversation UI

Announcements, support questions, and discussion for the Dialogue System.
nrvllrgrs
Posts: 20
Joined: Wed Nov 11, 2015 4:55 pm

Re: Different Conversation UI

Post by nrvllrgrs »

This is great! Slightly different than what I was thinking. It's something new to think about. Any suggestions for a "Reply" option?
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Re: Different Conversation UI

Post by Tony Li »

You could set up a Reply button as a design-time response button -- that is, it would be assigned to the dialogue UI's Buttons list rather than instantiated at runtime using the response button template. This response could use the TextInput() sequencer command to prompt the user for text input. If you'd like to see an example, please let me know.

If you don't want the player to enter a response as freeform text, you could link the Reply button to some pre-written responses that the player can choose from.
nrvllrgrs
Posts: 20
Joined: Wed Nov 11, 2015 4:55 pm

Re: Different Conversation UI

Post by nrvllrgrs »

My plan is the latter, using predefined text.
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Re: Different Conversation UI

Post by Tony Li »

Sounds good. That's easier, too. I wasn't quite sure what you'd do with the freeform text if you went that way. :-)
nrvllrgrs
Posts: 20
Joined: Wed Nov 11, 2015 4:55 pm

Re: Different Conversation UI

Post by nrvllrgrs »

Tony Li wrote:You could set up a Reply button as a design-time response button -- that is, it would be assigned to the dialogue UI's Buttons list rather than instantiated at runtime using the response button template.
Just I'm understanding this correctly. You are suggesting that there is a UI button that exists outside of the Dialogue System. When the player clicks this button, it displays text that exists outside of the system as well. Is this correct?
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Re: Different Conversation UI

Post by Tony Li »

I was actually suggesting a button that still exists inside the Dialogue System. You can configure the Unity UI Dialogue UI component with two types of response buttons:

1. A "template" response button (Button Template). The Dialogue System makes copies of this template to show responses and puts them inside a Button Template Holder. These are the buttons you're familiar with in the email conversation example I posted earlier.

2. Or "hard-coded" buttons that you position and customize at design time (i.e., not automatically at runtime). These buttons are assigned to the Buttons list on the Unity UI Dialogue UI component. Here's an example of one purpose of these "hard-coded" buttons:

Image

In that screenshot from The Walking Dead, there are four hard-coded buttons. Each one also has an image as a child UI element that indicates which gamepad button works as the shortcut. You can see that each button is positioned and formatted specially; they aren't just instantiated copies thrown into a vertical list. (There's also a timer bar below the button, which you can also do with the Dialogue System, but that's beside the point.)

Here's an example scene ("Email With Reply") that adds a Reply button.

EmailConversationExample_2016-10-11.unitypackage

The conversation has a new dialogue entry node whose Dialogue Text is "Reply [position 0]". The special tag "[position 0]" tells it to use the hard-coded button in position 0, which is the button shown in red below:

Image

I also used the TextInput() sequencer command to get freeform text input from the player, but you could just as easily have the conversation lead to a menu of prewritten replies.
nrvllrgrs
Posts: 20
Joined: Wed Nov 11, 2015 4:55 pm

Re: Different Conversation UI

Post by nrvllrgrs »

That's awesome! Alright, a couple more questions.
  • Is there a way to hide the Reply option in the Inbox list when it is available as a button?
  • Is button setup/functionality in the documentation? I can find the Continue button but not the predefined Response buttons.
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Re: Different Conversation UI

Post by Tony Li »

nrvllrgrs wrote:Is there a way to hide the Reply option in the Inbox list when it is available as a button?
There are a couple ways to do this. One way is to simply deactivate the button. To test this in the example scene, I changed the Reply node's Sequence to:

Code: Select all

SetActive(REPLY RESPONSE BUTTON,false);
TextInput(Text Field UI, REPLY:, ReplyContent)
nrvllrgrs wrote:Is button setup/functionality in the documentation? I can find the Continue button but not the predefined Response buttons.
In a sense. The documentation assumes that you're using predefined response buttons, and includes an extra section on how to use a button template. This is because early versions of the Dialogue System only used predefined response buttons. However, the button template approach has proven to be more popular, so that's what most of the prefab dialogue UIs ship with, including the generic UI bundled in the Dialogue Manager prefab. The setup for predefined buttons is pretty simple:

1. Add a button to the response panel.
2. Add a Unity UI Response Button component to the button.
3. Add the button to the dialogue UI's Buttons list.
nrvllrgrs
Posts: 20
Joined: Wed Nov 11, 2015 4:55 pm

Re: Different Conversation UI

Post by nrvllrgrs »

SetActive(REPLY RESPONSE BUTTON,false);
This code snippet does not disable Response Button Template (Clone) gameObject for the "Reply" option. I added that code to the Sequence property to the "Reply [position 0]" node in the example. This creates 2 paths for players to reply, which is somewhat awkward. Am I doing something wrong?
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Re: Different Conversation UI

Post by Tony Li »

Can you rename the button to get rid of "(Clone)"? Currently the sequencer doesn't accept gameObject names that contain parentheses. (This is documented in the manual but not prominent.) I plan to remove this restriction in a future version.
Post Reply