Search Unity

  1. Megacity Metro Demo now available. Download 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:
    12,686
    Thanks for posting this! The setting is very intriguing! I strikes me as a kind of Cold War steampunk Skyrim. I wasn't expecting that big robot to run up while you were looking through your "spellbook." :) I think the 2D dialogue style works really well, and it looks like it will be fun clicking around the different locations in the town. Are you using a first-person shooter kit like Ultimate FPS or Realistic FPS Prefab, or something homegrown?
     
  2. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    Yep that's the idea for an immersive rpg in an unusual setting. Trying to scale back the massive art requirement that something like Skyrim has is why we decided to try to go for 2D character art and a simplified town interface. I use ufps though with the code for attacks and weapon handling replaced to handle rpg stat driven weapons with a variety of control schemes (hold / release physics projectiles, more complex melee, defending, etc). I really like ufps' procedural camera setup for view bobbing and such (rather than canned animations) and object interaction interface though.
     
  3. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,686
    When you get a website or blog set up, please post the link here! I'd like to follow the project, and it would be good for building up buzz and a base of playtesters.
     
  4. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,686
    The Dialogue System for Unity 1.1.3 has just been released!!

    It should be available on the Asset Store in about 7 days. It's also available for immediate download on our customer download web page. If you need access, please PM me your invoice number.

    This release doesn't introduce any huge new features. Instead, it contains several usability additions requested by customers.

    New in version 1.1.3:
    • New: OnConversationStart and OnConversationEnd messages are now also broadcast to the Dialogue Manager object.
    • New: Added OnConversationLineCancelled and OnConversationCancelled messages (see Notification Messages).
    • New: Added optional Subtitle Continue Button.
    • New: Added dialogue event trigger OnEnable (see Triggers).
    • New: Added "Is Item" field to the Item (quest) table. If using the quest system, you can now set "Is Item" true on any actual items (i.e., non-quests) to exclude them from the quest system. To use this with existing databases, you'll need to add the field manually.
    • New: Added DialogueManager.PreloadMasterDatabase() method.
    • New: Added ProximitySelector component that can trigger OnUse messages based on proximity to usable objects. Also supports target selection callback delegates. (See Top Down Demo for an example.)
    • New: (NGUI) Added the ability to set up templates for NGUI barks.
    • Improved: Dialogue Manager now lazy-loads the UI. If you assign a new UI any time before the first conversation or alert message, the default UI will no longer be uselessly loaded.
    • Improved: Unity GUI subsystem's GUIScrollView now includes child controls in the scrollview.
    • Improved: Selector component now supports custom positions in addition to camera center and mouse position.
    • Improved: Selector component now supports target selection callback delegates.
    • Improved: (PlayMaker) Run Lua action can now save return values to Bool, Int, Float, or String variables.
    • Improved: (PlayMaker) Additional error reporting in PlayMaker actions.
    • Improved: (PlayMaker) The example scene now demonstrates many more actions.
    • Improved: Expanded documentation on triggers.
    • Improved: Usability improvements to the dialogue database editor.
    • Changed: (DFGUI) Changed DaikonForgeBarkUI to use dfFontBase to allow selection of bitmapped or dynamic fonts.
    • Fixed: (DFGUI) Bug in DaikonForgeFollowObject that caused bark text to pop when facing 180-degrees from barker.
    • (Thank you, Fuzzy_Slippers, for the DFGUI suggestions!)
    The big push for the next release (1.1.4) will be importer support for Twine and Neverwinter Nights' Aurora Toolset, as well as Killer Waves integration.
     
    Last edited: Dec 17, 2013
  5. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,686
    Just a quick update: The version that was submitted to the Asset Store is 1.1.3.1. It contains a couple small additions to 1.1.3:
    • The Proximity Selector component now selects another usable object in range if the player moves away from the current selection.
    • The dialogue database editor now sets new conversations’ START entries’ Sequences to “None()” instead of using the default sequence. This avoids an issue where conversations would appear to delay two seconds before starting. (The conversation is actually playing the default sequence, which includes a 2+ second delay.) The Chat Mapper and articy:draft importers already did this, but the in-Unity editor defaulted to a blank Sequence, which caused it to use the default sequence defined in your Dialogue Manager.
     
  6. neopan

    neopan

    Joined:
    Jan 15, 2013
    Posts:
    47
    I am a huge fan of the tornado twins and was wondering if you could integrate this into "FPS Control"?
     
  7. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,686
    I'll add it to the roadmap. FPS Control is a big system, and Killer Waves integration is first in line, so it might take some time to fully integrate. (And, rocki, confirming iOS support is at the very front of the line. We finally got all of the iOS development equipment.)
     
    Last edited: Dec 18, 2013
  8. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,686
    Customers: In rare configurations, a bug in 1.1.3 – 1.1.3.1 affects Unity GUI UI prefabs that have dialogue panels (that is, a container panel that holds all of the subtitle and response menu controls). A fix will be issued as soon as possible. In the meantime, there are two workarounds if you're affected:
    1. Drop the prefab into your scene, and assign it to the Dialogue Manager’s Dialogue UI property. The bug only affects prefabs, not scene objects. Or,
    2. Use one of these UI prefabs that don’t have dialogue panels: Celtic, Default, Computer, Mobile, Sci-fi, Streamlined, Wheel, Wheel2. (The following UI prefabs have dialogue panels, so you’ll have to use workaround #1: Circle, JRPG, JRPG2, Letterbox, Necro, Nuke.)
     
    Last edited: Dec 19, 2013
  9. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Tony, do you know yet what you're planning on adding as far as Killer Waves integration? We should chat on Skype, so you know what I'm recently adding (which is very powerful). Playmaker-like use of variables or entering values for all integer fields first. I'll be adding other variable types probably soon after that.
    Also, we should figure out what DarkTonic can do to return the favor. Any sort of Dialogue System integration we could add to Master Audio and/or Killer Waves is up for discussion!

    Thanks for taking the initiative Tony!
     
  10. thedreamer

    thedreamer

    Joined:
    May 13, 2013
    Posts:
    226
    UniRPG and RPG KIT 2.0 is Great tool too!!!! you know i mean? Dialogue is an important factor in the RPG GAME

    I look forward to the synergy of the two products
     
    Last edited: Dec 19, 2013
  11. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,686
    The Dialogue System provides a Lua environment that conversations can access. I'm adding a bridge between Killer Waves' world variables and Lua so conversations can check and modify world variables in Lua. But it sounds like I should wait for the world variable revamp in the next version of Killer Waves.

    Every line in a conversation can play a cutscene sequence defined by commands such as Animation(), Camera(), Audio(), etc. I'll add sequencer commands for controlling waves, basically the same set of commands as in your Playmaker actions but usable in sequences. So if you insult the wicked witch in a conversation, it can spawn a wave of flying monkeys, or you could convince a mad scientist to deactivate his oncoming army of killer robots.

    Talking about the sequencer, the built-in Audio() command uses Unity's AudioSource. I'm open to any suggestions for adding additional audio controls that would interface with Master Audio, or any other integration functionality with Killer Waves. Please let me know if you have any suggestions!

    Both are on the roadmap. I haven't yet used them very extensively, so it will take some time to design how best to integrate them with the Dialogue System. Please subscribe to this thread to receive updates!
     
  12. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Your product has integration with so much! You are an inspiration. We will be in touch.
     
  13. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    I can feel the love. It is encouraging that so many developers are working with each other to help the community on a whole. I have said it before but there are so many opportunities for these two app's to work together.
     
  14. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
  15. stalyan77

    stalyan77

    Joined:
    Nov 24, 2013
    Posts:
    14
    1 - Another one here very interested to see if the Dialogue System will be integrated with UniRPG or RPG Kit in the future. I haven't decided which one of both packages I may use yet, but I already bought yours to start tinkering, amazing job TonyLi! =)

    2 - quick question: i can't seem to open the .cmp files directly from unity. The message "unable to open blabla.cmp: Check external application preferences" is displayed instead.

    3 - A little issue to fix or maybe i'm doing something wrong:

    I followed your tutorial. Created the Adam and Bob conversation in Chatmapper pro. The first time i run the project, no dialogue lines are seen. Default camera angles work okey. I made use of the [f] tag and test it first in Chatmapper just to be sure that maybe the lines were being displayed too fast in Unity, but they did not show either.

    When I pressed the spacebar near Bob for the second time, the dialogue was properly displayed... don't know why this may happen.
     
    Last edited: Dec 21, 2013
  16. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    @TonyLi,

    Your package is super awesome and definitely on my buying list but my budget is so limited due to the holiday's obligations.

    Would you be having a Holiday Promotion for this package?

    This asset will probably sky-rocket up the "Top Grossing" list if you decide to go on the 24hr sale.

    Please let us know if you have a holiday promotion, will definitely try to get it then.

    Cheers.
     
  17. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,686
    Thanks for posting the notice. If anyone has enhancement suggestions for the articy:draft importer, please post them here. I've spoken with Nevigo, and they plan to add a command line option to export XML. This will let me add one-click imports like the Chat Mapper importer has. (Currently you have to manually export XML from articy:draft before you can import into Unity.)

    Those are high up on the roadmap. I'm just now finishing Killer Waves integration, then adding import support for Neverwinter Nights' Aurora Toolset, and then tackling UniRPG.

    Unity only observes file type associations for scripts, textures, and models. The best you can do is to right-click the .cmp file, select Show in Explorer, and open it there.

    You're not doing anything wrong. This is a bug that was introduced in 1.1.3. As a workaround, you can drop the UI prefab into your scene and point the Dialogue Manager to it, or use a different UI prefab (Celtic, Default, Computer, Mobile, Sci-fi, Streamlined, Wheel, Wheel2 work).

    Version 1.1.3.2, which includes the fix, will be published to the private customer download page later today. I'll PM you the access details. [Edit: Your PMs are disabled. Please PM me or email tony at pixelcrushers dotcom if you'd like access to the download page.]

    Thanks! The 24hr sale is invitation only. I'll contact Unity today to see if the Dialogue System can get on the list. When it's on sale, I'll post notice here.
     
    Last edited: Dec 21, 2013
  18. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,686
    Version 1.1.3.2 is now available on the customer download page. If you need access, please PM me your invoice number.

    The primary reason for this release is to fix a bug introduced in 1.1.3 that affected certain UI prefabs.

    Version 1.1.3.2:
    • New: (DFGUI, TK2D) Typewriter effect for DFGUI and TK2D labels.
    • Changed: Additional menu items in Window > Dialogue System > Help.
    • Changed: If a conversation's first dialogue entry ("START") has an empty Sequence, it skips the sequence instead of playing the default sequence.
    • Changed: The OnConversationLine message is now sent before showing the subtitle, allowing listeners to modify the subtitle before showing.
    • Changed: When opening a Unity GUI conversation UI, the screen rects of controls are now always recalculated in case screen resolution has changed.
    • Fixed: Bug with UI prefabs that prevented first subtitle from displaying if a dialogue panel was assigned.
     
  19. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    Did they mention if that will be in all version of Articy? I think any of their current fancier export options are reserved for their crazy expensive API access (requiring a 1500 euro server and then 1500 euro for the API itself).
     
  20. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,686
    My understanding is that they're planning to build it into articy:draft 2 single- and multi-user, so you shouldn't have to shell out for their pricey API access. But Julius at Nevigo did say: "You would still be required to have your articy:draft project open, but you could then send the export command directly from [Unity.]"
     
  21. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,686
    Merry Christmas, everyone! Old Saint Nick came down the chimney last night and delivered confirmation that the Dialogue System works fine on iOS devices. rocki, sorry for the delay. It took longer than I expected to renew my iOS developer membership and set up a new iOS dev environment.
     
  22. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    Ho Ho Ho,

    Great Stocking News.

    Thanks for the update. Merry Christmas.

    Cheers.
     
  23. neopan

    neopan

    Joined:
    Jan 15, 2013
    Posts:
    47
    I know I asked you about FPS Control [Tornado Twins], but since then my lead programmer asked me to shift our first project to a "Zelda Clone" in dungeons and dragons world [via the Open Game License, so no Lolth or Beholders .. or... whimpers... Mind Flayers] which necessitated moving over to UniRPG [which will later work with Ultimate FPS, which you also have plugs into]

    So now my question [since i see UniRPG on the RoadMap] is:

    WIll I be able to use Diaq [The UniRPG Qialogue and Quest System - I am aware you havent yet studied UniRPG in major depth yet, soz] for now you think and somehow export or relatively easily move over what I make to your Dialogue SYstem when it's integrated?

    If not, no worries, just curious. [I come from the Banking/Security/Networking world in which case this would be a NO .. but my several years trying to get into gamedev have taught me a lot more is possible here]
     
  24. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,686
    Hi neopan, UniRPG is one of the very next things on the roadmap. I've heard a rumor that the author is preparing a revamp of UniRPG that might have some significant changes. I'm going to contact the author and try to target the revamped version. Since I don't know what changes are coming in UniRPG, I can't tell you right now what kind of integration the Dialogue System will provide. But I'll look into the best way to integrate the quest and dialogue systems in UniRPG and the Dialogue System.
     
  25. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    Look also at RPG 2 kit. His quest system works very well with this app.
    http://zerano-unity3d.com/RPGKit/quest-editor/

    His quest editor can set just about anything. These are easy to access using the Dialog systems LUA.
     
  26. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Hi Tony. I've just finished coding Killer Waves 3.0. I'm not going to submit it to the Asset Store for another week or so while I polish up the example scenes and make another video, but I can send you the latest if you email me at support@darktonic.com so you can start integration and talks with us. There are now World Variables of integer and float types, with complete integration into every Inspector. Super flexible and powerful.

    Happy holidays and thanks!
     
  27. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    I am doing the snoopy happy dance now!!
    This is just in time for us. My team was just about to start adding killer waves with the Dialog system for our project.
     
  28. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Then you may want to get the beta from us before you start. Because upgrading from pre-3.0 means you will lose every value you've set that's an int or float in our Inspectors now that they're Killer ints and Killer floats.
     
  29. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    When will it hit the store? We could wait until you both update. You would both have the same example so that may be best.
    Have you made any examples that are not the 2d waves? one that would spawn 3d models in a scene?
     
  30. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Probably a couple weeks out, I still want to add pooling (like Pool Manager). We don't have any 3d models to use for that purpose, so not sure about that. I don't want to further hi-jack this thread, so if you have more questions, please post on the KW thread.
     
  31. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,686
    The next release of the Dialogue System will include support for Killer Waves v2.7.8. It's already written and tested, and the example scene spawns 3D models. When Killer Waves v3.0 is on the Asset Store, I'll include a support package for it. Functionally, the integration scripts will work the same with v2.7.8 and v3.0. They'll just be doing things a little differently under the hood.
     
  32. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    No rush for either of you. I am sure we all would like both your products working together to the fullest.
    We have a nice sized project we are working on and I have big plans for both of these.

    Oh yes big EVIL plans...

    But for both of you I will give you full updates so you can see all that your products can do together.
     
  33. EDarkness

    EDarkness

    Joined:
    Feb 1, 2013
    Posts:
    506
    I picked this up the other day and I'm going to try fiddling around with it since the previous dialog program I was using wasn't working. This one seems to be fairly robust, but I am worried about whether or not it'll be able to integrate into my game easily. I suppose I'll find out in a couple of days once I have time to really get it working.

    I do want to know what can I leave out in order to get functionality with NGUI. I don't want a lot of extra stuff in my main project, so I generally remove demos and such, but recently I've found that some people weave the demo into the main setup in such a way that leaving it out just causes problems. I figured it'd be better to get that sorted out now.

    Thanks.
     
  34. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,686
    EDarkness, You can delete the entire Examples folder, Documentation folder, and all unitypackage files in Third Party Support once you've imported whatever third-party support packages you need.

    Examples/Scripts contains some useful scripts that were originally provided just to drive the example scenes. However, many customers use them in their projects, so in the next release (due tomorrow) they'll be located in Scripts/Supplemental. This folder will also include new wizards that make it very easy to set up players and NPCs with conversations, barks, and gameplay integration. If you have any questions about using the Dialogue System, please post here or PM me any time.
     
  35. tiggus

    tiggus

    Joined:
    Sep 2, 2010
    Posts:
    1,240
    Read through the documentation a bit and interested in the dialogue editor functionality and how hard it would be to turn this into a in-game quest maker for something like a world/map editing tool. Has anyone done this previously or any gotchas that might come up?
     
  36. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,686
    The dialogue database and associated Lua environment can change in-game using PlayMaker actions, Lua commands, or scripts, so there aren't any technical barriers. The built-in dialogue editor is meant for design-time (i.e., only in the Unity editor), so you'd be responsible for providing your own in-game editor to make changes to the dialogue database. If you have any specific questions or need any pointers, please post here or PM me any time.
     
  37. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,686
    The Dialogue System for Unity 1.1.4 has just been released!!

    It should be available on the Asset Store in about 7 days. It's also available for immediate download on our customer download web page. If you need access, please PM me your invoice number.

    Important Upgrade Note: When upgrading, please remove the Dialogue System folder before importing 1.1.4. The Examples/Scripts folder was moved to Scripts/Supplemental. Many customers are using these scripts for their projects; they're not just examples any more. Moving them out of Examples will allow you to delete the entire Examples folder if you want to reduce the size of your project.

    New in 1.1.4:
    • New: Killer Waves integration.
    • New: Neverwinter Nights 1 2 Aurora Toolset importer.
    • New: Wizards to simplify configuration of NPCs, PCs, and gameplay integration.
    • New: Separate dialogue database editor window. (Editing in inspector is also still available.)
    • New: Added Rich Text Emphases checkbox to display settings to use rich text codes for emphasis tags.
    • New: (PlayMaker) Added new actions: PreloadMasterDatabase, PreloadDialogueUI, SetStatus, GetStatus, SetRelationship, GetRelationship, IncRelationship, DecRelationship.
    • Improved: Interface enhancements to the dialogue database editor and Chat Mapper importer.
    • Improved: (UFPS, Realistic FPS Prefab): Added menu items for integration components.
    • Changed: Moved scripts in Examples/Scripts to Scripts/Supplemental/Utility.
    • Changed: The Always Force Response Menu display setting is now ticked by default.
    I'm excited about the new NPC Setup and PC Setup Wizards. They should make it much easier to set up characters with all the right components to trigger conversations and barks.

    The current Killer Waves integration package works with Killer Waves v2.7.x, so it requires Unity 4.3+. When Dark Tonic releases Killer Waves v3.0, I'll update the support package to work with the new world variable system. This will be an "under the hood" change. Nothing should change for users of the integration package.

    Pixel Crushers will be closed January 2-5. If you have any support questions, ask 'em now or wait until the 6th. :)
     
  38. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Tony, if you would be so kind as to go post the same thing (Killer Waves support) over on the Killer Waves thread, it would be much appreciated :)

    Thanks!
     
  39. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    Looks great. I can't wait to dig into this release. That Aurora Toolset integration is nutty. Are there people out there using it just for conversations /rpg db needs or is it more like so modding teams can port their work out of the old engine?
     
  40. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,686
    jerotas, done. Thanks!

    Fuzzy_Slippers, I'm not sure of the backgrounds, but one team contacted me with 500,000+ words of dialogue in Neverwinter Nights 1 that they wanted to bring into Unity, and since then coincidentally another team asked about Neverwinter Nights 2. The importer does both. The Neverwinter Nights and Dragon Age toolsets were the inspiration behind the design of the Dialogue System's built-in editor, so I guess it's fitting. :)
     
  41. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    Crazy. I hope those teams post about their experiences somewhere as it'd be interesting to hear how porting from NWN to Unity goes for them.
     
  42. EDarkness

    EDarkness

    Joined:
    Feb 1, 2013
    Posts:
    506
    I'm finally delving into this system and I have to integrate it into my project which will be no small feat. Everything I've done so far is completely custom same with the UI. So as I look at this piece of software I need to know more about where the hooks are into the system since I'll have to make calls to it. Here's a screen from my game so you can get an idea of how it's setup.

    $Skullforge_4.png

    In this case I have two actors and I don't want to be zooming into their face. The camera angle is set and shouldn't be messed with...at least not generally. The main character is on the left and the NPC is on the right. In the middle is a list of possible questions the player can ask. Right now it's in a box, but in the future it will simply be a list without a box as I think it would be much cleaner that way. All text in this picture is temporary and added by hand just to get a feel for the text when it's actually on the screen.

    So what would be the best way to handle this? The text itself can simply be printed in the dialog boxes, however, the list needs to be handled by the dialogue system. Any suggestions would be greatly appreciated.
     
  43. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,686
    EDarkness, in the Dialogue Manager's Display Settings, change Default Sequence to Delay({{end}}) or None(). The first will display the NPC's text and wait a few seconds (based on the length of the text) before displaying the player response menu. The second will display the NPC's text and then immediately display the player responses. Neither of them include camera commands, so they won't touch the camera. (The default value of Default Sequence does the camera closeups you mentioned.)

    You can also define a custom sequence for each line of dialogue. Customers often set the conversation's first line to rotate both participants to look at each other, using the LookAt() sequencer command. But of course that's entirely up to you.

    You have several options. The Dialogue System doesn't lock you into a specific type of UI, although it also provides polished, ready-to-use UIs out of the box.

    The bottom line is that your dialogue UI needs to implement a simple C# interface (IDialogueUI).

    The Dialogue System provides pre-written implementations in Unity GUI, NGUI, Daikon Forge GUI, and 2D Toolkit UI. To use NGUI, DF-GUI, or TK2D, you need to import the sub-package in Third Party Support.

    An easy way to set up your UI is to choose a UI prefab that's kind of similar to what you want. Add it to the scene, select Break Prefab Instance (so you're not modifying the original), and customize it. Then assign is to the Dialogue Manager. Or save it as a prefab and assign the prefab. More details are here, and a video tutorial is here.

    If you already have a GUI class that you want to use instead of the provided UI systems, you can just add the IDialogueUI methods to it.

    If I can clarify more or provide additional details, please let me know!
     
  44. EDarkness

    EDarkness

    Joined:
    Feb 1, 2013
    Posts:
    506
    I just spent much of the night trying to get the Bark System to work in my framework. Lots of time and effort there and I had to modify some of the code as well. Ugh. The good thing is I got it working.

    Anyway, thanks for the response. Not sure how it's going to work since my system is very specific with regards to UI. I'll see what I can do, but I hope it's nothing like what I just had to go through to get just the Bark System to work. Sheesh. Might have to wait until tomorrow since it's almost 1am here now.

    I do have another question...

    Is there a way to have a random bark be nothing? So that sometimes they say something and sometimes they don't? Or how about they say "Good Morning" once a day or something like that? I'd like random guards to sometimes say something, but not all the time.
     
  45. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,686
    May I ask what you had to modify? Maybe I need to add more documentation on the bark system. If you ever feel like you have to modify code, please let me know; perhaps I can point out how to do it within the existing system.

    [Edit: The bark system interface is also modular. If it's a UI thing, you can implement IBarkUI rather than modifying code. As with dialogue UIs, the Dialogue System comes with pre-written implementations in Unity GUI, NGUI, DF-GUI, and TK2D.]

    Absolutely. Barks are pulled from a conversation. All entries that are linked from the START entry are considered. If an entry's Condition is false, it won't be added to the random bark list. You could add conditions that check the time of day for "Good morning," "Good afternoon," "Good evening," etc. You can also add a blank entry if you want the guard to say nothing.
     
    Last edited: Dec 31, 2013
  46. EDarkness

    EDarkness

    Joined:
    Feb 1, 2013
    Posts:
    506
    Well, the situation is that my game has a bunch of different cameras that are doing different things. When your NGUI code was looking for the camera, it kept picking up a random camera for some reason, so I had to go in and force it to look for the actual game camera. This is an NGUI thing and something I'll have to bring up with AM, especially if games are going to be having multiple cameras for the game.

    Also, the way you're adding labels over the heads of characters was actually putting the label on the feet, which looked crazy. I have HUDText and AM told me that it was best to add a simple object above the head of the character and use that transform instead of the transform of the character itself. So I had to go in and adjust the code to get it to use the right object to get the transform. I tried using SendMessage("OnUse", transform), but this didn't do anything. Which meant I had to modify the code by hand.

    The other thing is that objects weren't destroyed when the object died. So I added a little bark to my NPCs for when they show up and say something like "You're gonna die!". Unfortunately, when the NPCs died the bark object that was created was never destroyed. The same for NPCs in the area that were added to the list once the zone was loaded. When moving to a new zone, those objects were still there and going back to a new zone was just adding another object to the list with the same name. This was getting out of hand extremely quick. I had to add a "destroy myself" function to the script.

    Luckily, I got it working, but it was a bit of a pain. Maybe I was doing something wrong, but just adding the scripts and hitting play wasn't working.


    Does this mean I have to learn LUA or can we just write some C# scripts to do all this stuff?
     
  47. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,686
    If you have a suggestion to work around this before he addresses it in NGUI, please let me know and I'll implement it.

    Somewhat related is the cutscene sequencer camera. If a sequence contains a camera-control command, such as the Dialogue Manager's Default Sequence, it will use the camera assigned to the Dialogue Manager's Sequencer Camera property. If this is a prefab, it will instantiate it for the duration of the sequence. This allows you to set up a camera specifically for cutscene sequences with depth of field effects, etc. If the Sequencer Camera property is unassigned, the sequencer will grab Camera.main. When the sequence is done, it will return Camera.main to its original position. I don't know if this came into play for you, but it's worth keeping in mind.

    The bark UI doesn't know how high up you want to place the label; you need to set the offset. HUDText is another good way to do this since you have it. That's what the Ashes demo uses. I didn't include a bark UI script for NGUI + HUDText, but I can put that in the next release and in a patch that I'll put on the download page tomorrow. In general, I'd recommend subclassing or implementing interfaces (e.g., IBarkUI) rather than modifying code. This way you won't lose anything when updating the Dialogue System. There's a template for IBarkUI in Scripts/Templates.

    Sorry, that was an oversight on my part. I'll fix that in the next release and put it in tomorrow's patch.

    Lua was selected so writers using authoring tools such as Chat Mapper (which uses Lua) could implement and test their logic and text before bringing it into Unity. There's isn't much to Lua, and you shouldn't need to do more than assign and check variable values. For example:

    Assignment: (setting the time)
    Code (csharp):
    1. Variable["Time"] = 1900
    Condition: (e.g., placed on a "Good evening" bark)
    Code (csharp):
    1. (1700 < Variable["Time"]) and (Variable["Time"] < 2100)
    The logical operators are the same as C# except:

    Not-equal: ~= (not !=)
    Booleans: 'and', 'or' (not , ||)

    You could also use Lua.RegisterFunction() to register your own C# methods with the Lua environment and call them instead.

    I'm sorry about the frustrations you've encountered. The Dialogue System is a big product with a lot of features. I'm confident that once you get it all set up within your framework it should be smooth sailing (at least on the dialogue front :)). Just keep in mind that you're not on your own. I strongly believe that providing a good product is only 50% of the commitment. The other 50% is support. I'll do what it takes to make sure the Dialogue System works for you.
     
    Last edited: Dec 31, 2013
  48. EDarkness

    EDarkness

    Joined:
    Feb 1, 2013
    Posts:
    506
    No real suggestion, honestly. I had to place a script on the UI camera that held the main game camera since that was something NGUI could find 100% of the time. Once it had the UI camera, I could get the script off the object and the camera attached to it. This way I could guarantee it was getting the right camera. It's not an elegant solution, but outside of doing a Find, it seemed like the easiest way to go. Once I talk this over with AM, maybe he'll have a better solution.

    Something I'll do today most likely. It was a quick and dirty way to just get things working. I'll have to clean it up at some point. I was just happy I got it working. Heh, heh.


    Great. Glad I was able to catch that one for you. :)


    Thanks for the assistance. My dialogue setup is going to be complicated and that's something I'm prepared to deal with as I think the end will make it more enjoyable for the player. I'm pretty sure there will be lots of discussion about it all, and I hope you can bear with me as I get it sorted.

    On that note, Happy New Year!! :)

    *EDIT:* Alright, I finally have the conversation stuff working...basically. How can I remove the timer and remove the need for the NPC's response text to be seen? With the system I have, the text is always on the screen, so the player will always be able to see what the NPC said and for long stretches of dialog, I'm gonna have a scroll window for the player to use to backtrack if necessary. Right now there isn't a need for that, so I just want the text to be put up on the screen and have it stay there instead of being removed.

    Also, the game is going to be on consoles, so everything has to work with a controller. How can I force up/down arrows and d-pad/analog stick for selecting options?
     
    Last edited: Dec 31, 2013
  49. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,686
    If you're talking about the countdown timer bar that auto-selects a response if you run out of time, then just set the Dialogue Manager's Response Timeout to 0 (zero). The timer won't be shown. You can get rid of the timer control if you want to in this case.

    If you're talking about the delay between showing the NPC's text and presenting the response menu, this is also set on the Dialogue Manager, using Subtitle Chars Per Second and Min Subtitle Seconds. They determine a value called {{end}}, where:

    {{end}} = (the length of the text) / (Subtitle Chars Per Second)

    If this is less than Min Subtitle Seconds, then {{end}} is set to Min Subtitle Seconds.

    The Dialogue Manager's Default Sequence can reference {{end}}.

    For example, "Delay({{end}})" simply waits until the duration is over.

    As another example, "Camera(Closeup); Camera(Closeup,listener)@{{end}}" immediately does a closeup of the speaker. Then, at the end of the duration, it does a closeup of the listener.

    The Default Sequence is ignored if the dialogue entry has its own sequence or if you untick Show NPC Subtitles During Line.

    If you want to immediately go to the response menu, just change the Default Sequence to "None()". Or untick Show NPC Subtitles During Line. This will skip the text display altogether. As long as Show NPC Subtitles With Responses is ticked, the text will be shown with the player response menu.

    You could also untick both and listen for OnConversationLine() messages. This passes a Subtitle object containing the text.

    There isn't a built-in way; you'll have to use what NGUI offers in this regard, such as using UIButtonKeys. Another customer just mapped his four responses to the A/B/X/Y buttons like The Walking Dead does.

    I just submitted version 1.1.4.1 to the Asset Store and published it on the Pixel Crushers customer download page. It includes the HUD Text Bark UI. Also, NPCs using NGUI or DFGUI bark UIs now properly destroy their UI label controls when the NPCs are destroyed.
     
  50. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,686
    The Dialogue System for Unity 1.1.4.1 has just been released!!

    It should be available on the Asset Store in about 7 days. It's also available for immediate download on our customer download web page. If you need access, please PM me your invoice number. I'll be out January 2-5, but I'll respond as soon as I'm back in the office.

    Important Upgrade Note: When upgrading from 1.1.3.2 or earlier, please remove the Dialogue System folder before importing 1.1.4. The Examples/Scripts folder was moved to Scripts/Supplemental. If you're already at 1.1.4, you can import on top of the existing Dialogue System folder.

    Changes in 1.1.4.1:
    • New: Added support package for NGUI HUD Text barks (requires NGUI HUD Text).
    • New: Added sequencer commands AnimatorTrigger(), AudioWait(), Voice().
    • Improved: Added optional finalClip parameter to Animation() sequencer command.
    • Improved: Added Allow During Conversations checkbox to Bark Trigger.
    • Improved: Added more examples scenes: Unity GUI Continue button, Menu Text + Dialogue Text, Three NPC bark sequence.
    • Improved: Added Don't Destroy Root checkbox to NGUI and DF-GUI Bark Roots.
    • Improved/Fixed: (NGUI/DFGUI) If an NPC with a NGUI or DFGUI bark UI is destroyed, its UI bark label is now also destroyed. (Thanks for catching this, EDarkness!)
    • Fixed: Bug in NPC wizard script that prevented adding bark UIs.
    • Changed: In the dialogue editor, lines with conditions now have a literal string "[condition]" instead of the actual Lua condition. Multi-line conditions were causing overlapped text.