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. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    321
    Did you believe me if I tell you that I'm absolutely lost o_O
    I've watched the tutorials a couple of times, and + / - they are working but I've no idea what I've done, why and... I'm still lost :confused:
     
  2. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @MaximilianPs! Just to make sure you're watching the version 2.x tutorials, did you try the Quick Start tutorial? It's available on the Tutorials page along with several other tutorials. Are there any specific questions I can answer? If you're more task-oriented, perhaps we could step through a task together, such as writing a conversation or setting up a Dialogue System Trigger. Just let me know how I can help.
     
    MaximilianPs likes this.
  3. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    City of the Shroud out now on Steam

    Check out Abyssal Arts' City of the Shroud, made with the Dialogue System for Unity, and just released on Steam:



    Engadget calls it "An RPG with a truly player-driven story... Very, very ambitious."

    Kotaku says it's "A game to look out for."

    And GameSpew simply writes, "A freakin' awesome game."

    Congratulations to Abyssal Arts on their release!
     
    Dreamaster and fancyferret like this.
  4. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,635
    @TonyLi , I have a question. My project has dozens of interactive characters with unique dialogs. There is also an inventory system that allows you to "hold" (i.e. equip) one item at a time. Depending on what item you have equipped, there are certain key characters that, instead of their regular dialog, they will have special dialogue regarding the item ("Hey that's a nice camera you have there! Maybe you could take a picture for me" etc.). I already know how to do this by having that character's dialog branch using the dialog conditions. That's pretty easy.

    Now I want to add an item called "stinky cheese". When your holding the cheese, aside from two or three special characters, I want every character in the game's regular dialog to be replaced with a single stinky-cheese-reaction dialog ("get that rancid thing away from me!"). Is there a way to do that without having to add a branch to each of my characters' dialogs? Thanks.
     
  5. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @kdgalla! I can suggest three approaches:

    1. To keep the logic in the dialogue database, you could link their conversations' <START> nodes to the stinky cheese conversation. Admittedly, this is similar to adding a branch to each conversation, but it's a little shorter because instead of a new branch in each conversation it's just a single cross-conversation link. Set the link's priority to to AboveNormal, and set the destination node's Conditions (in the stinky cheese conversation) to require that the player has the stinky cheese.

    Since the link to the stinky cheese conversation is AboveNormal, the Dialogue System will check this link's Conditions first. If true, it will follow the link to the stinky cheese conversation. Otherwise it will play the character's regular conversation.


    2. Or you can add a second Dialogue System Trigger to each character. (Assuming you're using Dialogue System Trigger to start conversations.) On the first Dialogue System Trigger that runs the regular conversation, set Conditions > Lua Conditions to check that the player doesn't have the stinky cheese. On the second Dialogue System Trigger, check that the player has the stinky cheese, and play the stinky cheese conversation.


    3. This one's perhaps more of a hack, but since you have dozens of characters already configured it might be easiest to implement. To the Dialogue Manager or player, add a script with an OnConversationStart() method. In this method, check if the player has the cheese and the conversant (NPC) is not one of the special characters. If those requirements are true, stop the conversation using DialogueManager.StopConversation(), and manually start the stinky cheese conversation using DialogueManager.StartConversation().
     
  6. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,635
    Thanks for the ideas! There's a lot to work with here.
     
  7. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Glad to help! If you have any questions about implementing any of those, just let me know.
     
  8. imaginationrabbit

    imaginationrabbit

    Joined:
    Sep 23, 2013
    Posts:
    349
    Hey Tony- Love Dialogue System! (And SceneStreamer :))

    Just upgraded my 1.8x project to 2.x and I'm having issues with the "UIButtonKeyTrigger" class- It worked in the 1.8x version of the project but now none of the scripts recognize the key presses that use it-

    I took a look at the script and now there's several versions of the "UIButtonKeyTrigger" in 2.x with wrapper classes etc which goes beyond my C# skills :(

    I've gone back to working with my backup 1.8x project as everything works well in that one- I'll eventually try to upgrade again- do you have any tips as to what I should be looking for when I upgrade again to keep the functionality? Thank you.
     
  9. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @mdotstrange! It sounds like you've already done the Upgrading From Version 1.x instructions. (If not, do that when upgrading from 1.x to 2.x.)

    UIButtonKeyTrigger now reads input from the Input Device Manager component. If your Dialogue Manager doesn't have this component, add it. (The version 2.x Dialogue Manager prefab has this by default.)

    If you're using Rewired, import Plugins / Common / Third Party Support / Rewired Support. Then add an Input Device Manager Rewired component.
     
    imaginationrabbit likes this.
  10. imaginationrabbit

    imaginationrabbit

    Joined:
    Sep 23, 2013
    Posts:
    349
    Thanks for the quick reply- I did follow the 1.x to 2.x upgrades instructions from your Youtube video-

    I suspect that it must have been that missing component as I'm using the old Manager prefab-

    I am also using Rewired so I'll double check that as well- I did reinstall the integrations though-

    Thank you for the info I will give it another shot.
     
  11. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Sounds good. If you run into any issues, just let me know.
     
    imaginationrabbit likes this.
  12. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,635
    I've decided to update my project from 1.x to the latest version. I knew it would break my existing set-up, but I think it will be worth while in the long run. So far, was able to rework most of my custom GUI to use the new StandardDialogueUI object.

    One problem I've run in to: My previous GUI used to have a seperate panel for the "response menu subtitle reminder line" (separate from both the PC and NPC subtitle lines). In the new StandardDialogueUI insoector fields, I don't see a place to plug-in this object. Is it still possible?
     
  13. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @kdgalla! In retrospect, the response menu's "subtitle reminder" panel was more confusing than helpful for most people. Almost invariably, people just want the regular subtitle panel to remain visible during the response menu. To do this with the StandardDialogueUI, set the subtitle panels' Visibility to Until Superceded, or even Always Once Shown or Always From Start if you want them to remain visible under additional conditions, too.
     
  14. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,635
    Thanks. I'll experiment with these options. I agree that creating my own GUI was really difficult and confusing for me when I first started working with the Dialogue system. That's understandable considering how flexible and customizable that it needs to be, but I think the new version is definitely an improvement!
     
    TonyLi likes this.
  15. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Unity ECS Compatibility

    Just a quick note about Unity ECS, which is available in a beta package in Unity's package manager. The Dialogue System for Unity works fine with ECS, with one exception, but is not specifically implemented to take advantage of all ECS features. If you've imported the beta ECS package into your project, delete both instances of LuaNetworkCommands.cs. This will remove the Lua Network Commands. It's the only step you need to take to get the Dialogue System working in an ECS project.
     
    Mazak and hopeful like this.
  16. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Bolt Visual Scripting Support Now Available

    Support for Ludiq's Bolt visual scripting system is now available on the Dialogue System Extras page. Under "Updated Support Packages", expand "Updated Support Packages for 2.0.3". This package will also be included in the upcoming version 2.0.4.

    Be sure to read the Bolt Support manual page since there are some required setup steps.

    If you have any feedback, feature requests, or bug reports, please let me know.
     
  17. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    uMMORPG Addon Bug Fix

    If you're using the Dialogue System's uMMORPG Addon, please download the updated package from the Dialogue System Extras page. It fixes an important bug.

    If you're also using Quest Machine with uMMORPG, you can download the updated addon package for it here:
    QM_uMMORPG_Support_2018-08-18.unitypackage

    These updated packages will also be in Dialogue System 2.0.4 and Quest Machine 1.0.7
     
    Dreamaster likes this.
  18. hungrybelome

    hungrybelome

    Joined:
    Dec 31, 2014
    Posts:
    336
    Hi, can your typewriter effect/special codes work with TextMeshPro (non UGUI version)?
     
    Last edited: Aug 24, 2018
  19. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @hungrybelome - Yes, in current versions of TextMesh Pro where they both have the same base class (TMPro.TMP_Text), but not in the older Digital Native version before Unity bought TMP.
     
    hungrybelome likes this.
  20. hungrybelome

    hungrybelome

    Joined:
    Dec 31, 2014
    Posts:
    336
    Thanks!

    Also, I am trying out the evaluation version, and when trying to create the initial database I get this error:

    Code (CSharp):
    1. ReflectionTypeLoadException: Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.
    2. System.Reflection.Assembly.GetExportedTypes () (at <f2e6809acb14476a81f399aeb800f8f2>:0)
    3. PixelCrushers.TypeUtility.<GetWrapperType>m__1 (System.Reflection.Assembly domainAssembly) (at <39557755f4814a249f0f980ca39cbcba>:0)
    4. System.Linq.Enumerable+<SelectManyIterator>d__167`3[TSource,TCollection,TResult].MoveNext () (at <839a3cb835c04d14aeb58d83bb7bc4bd>:0)
    5. System.Linq.Enumerable+WhereSelectEnumerableIterator`2[TSource,TResult].ToArray () (at <839a3cb835c04d14aeb58d83bb7bc4bd>:0)
    6. System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) (at <839a3cb835c04d14aeb58d83bb7bc4bd>:0)
    7. PixelCrushers.TypeUtility.GetWrapperType (System.Type type) (at <39557755f4814a249f0f980ca39cbcba>:0)
    8. PixelCrushers.DialogueSystem.DialogueSystemMenuItems.CreateDialogueDatabaseInstance () (at <76e8c80835ec4f16b27b49e32bd8d102>:0)
    9. PixelCrushers.DialogueSystem.DialogueSystemControllerEditor.CreateInitialDatabase () (at <76e8c80835ec4f16b27b49e32bd8d102>:0)
    10. PixelCrushers.DialogueSystem.DialogueSystemControllerEditor.OnInspectorGUI () (at <76e8c80835ec4f16b27b49e32bd8d102>:0)
    11. UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor[] editors, System.Int32 editorIndex, System.Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1374)
    12. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    13.  
    I'm on OSX, Unity 2018.2.5f1, targeting iOS, downloaded from here: https://www.pixelcrushers.com/dialogue-system-evaluation-downloads/.

    Thanks
     
  21. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @hungrybelome - You can still create the database, though, correct? If so, you can ignore the message or fix it as described below. If it doesn't create the database, you have a really old DLL, and the fix below should also address it.

    In version 2.0.4, reporting for this condition is handled more gracefully. What it's really reporting is that you probably have an old DLL in your project that can't be fully read. The most common culprit is PlayMaker 1.8.9 or earlier, which wasn't built against Unity 2018.2. If you're running PlayMaker 1.8.9 or earlier, update PlayMaker. (I only call out PlayMaker because everyone has it, which is why it's the most common culprit.)

    To be able to offer an evaluation version that maintains full asset compatibility with the paid version, the Dialogue System uses wrapper scripts. It examines the project's DLLs to link up the wrappers with their underlying classes, which will be in a DLL for the evaluation version or in source scripts for the paid version. If it can't examine a DLL for some reason, it reports this warning.
     
    Last edited: Aug 24, 2018
  22. hungrybelome

    hungrybelome

    Joined:
    Dec 31, 2014
    Posts:
    336
    It actually did not proceed to create a database when I got that error. However, I removed a faulty DLL as you suggested, and then the database was successfully created. Thanks! I'll be testing out the plugin and seeing how well it integrates with I2Localization. Going through the docs, seems pretty good so far!
     
  23. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Sorry about that. That condition is also handled much better in 2.0.4.

    Sounds good. If you have any questions about using i2 with it, just let me know.
     
    hungrybelome likes this.
  24. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,635
    @TonyLi, What is the best practice now for using the uGui Dialogue System implementation, but using a third-party input system instead of Unity's input bindings? In my case I'm using InControl, but it seems like all of the Dialogue UI systems have the controls embedded in the scripts. Is there an abstraction for this?
     
  25. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @kdgalla - Assign functions to InputDeviceManager.instance.GetButtonDownDelegate and InputDeviceManager.instance.GetAxisDelegate.

    If you're using version 2.0.3.1 or earlier (that is, all current versions as of this post) also assign the same button down function to DialogueManager.getInputButtonDown so the Dialogue Manager's Input Settings > Cancel and Cancel Conversation buttons will use it. In version 2.0.4+, you no longer have to assign the function to DialogueManager.getInputButtonDown. This was an oversight on my part that I fixed in 2.0.4.

    All Dialogue System input uses these delegates. Nothing polls Unity's Input class directly. By default, the delegates point to Input.GetButtonDown(), etc.

    Example:
    Code (csharp):
    1. InputDeviceManager.instance.GetButtonDownDelegate = InControlGetButtonDown;
    2. ...
    3. bool InControlGetButtonDown(string buttonName)
    4. {
    5.     InputManager.ActiveDevice.GetControlByName(buttonName).WasPressed;
    6. }
    It's been a while since I've used InControl. The syntax might be a little off, but that's the idea.
     
  26. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,635
    Perfect! Thanks for the quick reply!
     
  27. Haapavuo

    Haapavuo

    Joined:
    Sep 19, 2015
    Posts:
    97
    We are getting a null reference exception from inside ProximitySelector class when using evaluation version 2.0.3.1. The log message is not really useful:

    NullReferenceException: Object reference not set to an instance of an object
    PixelCrushers.DialogueSystem.ProximitySelector.Update () (at <9bfb2fb24db240f6bd9fdb1f18243bc0>:0)

    Could you improve the logging to indicate what causes the exception? If you fix the issue quick enough, there is a high probability that we will be buying 4 copies of this asset.
     
  28. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @Haapavuo - It's already addressed in version 2.0.4, which is pending on the Asset Store. Since 2.0.4 isn't available on the Asset Store yet, I haven't switched the evaluation page to the 2.0.4 evaluation version. But you can download it here:

    DialogueSystem_2_0_4_Evaluation_Unity2017plus.unitypackage

    Version 2.0.4 will also be available on the Pixel Crushers customer download site today. If you buy the Dialogue System, please PM me your Unity Asset Store invoice number, and I'll set up your download access.

    BTW, the Dialogue System uses the Asset Store's standard license, not the per-seat editor extension license. You only need one license for your entire studio as long as they're physically co-located.
     
  29. Haapavuo

    Haapavuo

    Joined:
    Sep 19, 2015
    Posts:
    97
    Thanks for a fast response. That seems to fix the null refs.

    Purchasing the asset now. You deserve the money.
     
    TonyLi likes this.
  30. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Thanks! If you have any questions about using it, just let me know! And if you'd like to download version 2.0.4 before it's available on the Asset Store, please PM me your Asset Store invoice number.
     
  31. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Dialogue System for Unity 2.0.4 Released!

    Version 2.0.4 is now available on the Asset Store and the Pixel Crushers customer download site.

    Highlights are Bolt support and improvements to uMMORPG / uMMORPG2D support. The i2 Localization integration also has improved right-to-left support.


    Version 2.0.4:
    Core:
    • Changed: LuaNetworkFunctions is now only available if compiler symbol USE_UNET is defined.
    • Changed: Standard Dialogue UI subtitle panel clears subtitle text on close. Added ClearText method.
    • Changed: SmoothCameraWithBumper demo script no longer auto-parents to target. Set parent manually at design time.
    • Improved: Updated for compatibility with new prefab system (pending 2018.3 release).
    • Improved: DialogueManager.GetInputButtonDown reads from InputDeviceManager.
    • Improved: GameSaver now uses SaveSystem if present.
    • Added: Animator Saver.
    • Added: SetPanel() sequencer command.
    • Fixed: LuaInterpreter now does short circuit evaluation of Boolean operators (and/or).
    • Fixed: OnConversationResponseMenu was called twice when using continue button.
    • Fixed: Removed editor warning in EditorNote.cs.
    • Fixed: DialogueManager methods no longer report error if scene doesn't have a Dialogue Manager instance.
    • Fixed: Zoom2D sequencer command no longer reports null reference if sequencer is destroyed during sequence.
    Third Party Support:
    • Bolt Visual Scripting: Added support.
    • I2 Localization: Added Dialogue System Use I2 RTL Fix component.
    • PlayMaker: Added Save System Record/Apply Saved Game Data actions.
    • RT-Voice: Save Audio Files window no longer prints warning for entries with no text.
    • uMMORPG: Fixed client/server synchronization issue. Added party variable & monster "on death" trigger synchronization.
     
    Last edited: Aug 28, 2018
    Akshara likes this.
  32. Dreamaster

    Dreamaster

    Joined:
    Aug 4, 2014
    Posts:
    148
    Good morning Tony!
    Does your Opsive 3rd Person Controller integration need to be updated to version 2? Just bought their controller recently and the integration is missing some Dialogue Manager scripts, which probably means it's meant for version 1.x?
     
  33. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @Dreamaster - Please use the Third Person Controller Support package in Plugins / Pixel Crushers / Dialogue System / Third Party Support. (Instructions are here.) I just forgot to send it to Opsive to put on their site.
     
    Dreamaster likes this.
  34. Dreamaster

    Dreamaster

    Joined:
    Aug 4, 2014
    Posts:
    148
    Mind blown.... Thanks for your hard work Tony.

    Screenshot 2018-08-28 10.46.00.png
     
    TonyLi likes this.
  35. Cleverlie

    Cleverlie

    Joined:
    Dec 23, 2013
    Posts:
    219
    hi @TonyLi I have a question, I need to modify the current aspect of the dialogue UI I'm using, I took the standard dialogue UI from the asset and modified it a bit with custom sprites etc. but now I've been asked to change the look of the dialogue to a look like a messaging app, like whatsapp, so basically what I need is something like this layout:

    concept.jpg

    Now, I don't need help with the aesthetic details or how to create or use a ScrollView, but what I need is to know how I can start doing the backend of this, I imagine some script that captures events like "OnDialogueEntrySpoken" and instantiates a UI prefab that has the small thumbnail and the text on it.

    I've seen that the asset comes with a couple of handy templates for different situations, games or UX, but none that has this kind of layout, at least none that I've found.

    can you put me in the right direction? cheers!
     
  36. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @Cleverlie - Look at the Textline template available on the Dialogue System Extras page. It's modeled after Three Minute Games' Lifeline, so it works very similarly. It uses a subclass of StandardDialogueUI that does what you described.
     
    hopeful likes this.
  37. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    Hello Tony. I have two questions for you that revolve around my Invector TPC, Emerald AI and Dialog System Project.

    1) I have an Emerald AI NPC doing a waypoint patrols and I want to be able to when I come in a radius for it to have it stop, doing some voice (sound) dialog along with the text and give the quest.

    2) I also would like when I complete certain quests (kill 5 wolves) that the quest reward be an item and that item to then appear and be usable in the Invector TPC's players inventory.

    Thanks!
     
  38. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @SickaGamer - There are a few parts to this.

    1. Write your quest in the dialogue database. For an example, see the demo scene's Enemy Attack quest.

    2. Write the NPC's conversation. For an example, see the demo scene's Sergeant Graves conversation. Don't worry about giving the reward item just yet. To play audio (like in the demo), put your audio files in a Resources folder. Then drag the corresponding audio file onto each dialogue entry node's Sequence field. This will add an AudioWait() command that plays the audio with that line of dialogue.

    3. Now you need to make the NPC start a conversation when the player enters a radius. At runtime, Emerald adds a Sphere trigger collider whose radius is the AI's detection distance.
    • If you want to use this same distance for the conversation, add a Dialogue System Trigger to the NPC.
    • Otherwise, add an empty child GameObject. Add a Sphere Collider, set its Radius to the desired distance, and tick Is Trigger. Then add a Dialogue System Trigger.
    Inspect the Dialogue System Trigger:
    • Change the Trigger dropdown to OnTriggerEnter.
    • Click the Add 'Player' Tag button.
    • In the Actions section, click Add Action, then select Start Conversation.
    • Select your NPC's conversation from the dropdown.
    • Assign the NPC as the Conversation Conversant.
    • Tick Show Cursor During Conversation if you allow the player to choose responses with the mouse.
    4. The NPC needs to pause its AI when the conversation starts. Add another Dialogue System Trigger directly to the NPC:
    • Change the Trigger dropdown to OnConversationStart.
    • Select Add Action > Set Components Enabled Or Disabled. In the Set Components Enabled Or Disabled section, click "+" to add a new entry. Drag the Emerald AI component into the slot, and set the State dropdown to False.
    • If your NPC still plays its walking animation when the conversation starts, you'll need to tell it to idle. Select Add Action > Play Sequence. Use AnimatorBool(), AnimatorFloat(), and/or AnimatorPlay() sequencer commands to put the animator in an idle state. I can't give you the exact commands because I don't know what your animator controller looks like. Maybe you can just use AnimatorPlay(Idle). However, you may need to use AnimatorFloat(Speed,0) or something like that to set its walking speed to 0.
    5. The NPC needs to resume its AI when the conversation ends. This is much easier. Add another Dialogue System Trigger to the NPC:
    • Change the Trigger to OnConversationEnd.
    • Select Add Action > Set Components Enabled Or Disabled. Add a new entry, assign the Emerald AI component again, and set State to True.
    6. The wolves need to tell the Dialogue System when they've been killed:
    • Add a Dialogue System Trigger to the wolf. Set its Trigger to OnUse, and Add Action > Lua Code just like for the Skeletons in the Dialogue System's Emerald AI demo scene.
    • Inspect the wolf's Emerald_AI > AI's Settings > Events. Add an entry to the OnDeath() event, assign the Dialogue System Trigger, and select DialogueSystemTrigger.OnUse from the dropdown.

    Which Invector controller are you using? The Dialogue System's Invector controller support only integrates with the controller, not with its inventory, because not all Invector controllers have inventory systems. I can look into how to reward items for the specific Invector controller that you're using.
     
  39. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
  40. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
  41. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Last edited: Aug 30, 2018
    BackwoodsGaming likes this.
  42. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    @SickaGamer - The Dialogue System Extras page has an updated Invector Support package that adds a Lua function:

    vAddItemByID( itemID:int, amount:int, autoEquip:bool )
    To enable the Lua function, add the scripting define symbol USE_INVECTOR_INVENTORY to Edit > Project Settings > Player > Other Settings > Scripting Define Symbols. You can use it in your conversations' Script fields, such as:

    vAddItemByID(3, 1, true)​

    If you're using Invector's example items, 3 is the sword. So the command above adds 1 sword to the player and auto-equips it.

    You can also download the package directly here: Invector_Support_2018-08-29.unitypackage
     
  43. Stonepunsh-Studio

    Stonepunsh-Studio

    Joined:
    Jan 7, 2018
    Posts:
    5
    Hi,
    So i try to keep myself as short as possible but it is kinda difficult. So the game is basically about you being a judge. The game has a non linear story.

    1. The player can drag informations out of the dialog. For example in a sentence one word has a diffrent color and the player can drag that word or at least click that word and the word can have a string with a sentence with more detailed information. Is this possible with your system and if so how?
    2. Maybe a stupid question but how can i edit the general settings like the key to skip a respond later on after creating the database.
    3. Is there a tutorial for how you can start a certain conversation depeing on a if statement?
    3.2 Can this variable also be a C# variable and not only a lua variable from the dialog system?
    4. How can i execute a C# function of an object at the end of a conversation similar to the event tab at a node of a conversation?
    5. Is there a teamplate that i can show the npc and the player´s lines same way? Or is this the player subtitle boolean?

    If all these things are possible with your system i think it suits our project really well and we will definitly buy it.
    Thanks a lot,
    Finn
     
    Last edited: Sep 3, 2018
  44. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi Finn,
    That's similar to the example in this post. You would have to write the code to handle the dragging. Fortunately, the Dialogue System is modular, so the rest of it (the data engine, the cutscene sequencer, etc.) will work happily with your code.

    There are two settings that can do this.
    • The Dialogue Manager's Display Settings > Input Settings > Cancel key will abort the current subtitle, causing the conversation to progress.
    • If you've set the Dialogue Manager's Display Settings > Subtitle Settings > Continue Mode dropdown to a mode that uses a continue button, such as Always, a continue button will appear with the subtitle. You can add a UI Button Key Trigger component to the continue button to assign a hotkey.

    It depends on where you want to put that 'if' statement. If you want to write C# code that starts a conversation, use DialogueManager.StartConversation(). (See here for commonly-used C# methods.)

    If you want a Dialogue System Trigger to fire only if a certain condition is true (such as a quest state), set the trigger's Conditions section. (More info: Dialogue System Trigger Tutorial.)

    If you want a conversation to branch based on conditions, set the Conditions fields in nodes as described in the Conversation Conditions Tutorial.

    Yes. Register a C# function with Lua that returns the C# variable value.

    Add a Dialogue System Events component, and assign your C# function to its OnConversationEnd() event. Or add a script that has an OnConversationEnd() method.

    Please feel free to try the evaluation version before buying. (Also, if you're going to buy, wait until tomorrow. You'll see why tomorrow.)
     
    lawsochi likes this.
  45. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Dialogue System for Unity On Sale!

    Get the Dialogue System for Unity for 25% off this week in Unity's Asset Store Sale.
     
  46. Bodyclock

    Bodyclock

    Joined:
    May 8, 2018
    Posts:
    172
    Hi, was thinking of picking this up in the sale but haven't had a good chance to look at it yet. So a quick question, would it be fairly easy to use as a base and integrate with a voice recognition / text-to-speech system, given I'm an adequate C# programmer, but no expert.

    Cheers

    Chris
     
  47. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi Chris - Yes. Others have integrated it with Wit.ai (steps here) and IBM Watson. I'll attach a simple IBM Watson example to this post.

    Please feel free to test integration using the evaluation version before buying. I think the sale runs until the 11th.
     

    Attached Files:

  48. Bodyclock

    Bodyclock

    Joined:
    May 8, 2018
    Posts:
    172
    Thanks for the quick reply - good support and response times are almost the No.1 criteria when choosing an asset :)
     
    TonyLi likes this.
  49. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Dialogue System - Save System Tutorial

    The Dialogue System for Unity 2.x Tutorial Playlist now has a setup tutorial on the integrated save system:



    You can use the save system to save the state of quests, variables, and conversations, of course, but it can also save GameObject positions, enabled/disabled states, destroyed objects, player's current scene, and more, and also handle scene transitions, all without the need for scripting.

    If you prefer text instructions, you can find them here: Save System.
     
    BackwoodsGaming and Akshara like this.
  50. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Check out Witch Hunt, a horror shooter by solo dev Andrii Vintsevych, on sale on Steam through September 10. It uses the Dialogue System primarily for the save system, cutscene sequencer, and language localization.

    witchHunt.jpg
     
    BackwoodsGaming and flashframe like this.