Search Unity

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

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

  1. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    This worked. Thanks again.

    On another note, I'm now glad that the conditions and such is on the nodes, rather than on the links. After I've done the "Arrange Node" thing my Upper district section looks like this:

    Unity_2018-01-19_22-34-26.png

    Lots of branching as you can see :p The main thing is what I mentioned about having several links to the central "trunk" so you can jump from a side point back into the central trunk. If the conditions were in the links I'd have to make those new for each new return to the central trunk. The way I'm doing it now (as you might have seen from my database) is adding a new variable for each new "section" of the main trunk, to basically record how far one is through the tree at any given branch.

    Edit: Now, this is one place where I can see some room for improvement as DS further matures. Mainly because while technically I'm using the variables to gate content, it's only in the most rudimentary sense. Some way of denoting where one currently is on the main trunk which then is looked at by each returning node would likely have the same effect without all of the customized variables.

    just spitballing...perhaps when the conversation is initialized, a list is made of each entry ID in the main trunk. No...a custom data type or class or something perhaps. Where each location in the list has the "ID" field as well as a "passed" or "spoken" boolean set to false. As the main trunk is traversed, the ID is queried, then the boolean is set to true. Then when the branches occur, when the branch returns to the main trunk (perhaps it could check this at every node similar to the timer) it checks the ID, then checks if the boolean is true or false. If it moves sequentially through the list, the first "false" valued boolean it arrives at should be where it returns to the main trunk.

    Man, I have too many crazy ideas.
     
    Last edited: Jan 20, 2018
  2. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    I can't take credit for that. The Dialogue System uses the data structure established by Chat Mapper. When designing the Dialogue System, I thought it wisest to base it on a proven industry format.

    If I'm reading this correctly, the Chat Mapper structure already supports this. It's called SimStatus. If you tick the Dialogue Manager's Include Sim Status checkbox, each dialogue entry node will have a SimStatus field that can be one of these three values:
    • Untouched: Never shown as a subtitle or in the player response menu
    • WasOffered: Was shown in the player response menu but not clicked yet
    • WasDisplayed: Was shown as a subtitle or clicked in the response menu
    If this isn't exactly what you're looking for, you could probably set SimStatus values manually, too. The Conditions field's Lua wizard has dropdown support for SimStatus.
     
  3. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    That sounds exactly like what I'm looking for. It would probably need a touch of scripting work, to get the incoming "branch" to access that variable. I'll try to take a look at that today.

    Edit: decided to put that off for the time being. I'll finish this small little bit of project, then look to tackle it. I don't imagine it will be overly difficult, but I'm already most of the way through this test so I'll keep it for later.
     
    Last edited: Jan 23, 2018
  4. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Updated I2 Localization Support & Customizable SciFi Holographic Interface Support Packages Available

    The Dialogue System Extras page has updated support packages for I2 Localization and Customizable SciFi Holographic Interface (CSFHI).

    The updated I2 Localization support package lets you specify whether to use I2's language codes or language names. (The previous version always used language names.)

    The CSFHI support package more cleanly handles reappearance of the UI if you start another conversation with it while it's in the process of disappearing from a previous conversation.
     
  5. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Updated Action-RPG Starter Kit Support Package Available

    The Dialogue System Extras page has an updated support package for Hitbear Studio's Action-RPG Starter Kit 6.x.
     
  6. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    Want to point out that I had to make another slight change. In the OnClick method, you had "showingInterjectableResponses = false." I had to get rid of that, reason being that it hid ALL dialogue responses when one is selected. I need other, unrelated responses to still be choosable after the player has selected one. To still remove the selected one I had to add a "[HideResponse X]" tag to the NPC line directly after the PC response (I tried adding it to the PC response, but it shows up in the text. I'm sure that can be adjusted, but I won't worry about that now).

    Okay, I've got the whole conversation written and I've been thinking about the SimStatus thing. I think I'm going to need to access the part of the scripts where a dialogue entry ends and looks for the next one to go to. I've been working exclusively in the InterjectableResponses class heretofore, but I don't see that here. Took a look at the ShowSubtitle method, but I don't see anything about moving on to pick a next response.

    I imagine it's as simple as something like

    Code (csharp):
    1. for(int i = 0; i < Links.Count; i++)
    2. {
    3.     if(Links[i].SimStatus == WasDisplayed)
    4.     continue;
    5.     else
    6.     // Do normal stuff
    7. }
    just need to find the appropriate place for it (there should already be a loop there).
     
  7. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Normally, the Dialogue System looks at all dialogue entries linked from the current dialogue entry. It culls out all the entries whose Conditions are false. Then it shows one the non-culled entries. If there are any NPC entries, it shows the first one. Otherwise it shows the player response menu.

    Here are two other ways you can hook in your own logic:
    1. You can register your C# method as a Lua function and call it in entries' Conditions fields, or
    2. Assign a C# method to DialogueManager.IsDialogueEntryValid.
    The IsDialogueEntryValid delegate should accept a DialogueEntry and return a bool indicating whether the entry should be kept or culled. SimStatus conditions are usually specified in Conditions fields, such as:
    • Conditions: Dialog[42].SimStatus == "WasDisplayed"
    But you could use IsDialogueEntryValid to apply this condition universally to all dialogue entries without having to enter it in each entry's Conditions field:

    Code (csharp):
    1. DialogueManager.IsDialogueEntryValid = IsDialogueEntryUndisplayed;
    2. ...
    3. bool IsDialogueEntryUndisplayed(DialogueEntry entry)
    4. {
    5.     return Lua.IsTrue("Dialog[" + entry.id + "].SimStatus ~= 'WasDisplayed`");
    6. }
     
  8. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    Is option 2 possible without unpacking the dlls? If not, I'll have to take a stab at #1.
     
  9. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Yes.
     
  10. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    Alright. I'll take a look at that when I get the chance.
     
  11. DarKRealm

    DarKRealm

    Joined:
    Oct 12, 2017
    Posts:
    2
    Hello Tony,

    I bought your Dialogue System for my project few months ago. I'm not sure, but I think since I'm updated my project to Unity 2017.3 and your Dialogue System to the last version the "NPC Subtitle Text" and the "NPC Subtitle Reminder Text" won't show correctly. I just can see it for not even a second before it disappear.
    Only if I'm enable "Always visible" for Npc Subtitle or Subtitle Reminder it seems to work for the Reminder Text.

    I have checked "Show NPC subtitle During line" and "Show NPC subtitle with response"
    Did I have set something wrong?

    I have read something about Subtitles above but I'm new at Unity and my English is not really perfect.
    Any Ideas?

    Thank you for your help in advance!
    Best regards
    Gerald
     
  12. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Hi Gerald - I just PM'ed you your access information to download version 1.7.7.2-beta1. This fixes some UI animation issues in certain situations. The same fixes will also be in the release version 1.7.7.2, which I'm working on now and expect to release next week. If it doesn't work correctly, please let me know. Feel free to send an example to tony (at) pixelcrushers.com. I'll be happy to take a look.
     
  13. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    (Gerald just confirmed that the updated UI scripts in 1.7.7.2-beta1 fixes his animation issue.)

    If anyone would like the updated UI package, you can download it from the Dialogue System Extras page or download the entire 1.7.7.2-beta1 from the Pixel Crushers customer download page. (If you need access to the customer download page, please PM me your Asset Store invoice number.)
     
    hopeful likes this.
  14. Galahad

    Galahad

    Joined:
    Feb 13, 2012
    Posts:
    72
    What could be causing this error:

    Dialogue System: Lua code 'Dialog = Conversation[19].Dialog' threw exception 'Lookup of field 'Dialog' in the table element failed because the table element itself isn't in the table.'​

    Regards
    Thiago
     
  15. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Hi Thiago - Did you manually change any ID numbers? The error means a dialogue entry node thinks it belongs to a conversation with ID 19, but there is no conversation with ID 19 in the database.
     
    Galahad likes this.
  16. Galahad

    Galahad

    Joined:
    Feb 13, 2012
    Posts:
    72
    Yep, I changed them to reorder it.
     
  17. Grimir

    Grimir

    Joined:
    Sep 5, 2017
    Posts:
    20
    I have a problem with pause duration (\. etc.) in dialogue. The pauses display properly depending on the setting (, .), but the single speech node ends abruptly like it didn't add the extra time for every pause I used.

    I'm a Dialogue System newbie, so probably missing something simple here. :)
     
  18. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Hi Thiago - If possible, change the ID back. There are better ways to arrange conversations, such as Menu > Sort > By Title (alphabetically), or by using forward slashes in titles to group your conversations into submenus. For example:
    • Companions/Robot Butler/At Your Service
    • Companions/Robot Butler/Malfunction
    • Desert/Scavenger
    • Desert/Scorpion Herder
    • Jungle/Shaman, etc.
    Hi @Grimir - The duration of the node is independent of the duration of the typewriter. Typically designers will set the typewriter's Character Per Second faster than the Dialogue Manager's Subtitle Settings > Subtitle Chars Per Second. This gives the typewriter time to finish before the node finishes.
     
  19. Grimir

    Grimir

    Joined:
    Sep 5, 2017
    Posts:
    20
    The problem is that's what I did - I kept the default setting of dialogue speed 30, while the typewriter is set to 50.
     
  20. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    You might need to set the dialogue speed a little slower, or manually specify a duration for that dialogue entry node. You can set the dialogue entry's duration to 3 seconds by setting its Sequence field to:
    • Sequence: Delay(3)
    You can also reference the special keyword {{end}}, which is a value determined by the dialogue speed and the length of the dialogue text. For example, to delay 2 extra seconds:
    • Sequence: Delay(2)@{{end}}
     
  21. kk99

    kk99

    Joined:
    Nov 5, 2013
    Posts:
    81
    Hello Tony :),

    I have a question:
    How can I load/create Dialogues at runtime?
    What would be the easiest way to achieve it?


    I read about the Chat Mapper but I think that is too fancy.
    I feel kinda lost and don't know really where to even start.
     
  22. Grimir

    Grimir

    Joined:
    Sep 5, 2017
    Posts:
    20
    That's exactly the solution I was hoping for. Thanks Tony!

    Side question - I saw it mentioned that typewriter pauses will be added for TMP in the next update. How far is that one from release?
     
  23. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    There are three ways to load/create dialogue at runtime:

    1. Import articy:draft XML format. This requires articy:draft.

    2. Import Chat Mapper XML format. You can use Chat Mapper (which is an excellent tool), but it's not required. If you create your dialogue in the Dialogue System's Dialogue Editor, you can export it to Chat Mapper XML format. Then you can import it at runtime using these steps.

    3. You can create a dialogue database in a script using the steps in this forum post. This way, you can handle any format as long as your script can read it and turn it into a dialogue database.

    If that doesn't help, please let me know why you want to load/create dialogue at runtime. I may be able to make other suggestions.

    It's going to take a little time. I'm working on a "Standard Dialogue UI" that combines "Unity UI Dialogue UI" and "Text Mesh Pro Dialogue UI" in the same way that Quest Machine does. You'll be able to assign a UI.Text or a TextMeshProUGUI to any text field in the UI. This way I won't be maintaining two separate sets of code, and any improvements (like typewriter pause codes) will automatically be supported whether you're using UI or TMP. I'm finishing up a maintenance update before then. I'll try to get the TMP typewriter pauses into that maintenance update.
     
  24. MrG

    MrG

    Joined:
    Oct 6, 2012
    Posts:
    368
    I tried to find an XSD for Chat Mapper XML...do you have one? Google wasn't helpful, as the Chat Mapper docs don't seem to reference an XSD.

    If one thinks of dialogs as "transactional" one might consider maintaining dialog state on a web server and using HTTPS to get the content.
     
  25. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    I'm afraid the developer hasn't published one. You can find a C# representation in the Dialogue System's source code package. It's in Assets / Dialogue System / Scripts / Core / Model-View-Controller / Model / Data / Chat Mapper / ChatMapperProject.cs.

    True. Normally, these "transactions" occur locally within a ConversationModel. But it's possible to simulate an external transaction system. The Dialogue System's Ink integration does this. Ink's format doesn't have a good 1:1 correspondence with the Dialogue System's format. Instead of converting an Ink file into a dialogue database, it plays a runtime-generated conversation that exchanges transactions with Ink's Unity integration. So the conversation is really playing out in Ink's Unity integration, and the Dialogue System is simply acting as a front-end. One could do something similar to exchange transactions with a web server.
     
  26. kk99

    kk99

    Joined:
    Nov 5, 2013
    Posts:
    81
    Thanks Tony. I am going to check it out and see what I can do :)

    I need Dialogues at Runtime because I want my Users to create some simple Dialogues and then share them online inside the game (role playing game).


    Another reason was performance optimization. (I was already manage to fix it).
    I have been using a pretty old Dialogue System Version v. 1.6.0.1 or little above. That's like 1 1/2 years old, I guess.

    And that version has gotten over the months/years always slower and slower (too many dialogues, npcs, barks etc)
    At the end it took literally 15 Minutes to DELETE a single Dialogue and adding or moving nodes was quite slow and laggie too. I have been refusing to Update because I touched so many files here and there and everywhere to make it mobile ready and adjust it to my needs, updating always screwed up everything.

    Today more by an accident I figured out I just have to replace the .dll and I can keep everything the way it is o_O I wish I had known this months ago.
    My idea was to reduce the Database making the system faster by adding Dialogues at Runtime :) So I guess this is not needed anymore. The Version 1.7 is running very smooth at least for now.

    Also I assume adding Dialogues at Runtime (making the Database smaller) will reduce the RAM and CPU usage and will increase the FPS. Because at the moment the entire database is loaded at once.I know it is possible to use multiple Databases in this Dialogue System but I have never been patient enough to get it done.
     
    Last edited: Feb 5, 2018
  27. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    @kk99 - I'm glad you were able to update to a newer version of the Dialogue System. Starting in version 1.7.6 (I think), the Dialogue Editor window's performance is much, much faster for large databases. (Starting in 1.6.9, the option was there to speed up performance, but it wasn't turned on by default until 1.7.6.)
     
  28. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Dialogue System for Unity 1.7.7.2 Released!

    Version 1.7.7.2 is now available on the Pixel Crushers customer download page (PM me your invoice number if you need access) and should be available on the Asset Store in 5-10 days.


    Version 1.7.7.2

    Core
    • Changed: When using OverrideActorName, now uses override actor’s portrait, not portrait of actor originally assigned to conversation in database.
    • Added: 'thisID' Lua variable, useful with SimStatus.
    • Fixed: [position #] > 10 weren't being recognized.
    • Fixed: Can now build for IL2CPP/UWP in Unity 2017.3.
    • Fixed: Markup tag [position #] with numbers greater than 10 weren’t being recognized.
    • Dialogue Editor: Added snap to grid options to node editor, made selected node(s) more prominent.
    • Unity UI: Animation fixes, improved animation options, typewriter improvements.

    Third Party Support
    • articy:draft:
      • Added: Can now define articy variables for emphasis tag settings.
      • Fixed: Overwrite wasn't overwriting.
      • Fixed: Dialogues in documents had an extra link.
      • Fixed: Uninitialized typeString error in variable conversion.
    • Action-RPG Starter Kit: Updated for ARPG 6.x.
    • Customizable Sci-Fi Holo Interface: Improved handling of fade in/out if restarting dialogue while holo interface is fading out.
    • I2 Localization: Can now specify to use language codes or language names.
    • Invector Third Person Controller; Added support.
    • Inventory Engine: Improvements to Lua functions.
    • PlayMaker: Added GetActorName action.
    • Rog: Added Inventory Engine integration.
    • Text Mesh Pro: Typewriter now supports RPGMaker codes, added quest log window prefab, animation fixes.
    • UFPS: Updated API calls in FPSyncLuaPlayerOnLoadLevel to remove deprecation warnings in Unity 2017, added EventSystem to demo scene.
     
  29. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
  30. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Crossing Souls now available on Steam!

    FourAttic's adventure game, Crossing Souls, just released. It's a pitch-perfect homage to the 1980's, a great adventure game in its own right, and built using the Dialogue System! It's also on sale through February 20.



    I'm really having fun playing the game ! I've lost count of the number of hilarious 1980s references hidden in every nook and cranny. :) Great job, guys! I'm glad to see your hard work getting recognition:

    “Crossing Souls is a inventive thrill ride that embraces clever, varied gameplay and heartfelt storytelling to coalesce into a gem of a game.”
    9/10 – Game Informer

    “Crossing Souls is a helluva fun ride, and a game I’d strongly recommend...”
    9.5/10 – GameSpace

    BTW, Gamasutra just published an excellent article on how FourAttic captured the aesthetic of the time. If you're interested in art design, check it out:

    How FourAttic captured the 80s with Crossing Souls' art design
     
  31. flashframe

    flashframe

    Joined:
    Feb 10, 2015
    Posts:
    798
    I’m enjoying it too! And the dialogue system is superb ;)
     
    TonyLi likes this.
  32. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    I've had the OST on loop all evening while I've been working. It kind of feels like an action sequence from an 80s movie is playing in the background.
     
  33. Grimir

    Grimir

    Joined:
    Sep 5, 2017
    Posts:
    20
    Hi Tony,

    I have two questions:

    #1
    Do RPG Maker codes in TextMeshPro Typewriter work as intended (in 1.7.7.2)? For example if I write something like "hmm\..\..\..", I'm getting different outcome each time. One time it's "hm (pause) m. (pause) .. ", and the next time "hmm (pause) .. (pause) .". I can't see any pattern here, besides the fact it's always different than what I wanted. :)

    #2
    What is the recommended way of handling character's animation during conversations? I basically want to play animations on some dialog entries - my character scratching his head, when he's verbalizing his thoughts, things like that. I tried to do this by writing sequence with AnimatorPlay(animationName) on each entry with animation change. But then every dialog entry with AnimatorPlay() other than the first one is skipped and text is not shown. Animation changes correctly. I guess that's something trivial, but I couldn't find a solution.
     
  34. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Hi,
    Please import the updated TextMesh Pro Support package from the Dialogue System Extras page. It fixes this bug.

    A dialogue entry stays onscreen for the duration of its Sequence; then the conversation moves forward to the next dialogue entry/response menu.

    The AnimatorPlay() sequencer command tells an animator to play a state and then immediately ends. If your Sequence only has an AnimatorPlay() command, its duration is 0 seconds.

    If you change the Sequence to something like this:

    AnimatorPlay(state);
    {{default}}

    then it will tell the animator to play a state and also play the Dialogue Manager's Default Sequence, which is initially configured to delay for a duration based on the text length.

    Or you can set it to something like this:

    AnimatorPlay(state);
    Delay({{end}})

    which also delays for {{end}}, which is a duration based on the text length.

    Or you can use AnimatorPlayWait(), which waits until the animator state is done:

    AnimatorPlayWait(state)


    Sequences can be even fancier if you want. If you want to wait 2 seconds longer than an animator state:

    AnimatorPlayWait(state)->Message(Done)
    Delay(2)@Message(Done)

    This sequence waits until state is done playing. Then it sends the message "Done" to the sequencer. The Delay(2) command doesn't start until it receives the sequencer message "Done". (Sequencer messages are arbitrary strings of your choosing.)
     
  35. Grimir

    Grimir

    Joined:
    Sep 5, 2017
    Posts:
    20
    @TonyLi Thank you for the solutions. Everything works great now.
     
    TonyLi likes this.
  36. digiwombat

    digiwombat

    Joined:
    Sep 26, 2013
    Posts:
    48
    A quick question:

    Is there a filter or search box somewhere so I can filter my quests/variables and so on? As it is, the current UI is pretty unwieldy for that sort of thing. I think a simple filter box would really give me everything I need there.
     
  37. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Hi,
    Not yet, but a big list of editor improvements are coming this spring. I don't want to leave you in a bind until then, so I'll try to prioritize at least some kind of simple filter box in the next interim release.
     
    Last edited: Feb 22, 2018
    hopeful and digiwombat like this.
  38. digiwombat

    digiwombat

    Joined:
    Sep 26, 2013
    Posts:
    48
    Thanks a ton, man! And I'm stoked to hear there are editor improvements coming. It's just about the only shortcoming to the system at this point that I can even think of. Every time I go "Man, I wish I could..." it's already in the docs.
     
    hopeful and TonyLi like this.
  39. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    How to Hide UFPS Player Body During Conversations

    The Dialogue System has UFPS Support. Someone asked in email how to hide the player body mesh during conversations. (Some UFPS player prefabs, such as HeroHDWeapons, come with third person player bodies.) To do this, just add the Mesh's Skinned Mesh Renderer to the player's "Set Component Enabled On Dialogue Event" component:



    To assign it, you'll need to open two Inspector tabs. In one, inspected HeroHDWeapons and clicked the padlock in the upper right to lock the view onto that GameObject. In the other, I inspected HeroHDWeapons > Body > Mesh. Then I dragged its Skinned Mesh Renderer component into the new Element 3 slots that I had added to Set Component Enabled On Dialogue Event.
     
  40. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Tale of Toast Now Free to Play on Steam!

    Check out Tale of Toast, a full MMORPG developed by a two-person team using the Dialogue System for Unity!


    The adorable graphics belie a game full of quests, deep PvE and PvP, and all kinds of zones to explore.

    Reviewers have said:

    "Beautiful MMO that takes you back to the good 'ol days of high risk open world PVP."

    "Honestly one of the best mmos I've ever played.... Brings back oldschool mmorpg feels."
     
  41. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Gamasutra Chat With Crossing Souls Devs at 1 PM EST

    Gamasutra is streaming a Twitch chat with the devs of Crossing Souls (made with the Dialogue System) at 1 PM EST today. If you like the game's 80's nostalgia-packed dialogue, quests, and setting, you might enjoy catching the stream.
     
  42. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Hi @digiwombat - The Pixel Crushers customer download site has a patch that adds filters to the Dialogue Editor. (If anyone needs access to the customer download site, please PM me your Asset Store invoice numbers.) Thanks for the feature suggestion. It's really handy!


    Patch 2018-02-28:
    • Dialogue Editor: Added filters to Actor, Items/Quests, Locations, and Variables tabs.
    • Unity UI Typewriter Effect: Updated to handle uppercase rich text codes (<B>, etc.).
    • Override Actor Name: Fixed: Unique ID button wasn't marking scene dirty.
    • Adventure Creator Support: Added Action mode dropdown to Conversation action to Start Conversation (default) or Stop Conversation.
    • plyGame Support: Updated for plyGame 3.1.4c. ConversationController now has option to set NPC to Idle-Stay instead of disabling plyGame control.
    • TextMesh Pro Support: Fixes typewriter effect to allow typing to start even if it hasn’t run its Awake method yet; fixes a bug in quest tracker to respect the value of Show Completed Entry Text checkbox.
     
    digiwombat likes this.
  43. MaliceA4Thought

    MaliceA4Thought

    Joined:
    Feb 25, 2011
    Posts:
    406
    HI Tony :)

    OK this is probably me being dumb, but a quick question if I may...

    I have Dialogue system setup and working fine in my game, and also have INventory pro.

    In the integrations section, There are two "examples" (kinda.. like all Devdog examples they seem to miss a few points). The first relates to LUA methods and allows for giving and taking items and currency on a node in the conversation.. works fine.. I can take things and give things no problem.

    The second part references a script that is included by DevDog which is the Inventory Dialogue Loot Script... this can register a quest in Dialogue.. however, (and this is where I may be being dumb), If I add this to a character, the quest seems to initiate at startup.. is there a way to make this trigger at a specific node of a conversation so it's only present as a quest once a certain point in the convo has been achieved, or is this a sample script that I need to build off of to get that initiation..

    I've asked on the Devdog Discord but no reply, so trying here. If this is a Devdog issue, let me know and I'll go back to their Discord and kick and scream until they answer :)

    Regards

    M
     
  44. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Hi @moria15 - I like to think of that script as a good starting point. It doesn't actually do anything with quests. It just updates the value of a Dialogue System variable (e.g., "numApplesPicked") whenever the player adds or removes items from its inventory. It also tells the quest tracker HUD to update, in case any quests' texts reference that variable.

    You could make a copy of that script and add a condition. For example, in the variable declaration, add:

    Code (csharp):
    1. public Condition condition;
    And then in the UpdateCount() method, only update the count if the condition is true:

    Code (csharp):
    1. private void UpdateCount(uint itemID)
    2. {
    3.     if (!Condition.IsTrue(transform)) return;
    4.     ...
    Then you can require that certain quest states or quest entry states or whatever be true. In a specific node in your conversation, you could set the quest state.
     
    hopeful and MaliceA4Thought like this.
  45. MaliceA4Thought

    MaliceA4Thought

    Joined:
    Feb 25, 2011
    Posts:
    406

    OK got it, thanks.

    Oft we go to the code writing stage then :)

    M
     
  46. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    Okay, I'm going to take a look at adding that dialogue delay.

    I was thinking I'd have a slider with a script on it, and when changing the value a method in the script is called. That method would then modify the appropriate value in the Dialogue System settings for the delay.

    Does this seem like a good idea? If so, what specific thing in the Dialogue System should I change (and how do I access it)? If not, what better way would you suggest?
     
  47. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Hi @EternalAmbiguity - That'll work. Try assigning a method like this to the slider's On Value Changed event:
    Code (csharp):
    1. using PixelCrushers.DialogueSystem;
    2. ...
    3. void OnValueChanged(float value)
    4. {
    5.     DialogueLua.SetVariable("delayAmount", value);
    6. }
    And set the Dialogue Manager's Default Sequence to:

    Delay([var=delayAmount])@{{end}}
     
    EternalAmbiguity likes this.
  48. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    Excellent, I'll report back later after get the chance to add it.

    Edit: It's working, though it causes the timers on the dialogue responses to mess up. I'll fix that by adding a float to the InterjectableDialogue script, and change it in the same Slider method. Then in the "recursive" method I'll add that float each time it cycles.

    Edit: And it's working. Many thanks.
     
    Last edited: Feb 28, 2018
  49. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    New post for new unrelated question. I typically pause a game by setting timescale to 0. The only "problem" with this is that the dialogue system keeps trundling along. Is there another way to pause that automatically pauses the DS, or should I add a line in my code to pause the DS as well (and if so, what is it)?

    Edit: Another question. neoshaman brought up using paraphrases, which seems necessary for if/when this system gets into the wild and it needs to obstruct as little screen space as possible.

    I was thinking I'd have the paraphrase for the menu, but also have something like a "tooltip" showing the full line. Any tips for how I'd do that?

    I imagine there'd need to be an "OnHighlighted" event, which I could then use to display the text.
     
    Last edited: Feb 28, 2018
  50. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    In a script, set DialogueTime.Mode to DialogueTime.TimeMode.Gameplay:
    Code (csharp):
    1. DialogueTime.Mode = DialogueTime.TimeMode.Gameplay;
    By default, it's set to Realtime because more often devs want to pause gameplay action during conversations.

    Funny, I just wrote about this in your forum thread. Use the Hover Response Button Example script on the Dialogue System Extras page.
     
    EternalAmbiguity likes this.