Search Unity

  1. 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. TaylorCaudle

    TaylorCaudle

    Joined:
    Feb 8, 2018
    Posts:
    61


    Hey there- there doesn't seem to be an Example scene for invector. Just the standard Demo Scenes. Also there's only one Integration package for invector, I'm not sure if maybe i misread those instructions, but there
    s two you're saying?

    And yeah thats the scene I'm using. I'm getting the first error on a 2.5.2 project, and on a fresh 2.5.3 project i get the bottom errors.

    EDIT: Ahhh i see in the instructions the filepaths are similiar, i got confused. I wasnt importing the second package! Works now!

    Quick question, where would i change the itemID check for the "currency" in that demo scene?
     
    Last edited: Aug 17, 2020
  2. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    Great!

    Inspect the player's vItemManager component and click OPEN ITEM LIST. This will open Invector's ItemList Editor. The example scene uses Invector's default vShooterMelee_ItemListData, so it uses the "KeyCard Red" item (ID 23) as currency.
     
  3. TaylorCaudle

    TaylorCaudle

    Joined:
    Feb 8, 2018
    Posts:
    61

    Perfect, thanks! One last question, is there a version of the integration available for 2.5.2? I spent the last few hours prepping a new fresh project to transfer my assets, if I need transfer nows the time, but I'd like the option at least if possible.

    But no worries if not, updates arent the end of the world!
     
  4. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    I think the current integration should work with Invector 2.5.2. If it doesn't, and if you need to use 2.5.2, let me know and I'll put the older integration on the Dialogue System Extras page.
     
  5. TaylorCaudle

    TaylorCaudle

    Joined:
    Feb 8, 2018
    Posts:
    61

    Yeah it's still giving me that vEquipArea error.
    I think it might be related to an update Invector team made to that script in 2.5.3, I think there's a new method to call the equipped item, thats not present in the 2.5.2 version. But not sure yet,

    Assets\Pixel Crushers\Common\Third Party Support\Invector Support\Scripts\InvectorInventorySaver.cs(84,55): error CS1061: 'vEquipArea' does not contain a definition for 'currentEquippedItem' and no accessible extension method 'currentEquippedItem' accepting a first argument of type 'vEquipArea' could be found (are you missing a using directive or an assembly reference?)
     
  6. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    Here's the integration package for Invector 2.5.2:

    DS_Invector_252_Support.unitypackage

    This version works with Invector 2.5.2 -- not 2.5.3.

    Note that Invector just today fixed an issue that @formatc2013 reported about not being able to click UI buttons with the joystick when using Invector. This will probably require Invector 2.5.3 or higher. So you might want to look toward upgrading to 2.5.3 in the future.
     
  7. nichjaim

    nichjaim

    Joined:
    Apr 23, 2020
    Posts:
    25
    Can scripts detect when dialogue sequencer messages have been sent, so as to have scripts outside the dialogue do stuff based on certain dialogue sequencer messages?
     
  8. TaylorCaudle

    TaylorCaudle

    Joined:
    Feb 8, 2018
    Posts:
    61

    Thanks! Will do, just need to transfer all the prefabs over lol
     
  9. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    You can send actual Unity messages. Example:
    Code (csharp):
    1. public class Bomb : MonoBehaviour {
    2.     public void Explode() {
    3.         GetComponent<Animator>().Play("explode");
    4.     }
    5. }
    Sequence:
    Code (csharp):
    1. AnimatorPlayWait(countdown)->Message(ReachedZero);
    2. SendMessage(Explode,,Bomb)@Message(ReachedZero)
    Or you can write a custom sequencer command:

    Code (csharp):
    1. public class SequencerCommandExplodeBomb : SequencerCommand {
    2.     public void Awake() {
    3.         speaker.GetComponent<Bomb>().Explode();
    4.         Stop();
    5.     }
    6. }
    Sequence:
    Code (csharp):
    1. AnimatorPlayWait(countdown)->Message(ReachedZero);
    2. ExplodeBomb()@Message(ReachedZero)
     
    nichjaim likes this.
  10. jeff_wilkes1

    jeff_wilkes1

    Joined:
    Jul 2, 2020
    Posts:
    1
    Hello,

    I'm having the same issues not being able to use the controller to select a response. I've done the previous steps as well. Is there a fix for it?
    thanks
     
  11. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    Yes. The Invector guys said it will be in the next Invector update. You'll just need to import that update. Also untick the Dialogue Manager's Input Device Device > Control Cursor State to allow Invector to control the cursor state.
     
  12. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    Dialogue System Voice Recognition

    A few people have recently asked how to use voice recognition to select response menu options.

    The Dialogue System Extras page has examples for Windows Speech Recognition and the Wit.ai online speech recognition service. This post has background information on how they work. (Since the Dialogue System is extensible, they just extend the dialogue UI's ShowResponses method.) The same approach applies to any voice recognition system such as Google Voice Recognition, Amazon Transcribe, etc.

    Combined with a text-to-speech asset such as RT-Voice, you can write completely voice-controlled applications using the Dialogue System, ideal for accessibility.
     
    AGregori likes this.
  13. AGregori

    AGregori

    Joined:
    Dec 11, 2014
    Posts:
    421
    Hi there, I see you're still shipping UFPSv1 add-ons for DS and Love/Hate (but not for QM). Does that mean that they support UFPS2 out of the box? Thanks.
     
  14. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    Yes, DS, QM, and LH all have Opsive character controller version 2 integration, including UFPS2.
     
    AGregori likes this.
  15. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    Jenny LeClue - Detectivu Releasing on Nintendo Switch Tomorrow

    Congratulations to Mografi for the upcoming release of Jenny LeClue - Detectivu, made with the Dialogue System for Unity and featuring great voice acting, on Switch tomorrow! You can preorder now for 20% off. Also available on Apple Arcade, Steam, and GOG.

     
  16. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    Suzerain at Indie Arena Megabooth August 27-30

    Check out Suzerain, the political simulation game made with the Dialogue System for Unity that's generating a lot of buzz this year, at the virtual Indie Arena Megabooth August 27-30.

    upload_2020-8-25_11-7-53.png
     
    AGregori likes this.
  17. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
  18. kikekun

    kikekun

    Joined:
    Sep 2, 2012
    Posts:
    7
    Hello,

    I wanted to ask, is there any way to search conversations (not words within the conversations but single whole conversations) or any plans to add this feature? We are making a game with a lot of conversations, the list is getting bigger and bigger everyday, and it's a bit of a pain to navigate one by one on the drop down list until you reach the one you are looking for. Is there maybe another faster and obvious way to navigate conversations that we are not seeing?

    Thank you very much.

    Apologies in advance if this has been answered before, but I did a search on this thread and nothing was found related to my question. Also, the fact that nobody is asking for something so useful on games with a lot of dialogue makes us wonder if we are doing something wrong...
     
  19. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    .
    Hi @kikekun - Organize your conversations into submenus using forward slashes in their Titles:

    upload_2020-8-28_8-54-5.png

    This makes them much easier to navigate. Note that Dialogue System Triggers refer to conversations by title, so you may need to update them if you rename conversations.

    You can also reorder conversations using the Menu dropdown or by switching to Outline mode (Menu > Outline) and using the up/down arrow buttons.
     

    Attached Files:

  20. goutham12

    goutham12

    Joined:
    Jul 14, 2016
    Posts:
    52
    Hi there,
    Am playing with the camera. I want the the camera to close up while conversation on. I know Camera(closeup) is the sequence used for close up the camera. Now my camera has a follower which is overriding the close up sequence. How can i disable follower component while conversation on and enable when it ends.
     
  21. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    Hi! Add a Dialogue System Events component to the player. Configure OnConversationStart() to disable the follower component. Configure OnConversationEnd() to re-enable it. See the bottom part of the Interaction Tutorial for details.
     
  22. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    AGregori likes this.
  23. nichjaim

    nichjaim

    Joined:
    Apr 23, 2020
    Posts:
    25
    Whenever a set of player responses are displayed the first one is always highlighted for some reason, what is causing this and how do I stop it?
     
  24. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    Hi @nichjaim - Inspect the Dialogue Manager GameObject. Untick the Input Device Manager's Always Auto Focus checkbox. Note that if you're playing with a joystick it will highlight the first response so you can navigate them. But, with Always Auto Focus unticked, if you're using a mouse then it will not highlight the first response.
     
    nichjaim likes this.
  25. Stickeyd

    Stickeyd

    Joined:
    Mar 26, 2017
    Posts:
    102
    Hello. Currently, to save the lua variables responsible for the state of the dialogue events I use Easy Save 3. What I'm doing is just saving them like that:

    Code (CSharp):
    1.      
    2.         ES3.Save<bool>("firstDialogueEnd", DialogueLua.GetVariable("firstDialogueEnd").asBool);
    3.         ES3.Save<bool>("secondDialogueEnd", DialogueLua.GetVariable("secondDialogueEnd").asBool);
    4.         ES3.Save<bool>("EventFinished", DialogueLua.GetVariable("EventFinished").asBool);
    5.         ES3.Save<bool>("ContinueIslandDialogue", DialogueLua.GetVariable("ContinueIslandDialogue").asBool);
    6.         ES3.Save<bool>("DeadExamined", DialogueLua.GetVariable("DeadExamined").asBool);
    7.         ES3.Save<bool>("BooksExamined", DialogueLua.GetVariable("BooksExamined").asBool);
    8.         ES3.Save<bool>("BigDeviceExaminedFirst", DialogueLua.GetVariable("BigDeviceExaminedFirst").asBool);
    Is there any way I can do it more efficiently with your save system while not making anything messy? It seems that it takes a long time to get lua variables out and save them like that
     
  26. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    Hi @Stickeyd - Use this:

    Code (csharp):
    1. ES3.Save<string>("variables", PersistentDataManager.GetSaveData());
    This will return the Dialogue System's variables and other state info (actor fields, quest states, etc.). as a string.

    If you only want to save the variables, inspect the Dialogue Manager. Untick all of the "Include xxx..." checkboxes.

    To restore the variables from a string s that you've loaded from Easy Save:

    Code (csharp):
    1. PersistentDataManager.ApplySaveData(s);
     
  27. kenlem1

    kenlem1

    Joined:
    Mar 20, 2014
    Posts:
    30
    Is there a way to order actions on a Dialogue System Trigger? I want to play a sequence before I run Lua code but the actions always get added with the lua code first.

    Is there somewhere in the docs that talks about order of actions on triggers?
     
  28. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    Hi @kenlem1 - The actions occur in the order listed in this table, which also corresponds with the order in dialogue entries. (Dialogue entries' Script fields run before Sequence fields.) If the Lua code just sets a Dialogue System variable, you can use the SetVariable() sequencer command in your sequence. If the Lua code calls one of your own C# methods that you've registered with Lua, you can write a custom sequencer command to call that C# method in a sequence.
     
  29. kenlem1

    kenlem1

    Joined:
    Mar 20, 2014
    Posts:
    30

    The lua code I want to run after sequence is setting a boolean in a behavior tree.
    bdSetBool("Alien", "followPlayer", true)

    Can I just run that in the sequence?

    BTW, I love Dialogue Manager. Can't believe I've waited this long to use it. It's really so much more than a Dialogue Manager. Great work!
     
  30. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    No, but you can use the BehaviorVariable() sequencer command. Example:
    Code (csharp):
    1. MoveTo(Player,,3);
    2. BehaviorVariable(Alien, followPlayer, true)
    (Note: No quotes needed for sequencer command.)

    Thanks! :)
     
  31. kenlem1

    kenlem1

    Joined:
    Mar 20, 2014
    Posts:
    30
    Thanks for the answer.

    I see that I could also play a cutscene sequence with the Lua code in there.

    I'm so impressed at how flexible this system is. It has taken me a bit to learn it but the effort is well worth it.
     
    TonyLi likes this.
  32. Stickeyd

    Stickeyd

    Joined:
    Mar 26, 2017
    Posts:
    102
    What's the best way to correctly start the next conversation right after the previous is finished? I don't want to implement it via different DialogueSystemTrigger components with a trigger set on "OnConversationEnd" as it becomes messy. Ideally I would like to add Scene Event at the final dialogue end of my conversation which triggers the next DialogueSystemTrigger.OnUse(), but it doesn't seem to start the next conversation if I do it in the event like that. It's almost like it doesn't start the next conversation because technically the previous has not ended yet. What's the solution?
     
  33. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    Hi @Stickeyd - You can link the last node of the first conversation to the first node of the second conversation. This way it can continue smoothly from the first conversation to the second. To link across conversations, inspect the last node of the first conversation. From the "Links To:" menu, select "(Another Conversation)".
     
  34. Stickeyd

    Stickeyd

    Joined:
    Mar 26, 2017
    Posts:
    102
    Great, thank you! Is there any way I can hide the dialogue UI for a few seconds between the one conversation ending and another starting?
     
  35. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    Yes, use the SetDialoguePanel() sequencer command or SetEnabled() on the canvas.
     
  36. goutham12

    goutham12

    Joined:
    Jul 14, 2016
    Posts:
    52
    Can i use two dialogueUI s for my game. i colud able to switch between them.
    how can i do it?
     
  37. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    Sure! Play DemoScene1. If you talk to the soldier (Private Hart), it will use the regular dialogue UI assigned to the Dialogue Manager. If you "talk" to the computer terminal in the center of the room, it will use a different dialogue UI.

    To use a different dialogue UI, add an Override Dialogue UI component to one of the participants. (In DemoScene1, the Terminal GameObject has an Override Dialogue UI component.) Then assign a dialogue UI to it.

    If you only want to use a different subtitle panel in the regular dialogue UI, use the [panel=#] markup tag, or add a Dialogue Actor component to the participant and set Dialogue UI Settings > Subtitle Panel Number.
     
  38. Niroan

    Niroan

    Joined:
    Jun 16, 2019
    Posts:
    46
    Im facing and issue.
    I have and prefab that has 2 GO on it
    each of them have a dialogue trigger.

    On of them OnEnable
    The other is OnDisable

    It works perfect and it spawns the dialogue as expected.
    The only issue i have is the "Pause on conversation" is not working.
    It just pops up and the conversations starts. But i want the timescale to be 0 as long as it plays.
    The initial converstation i ahve at game starts works fine. And it pause the game.

    These comes inside the map when a special monster appear.

    Is this a bug and if so where can i fix this. Really annoying spend 3 hours today trying to fix.
    Using version 2.2.5 i dont want to upgrade cause i spend hours setting this up.
     
  39. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    Hi @Niroan - It's not a bug. In version 2.2.5, the Dialogue System Trigger must be on either of the GameObjects that are used as the conversation actor or conversation conversant. (See Character GameObject Assignments.) Move the Dialogue System Trigger to either of these GameObjects.

    Version 2.2.7 changed this requirement so the Dialogue System Trigger can be anywhere.

    If you don't want to upgrade and you can't move the Dialogue System Trigger to one of the participants, then you can add a PauseGameOnConversation component to one of the participants or the Dialogue Manager. If you put it on the Dialogue Manager, it will pause during all conversations. If you put it on a participant, it will only pause when that participant is involved in a conversation. To add this component, navigate to Plugins / Pixel Crushers / Dialogue System / Scripts / Triggers / Legacy. Then drag the PauseGameOnConversation script onto the GameObject.
     
  40. MrZeker

    MrZeker

    Joined:
    Nov 23, 2018
    Posts:
    161
    Hello, i have a question.
    Since my next project will include A LOT of conversations.
    What would be the best practice for this? could i use different dialogue-databases?
     
  41. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    Hi @MrZeker - A few notes:

    If you use the built-in Dialogue Editor, do not use Unity 2019.2 or 2019.3. They have an editor bug that causes very slow editor performance when working with asset files, including but not limited to dialogue database assets. Use 2019.4 or 2020.1 (or 2019.1 or earlier).

    Use forward slashes in conversation titles. This will organize them into submenus. For example, you could title your conversations:
    • Companions/Robot Butler/At Your Service
    • Companions/Robot Butler/Malfunction
    • Companions/Scavenger/Shop
    • Jungle/Leopard Hunter
    • Jungle/Shaman, etc.
    Read Working With Multiple Databases before deciding to use multiple dialogue databases. Multiple databases have benefits and drawbacks. But they're fully supported in the Dialogue System, and many large games use multiple databases.

    If the problem is that there are a lot of conversations in the menu, then using forward slashes will help without needing to use multiple databases.

    Alternatively, you can use an external editor such as articy:draft, Chat Mapper, or Aurora (Neverwinter Nights Toolset). They're all supported, too.
     
  42. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    Dwerve on Kickstarter - Nintendo Switch Stretch Goal Announced

    Half Human Games just announced a Nintendo Switch stretch goal in their Kickstarter campaign, which is running now.

    This pixel art tower defense dungeon crawler would be perfect for Switch. If you're interested, check out their Kickstarter campaign.

     
  43. Niroan

    Niroan

    Joined:
    Jun 16, 2019
    Posts:
    46
    Hello TonyLi

    I upgraded and managed to recover what i had made.
    Not i got another issue. When i use "OnDisable" when enemy is death. The Conversation is playing. But when its over its not enabling game again. It works fine with pause on conversation with Start and OnEnable.

    Is there a way i can call the Conversation easy from script?
    Then i can just make a script that calls the conversation when enemy is dead.
     
  44. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    Yes. Use DialogueManager.StartConversation():
    Code (csharp):
    1. DialogueManager.StartConversation("My Conversation Title");
    or:
    Code (csharp):
    1. DialogueManager.StartConversation("My Conversation Title", actorTransform, conversantTransform);
    If you want to use the same actor and conversant as the previous conversation:
    Code (csharp):
    1. DialogueManager.StartConversation("My Conversation Title", DialogueManager.currentActor, DialogueManager.currentConversant);
     
  45. Niroan

    Niroan

    Joined:
    Jun 16, 2019
    Posts:
    46
    I ended up making a custom script on the enemy that checks the hp of it and calls the OnUse trigger manuel. This works great :)

    Thank for support :)
     
    TonyLi likes this.
  46. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    Updated Integrations: RT-Voice, Adventure Creator, Invector, Opsive, Lively Chat Bubbles

    The Dialogue System Extras page has updated integration packages for:
    • RT-Voice: Updated for RT-Voice 2020.4.2.
    • Adventure Creator: Fixed package. (Version in 2.2.9 was missing files.)
    • Invector: Improved inventory save/load.
    • Opsive: Latest integration packages available on opsive.com.
    • Lively Chat Bubbles: Adds support.
    • Import/Export: Chat Mapper and CSV import can now link portrait sprites, not just portrait textures.

    And a few misc. patches for very specific issues/improvement requests.

    These will all be in the upcoming full release version, too.
     
  47. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    Half Human Games AMA on Reddit

    Half Human Games, the developer of Dwerve, which is being made with the Dialogue System for Unity, is doing an Ask Me Anything on Reddit today. Their Kickstarter campaign is also running right now, too, and making progress toward their Nintendo Switch stretch goal. If you like tower defense or dungeon crawler RPGs, check it out.
     
  48. Mythran

    Mythran

    Joined:
    Feb 26, 2013
    Posts:
    48
    Hello, dunno if it's possible but,
    How can i disable answers options after they were choosen
    and if the player talks to the NPC again, only start conversation if any option is still available and show only non-selected options.
    Thank you.
     
  49. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    Hi @Mythran - Enable SimStatus:

    upload_2020-9-10_16-36-57.png

    Then set the player response nodes' Conditions fields to:

    Dialog[thisID].SimStatus ~= "WasDisplayed"

    upload_2020-9-10_16-39-23.png

    This will hide options that the player has already clicked.

    If you want to show previously-selected options but in a disabled, non-clickable state, set the Dialogue Manager's Input Settings > [em#] Tag For Invalid Responses to something other than None. Then set the corresponding appearance of the [em#] tag in the Dialogue Editor's Database section.
     
  50. Mythran

    Mythran

    Joined:
    Feb 26, 2013
    Posts:
    48
    Awsome!
    Thank you very much for helping!
     
    TonyLi likes this.
unityunity