Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  5. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    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. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    8,620
    Hi @EmeralLotus - It's included. The steps to set it up are here: Adventure Creator Integration.
     
  2. StevenWendel

    StevenWendel

    Joined:
    Jun 18, 2013
    Posts:
    105
    Worked perfectly! Thank you so much Tony.
     
    TonyLi likes this.
  3. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,317
    Awesome.
    Can QuestMaker be integrated with Adventure Creator also?
     
  4. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    8,620
    Hi - Are you talking about Quest Machine? If so, then yes, it's on the roadmap.
     
  5. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    8,620
    Glad to help!
     
    StevenWendel likes this.
  6. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,317
    Yes, I own both of your excellent assets and for this next project would like to use it with Adventure Creator.
     
  7. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    8,620
    It should be in the next release of Quest Machine (1.1.2).
     
  8. DespairBear

    DespairBear

    Joined:
    Nov 1, 2013
    Posts:
    188
    Quick question that's probably very easy to answer. Is there a way to delay between commands when the trigger is simply an interactable object? I'm trying to simply enable one particle effect, wait a duration of time, and then set the second to active. I'm utilizing the following sequence command:

    Code (CSharp):
    1. SetActive(Aura);
    2. Delay(10);
    3. SetActive(Fairy);
    But there is no delay between the two, I'm assuming because this command is probably meant for when within a conversation, not for use as a general trigger maybe?
     
  9. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,317
    Wow, totally Awesome.
    Actually I also bought your other package (Love & Hate)
    Cheers
     
    hopeful likes this.
  10. Radiant_Cadenza

    Radiant_Cadenza

    Joined:
    May 11, 2015
    Posts:
    3
    Hello, I'm trying to incorporate the Textline example into a project (This one: https://pixelcrushers.com/dialogue_system/demos/textline/ ) and I'm having three issues with the demo scene and documentation I'm having trouble sorting out:

    1. The icons for the NPC and Player render as white squares during runtime, but the example sprite shows in editor. The web demo also shows them as white squares instead of sprites for me. Any insight as to why and how to fix that?

    2. The "message received" sound effect plays when the preloading icon first appears rather than when the message pops up after the 'typing' delay resolves. How can I change it so that it plays when the actual message shows?

    3. I would like to change scenes when the dialogue finishes. I can't quite figure out how to trigger a scene change from a conversation. I'm having difficulty finding this in the documentation.
     
  11. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    8,620
    Hi @DespairBear - Try this:

    SetActive(Aura);
    SetActive(Fairy)@10

    You may be interested in the page on How To Write Sequences, which explains the "@" part as well as other ways to time sequences. There's also a set of Cutscene Sequence Video Tutorials.

    Hi @EmeralLotus - Thanks! Love/Hate also has Adventure Creator integration. So all three Pixel Crushers products integrate with each other (Dialogue System, Love/Hate, and Quest Machine), and when Quest Machine 1.1.2 comes out all three will have Adventure Creator integration, too.

    Hi @Radiant_Cadenza - Change your actor portrait images to Editor GUI and Legacy GUI:
    upload_2018-12-3_8-49-41.png

    Here's one way:
    1. Change the Dialogue Manager's Default Sequence to Audio(ReceiveText)@{{end}}:
      upload_2018-12-3_8-55-49.png

    2. Set the Dialogue UI's NPC Pre Delay Settings > Based On Text Length to ticked, and Additional Seconds to 0.
      upload_2018-12-3_8-57-17.png

    3. Adjust the 'typing' delay by changing the Dialogue Manager's Subtitle Settings > Subtitle Chars Per Second. Think of this as how many characters the NPC can type per second. Ten might be a good value, depending on how you want to pace your game.
    The easiest way is to use the LoadLevel() sequencer command in the last dialogue entry node.
    • Dialogue Text: "Bye now. I'm going to the bus stop."
    • Sequence: {{default}}; LoadLevel("Bus Stop")
    In the example above, I included the special keyword {{default}} which is a shortcut for the Dialogue Manager's Default Sequence. You may or may not want this in your conversation, but I thought I'd mention it.
     
    DespairBear likes this.
  12. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    8,620
    Dialogue System 2.0.9 Released

    Version 2.0.9 is now available on the Asset Store! It fixes a critical bug introduced in version 2.0.8.
    If you're using 2.0.8, please update to version 2.0.9!


    Release Notes
    Core:
    • Fixed: Bug introduced in 2.0.8 involving fields with spaces in them. Caused issues with display names and quest entries.
    • Fixed: Fade-from-black animation in SceneFaderCanvas's animator controller.
    • Fixed: ConditionObserver now respects Once checkbox.
    • Fixed: LiveCamera sequencer command now gracefully handles if camera is destroyed before command is done.
    • Fixed: UI animation monitor no longer reports error if animator is destroyed while waiting.
    Third Party Support:
    • LipSync Pro: Fixed error message if character doesn't have LipSync component.
    • uMMORPG: Updated for uMMORPG 1.148.
    • uSurvival: Added Warp() sequencer command.
     
    Candy-Bomber likes this.
  13. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    8,620
    Unity Christmas Giveaway 2018 - Free Pixel Crushers Assets December 4

    Sign up for the 2018 Unity Christmas giveaway: http://christmas.devdog.io

    December 4 is Pixel Crushers day, with over 15 Pixel Crushers assets being given away, including the Dialogue System. Good luck!
     
    Candy-Bomber and SickaGamer like this.
  14. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    8,620
    Cyber Mega Sale - Dialogue System 50% Off

    The Unity Asset Store Cyber Mega Sale ends December 7. Remember to get the Dialogue System for Unity at half price before the sale ends. The Dialogue System includes integrations for a long list of third party assets that are also on sale, such as Behavior Designer, Emerald AI, LipSync Pro, PlayMaker, uMMORPG, and many more.
     
    SickaGamer likes this.
  15. DespairBear

    DespairBear

    Joined:
    Nov 1, 2013
    Posts:
    188
    Is there a way to communicate with the DialogueSystem via Unity's Event system? I'm looking for a way to send a message or something similar to the Dialogue Manager object which would allow me to set a variable or something of the sort. Does this already exist or something I should write myself?
     
  16. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    8,620
    Hi @DespairBear - Yes, there are many ways to do this.

    To set a variable using a C# script, use DialogueLua.SetVariable():
    Code (csharp):
    1. PixelCrushers.DialogueSystem.SetVariable("Pi", 3.14);
    You can add a Dialogue System Trigger and select Add Action > Lua Code. Then click "+", select the variable from the dropdown, and specify the value. Or just type it manually if you prefer, like:
    Code (lua):
    1. Variable["Pi"] = 3.14
    If you set the Dialogue System Trigger to OnUse, you can send an OnUse message to it to run the Lua code.

    Or you can use any of the visual scripting actions included in Third Party Support to set variables using PlayMaker, Bolt, etc.

    If you want to react to Dialogue System activity using Unity's UnityEvent system, add a Dialogue System Events component to the Dialogue Manager. This has several UnityEvents such as OnConversationStart, OnQuestStateChange, etc.

    If that doesn't cover what you want to do, please describe it and I'll explain how to do it in the Dialogue System.
     
  17. Proksenos

    Proksenos

    Joined:
    Dec 9, 2017
    Posts:
    5
    Hello, thinking of buying this but I have a simple beginner's question.

    In one of your videos, where you showcased the different UI layout templates included, there was the WRPG UI, in which you mentioned that it accumulates the text, so one can review the whole conversation. I was wondering if there is a simple enough way to make it accumulate all the conversations between all the different actors. Like, the dialogue UI being permanent on the screen, and containing all conversations that took place in that scene.
     
    Last edited: Dec 5, 2018
  18. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    8,620
    Hi @Proksenos - Yes. It's not built in, but it's certainly possible and quite easy to do. It might end up being quite a lot of text, though. The shortest solution would be to add a small script that has two methods: OnConversationStart and OnConversationLine. In OnConversationStart, set a bool to add all the accumulated text from previous conversations to the next line. In OnConversationLine, add the previous conversation text if the bool is set, and in any case add the line's text to it. So less than 10 lines of code.
     
    Proksenos likes this.
  19. Proksenos

    Proksenos

    Joined:
    Dec 9, 2017
    Posts:
    5
    Thank you!
     
  20. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    8,620
    Glad to help! If you'd like to try it out before buying, please feel free to download the evaluation version. But remember to take advantage of the Cyber Sale by Friday!
     
  21. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    274
    It ends on or before Friday?
     
  22. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    8,620
    They say December 7 at midnight PST. I don't know if that means Thursday night or Friday night. I'll try to find it.
     
    SickaGamer likes this.
  23. Candy-Bomber

    Candy-Bomber

    Joined:
    May 21, 2015
    Posts:
    23
    Hey, sorry to be that guy but could I get another tip please? I'm trying to get the 'Persistent Active Data' script working with multiple 'Subtitle Panel' game-objects (One for each actor). My problem is that I have 5 Subtitle Panels. Panel #1 is enabled from the start and the rest are all disabled. Panels 2-5 enable individually when their corresponding actor is currently talking. When the player saves the game and exits it mid-conversation, I need it to know which panel is currently open so that when the player reloads it will enable the correct panel rather than the standard panel #1.

    I guess my question is if there is a way to set up the 'Persistant Active Data' script to identify which actor is currently talking on the dialogue node where the player left off? Something like a Lua condtion of the direction 'Current_Talking_Actor=Bob

    My only idea so far has been to create a dialogue system boolean variable for each panel and go through the entire database and set the script field to change the booleans every time the actor changes, but this seems like a herculean task and there must be an easier way I'm missing.

    Thank you for your time as always. Regards
     
  24. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    8,620
    Friday, December 7, at 23:59:59 PST.

    Here's an example with a script that saves which panels are open. It includes a new script "DialogueUISaver" that I just put together quickly, so I took a shortcut and made the assumption that the default NPC panel is panel #0 and the default player panel is panel #1.
     

    Attached Files:

    Candy-Bomber likes this.
  25. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    8,620
    Preliminary Super Text Mesh Support

    The Dialogue System Extras page has a preliminary support package for Super Text Mesh (STM) that adds STM support to the Standard Dialogue UI system.

    As a reminder, the Dialogue System already includes support for regular Unity UI, TextMesh Pro, NGUI, and others.
     
  26. Proksenos

    Proksenos

    Joined:
    Dec 9, 2017
    Posts:
    5
    Just bought it! Thanks for being helpful and for making the program.
     
  27. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    8,620
    Thanks! If you have any questions about using the Dialogue System, please post here or the Pixel Crushers forum or use the support form or email tony (at) pixelcrushers.com, whichever you prefer.
     
  28. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    8,620
  29. RayWolf

    RayWolf

    Joined:
    Mar 24, 2012
    Posts:
    87
    Hi!
    I dont know what Im missing here, cant find it in the documentation either. My problem is I dont get the successfull or failure descriptions wen I do SetQuestState("speak with the NPC", "success") in an conversation node which is clicked by the player. I mean, the Quest does shown as completed in the questlog but with no indication of success or failure.
    Best thing would be in addition to this to changethe quest description from e.g. "speak with the NPC" to "I have spoken to the NPC" when quest ist completed successfull but I dont know how to do it..or is it broken? (I did fill the field success description) Maybe as a summary I think its a bug: The "Quest Entry Description" is not shown in questtracker or quest log and not updated during dialogue. I used the prefab and can see it in editor at the right place directly under the quest description-title thingy. Can someone help please?
     
  30. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    8,620
    Hi @RayWolf - There was a bug introduced in version 2.0.8. It's fixed in version 2.0.9. Would you please check your version (Tools > Pixel Crushers > Dialogue System > Welcome Window or _README.txt file) and update if you're on 2.0.8?
     
  31. RayWolf

    RayWolf

    Joined:
    Mar 24, 2012
    Posts:
    87
    yes I am on 2.0.8 according to the _README in the Dialogue System Folder. I will got to assetstore and Update.

    edit: Thank You! This solved my Problem, I should have come here days ago. Also the update to 2.0.9 fixed the missing fade-out thingy I was trying to implement yesterday. Thank you for the great support and in generally for keeping this wonderful asset up-to-date :)
     
    Last edited: Dec 7, 2018
    TonyLi likes this.
  32. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    8,620
    Glad to help! :)
     
    SickaGamer likes this.
  33. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    8,620
  34. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    8,620
    Just watched Jon Ingold's excellent talk, "Sparkling Dialogue: A Masterclass" recorded last month at AdventureX:



    It's inspiring stuff if you're writing dialogue. (The Dialogue System for Unity has Ink integration, btw.)
     
  35. DespairBear

    DespairBear

    Joined:
    Nov 1, 2013
    Posts:
    188
    Been mucking around a bit trying to find a solution to this as it may be a bug. If you try passing a newline to an alert with a duration, it seems the newline is printed as a string literal. If you simply show the alert with the default duration, it prints with the newline as expected
     
  36. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    8,620
    Hi @DespairBear - How are you initiating the alert? C# call to DialogueManager.ShowAlert()? Dialogue System Trigger with Show Alert action?

    I just tested with this script, and it seems to be OK:

    Code (csharp):
    1. using UnityEngine;
    2. using PixelCrushers.DialogueSystem;
    3.  
    4. public class TestAlert : MonoBehaviour
    5. {
    6.     void Update()
    7.     {
    8.         if (Input.GetKeyDown(KeyCode.F1))
    9.         {
    10.             DialogueManager.ShowAlert("Line1\nLine2", 3); // Newline alert with duration.
    11.         }
    12.         else if (Input.GetKeyDown(KeyCode.F2))
    13.         {
    14.             DialogueManager.ShowAlert("Line1\nLine2"); // Newline alert with default duration.
    15.         }
    16.     }
    17. }

    Also, what GUI system are you using? Unity UI Text? TextMesh Pro?
     
  37. DespairBear

    DespairBear

    Joined:
    Nov 1, 2013
    Posts:
    188
    I was just using the default UI Dialogue System ships with and I was calling it from the Sequencer. I found the issue. In the ShowAlert method on line 1149 of the DialogueSystemController.cs it doesn't parse for the newline like the other ShowAlert method on line 1164. All I had to do was take the newline replacer from line 1166 and paste it into the if statement within the ShowAlert method that takes the duration as the second parameter

    Thanks for the prompt response. The quality of this asset and the quality of support is phenomenal.
     
    Proksenos likes this.
  38. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    8,620
    Thanks for catching that. Consider it fixed in the upcoming version 2.1.0.
     
    Proksenos and hopeful like this.
  39. Candy-Bomber

    Candy-Bomber

    Joined:
    May 21, 2015
    Posts:
    23
    Thank you. what would I have to change to get this working with the "JRPG Unity UI Dialogue UI"? In my case the standard NPCs and Player both share panel 1. There is no panel 0. The rest of the panels up to 5 are used individually by different actors.

    Also is there any functional difference between saving using the 'Save System' script attached to the dialogue manager and saving using the 'Game Saver' script set to it's own game-object? Or do they essentially do the same thing?

    Thank you for your time. Regards
     
  40. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    8,620
    Hi @Candy-Bomber - The script is written to work with the Standard Dialogue UI system, so the JRPG Template Standard Dialogue UI prefab. If you're using the Standard Dialogue UI, the script should work fine. Standard Dialogue UI lets you define as many panels as you want. The saver script will simply work with whatever panels you've defined.

    If you're using the JRPG Unity UI Dialogue UI, which uses a Unity UI Dialogue UI script, it's a bit more complicated. This is because the older Unity UI Dialogue UI system was designed to work with one NPC panel and one Player panel. Extra panels had to use an Override Unity UI Dialogue Controls component, which makes for a little more work to track down what panels are actually in use to include that information in a saved game. If you're using Unity UI Dialogue UI and can't switch to Standard Dialogue UI, let me know. I can take a look at what changes the script would require.

    If your scene has a Save System, the Game Saver simply acts as a front-end and hands off all saving work to the Save System. Note that the Save System survives scene changes. So if you have a Save System in, for example, your starting scene, you don't necessarily need one in subsequent scenes. The Save System will carry through your scene changes.
     
    Candy-Bomber likes this.