Search Unity

Dialoguer - A Dialogue Creator Tool For Unity

Discussion in 'Assets and Asset Store' started by tonycoculuzzi, Mar 22, 2013.

  1. tonycoculuzzi

    tonycoculuzzi

    Joined:
    Jun 2, 2011
    Posts:
    301
    Oh. That's not how Dialoguer is meant to work. Why aren't you just using the Dialoguer editor to create dialogues?
     
  2. edpulis

    edpulis

    Joined:
    Mar 17, 2014
    Posts:
    3
    Has anyone manged to get GUI skin to auto scale using ClassicRpgGUI dialoguer skin?
     
  3. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    Hi Tonzie,

    I sure would like a way to get a variable by name. Is there an existing way to do that or would you consider an update?

    I'm working on hiding and showing dialogue items as described in your FAQ and I want to look up values in my expression parser by name.
     
  4. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    I see the variable editor keeps track of the name of a variable but that doesn't seem to be accessible to me at run time.
     
  5. tonycoculuzzi

    tonycoculuzzi

    Joined:
    Jun 2, 2011
    Posts:
    301
    I'll be including that functionality in the future, but I'm not sure when that will be. It is in the plans though. It'll function similar to how the Dialogues work, where you're provided with an enum full of all your variable names.
     
  6. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    Thanks! Until then I guess I'll name my variables V1, V2... etc so that I can keep track of them.
     
  7. Guideborn

    Guideborn

    Joined:
    Jun 15, 2013
    Posts:
    231
    If I were to use uSequencer in conjunction with this, what steps should I take? Thanks!
     
  8. tonycoculuzzi

    tonycoculuzzi

    Joined:
    Jun 2, 2011
    Posts:
    301
    I'm not quite sure, I haven't used it before. Is it similar to PlayMaker?
     
  9. Guideborn

    Guideborn

    Joined:
    Jun 15, 2013
    Posts:
    231
    uSequencer is a scrub-based cutscene editor.

     
  10. tonycoculuzzi

    tonycoculuzzi

    Joined:
    Jun 2, 2011
    Posts:
    301
    Oh okay, cool. First, I'd suggest trying to find out if they have a specific way to extend their system with new tools or functionality. If they do, I'd follow the steps they lay out to add a few Dialoguer events, such as StartDialogue, ContinueDialogue, EndDialogue, etc. And within these events, simply call the Dialoguer methods.
     
  11. WF_Bart

    WF_Bart

    Joined:
    Apr 16, 2014
    Posts:
    29
    Hey Tonzie,
    Your tool looks awesome!

    I was wondering however if it works in conjunction with Pixel Crushers' Chat Mapper... is there an exporter for Chat Mapper to Dialoguer?
     
  12. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,706
    Just wanted to clarify that Pixel Crushers makes the Dialogue System for Unity, which can import Chat Mapper files. But Chat Mapper is a separate product by Urban Brain Studios.
     
  13. WF_Bart

    WF_Bart

    Joined:
    Apr 16, 2014
    Posts:
    29
    Oh, yeah, sorry! I got them mixed up! Thanks for the correction.

    Should drink more coffee before posting ;)

    I meant to ask if there is a way to transfer content from *Urban Brain Studios*' Chat Mapper to Dialoguer?
     
  14. tonycoculuzzi

    tonycoculuzzi

    Joined:
    Jun 2, 2011
    Posts:
    301
    Unfortunately, there is no importer for Chat Mapper files yet. It's something I'll be looking into when I have time though!
     
  15. djweinbaum

    djweinbaum

    Joined:
    Nov 3, 2013
    Posts:
    533
    This tool is fantastic. You've done a great job with it Tonzie. I particularly love how you didn't try to make some massive sprawling nightmare interface for a bull crap "no coding required!" design. The way your system implements is absolutely perfect.

    I'm starting to dig into some serious dialogue authoring, and I just want to +1 my voice for absolutely needing a zoom. I feel like a horse with blinders on when I'm building my convos. I also want to add that we need to be able to select and move multiple nodes (if it hasn't already been said). Consider the scenario where you forgot to add some set variable (like HasMetJoe) at the start of a medium sized dialogue tree with 10+ nodes. Unless I'm missing something, you literally have to scroll to the end and drag each node one at a time over a bit to make room, lest you get nodes stacked on top of each other. My last piece of feedback would be the delete node button is right where I'd expect an output to be. I'm obliterating my artfully crafted nodes left and right.

    I want to conclude with the second bread slice of a compliment sandwich: Your tool is beautiful. I think if you get the node canvas working better you could charge quite a bit more.
     
    Last edited: Oct 6, 2014
  16. tonycoculuzzi

    tonycoculuzzi

    Joined:
    Jun 2, 2011
    Posts:
    301
    Thanks, it really means a lot! The zoom is definitely coming. I'm hoping once I'm done with Cuphead, I'll be able to finally get the Dialoguer update finished. I'm planning a huge release, and there's going to be a lot of work that'll be going into it, but it's going to be worth it, I hope.

    Thanks again for the kind words, it means a lot.
     
  17. thomkoled

    thomkoled

    Joined:
    Oct 28, 2014
    Posts:
    11
    Hi all,
    First, Tonzie, what a great tool, thank you very much!
    But I have a small issue with StartDialogue. In my update function I am trying to implement this tool to communicate with NPC, for example

    Code (CSharp):
    1. // NPC (layer = 10, distance between target)
    2. if (TouchManager.hitLayerID == 10 && lastDistance <= 2) {
    3.     if (UnityDefaultGui._showing == false) {
    4.         Dialoguer.StartDialogue(3);
    5.     }
    6. }
    GUI appears well, but I can't choose an option... So I think, Dialoguer.StartDialogue is calling multiple times, because of Update function. _showing variable is located in UnityDefaultGui script, (onStartedHandler, onEndedHandler).. based on included script. Variable _showing is public static.

    My solution is to use other additional variable..

    Code (CSharp):
    1. private bool isGui = false;
    2.  
    3. if (TouchManager.hitLayerID == 10 && lastDistance <= 2) {
    4.     if (isGui == false) {
    5.         Dialoguer.StartDialogue(3);
    6.         isGui == true;
    7.     }
    8. }
    9. else {
    10.     isGui = false;
    11. }
    I am wondering, why I cant use _showing variable, I dont like my solution :) Thanks for help.
     
  18. thomkoled

    thomkoled

    Joined:
    Oct 28, 2014
    Posts:
    11
    I am sorry for my post above, my bad.. I have figured it out.. bad logic in update function.. I love this tool! really recommended! bye
     
  19. tonycoculuzzi

    tonycoculuzzi

    Joined:
    Jun 2, 2011
    Posts:
    301
    Glad you got it working! :)
     
  20. thomkoled

    thomkoled

    Joined:
    Oct 28, 2014
    Posts:
    11
    Hi, could anyone post an example, how to work with new UI pls? Dynamicly generated choices, etc. Thanks
     
  21. tonycoculuzzi

    tonycoculuzzi

    Joined:
    Jun 2, 2011
    Posts:
    301
    I will be releasing a new version soon after 4.6 is officially released with an included example for using the new UI.
     
  22. Rocco-Salvetti

    Rocco-Salvetti

    Joined:
    Jul 15, 2013
    Posts:
    6
    Guys, do any of you know how to use the messaging node? Theoretically it should be as simple as using events in Unity, practically I have no idea how to use it. A little sample would help very much. Thank you! :D
    Cheers.
     
  23. OctoSloths

    OctoSloths

    Joined:
    Oct 28, 2014
    Posts:
    2
    Hello, I was wondering if you could explain how to make it so that the ClassicRpgGui doesn't destroy on level load? I am confused on how this works. I keep getting the error: "MissingReferenceException: The object of type 'ClassicRpgGui' has been destroyed but you are still trying to access it." when I try to play to the second level or load from the game over scene.
     
  24. tonycoculuzzi

    tonycoculuzzi

    Joined:
    Jun 2, 2011
    Posts:
    301
    In the Awake function of the ClassicRpgGui class, add the following line:
    DontDestroyOnLoad(this.gameObject);

    That should stop it from being destroyed
     
  25. Eyehawk

    Eyehawk

    Joined:
    Dec 24, 2012
    Posts:
    288
    Hi @Tonzie, I was wondering if the Daikon Forge Demos you mentioned previously are available yet? Also is there any instruction about how to get it working currently with DF?
     
  26. Valente11

    Valente11

    Joined:
    Sep 20, 2013
    Posts:
    12
    Hi there!

    Great system, I just purchased it yesterday and I've been tinkering with it. Very clean. Is there any further word on an example for working with the new unity ui? particularly with implementing choices into the new ui buttons?

    Thanks in advance!
     
  27. djweinbaum

    djweinbaum

    Joined:
    Nov 3, 2013
    Posts:
    533
    Though I'm sure Tonzie will have a better answer, I've been using this with the new Unity UI for a while and its pretty straight forward. This dialogue system is totally abstracted from the UI implementation. It just feeds data through events. You can do whatever you want in onTextPhase which will pass the DialoguerTextData. Here is a simplified version of what I do in onTextPhase

    Code (CSharp):
    1. void onTextPhase ( DialoguerTextData data ) {
    2.         SpeakText.text = data.text; // changes some text on a text component
    3.         if (data.choices != null) { // if this phase has choices
    4.             ChoiceBox.gameObject.SetActive( true ); //activate some panel with choice buttons
    5.             ChoiceBox.Populate( data.choices ); //I have a component to manage and populate the choices to some buttons
    6.         } else {
    7.             ChoiceBox.gameObject.SetActive( false ); //if there's no choices then hide the buttons for choices
    8.         }
    9.     }
    Then each button can have a component that can store its own choice index and when clicked will do Dialoguer.ContinueDialogue( thisChoiceInt ).

    es-dialogue.jpg
     
  28. Valente11

    Valente11

    Joined:
    Sep 20, 2013
    Posts:
    12
    Wow thanks, man! That's exactly what I'm looking for.

    Question: did you map the buttons' OnClick actions through the inspector or through code? Currently I'm instantiating the buttons at runtime and filling them with the choice data so I can't map their OnClick actions through the inspector. I'm off to tinker with it as we speak!
     
  29. djweinbaum

    djweinbaum

    Joined:
    Nov 3, 2013
    Posts:
    533
    Glad it helped. I actually don't even use the OnPointerClick handler, as I have an input class that detects what button the pointer is over on click (its kind of silly but I designed it back when 4.6 was in beta and missing some features). Nowadays I'd just make a custom component that implements the IPointerClickHandler and use the OnPointerClick to advance the dialogue and pass the integer. If you're creating the buttons at runtime you can just add that component and fill in the data, or instantiate a button prefab and fill in the data. I find the function binding things more complicated (and apparently are slower) than just making a custom component.
     
  30. peterpunk

    peterpunk

    Joined:
    Nov 25, 2012
    Posts:
    11
    1. Is there a way to refer to variables by name in the texts? E.g. instead of <gs>0</gs> use <gs>HERO</gs>? Does not seem to work now.
    2. Is there anywhere an example with Unity "new" UI?
    Thanks.
     
  31. MarkKreitler

    MarkKreitler

    Joined:
    Dec 16, 2014
    Posts:
    3
    Maybe this has been fixed, but Wait Nodes set to "continue" don't honor Dialoguer.ContinueDialogue(). Even worse, calling Dialoguer.ContinueDialogue() with a valid ID causes an access outside of array bounds in AbstractDialoguePhase (the 'outs' variable is too large).

    A colleague of mine recommended the following workaround in WaitPhase.Continue:

    public override void Continue (int outId){
    if(type != DialogueEditorWaitTypes.Continue) return;

    // CUSTOM CODE (courtesy of David Fahr)
    waitComplete();

    // ORIGINAL CODE:
    // DialoguerEventManager.dispatchOnWaitComplete();
    // base.Continue (outId);
    }

    That works, but I'm afraid there may be side effects.

    Dialoguer is a great tool and your support looks equally good. Hope this helps fix the problem.

    Cheers,

    Mark
     
  32. Valente11

    Valente11

    Joined:
    Sep 20, 2013
    Posts:
    12
    I'm having this exact issue. I had assumed it was my fault somehow, it might be. Using Dialoguer.ContinueDialogue(i) with the index passed in during a for loop like in the tutorial produces this result. Have you figured out what's causing it or a work around? Passing in no variable continues the dialogue just fine, albeit without the choices.
     
  33. tonycoculuzzi

    tonycoculuzzi

    Joined:
    Jun 2, 2011
    Posts:
    301
    I don't have any demo available yet, and I'm not sure if I will at this point because of the new UI system. It's very simple though, using your Dialogue Controller class to reference your different DF GUI elements and animate/change them based on the state of your controller.


    I'm currently working on Cuphead, which is taking up a lot of my time, but I'm slowly working on it on weekends when I have free time. Once I'm finished working on Cuphead, I'll be dedicating my time 100% to Dialoguer in order to get a nice big update out with official support for the new UI. It technically works with it, but there are just no examples included at this time. That'll change soon!


    You can't yet reference variables by name, but I'm planning that in the next big update!
     
  34. tonycoculuzzi

    tonycoculuzzi

    Joined:
    Jun 2, 2011
    Posts:
    301

    Thanks for explaining that, I couldn't have said it better myself hahaha. Your dialogue stuff looks awesome too!
     
  35. tonycoculuzzi

    tonycoculuzzi

    Joined:
    Jun 2, 2011
    Posts:
    301
    You should only be passing it an int if you're trying to continue through a branched text node selection. If you just use Dialoguer.Continue() it will default to choice 0, or the only choice in the regular Text node. Make sure to check the length of data.choices, before continuing just in case. If this problem continues, let me know and I'll check it out
     
  36. Valente11

    Valente11

    Joined:
    Sep 20, 2013
    Posts:
    12
    Hey there, congratulations on joining Cuphead!

    I was able to bypass the issue. Using the index still gives me errors, but I created a temporary int that gets incremented each loop, serving as my "fake index" and I passed that in instead of (i). Thank you for the response.

    I also got it completely working with the 4.6 ui! It wasn't very difficult at all. Instantiating and placing buttons at runtime is a breeze, it turns out. Once I get some time I'll post my ui script in case anyone in the future was looking for help with that. I'm not a great programmer, but it works.

    I have one question about an example in the FAQ, and this is a little embarrassing: in your answer about displaying choices based on metadata defined in the node's "advanced" section, you mention that you could "parse" the string to hide choices depending on variables etc - gee this is embarrassing - Does anyone have a link to an explanation on what "parsing a string" is, and how it's done in unity? From my own searches I understand that "parsing" means reading a string according to some sort of key or special format, and then reading them as if they were sets of variables? I've tried searching but any results on practical applications in unity have eluded me. I know this doesn't relate exactly to dialoguer.

    I appreciate the help!
     
  37. tonycoculuzzi

    tonycoculuzzi

    Joined:
    Jun 2, 2011
    Posts:
    301
    Sorry for the late reply! Parsing a string is basically just iterating through a string and using the data/symbols in it to do what you need to. In this case, you'd parse the string for a specific sub-string, like "test" and if the string contained "test" you could react to that somehow in your code.
     
  38. Wisearn

    Wisearn

    Joined:
    Jul 10, 2012
    Posts:
    8
    I'm having some problems with the Wait (complete) node, I have Message1 -> Wait (complete) -> Message2

    It works until the Wait, where ContinueDialogue does nothing :S Earlier in this forum you posted a hack to add continuedialogue to the onEndWait but that makes Unity crash (I would guess an infinite loop of continuedialogue->onEndWait->continuedialogue->onEndWait->continuedialogue

    Any idea what to do?
     
    Last edited: Feb 7, 2015
  39. ForgeStudios

    ForgeStudios

    Joined:
    Aug 22, 2013
    Posts:
    4
    Boom, folder system.
     
    Deleted User likes this.
  40. RemkoH

    RemkoH

    Joined:
    Sep 10, 2013
    Posts:
    2
    @ForgeStudios That looks nice! Been looking for something like that. Anyway of sharing how you did it?
     
    Deleted User likes this.
  41. ForgeStudios

    ForgeStudios

    Joined:
    Aug 22, 2013
    Posts:
    4
    @Johnko sure! I'll try to get the files zipped and on here by tomorrow.
     
  42. ForgeStudios

    ForgeStudios

    Joined:
    Aug 22, 2013
    Posts:
    4

    Attached Files:

  43. RemkoH

    RemkoH

    Joined:
    Sep 10, 2013
    Posts:
    2
    @ForgeStudios Thank you very very much, im going to look at it and see if i can get it working :D Again, thanks for your time and effort :)
     
  44. BYD

    BYD

    Joined:
    Jan 26, 2015
    Posts:
    24
    Tonzie, any way to implement ForgeStudios addition into future updates?
    Being able to organize our dialouges would really help for big projects like RPGs.
    Built in localization support would be also nice :D
     
    Deleted User likes this.
  45. Deleted User

    Deleted User

    Guest

    Indeed, I second both of those additions!
     
  46. BYD

    BYD

    Joined:
    Jan 26, 2015
    Posts:
    24
    Also can anyone tell me how to use the theme option in the advanced options of a text node?
    I didn't quite get how it works...:(
     
  47. BYD

    BYD

    Joined:
    Jan 26, 2015
    Posts:
    24
    According to the screenshots the theme option should be a dropdown but in my project it's a textbox...
     
  48. BobFrank

    BobFrank

    Joined:
    May 18, 2015
    Posts:
    1
    Dialoguer works well when I just press the play button, but when I click on Build and Run it comes up with the following errors:

    What am I doing wrong and what can I do to fix this? I've tried adding "Using UnityEditor" at the top and flanking those two problematic lines with #if UNITY_EDITOR and #endif, but it then complains that a value isn't being returned. I'm using Unity 5.0.2f1 Personal if that helps.
     
    Last edited: Jun 15, 2015
  49. atsiitech

    atsiitech

    Joined:
    Apr 11, 2014
    Posts:
    7
    I think the Dialoguer is broken since Unity 5 because of some scripting changes. Just gotta wait for the new update.
     
  50. tonycoculuzzi

    tonycoculuzzi

    Joined:
    Jun 2, 2011
    Posts:
    301
    Yep, a new update is coming really soon to deal with some of the changes that have come in Unity 5.1!
     
    TanselAltinel and atsiitech like this.