Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    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. SupremeSmash

    SupremeSmash

    Joined:
    Nov 30, 2018
    Posts:
    28
    Couldn't find the right place to post this question sorry.

    I have both Dialogue system and Quest Machine and I have integrated Dialogue system and Corgi engine into my project. I am looking to create quests and I know Dialogue system has a Quest system. Are there any major benefits using one over the other or can I use both
     
  2. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,111
    Hi @SupremeSmash - Here's a comparison chart: Dialogue System / Quest Machine Feature Comparison

    Benefits of Quest Machine are:
    • Node-based editor for quests (vs. Dialogue System's field-based editor)
    • Can procedurally generate new quests at runtime
    • It's a little easier to manage quests outside of conversations with Quest Machine (e.g., automatically advance a quest when the player collects X items or kills X targets) but it's still perfectly doable in the Dialogue System
    The tradeoff is that it's another asset to learn. If your game will have dialogue trees, then you should use the Dialogue System. For quests, I recommend using one or the other's quest system but not both at the same time. It's up to you whether you use the Dialogue System or Quest Machine for quests.
     
    SupremeSmash likes this.
  3. SupremeSmash

    SupremeSmash

    Joined:
    Nov 30, 2018
    Posts:
    28
    Thanks @TonyLi this is very helpful. I will have a play around with Quest Machine for the quests
     
    TonyLi likes this.
  4. jamesccc

    jamesccc

    Joined:
    Nov 17, 2012
    Posts:
    5
    Thank you !
     
    TonyLi likes this.
  5. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,111
    3 Days Left to Back Space Cats Tactics on Kickstarter

    If you like tactics games or cats in mech suits, check out the Kickstarter for Space Cats Tactics, made with the Dialogue System for Unity. They're almost at their funding goal. Your backing could get the game funded.

     
  6. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,111
    Disco Elysium TV Series in the Works

    Congrats to Studio ZA/UM! Last year's Game of the Year, Disco Elysium, made with the Dialogue System for Unity, is getting a TV adaptation!



    Source: Variety
     
  7. Grimir

    Grimir

    Joined:
    Sep 5, 2017
    Posts:
    18
    Hi @TonyLi. Is there a way to perfectly line both numbers and texts in the response menu when using autonumber? The font I use has different width for number 1. so text in first response starts a little on the left side compared to the rest. My response menu is more or less like in Disco Elysium.
     
  8. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,111
    Hi @Grimir - Use TextMesh Pro (see TextMesh Pro Support) and \t for a tab character:

    upload_2020-6-30_10-39-50.png

    You can set the length of tab stops in the TextMesh Pro font asset.
     
  9. Grimir

    Grimir

    Joined:
    Sep 5, 2017
    Posts:
    18
    Ok, thanks. That will work. I just noticed that \t, \n etc. are not parsed when I use them in dialogues. I have them enabled in tmp components. I guess I have some option unticked but I have a hard time finding it.
     
    Last edited: Jun 30, 2020
  10. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,111
    Inspect the TextMeshProUGUI component and make sure Extra Settings > Rich Text is ticked.
     
  11. Grimir

    Grimir

    Joined:
    Sep 5, 2017
    Posts:
    18
    It is ticked. Parse Escape Characters is also ticked. Tags like <b> </b> works just fine. Only tags like \n or \t are not.
     
  12. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,111
    Hmm, if it were only \t, I'd suggest looking at the tab settings on the font asset.

    But if \n isn't working, and if Parse Escape Codes is ticked, then it's probably something else. Are you writing content in the Dialogue Editor or an external editor such as articy:draft?
     
  13. Grimir

    Grimir

    Joined:
    Sep 5, 2017
    Posts:
    18
    I tried writing them in Autonumber -> Format as you suggested. I also tried to write \n inside dialogue entry's dialogue text. When I write \t or \n in TextMeshProUGUI component in editor it is successfully parsed. They stop working during runtime.
     
  14. Grimir

    Grimir

    Joined:
    Sep 5, 2017
    Posts:
    18
    If I manually untick/tick Rich Text during playtesting, \t and \n start to work. But only for the entry I changed. After that, it will be displayed as \t and not a tab.
     
  15. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,111
    It appears that Unity does some funny things with serialization in this case. The immediate solution is to use an actual tab character, so your Format string will look like this in the inspector:

    upload_2020-6-30_14-11-15.png

    The gap between "{0}." and {1} is a single tab character.

    I'll look into handling escape codes such as "\t" in the Format field in the next release.
     
  16. Grimir

    Grimir

    Joined:
    Sep 5, 2017
    Posts:
    18
    Oh, ok. I will probably wait for an update then since I'm not in the hurry and it's only visual tweak.
    Once again, thanks for the help!
     
  17. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,111
    Sounds good. It does work fine right now if you add an actual tab. The update will just allow you to enter \t as a tab character.
     
  18. jlhacode

    jlhacode

    Joined:
    Feb 20, 2020
    Posts:
    13
    Is there any way to use a Text Table field for the Dialogue Text of a Dialogue Entry in a conversation?
     
  19. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,111
    Hi @jlhacode - Not by default. Dialogue databases have their own built-in localization with full editor integration (more info).

    However, if for some reason you don't want to use it, you can use i2 Localization, or you can use a Text Table with an OnConversationLine method on the Dialogue Manager. Example:
    Code (csharp):
    1. void OnConversationLine(Subtitle subtitle)
    2. { // Use the default text table assigned to the Dialogue Manager:
    3.     subtitle.formattedText.text = DialogueManager.GetLocalizedText(subtitle.formattedText.text);
    4. }
     
  20. DREBOTgamestudio

    DREBOTgamestudio

    Joined:
    Jan 30, 2018
    Posts:
    43
    Hello, i have some problems with items. I change item field.
    Code (CSharp):
    1. DialogueLua.SetItemField("Test1", "Found", true);
    but i have a different result: true and false.
    Code (CSharp):
    1. Debug.Log(DialogueLua.GetItemField("Test1", "Found").asBool);
    2. Debug.Log(DialogueManager.databaseManager.masterDatabase.GetItem("Test1").LookupBool("Found").ToString());
    Why does the second result display false? How do I get the right information on all items? DialogueManager.masterDatabase.items display false too.
     
  21. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,111
    Hi @DREBOTgamestudio - At runtime, all runtime changes are stored in the Dialogue System's Lua environment, which you can access using DialogueLua (the first line in your code). The dialogue database remains static at runtime (the second line in your code). That's why the DialogueLua call returns the current runtime value, whereas the DialogueDatabase.GetItem() call returns the original design-time value.
     
    Last edited: Jul 3, 2020
    DREBOTgamestudio likes this.
  22. ch715t0

    ch715t0

    Joined:
    Jan 11, 2016
    Posts:
    3
    Hey, I'm using this asset with UFPS, and prior to using, I had no issues with cursor lock, but now after import and setup, cursor is hidden behind the game window, but not actually locked. It appears to be a conflict but I can't isolate where the issue is coming from. Any ideas? Cheers
     
  23. Mythran

    Mythran

    Joined:
    Feb 26, 2013
    Posts:
    58
    Hello, i would like to know if this asset allows for the following out-of-the-box:

    NPC starts dialogue with character (without any input, triggered by finishing a quest)
    NPC speaks with each other (Text boxes (i believe barks))

    Thanks
     
  24. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,111
    Hi @ch715t0 - Did you follow the integration instructions? You can also tell the Dialogue System to keep its hands entirely off the cursor by inspecting the Dialogue Manager GameObject and unticking the Input Device Manager's Control Cursor State checkbox.

    Hi @Mythran - Yes to both. :)
     
    ch715t0 likes this.
  25. ch715t0

    ch715t0

    Joined:
    Jan 11, 2016
    Posts:
    3
    I replied on the Opsive discord, but basically: I deactivated the Input Device Manager, and it worked without needing the integration, but I will look into using the integration now as I'm assuming it makes more than the mouse play nice ;). Thanks for the help
     
    TonyLi likes this.
  26. MrZeker

    MrZeker

    Joined:
    Nov 23, 2018
    Posts:
    175
    Hello, i have this error popping out of nowhere.


    i havent changed anything nor used the asset in the last 30 days.
     
  27. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,111
    The Unity editor may be having an issue. Try selecting the Dialogue Editor window (if it's open) and pressing Alt+F4 to close it. Then you should be able to re-open it without any issues. Or select Layout > some built-in layout such as Default.

    If that doesn't clear it up, what versions of Unity and the Dialogue System are you using? And on what OS?
     
  28. SamRock

    SamRock

    Joined:
    Sep 5, 2017
    Posts:
    212
    @TonyLi
    I am back after long time! Hope you and your loved ones doing well during these tough times.

    I just noticed that the "CinemachineCameraPriorityOnDialogueEvent" script is not allowing me to assign a Cinemachine Cam anymore. I have Cinemachine installed. Project is on 2019.3.1
    I installed the latest update as well
    Any idea what could be wrong?

    EDIT: I saw the Console message that I need to enable Cinemachine on the Welcome screen. Didnt know it gets reset. Now its all good thank you! :)
     
    Last edited: Jul 11, 2020
    TonyLi likes this.
  29. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,111
    Dialogue System 2.2.8 Released!

    Version 2.2.8 is now available on the Asset Store!

    This update adds a star icon to indicate that a node has a scene-based UnityEvent:

    upload_2020-7-13_14-54-14.png

    And it also adds screenplay-style export:

    upload_2020-7-13_14-52-15.png

    And several other improvements, bug fixes, and integration updates. (Lots of improvements for Ink integration.)


    Release Notes:

    Core:
    • Added: Screenplay export.
    • Added: Node icon for OnExecute() events.
    • Improved: Sequences can now have comments (//).
    • Improved: DialogueSystemTrigger Cache Bark Lines now caches lines on start.
    • Improved: StandardUIMenuPanel.Autonumber > Format now accepts \t and \n escape codes.
    • Improved: TypewriterUtility.GetTypewriter() now works with any AbstractTypewriterEffect.
    • Improved: Updated Cinemachine & Timeline sequencer commands for changes to recent versions of Cinemachine & Timeline.
    • Improved: UILocalizationManager has option to not use PlayerPrefs.
    • Fixed: UILocalizationManager no longer creates a duplicate copy on Dialogue Manager.
    • Fixed: Current node wouldn't appear in green during play if Time.timeScale was zero.
    • Fixed: UIButtonKeyTrigger feature to visually simulate button click would not work if time was paused.
    • Fixed: If on Actors, Items, or Locations tab when switching to play mode, Inspector would show last Dialogue Editor selection even if Dialogue Editor window didn't have focus.
    • Save System: Changed: DialogueSystemSaver: Added Skip Apply Data If Applied Immediate checkbox (ticked by default) to avoid double apply.
    Third Party Support:
    • Adventure Creator: Updated for 1.71.4.
    • Behavior Designer: Added ability to operate on behavior trees with a specific group ID.
    • Corgi: Updated for 6.5. Adds ConversationZone.DisallowMovement/UndoDisallowMovement methods. DialogueSystemCorgiEventListener manages handoff between dialogue UI and Corgi pause menu.
      • Ink:
      • Added option to read actor name from front of lines.
      • Added option to trim whitespace.
      • Included files now shown in knot/stitch picker dropdown; added [InkEntrypoint] script variable attribute.
      • Added DialogueSystemInkIntegration.lastStartingPoint.
      • Streamlined integration by removing need for Override dropdown and PlayerSpeakerActor; uses real player actor.
      • Added GetActorsInStory().
      • Fixed transform assignments to Sequence() functions.
    • PlayMaker: Added Get All Lua Elements action; PlayMakerGlobalVariableSaver can now save arrays.
    • TopDown Engine: Updated 2D example scene with item fetch quest.
    • uRPG: Updated for 1.25.
     
    SamRock likes this.
  30. SamRock

    SamRock

    Joined:
    Sep 5, 2017
    Posts:
    212
    Another awesome update! Thank you @TonyLi

    I had a query on Cinemachine again. I am using "CinemachineCameraPriorityOnDialogueEvent" script on my NPC to trigger VirtualCamera to look at them. And it works greatly!
    But in few conversations I have scenarios where the NPC points towards an object in the scene, like a Door or a Key. How do I make the Vcam shift in middle of a conversation? I tried adding these objects are actors and assigning them "CinemachineCameraPriorityOnDialogueEvent" script but it didnt work. Also tried sequencer "CinemachineTarget" during the dialogue. Didnt work either.

    Could you please advice how I can achieve this?
     
  31. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,111
    Hi @SamRock - Set up a vcam that points at the object. Use the CinemachinePriority() sequencer command to temporarily give that vcam the highest priority. When you're done pointing the camera at the object, use CinemachinePriority() again to set the priority back down.
     
    SamRock likes this.
  32. SamRock

    SamRock

    Joined:
    Sep 5, 2017
    Posts:
    212
    This works perfectly fine! Thank you.. I was trying to achieve it by assigning Cinemachine script to the actor objects, This is much simpler.

    Now I ran into another issue, when I add the CinemachinePriority() sequencer to the conversation, the Player text seems to appear before NPC's text completes. Here is a video to show before and after effect of the sequencer. How do I get the default behivour of waiting for NPC text to complete before showing Player's text?

     
  33. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,111
    @SamRock - Include {{default}} in your Sequence to include the default behavior. Example:

    {{default}};
    CinemachinePriority(CM Ramp,,0.2)

    You can type it manually, or you can click "+" > Include Dialogue Manager's Default Sequence to add it automatically.
     
    SamRock likes this.
  34. SupremeSmash

    SupremeSmash

    Joined:
    Nov 30, 2018
    Posts:
    28
    I'm using Dialogue System (awesome asset) with Corgi engine and Inventory Engine and have imported both the Corgi Engine and Inventory Engine support packages. When I enter the conversation area and activate it while still moving I seem to be getting a few glitches.

    • The footsteps sound continue (this sfx has been added using the Corgi Engine MMFeedbacks asset)
    • The Inventory Engine 'move' sound effect plays
    • Using the WASD keys in the conversation also plays the sound
     
    Last edited: Jul 15, 2020
  35. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,111
    Hi @SupremeSmash - Thanks for using the Dialogue System! Try assigning those Feedbacks to a Dialogue System Events component on your player prefab. In the OnConversationStart() event, call StopFeedbacks. In OnConversationEnd(), call PlayFeedbacks(). You might need to do something similar for inventory, but the first thing to check is that the Conversation Zone's Disable Inventory While Talking checkbox is ticked.
     
    SupremeSmash likes this.
  36. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,111
    SamRock likes this.
  37. SupremeSmash

    SupremeSmash

    Joined:
    Nov 30, 2018
    Posts:
    28
    @TonyLi worked perfectly. Thanks
     
    TonyLi likes this.
  38. SamRock

    SamRock

    Joined:
    Sep 5, 2017
    Posts:
    212
    Thank you so much!
     
    TonyLi likes this.
  39. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,111
    Reminder: Dialogue System 90% Off in Power Tools Mega Bundle

    The Dialogue System for Unity -- seen in Game of the Year Disco Elysium, Steam Summer Festival hits Gestalt: Steam & Cinder, The Way of Wrath, and Suzerain, and many, many other games, is 90% off in the Asset Store's Power Tools Mega Bundle.

    If you've been waiting to get the Dialogue System, now is a great opportunity to get it and many other excellent tools at a deep discount.

     
    SamRock likes this.
  40. SamRock

    SamRock

    Joined:
    Sep 5, 2017
    Posts:
    212
    @TonyLi
    Thanks again for all the amazing help and support! :)|

    Here is the final cut. Still got to work on the actual dialogue scripts. You tool is just the best :)
     
  41. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,111
    @SamRock - Great job! Looking good. The underwater cave has nice lighting.
     
  42. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,111
    Dialogue System 90% Off in Power Tools Mega Bundle

    The Dialogue System for Unity -- seen in Game of the Year Disco Elysium, Apple Arcade feature Jenny LeClue, Steam Summer Festival hits Gestalt: Steam & Cinder, The Way of Wrath, and Suzerain, and many, many other games, is still 90% off on the Asset Store while the Power Tools Mega Bundle offer is running.

    If you've been waiting to get the Dialogue System, now is a great opportunity to get it and many other excellent tools at a fantastic discount.

     
    SamRock likes this.
  43. Eggpunk

    Eggpunk

    Joined:
    Nov 2, 2014
    Posts:
    38
    Hi @TonyLi

    Is there documentation with more info on the screenplay-style export, or will there be any details coming? Interested in the feature, but I only saw some code reference in the documents site, and the screen grab you posted in the update announcement.
     
  44. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,111
    Oops, the manual had a bad link. It's actually in a section below Voiceover format. I just fixed the link:

    Screenplay Export

    Note that if your dialogue has a lot of twistybranches, screenplay format will necessarily look a bit strange. But if it's mostly linear, it will look more like a traditional screenplay.
     
  45. Eggpunk

    Eggpunk

    Joined:
    Nov 2, 2014
    Posts:
    38
    Awesome, thanks for the quick fix!
     
  46. Stickeyd

    Stickeyd

    Joined:
    Mar 26, 2017
    Posts:
    113
    I have a super weird bug. I start the same dialogue 3 times, and on the third time the dialogue options disappear and I can't finish the dialogue even though nothing really changed and I don't execute any scripts beyond just running/finishing the conversation. Here is a gif. https://gyazo.com/b7a123642e5a624d6ececdda787ccb22

    Here is the screenshot of this moment with a dialogue window
     
  47. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,111
    Hi @Stickeyd - The screenshot shows that the conversation is active, so it's either an animation issue or a GameObject active issue.

    When you get to this point, pause the game and inspect the dialogue UI.

    Are the proper GameObjects active? (Dialogue panel, subtitle panel, subtitle text, menu panel, and menu buttons)

    If so, check the animator(s) on the panels. Are they in the correct state? If they animate the panels' Canvas Groups, are the Canvas Group > Alpha values correct?

    What version of the Dialogue System are you using?
     
  48. MrZeker

    MrZeker

    Joined:
    Nov 23, 2018
    Posts:
    175
    Excuse me, i tought i had understand how to do this but it seems i didn't
    i can't find how to link different conversations, i can only link different dialogues.
     
  49. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,111
    Hi @MrZeker - Click on a dialogue entry node. At the bottom of the Inspector, from the "Links To:" dropdown select "(Another Conversation)":

    upload_2020-7-23_13-20-17.png

    Then you can choose the other conversation and which dialogue entry node to link to in that conversation:

    upload_2020-7-23_13-20-35.png
     
  50. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,111
    Dialogue System and Unity 2020.1 (Fully Compatible)

    Since some people have asked, I'm just posting a quick note that the Dialogue System is fully compatible with Unity 2020.1, which just released today. It supports all Unity versions 2017.4 - 2020.1.
     
unityunity