Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[RELEASED] Dialogue System for Unity - easy conversations, quests, and more!

Discussion in 'Assets and Asset Store' started by TonyLi, Oct 12, 2013.

  1. Elzbach

    Elzbach

    Joined:
    Dec 5, 2014
    Posts:
    29
    I sent a video to you through PM. And, I can select NPC's conversations from their Bark Trigger drop-down menu, but that hasn't gotten them working.
     
  2. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @Elzbach - I replied to your PM. Once we've confirmed that the issue is resolved, I'll post the resolution here in case it's helpful for others in the same situation.

    --------------

    Dialogue System 1.5.1 Patch 2015-06-07 Available

    A patch for Dialogue System 1.5.1 is available on the Pixel Crushers customer download site. (PM me your Asset Store invoice number if you'd like access.)

    This patch includes:
    • Added: New trigger options OnTriggerEnter, OnDisable, and OnDestroy added to Bark Trigger, Conversation Trigger, Lua Trigger, etc.
    • Added: Extra Databases component, which lets you automatically load/unload additional dialogue databases.
    • Improved: Condition Observer can now also run a sequence when triggered.
    • Improved: More error handling and info messages in NPC Setup Wizard.
    • Improved: Added option in SetPortrait() to specify “pic=varName”.
    • Adventure Creator: Fixed bridge sync bug when inventory had empty slots that still had id numbers.
    • (Was also in patch 2015-06-01) Changed: Camera() sequencer command now uses Lerp instead of Slerp to move.
    • (Was also in patch 2015-06-01) Improved: Unity GUI and Unity UI QuestTrackers now have options to show description instead of name and to show completed entry text.
    • (Was also in patch 2015-06-01) Unity UI: Added Wheel2 dialogue UI prefab; added UnityUIColorText component to change button text color when hovered.
    • (Was also in patch 2015-06-01) articy:draft: Properties and features on dialogues are now converted.
     
    Last edited: Jun 8, 2015
    BackwoodsGaming likes this.
  3. Demonith88

    Demonith88

    Joined:
    Jun 30, 2014
    Posts:
    216
    Somehow after dialogue the camera stuck above head of the character can i some how delete camera angles ?
     
  4. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @Demonith88 - Change the Dialogue Manager's Display Settings > Camera Settings > Default Sequence to:

    Delay({{end}})

    RPG Kit controls the camera during normal gameplay. If you tell the Dialogue System to the camera at the same time, they will clash. The setting above tells the Dialogue System to leave the camera untouched.

    If you want the Dialogue System to control the camera during conversations, use the Set Component Enabled On Dialogue Event component. Set the Trigger to OnConversation. Assign the RPG Kit camera control components to the On Start and On End sections, and set the On Start value to False. (See any of the Dialogue System's example scenes, such as Feature Demo, to see how it's set up on the Player.)

    If this doesn't help, please feel free to send an example project to tony (at) pixelcrushers.com. I'll be happy to take a look.
     
  5. Demonith88

    Demonith88

    Joined:
    Jun 30, 2014
    Posts:
    216
    i had watched tutorials on Utube Dialogue System for Unity - Camera Angles is that the right video for that ?
     
  6. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Yes, that tutorial explains how to use camera angles. Remember to temporarily disable RPG Kit's camera control while the Dialogue System is controlling the camera. The Cutscene Sequences tutorial explains more generally how to use sequences, including camera control sequences.
     
  7. westingtyler

    westingtyler

    Joined:
    Dec 7, 2013
    Posts:
    34
    Hey! I got the Dialogue System. It's great! My question: I added the Dialogue Manager, a canvas, and the Necromancer Dialogue UI to my scene. I can see in the Scene View the white border representing the UI frame, but the actual dialogue window graphics and alert message only show up in the Game View, and when I grab the pieces in the scene view, I can't move them around using the axis tool. Why is this the case, since my other UI tools show up in the scene view and can be moved and rescaled that by grabbing them? dialogue.PNG
     
  8. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @westingtyler - Thanks for buying the Dialogue System!

    The prefabs in "Dialogue System/Prefabs/Unity Dialogue UIs" use the legacy Unity GUI system. Unfortunately, legacy Unity GUI isn't quite as designer-friendly as the new Unity UI system. To move things around, you have to inspect the UI element and fiddle with the numbers in the Scaled Rect section. They're not tied to the new Unity UI system, so you can't move them around with the axis tool.

    The prefabs for the new Unity UI system are hiding in "Dialogue System/Scripts/Supplemental/UI/Prefabs". Not all of the legacy prefabs have been converted to the new Unity UI system yet. Most developers have been using the built-in UIs for quick prototyping and then designing custom UIs for release, so converting the legacy prefabs has been somewhat low on the priority list. I'll try to get the Necromancer UI converted for the next release (v1.5.2).
     
  9. westingtyler

    westingtyler

    Joined:
    Dec 7, 2013
    Posts:
    34
    Thanks for the quick reply! I had done some research and figured it was because of the Legacy UI. A few weeks ago I asked on here about creating a Skyrim-style dialogue window in which you would TYPE your response like in the old game Ultima VI, instead of selecting from a list of options. I feel like I need to take the input field from the "Computer Dialogue UI with Text Input" example and build from that, but I encountered a slight inconsistency in the downloaded demo scene (in which you put in a password at the computer terminal) compared to the one online. In the downloaded one, I selected from a list of a few possible passwords, whereas online I was able to type it in, which is more what I am going for. EDIT: The UI Scenes you mentioned contain the password version, so I will examine it!

    While it would be great to convert all the old UIs to the new system, if I have the clout to ask how to prioritize them, I'd ask for the "Computer Dialogue UI with Text Input" UI to be at the top of the list, followed by a more standard one like the Necromancer UI. Thanks for all your hard work!
     
    Last edited: Jun 9, 2015
  10. westingtyler

    westingtyler

    Joined:
    Dec 7, 2013
    Posts:
    34
    So, yeah, I know the request is very specific to my needs, but I would love a tutorial of some kinds that showed how to make a dialogue window that responds to text input rather than choice selections. Even something that explains how to link an input window to a UI as a response area would be helpful if it exists. Like, how do you say "now that the person is done speaking, bring up the text input. Then once you type a word and hit enter, save that input and compare that input to several option strings, and if it matches, go down a specific dialogue branch and then loop back to that same input section to do it again until you either hit escape or type 'bye'." I am going through the more general tutorials, so any leads would help a lot!
     
  11. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @westingtyler - I'll convert the "Computer Dialogue UI with Text Input" to Unity UI in the next version. After it's released, I plan to record some tutorials, including a text input tutorial now. I'll use your example of looping back until the player hits Escape or types 'bye'.

    In the meantime, look at the Feature Demo scene's Terminal conversation. It uses the TextInput() sequencer command to bring up the text input. Then it compares the input to the terminal's password and follows the proper branch depending on whether the password is correct or not.

    The dialogue markup tag [var=?varName] is alternative way to implicitly call the TextInput() sequencer command by including this tag in your dialogue text.
     
  12. westingtyler

    westingtyler

    Joined:
    Dec 7, 2013
    Posts:
    34
    Hey, thanks. I look forward to the new developments. I've been working with the UI you recommended, and I have a few questions. 1) what do the pieces of this represent: TextInput(NPC Convo UI,Password,Password). I figured out that TextInput calls a TextInput, and that the first section denotes the game object's name, by why does "password, password" have password twice? Where can I find a database of what the all the possible sequence pieces like these mean?

    Also, I want to make the dialogue so that 1) I can use spacebar or mouse click to skip the "printing" of the dialogue text and cause it to all just pop up, like in Zelda. And currently I have to manually select the password field after the dialogue printing is done, when I would like it highlighted and available for typing from as soon as the convo window pops up. You can type WHILE the above dialogue is still being printed, which is great, but I want to implement a minor tweak to this. If you finish typing your input while it is still printing, hitting enter one time would finish the printing, and hitting enter the second time would confirm your entry. As it is now, typing and pressing ENTER "interrupts" the NPC's text printing and just skips it.

    One last thing I noticed. Using the UI example with the terminal, I didn't want the "login, logout" confirmation box to exist after you hit enter on the password field. I wanted to go directly from the enter password node to either of the password nodes. For some reason, though, when I link the Enter Password node directly to the "enter command" and "invalid login" nodes, the first time I confirm, it ALWAYS says the login is wrong. Almost like it stores the new password entry I added AFTER going to the "incorrect" node. Sure enough, the second time I confirm my entry, even if it was wrong this time, as long as it was right the first time, it says it was correct. When is the password entry actually "saved," and how do I get it to save my input to the input variable THEN check if it my entry was correct? Here is a picture of my setup:
    sip dialogue 3.PNG

    Thanks for all your hard work!
     
  13. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @westingtyler - The second parameter is the label, and the third is the variable to store the input in. So if the TextInput() command were this:
    Code (Sequencer):
    1. TextInput(Text Field UI, Enter Password:, MyPasswordVar)
    It would:
    • Find the dialogue UI child GameObject named "Text Field UI" and use it to display the input field.
    • Show "Enter Password:" as the label (input prompt).
    • Store the player's input in the variabled named "MyPasswordVar".
    The manual reference for TextInput() is here, the main section for sequences is here, and a list of all of the built-in sequencer commands is here.

    You can use a "continue button" to do this. Instructions for configuring continue buttons are here. You'll probably want to configure the "Continue Button Fast Forward" option, which does exactly what you describe. You can add a Unity UI Button Key Trigger component to the button to bind the spacebar key to it.

    I'll add this to my To Do list. The behavior is currently as you describe. I'll also make sure it automatically focuses the input field. If you're in a bind and can't wait, you can edit the scripts yourself in Scripts/Supplemental/UI/Scripts/Dialogue UI.

    This is a good question with a complicated answer and a simple solution:

    Insert an empty node between Enter password and Enter command. Set the node's Sequence field to None() so it immediately moves to the Enter command node.*

    This is due to the way the Dialogue System evaluates nodes. Just before it shows a node, it evaluates the node's links. It doesn't wait until the node is done to evaluate its links. There are several reasons for this; one reason is that some of the Dialogue Manager's Continue Button modes need to know what the next link(s) are to determine whether to show the continue button.

    So this means the Dialogue System evaluates the links before running the TextInput() sequencer command. By inserting the empty node, you can delay evaluation.

    Your conversation tree currently runs in this order:
    • Prepare to show Enter password. (Links to: Invalid login)
    • Show Enter password, and run TextInput() command.
    • [Player presses Enter.] Store player's input in "Password" variable.
    • Prepare to show Invalid login. (Links to: Attempt Login)
    By adding the empty node, it runs in this order:
    • Prepare to show Enter password. (Links to: Empty node)
    • Show Enter password, and run TextInput() command.
    • [Player presses Enter.] Store player's input in "Password" variable.
    • Prepare to show Empty node. (Links to: Enter command)
    • "Show" Empty node (but immediately progress to the next link).
    • Prepare to show Enter command.
    • Show Enter command.

    * If you use a continue button, don't use the None() sequencer command in the empty node's Sequence field. Instead, use this sequencer command: SendMessage(OnConversationContinue,,Dialogue Manager). This simulates the player pressing the continue button to move past the empty node.
     
    Last edited: Jun 9, 2015
  14. westingtyler

    westingtyler

    Joined:
    Dec 7, 2013
    Posts:
    34
    This is great, and my system is working better and better. I used the TextInput UI setup to create my dialogue system, and I am wondering if it could be possible to use the name of the Conversant in the Label part of TextInput. Like this: TextInput(Text Field UI, Conversant, MyPasswordVar).

    Also, what is the most effective way to tell the dialogue tree, "if response is ANYTHING ELSE, go to the "I don't know what you are talking about" response. Like if you ask a merchant about dragons, and he has no specific response for dragons. I have one that is low priority that works if the password is "", as in, nothing, but this doesn't account for the "anything else" condition I desire. What is the best way to implement that function? I know I could have one node that has conditions "NOT THIS ONE NOT THAT ONE NOT THE OTHER ONE AND NOT THIS ONE," but it would be clunky and less smooth to have to add in new conditions every time I add a new response, so a simple "anything NOT already accounted for" condition would be helpful.

    Is there a way to tell the textinput field to clear itself after every entry? Once it loops back to the input area, it is still full of the last thing, meaning I have to highlight and delete it to type something new.

    Oh, also is there a clean way to link from the bottom of a tree back to the top without making link lines that run through the whole thing? Playmaker's version of this is "global transitions", for instance. For now I am using what I call "E.P. nodes" to make the workspace stay clean. EP means "empty pretty".

    I apologize for so many questions; I am just very excited about the possibilities of the system!
     
    Last edited: Jun 9, 2015
  15. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @westingtyler - In the next version, I'll add a syntax variation where you can use a variable value (such as Conversant) for the Label part, like this:
    Code (Sequencer):
    1. TextInput(Text Field UI, var=Conversant, MyPasswordVar)
    You're on the right track with Priority. Set all the other nodes to AboveNormal priority or higher. Set the "I don't know what you are talking about" node to Normal priority with no Conditions. When evaluating links, the Dialogue System will use any true nodes that are AboveNormal. If none of them are true, it will look for any Normal nodes that are true, and it'll end up choosing this catchall node since a blank Conditions field is always true.

    It sets the input field to the current value of the variable. This allows you to have default values where the player can just press Enter to accept. If you want to clear it, use the Script field to set the variable to "" first. While I'm editing the TextInput() sequencer command, I'll also add an optional fourth parameter "clear" that will clear the input field instead of using the variable's value.

    Not currently. The interface works very much like a state machine in Mecanim's Animator view. I'll give this some thought.

    I'm glad the Dialogue System is working out for you![/QUOTE]
     
  16. westingtyler

    westingtyler

    Joined:
    Dec 7, 2013
    Posts:
    34
    Your responses and thoughtful consideration of new ideas is great! As always, I am excited about its further developments. I have another question, and I am sure this one is a no-brainer I have missed about assigning something to something: sip2 dia space.PNG What are the possible simple reasons why the text shows up at the top of the screen instead of inside the text box? I feel it could be that I am mixing a text input thing with a dialogue thing. I can't quite wrap my head around where the UI Dialogue and Text Input components should be placed, like: on the main canvas, on the speech box graphic, on its child speech text box? Is there a danger of having a UI text field script AND a dialogue script on the object?

    I am also getting the error: "No Dialogue UI found on 'SF Unity UI Dialogue UI'" and I am not sure which field on the script is having a problem, since they all look filled out.

    One more thing: When I move from node to node in my dialogue system, the Dialogue Box graphics flicker off for a second then back on. Like, the last node is turning off the graphics, then the next node is turning them back on. What is the best way to tell the system "just keep this menu visible between transitions?"

    Also, when I duplicate a node that has no Description line, an empty Description line appears in the duplicated node. Why? I can delete that field from the templates page, but is there a way to delete that field from the actual node since I don't need it?

    Sometimes when I make changes to a conversation then press play, it deletes my recent work and reverts the conversation to an earlier time. Even when I save before hitting play this happens, and it is very frustrating to lose several minutes of work for no reason. Why would the conversation revert to an earlier state?

    Anyway, thanks again for all your hard work!

    Update: Yeah, now this randomly happens or doesn't, which means I am afraid to play my changes. Every time I make the change, to delete an unnecessary node, it says, "Cannot undo this." But it should say, "You can't undo this, but don't worry, because when you press play, we'll undo it for you." It is driving me cray cray. Any idea what could be causing this?
     
    Last edited: Jun 10, 2015
  17. westingtyler

    westingtyler

    Joined:
    Dec 7, 2013
    Posts:
    34
    Is there a method of checking, in a condition, whether a string variable contains a sub-string? For instance, when you talk to an NPC and ask about "dragon" I want to give the same response if you ask about "dragons." I want the node condition to check if the string CONTAINS 'dragon'. This way it doesn't have to be precise to get the desired result, and you can type "let's talk about dragons", and it will recognize the contained "dragon." Is this a doable thing?
     
  18. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @westingtyler - These are related. Since the Dialogue System isn't finding the dialogue UI, it's loading and using the default dialogue UI. The text at the top of the screen is from the default dialogue UI, not your custom dialogue UI.

    Make sure your 'SF Unity UI Dialogue UI' GameObject is active and the UnityUIDialogueUI component is enabled. You can deactivate all of the child panels such as Alert Panel, Dialogue Panel, etc., to hide them. The UnityUIDialogueUI component will reactivate them as needed.

    The Dialogue System is UI-independent and allows you to use any dialogue UI script that implements the IDialogueUI C# interface. The Unity editor doesn't support assigning C# interfaces in the inspector, so you have to assign the GameObject instead. The Dialogue System then uses a variant of GetComponent() to find a component that implements IDialogueUI, but it can only find enabled components.

    The upcoming release improves the warning message. It now says, "No Dialogue UI found on 'SF Unity UI Dialogue UI'. Is the GameObject active and the dialogue UI script enabled?"

    Unassign it from the NPC Subtitle Panel, PC Subtitle Panel, and NPC Subtitle Reminder Panel fields. If you do this, the UnityUIDialogueUI component won't touch it. In this case, as long as it's a child GameObject of the Dialogue Panel, it will appear whenever the Dialogue Panel is active. (The Dialogue Panel goes active when the conversation starts and stays active until the conversation ends.)

    Can you inspect a node, expand the All Fields foldout, and click the "-" button to the right of the Description field?

    That's not good. What version of Unity, Dialogue System, and operating system are you using? I'll give this high priority, since it sounds like a bug.

    Another complicated answer with some simple solutions: The complete Lua function library includes string.find(), which finds sub-strings. Unfortunately, the Dialogue System's default Lua implementation, LuaInterpreter, is very lean and doesn't implement the complete library.

    If you're using Unity 5, import Third Party Support/NLua Unity 5 Support. This switches the Dialogue System to NLua, which implements the complete library. Since it's native C++, it also runs faster than LuaInterpreter if you're running large amounts of Lua code. If you're just checking a few conditions (which is the typical case in the Dialogue System), you won't notice any speed difference.

    If you're using Unity 4 Pro, import Third Party Support/NLua Support.

    If you're using Unity 4 Free, you can't use NLua. You can either write your own string.find() and put it in your dialogue database's Global User Script, or register a C# method that finds sub-strings.
     
  19. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    @westingtyler - I wasn't able to reproduce the issue you described, but I just posted a patch that manually sets the dialogue database dirty before switching to playmode. This may resolve the issue. If not, please let me know which versions you're using and what changes seem to make this happen. I also added the var=varName and clear options to TextInput(). Other pending requests will be added in the final 1.5.2 release version. Please PM me or email tony (at) pixelcrushers.com if you'd like access to the patch.


    ------------------------------------

    Dialogue System 1.5.1 Patch 2015-06-09 Available

    A new patch is available on the Pixel Crushers customer download site. PM me your Asset Store invoice number if you need access. This patch contains:
    • Improved: Dialogue Editor sets database dirty before entering playmode.
    • Improved: TextInput() sequencer command now handles var=varName for labels, optional “clear” keyword to clear text field.
    • Changed: Unity UI Text Field UI auto-focuses when used.
    • (Was also in patch 2015-06-07) Added: Trigger options OnTriggerEnter, OnDisable, OnDestroy to Bark Trigger, Conversation Trigger, Lua Trigger, etc.
    • (Was also in patch 2015-06-07) Added: Extra Databases component.
    • (Was also in patch 2015-06-07) Improved: Condition Observer can now also run a sequence when triggered.
    • (Was also in patch 2015-06-07) Improved: More error handling and info messages in NPC Setup Wizard.
    • (Was also in patch 2015-06-07) Improved: Added option in SetPortrait() to specify “pic=varName”.
    • (Was also in patch 2015-06-07) Adventure Creator: Fixed bridge sync bug when inventory had empty slots that still had id numbers.
    • (Was also in patch 2015-06-01) Changed: Camera() sequencer command now uses Lerp instead of Slerp to move.
    • (Was also in patch 2015-06-01) Improved: Unity GUI and Unity UI QuestTrackers now have options to show description instead of name and to show completed entry text.
    • (Was also in patch 2015-06-01) Unity UI: Added Wheel2 dialogue UI prefab; added UnityUIColorText component to change button text color when hovered.
    • (Was also in patch 2015-06-01) articy:draft: Properties and features on dialogues are now converted.
     
  20. westingtyler

    westingtyler

    Joined:
    Dec 7, 2013
    Posts:
    34
    NODES REVERTING UPON PLAY: I have not updated to the patch yet, but I will when I can. I can't find what version I am using because I can't find an About button for the Dialogue System. if there isn't one of those, it would be helpful. I looked in the Window > Dialogue System > area. My database says 1.5.1.0. I am using Windows 7 64 bit. Unity version is 5.0.1f1 personal. I notice that as long as I manually enter a conversation node in the conversation editor and type in some info into one of the fields, even if is is just a space, then it generally "saves" my node arrangements and such when i press play. But if I just add a node and add links, it almost always deletes it when i press play.

    CONTINUE BUTTON 'ALWAYS' USE MAKES EVERYTHING INVISIBLE:
    Now I have a weird situation where I type into my password input and press enter, and the node never advances to the possible responses, but the UI goes invisible/inactive when I hit enter after typing the word, though the camera remains locked onto the conversant. What are the possible reasons for this? I noticed it after adding a continue button to the Dialogue UI. But now deleting the reference to that button only causes the error "input button Continue is not setup," so I have to add back the continue buttons. So, for some reason pressing enter in an input window just deactivates the visible UI now. I traced the whole thing back to the setting of "Always" for the Continue Button in the UI. As soon as I set it back to "Never" my dialogue tree works normally again, but the tutorial told me I needed to set it to "Always," so I am not sure which is right. Remember, my goal is to allow you to hit a button to make the typewriter effect finish instantly during a convo. I finished the continue button tutorial, but my continue button does nothing, and I fear it is because I had to set the "Always" button back to "Never" for everything else to work right. I am also getting an error saying "input Button Continue is not setup, and to change use edit > project settings > input." but I don't think the tutorial mentioned anything about this.Here is my setup: continue button issue.PNG


    DIALOGUE TEXT STILL AT TOP OF SCREEN INSTEAD OF INSIDE BOX: I deleted the prefabs from the project when I constructed my own, and am no longer getting the error that I had about the SF Dialogue thing, but I still have the problem with my dialogue text showing up at the top of the screen. Here is a picture of all the assignments I have made. The Dialogue TXT Object is physically inside the dialogue frame, but I can't wrap my head around which place it needs to be assigned to. I assigned it to both the NPC subtitle and the PC subtitle lines, but I always get the default one at the top of the screen. dia which one.PNG

    GUI FLICKER BETWEEN CONVO NODES: I did what you said by unassigning my Dialogue Frame GFX from the subtitle panels to prevent the disable flicker of the gui between conversation nodes, but nothing has changed, and I can still see that all of my graphics that are the child of the NPC Convo UI disable for a second, then re-enable them after a second. Using the image I sent, can you tell if I am assigning things incorrectly? Remember that I mashed a regular dialogue panel together with the password panel to create this, so maybe I am doing something wrong.

    UI DISABLING ITSELF AND CHILD OBJECTS: I am also wondering, why does the UI automatically disable itself upon the game starting, and where do I set that option? And weirdly, even when it enables itself for the dialogue screen, the Continue button stays disabled for some reason, but I can't find anything anywhere that would specifically disable just that child object, which is enabled in the editor.
     
    Last edited: Jun 11, 2015
  21. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @westingtyler - The version is in Dialogue System/_README.txt. I just added a menu item Window > Dialogue System > Help > About. It'll be available in the next version. Version 1.5.1 (the latest on the Asset Store) contains a change in the Dialogue Editor code to keep the current conversation selected when switching in and out of playmode. A patch available on the Pixel Crushers customer download site also explicitly saves the database when switching. PM or email me if you'd like access.

    (BTW, the version in the dialogue database is the Chat Mapper data model version. You can change this if you want to repurpose the Version field. It just starts with the data model version by default. I'll add a clarifying tooltip in the next release.)

    I think it all boils down to combining the password panel (Unity UI Text Field UI) and the dialogue panel. The Unity UI Dialogue UI deactivates panels that it's not currently using. When you press Enter, it closes the Unity UI Text Field UI panel. Can you make them separate panels?

    In general, it may help to watch the conversation in the Dialogue Editor. The current node will be highlighted in green, with valid links in green and invalid links in red. You can also temporarily set the Dialogue Manager's Debug Level to Info. This will add a lot of info to the Console view, which you can trace through to get an idea of what's going on under the hood.

    As an aside, it occurred to me that binding the continue button to the Spacebar key might cause an issue. If the player enters a two-word command that contains a space, the continue There's a fairly easy workaround by using a sequence command to temporarily disable the continue button; it doesn't require any code changes. But let's resolve the other issues you reported first.

    Does your UI even have a Text element for that default line at the top? When you play the scene, is there still a console warning that it can't find your dialogue UI? I don't think the Dialogue Manager is loading the default UI because you say that the other elements of your UI are being used, but the line at the top is consistent with loading the default UI.

    The logic can be a bit strange at first because the provided Unity UI dialogue UI implementation sacrifices some ease of use in order to be flexible for all the different purposes developers put it to. When showing content, it activates the corresponding panel's GameObject and any assigned children such as line, portrait name, portrait image, etc. When it's done showing content, it deactivates them.

    This is what happens when a conversation shows two NPC nodes in a row, then a response menu:
    1. (Start conversation): Activate Dialogue Panel. Deactivate NPC Subtitle, PC Subtitle, and Response Menu elements (including children).
    2. (Show first node): Activate NPC Subtitle. Set element values with data from first node.
    3. (Done showing first node): Deactivate NPC Subtitle.
    4. (Show second node): Activate NPC Subtitle. Set element values with data from second node.
    5. (Done showing second node): Deactivate NPC Subtitle.
    6. (Show response menu):
      • Activate Response Menu. Populate response menu buttons.
      • Activate NPC Subtitle Reminder. Set element values with data from second node.
    7. (Player selected response): Deactivate Response Menu and NPC Subtitle Reminder.
    The description above assumes the corresponding checkboxes in Dialogue Manager > Display Settings are ticked. If Show NPC Subtitles With Responses is unticked, for example, it won't activate NPC Subtitle Reminder when showing the response menu.

    I hope that sheds some light on what might be going on with your UI. As you work through the logic of your UI, keep in mind that you can leave some panel fields unassigned in the Unity UI Dialogue UI; this will prevent the UI from trying to activate and deactivate them.

    Ah, that's another clue. When Unity UI Dialogue UI starts, it disables the Dialogue Panel, which it assumes is a child GameObject. If the Unity UI Dialogue UI and Dialogue Panel are the same GameObject, it will disable itself, which will cause problems. If this is the case in your UI, can you separate them?

    Please also feel free to email me an example project or an export of your UI and a test dialogue database. I'll be happy to take a look!
     
  22. westingtyler

    westingtyler

    Joined:
    Dec 7, 2013
    Posts:
    34
    Thanks for the quick and thorough response. I bet the way I have them setup is a big clue, so I will look into it using the steps you have provided. Thanks again for all your hard work and for continually adding new features to the system!
     
  23. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Happy to help! Sorry about the frustrations with the UI stuff. We'll get there! :) I appreciate you explaining what's going on so thoroughly. I'll use it as feedback to add more informative logging and configuration checks to the Unity UI Dialogue UI stuff in the next release.
     
  24. westingtyler

    westingtyler

    Joined:
    Dec 7, 2013
    Posts:
    34
    Very cool. One new weird thing: I've been working with playmaker again today for the first time since getting the Dialogue System, and ever since I mentioned how the dialogue conversation editor would reset itself and delete recent work upon pressing play, now playmaker is doing the same thing when it never did before. What do you think that is all about? Do you think the Dialogue System could have caused it, or does this indicate it is something wrong with my unity installation suddenly? In case it helps, I noticed it when I changed the object type property of an Object variable in a a playmaker FSM. I changed it from UnityEngine.UI.InputField to UnityEngine.UI.Text, and when I pressed play it reverted to the InputField one. Then, one time in the middle of it playing, I changed it again to the Text one, and when I turned OFF play mode, it kept the Text setting even though playmaker never ever saves things during play mode. And clicking the inspector check box below the variable did NOT cause it to show up in the inspector in the FSM. But as soon as I defocused the variables tab and went back to it, it had reverted again to the InputField object type. Any clues what the source of this might be since it seems to affect BOTH the Dialogue System and Playmaker now?
     
    Last edited: Jun 11, 2015
  25. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    The Dialogue System only provides some PlayMaker action scripts; it doesn't change PlayMaker's internal behavior. It sounds like the root cause might be something else. Did you recently install any editor plugins or any Unity patches?
     
  26. westingtyler

    westingtyler

    Joined:
    Dec 7, 2013
    Posts:
    34
    I don't THINK I have installed anything recently, but I will have to think about it. Thanks, I will look into it. Here's another cray cray idea: would it be possible to trigger a Playmaker FSM from a conversation? As in, after a conversation node, it triggers a ping pong game?
     
  27. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Sure, that's no problem. Just use the FSMEvent() sequencer command. This sends an event to an FSM. Your FSM can handle that event by starting a ping pong game.
     
  28. Riff-Rex

    Riff-Rex

    Joined:
    Mar 14, 2014
    Posts:
    19
    Forgive me if I overlooked something simple here, but how does one make the player character's lines of dialogue non-interactable/not selectable. I'd just like all dialogue to automatically play and end like an NPC's does, like both characters are having a conversation that the player has no control over (non interactive, no input required, no branches to select). By the way, I'm using the built-in dialogue editor and assigning sequences per each line.

    Thank you! This is an amazing tool you've created! \m/
     
  29. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @Riff Rex - If the player only has one valid line at each point in the conversation, untick Always Force Response Menu on the Dialogue Manager's Input Settings:


    You can add an Override Display Settings component to your NPC if you only want this behavior for a specific NPC.

    If you want the participants to run through the conversation using their bark UIs instead of the regular dialogue UI, you can add a Bark Dialogue UI. The Bark Dialogue UI auto-selects the first valid PC line if the PC has more than one option.
     
  30. Riff-Rex

    Riff-Rex

    Joined:
    Mar 14, 2014
    Posts:
    19
    Thank you!
     
  31. TopThreat

    TopThreat

    Joined:
    Aug 7, 2012
    Posts:
    136
    Wow I did not know about Override Display Settings!!! I came here to ask about one problem I am having and you solved a different one I did not even know I COULD solve LOL!

    Question: In my current project I am using Dialog system and RFPS. Whenever I end a conversation the screen does a little dip and makes the change weapon sound. Is there some setting that I missed that would stop doing that every time the fps player is reactivated?

    I realize this is probably more of a RFPS problem than Dialog but it is very annoying and I just cant find the solution and do not want to go in and change a bunch of code if there is an easy fix like checking a box or something.

    Thanks!

    Lee
     
  32. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi Lee - In the example scene, the player's Selector is mapped to the 'E' key. RFPS also maps 'E' to lean right. This causes a slight bob when using the Selector to engage in conversations. It's probably something similar in your project. If that's the case, you can resolve it by changing the input settings so keys don't map to multiple actions.

    If it's not the case, let me know. I'll be happy to look into it. Please let me know which versions of Unity and RFPS you're using, and any other details that might be relevant. Also feel free to send an example project or video to tony (at) pixelcrushers.com.
     
  33. Tony707

    Tony707

    Joined:
    Jun 15, 2015
    Posts:
    38
    Hi,

    I'm currently trying to figure out what's the best way to retreive a custom conversation field value from script once a conversation has started.

    I've found the following way:
    var title = DialogueManager.LastConversationStarted;
    var conv = DialogueManager.MasterDatabase.GetConversation(title);
    var value = conv.LookupValue("MyVal");

    But this doesn't seem to be the best way to do it.

    Can someone tell me is there is a better solution to get the current conversation on a OnConversationStart event ?

    Thank you !
     
  34. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @Tony707 - That's the right way.
     
  35. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Dialogue System for Unity v1.5.2 Released!

    The Dialogue System v1.5.2 is now available on the Pixel Crushers customer download site (PM me your Asset Store invoice number if you'd like access) and should be available on the Unity Asset Store in a few days!

    Version 1.5.2
    Core:

    • Added: Extra Databases component to automatically load/unload extra dialogue databases.
    • Added: Additional trigger events OnTriggerExit, OnDisable, OnDestroy.
    • Improved: Bark Trigger & Conversation Trigger inspectors now highlight if not using Dialogue Manager's Initial Database.
    • Improved: TextInput() sequencer command now accepts variables for labels, 'clear' keyword.
    • Improved: More error handling and info messages in NPC Setup Wizard.
    • Improved: Condition Observer can now also run a sequence when triggered.
    • Improved: SetPortrait() now handles "pic=varName".
    • Improved: Legacy and Unity UI QuestTrackers now have option to show description instead of name and completed entry text.
    • Changed: Camera() sequencer command now uses Lerp instead of Slerp to move.
    • Unity UI:
      • Added Computer & Wheel2 dialogue UI prefabs.
      • Added UnityUIColorText component.
      • Added On Accept & On Cancel events to Text Field UI; Unity UI Text Field UI now auto-focuses.
      • Added input loop example.
    Third Party Support:
    • Adventure Creator: Updated for AC 1.46; fixed bridge sync bug when inventory had empty slots that still had id numbers.
    • articy:draft: Properties & features on dialogues are now converted.
    • HUD Waypoint: Added persistent data component; added ability to load waypoint textures from asset bundles.

    (@westingtyler - I tested a scene (not included) based on the input loop example that uses Unity UI Text Field UI's On Accept event to invoke the continue button's OnFastForward method. I believe this is what you were looking to do in your project.)
     
  36. Tony707

    Tony707

    Joined:
    Jun 15, 2015
    Posts:
    38
    Hi,

    Thank's for your previous answer.
    I have one more question:

    Is there a way to use the Localized text table with dialogue entries (and typewriter effect) ?

    I've put a LocalizeUIText on my text component, but since i'm also
    using a typewriter effect the localized field lookup isn't working.

    Thank you.
     
    TopThreat likes this.
  37. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @Tony707 - If you haven't already read the Localization page, you may find it helpful.

    You can localize in two places:
    1. In your dialogue database (conversations, barks, quests, etc.), create localizable fields. These fields will use names like "es" for Spanish, "ru" for Russian, etc. You can add them to the database template to apply them to all dialogue entries:

      The Dialogue System will automatically look up the appropriate localized field and set the NPC Subtitle Line, etc., to the localized value. It will automatically work with the typewriter effect.

    2. In other places (such as gameplay GUIs and menus), use localized text tables. Don't use localized text tables or LocalizeUIText for UI elements that receive their content from the dialogue database.

    If you want to build a release for a specific language, set the language in the Dialogue Manager's Localization Settings section. Otherwise, if you want a single build in which the player can switch between languages, you can set the property Localization.Language. (See How to Switch Languages at the bottom of the localization page.)
     
  38. Tony707

    Tony707

    Joined:
    Jun 15, 2015
    Posts:
    38
    Hi @TonyLi ,

    Yes i've read the Localization page about the templates, thank's.

    In fact we wereinterested by the localized table for conversations because it is easier to export/import with csv.
    Dialogue entries exports are quite noisy if we want to make them translated by a company for example.

    But if it works that way, no problem we gonna deal with it :)

    Thank you.
     
  39. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    I know what you mean about dialogue database exports. In the next release, I plan to add an additional import/export feature specifically for translators.

    In the meantime, if you have Chat Mapper you can import the dialogue database into Chat Mapper and then export an Excel file from there. This requires extra steps for you, but it may be easier for the translators.
     
  40. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    I just want to know if this system can be used in some way together with the asset from the store where Users can make their own level with and i hoped that they then can use this asset also to place some informations inside the levels or an npc who will inform the player what he can or should do in this level.
     
  41. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @RandAlThor - Yes, since the Dialogue System uses Lua under the hood, you can give users an entire scripting language to control their levels if you want to. You can also set and use variables in conversations. For example, the user can create a special room and put an NPC in it. You can let them drop in a generic conversation with lines like "Welcome to the [var=roomName]. Here, you can [var=activity]." I'd be very happy to discuss your ideas. Please feel free to post here or email me at tony (at) pixelcrushers.com!
     
  42. Tony707

    Tony707

    Joined:
    Jun 15, 2015
    Posts:
    38
    Hi again :),

    In case I manually callDialogueManager.StopConversation() from script, the current conversation is indeed cancelled.
    But let's say I have a required sequence command to be played at the end of the current dialogue entry,
    it is not trigerred if the conversation is cancelled.

    In practice I trigger a starttalk animation a the beginning but the required trigger stoptalk isn't.

    Is there a way to provide some sequence commands to play in case the conversation is cancelled ?
    Or whatever solution you may have :)

    Thank you.
     
  43. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @Tony707 - You can add an OnConversationEnd or OnConversationCancelled method. OnConversationEnd is always called, whether the conversation is cancelled or ends normally. OnConversationCancelled is only called if the conversation is cancelled. Say you put this script on the NPC:
    Code (csharp):
    1. public string endSequence;
    2.  
    3. public void OnConversationEnd(Transform actor) {
    4.     DialogueManager.PlaySequence(endSequence, actor, this.transform);
    5. }
    When the conversation ends, it will play the sequence that you've entered into endSequence.

    If you want to record the sequence in the dialogue database's conversation, you could add a custom field to the conversation -- for example, called EndSequence. Then do this:
    Code (csharp):
    1. public void OnConversationEnd(Transform actor) {
    2.     var conversation = DialogueManager.MasterDatabase.GetConversation(DialogueManager.LastConversationStarted);
    3.     var endSequence = conversation.Lookup("EndSequence");
    4.     DialogueManager.PlaySequence(endSequence, actor, this.transform);
    5. }
    As a side tip, OnConversationCancelled is useful to know when a conversation was cancelled instead of ending normally. Some games keep track of how often the player cancels a conversation, and the NPC starts to get upset if you've "interrupted" it too often.
     
  44. Tony707

    Tony707

    Joined:
    Jun 15, 2015
    Posts:
    38
    Thank you that's perfect :) !
     
  45. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
  46. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
  47. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    The Dialogue System Extras page has an updated support package for Azuline Studios' Realistic FPS Prefab. It includes a new Persistent SmoothMouseLook component that you can add to FPS Camera to record the player's rotation in saved games. (Component > Dialogue System > Third Party > Realistic FPS Prefab > Persistent SmoothMouseLook)
     
  48. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Congratulations to The Game Kitchen! Their game series, The Last Door (which uses the Dialogue System), is included in PC Gamer magazine's "40 Classic Horror Games" feature. PC Gamer glows: "...inspired by Lovecraft, but with a style all of its own... with the Victorian setting offering puzzles as unusual as they are compelling."



    Porting to the Dialogue System:

     
  49. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Creashock Studios' Shadows Peak and Gynophobia have been added to the Dialogue System's Games Showcase page!



     
  50. NioFox

    NioFox

    Joined:
    Dec 28, 2012
    Posts:
    65
    Is there a way to disable response buttons rather than hide them if they fail a condition check?
    In my case, I want the player to be aware of dialogue options that they can't use (due to stat checks)
    I'm using a UnityUIDialogueUI