Is it possible to type in a password as a dialogue response?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
westingtyler
Posts: 3
Joined: Thu May 14, 2015 4:44 pm

Is it possible to type in a password as a dialogue response?

Post by westingtyler »

Hello. I am considering buying the dialogue package, but I have very specific needs. Like in the old game Ultima VI: The False Prophet, I want dialogue responses to be words you type in, at which point the NPC responds based on what you typed. During conversation the keywords you can later type are highlighted in red as the NPC says them.



Basically, I need to be able to type a response words instead of clicking ready-made responses, and I need to be able to selectively color words in dialogue branches. Also, I really don't want to learn to code or script if possible. Is it possible to do this with this package? Thanks!
User avatar
Tony Li
Posts: 22101
Joined: Thu Jul 18, 2013 1:27 pm

Is it possible to type in a password as a dialogue response?

Post by Tony Li »

Hi,



Yes, the Dialogue System can do this. Briefly, whenever you want to ask the player to type a response, you'll use the TextInput() sequencer command in your conversation. This will save the player's input in a variable. For example: TextInput(TextFieldUI,,favoriteColor) saves the player's input in a variable named "favoriteColor".







Then you can reference that variable in the conversation using the [var=name] tag in your dialogue text, such as: "We already talked about [em1][var=favoriteColor][/em1]. Let's talk about something else." The [em1]...[/em1] tags specify what to color in red, and [var=favoriteColor] gets replaced with the player's earlier input.
westingtyler
Posts: 3
Joined: Thu May 14, 2015 4:44 pm

Is it possible to type in a password as a dialogue response?

Post by westingtyler »

Thanks for the quick response, as that seems easy enough! Can this be accomplished using the node-based system alone, or will it require additionally working inside scripts?
westingtyler
Posts: 3
Joined: Thu May 14, 2015 4:44 pm

Is it possible to type in a password as a dialogue response?

Post by westingtyler »

And can I cause the NPC to give a different response depending on what word the player types in? Can it test the Textinput() string against another preset string?
User avatar
Tony Li
Posts: 22101
Joined: Thu Jul 18, 2013 1:27 pm

Is it possible to type in a password as a dialogue response?

Post by Tony Li »

You can do this entirely within the node-based system, without any scripting. That said, while the Dialogue System makes it much, much easier, there's still work involved, especially in setting up your UI unless you decide to use one of the included UI prefabs. But I'll be here if you have any questions. :-)
User avatar
Tony Li
Posts: 22101
Joined: Thu Jul 18, 2013 1:27 pm

Is it possible to type in a password as a dialogue response?

Post by Tony Li »

And, yes, you can test the TextInput() string against another preset string. Technically, under the hood, the Dialogue System uses a scripting language called Lua to do this. But the Dialogue Editor provides a point-and-click "Lua Wizard" so you don't have to do any actual scripting.
terrymorgan
Posts: 97
Joined: Wed Sep 10, 2014 5:29 pm

Re: Is it possible to type in a password as a dialogue response?

Post by terrymorgan »

https://sites.google.com/site/terrymorg ... _player_10


https://dl.dropboxusercontent.com/u/102 ... yer_10.zip
20MB



Player art and prefab
https://dl.dropboxusercontent.com/u/102 ... itypackage
9mb

unitypackage requires arpg and dialog system
https://dl.dropboxusercontent.com/u/102 ... itypackage
10mb
new arpg scripts
https://dl.dropboxusercontent.com/u/102 ... rch_18.zip
19k

What:

1. Roof disappears on entering building
2. Alchemy Table -mixing a potion (crafting) (partially working)
3. Mining gold (partly working, goal is to get random amounts) rock is by Gamedraw
4. NPC calls you by name-Patty, by Autodesk Pinocchio
5. NPC stops walking and goes into idle, remembers talking to you- Green Spider, On Asset store
6. NPC demands Gold, you either pay or fight -headless dwarf by psionic3d
7. Use a bed (sleeping)
8. Jumppad-the white cube just jump on it.

You want the npc calls you by name bit, you don't need ARPG to see the dialog system

many more dialog system tuts here
https://sites.google.com/site/terrymorg ... tutorials/

all start with 'arpg' or 'action rpg kit'

There's a 1st world and a 3rd world. Where's the 2nd world?
User avatar
Tony Li
Posts: 22101
Joined: Thu Jul 18, 2013 1:27 pm

Re: Is it possible to type in a password as a dialogue response?

Post by Tony Li »

Thanks for sharing the tutorials and packages, Terry!
terrymorgan
Posts: 97
Joined: Wed Sep 10, 2014 5:29 pm

Re: Is it possible to type in a password as a dialogue response?

Post by terrymorgan »

I wonder if they help westingtyler. I make them because I don't want to figure things out twice. :--}
User avatar
Tony Li
Posts: 22101
Joined: Thu Jul 18, 2013 1:27 pm

Re: Is it possible to type in a password as a dialogue response?

Post by Tony Li »

You and westingtyler inspired me to add an "input loop" example scene to the Unity UI Dialogue UI examples. It's in v1.5.2+. It uses the new Unity UI version of the Computer UI to act like a command line interface where you can type in a couple commands instead of choosing responses from buttons.
Post Reply