Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @TonyLi I'm having an issue with InventoryPro integration on scene changes. I am using the Inventory pro Collection Saver script on my Inventory Character, but after switching scenes, the result is messed up. Here is an image of what it looks like in the scene hierarchy after picking up a single sword item and adding it to the inventory:

    https://imgur.com/a/OwmG1nq

    You can see the sword is added under the Managers. Now, here is what it looks like after portaling to another scene:

    https://imgur.com/a/jOoQkr4

    There are now 3 instances of the sword item and it is no longer under the managers where it belongs. Any idea what could be wrong?
     
  2. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @magique - Hmm, InventoryProCollectionSaver is just a wrapper for Inventory Pro's CollectionSaverLoaderBase. Are you using the last Asset Store version or the open source version? I'll check the integration against your version and by tomorrow reply either with the steps to get it working or an updated integration package if necessary.
     
  3. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I'm using the last store version. And version 2.1.6 of Dialogue System.
     
  4. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    @magique - Here's a set of example scenes. I used the last store version of Inventory Pro and Dialogue System 2.2.2.

    Add the scenes DS_InvPro_Scene1 and DS_InvPro_Scene2 to your build settings. Then play DS_InvPro_Scene1. Pick up some items, such as the scrolls on the floor, and go through the door to Scene2. I only added InventoryProCollectionSavers to InventoryWindow and InventoryWindow2, so those are currently the only collections that will save across scene changes.

    Briefly, the setup is:
    1. Dialogue Manager: SaveSystem, DialogueSystemSaver (not used in this example, but good to add), [Json]DataSerializer, [PlayerPrefs]SavedGameDataStorer. (Any DataSerializer and SavedGameDataStorer is fine.)
    2. InventoryWindow and InventoryWindow2: InventoryProCollectionSaver
     

    Attached Files:

  5. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Thanks. I'll give it a try and hopefully I can see what's different that is causing my problem. I'll let you know.
     
  6. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @TonyLi I'm not able to get the demo scenes to work. The last item in the Canvas object says missing prefab and when I try to click on an item to pick it up, I get the following errors:
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. Devdog.InventoryPro.InventoryItemUtility.RowsToItems (Devdog.InventoryPro.ItemAmountRow[] items, Boolean abideMaxStackSize) (at Assets/Devdog/InventoryPro/Scripts/Other/Utilities/InventoryItemUtility.cs:99)
    3. Devdog.InventoryPro.CollectionPopulator.Awake () (at Assets/Devdog/InventoryPro/Scripts/Collections/CollectionPopulator.cs:24)
    4.  
    5. NullReferenceException: Object reference not set to an instance of an object
    6. Devdog.InventoryPro.ItemCollectionBaseAddCounter.SetItem (Devdog.InventoryPro.CollectionPriority lookup, UInt32 i, Devdog.InventoryPro.Tuple t) (at Assets/Devdog/InventoryPro/Scripts/Collections/ItemCollectionBaseAddCounter.cs:151)
    7. Devdog.InventoryPro.ItemCollectionBaseAddCounter.CanAddItemCount (Devdog.InventoryPro.CollectionPriority lookup, Devdog.InventoryPro.InventoryItemBase itemToAdd, UInt32 earlyBailAmount) (at Assets/Devdog/InventoryPro/Scripts/Collections/ItemCollectionBaseAddCounter.cs:274)
    8. Devdog.InventoryPro.ItemCollectionBaseAddCounter.CanAddItem (Devdog.InventoryPro.CollectionPriority lookup, Devdog.InventoryPro.InventoryItemBase item) (at Assets/Devdog/InventoryPro/Scripts/Collections/ItemCollectionBaseAddCounter.cs:217)
    9. Devdog.InventoryPro.ItemCollectionBaseAddCounter.GetBestCollectionForItem (Devdog.InventoryPro.InventoryItemBase item) (at Assets/Devdog/InventoryPro/Scripts/Collections/ItemCollectionBaseAddCounter.cs:193)
    10. Devdog.InventoryPro.ItemCollectionBaseAddCounter.TryAdd (IList`1 itemsToAdd) (at Assets/Devdog/InventoryPro/Scripts/Collections/ItemCollectionBaseAddCounter.cs:418)
    11. Devdog.InventoryPro.InventoryManager.CanAddItems (Devdog.InventoryPro.ItemAmountRow[] items, Boolean rebuildCounter) (at Assets/Devdog/InventoryPro/Scripts/Managers/InventoryManager.cs:488)
    12. Devdog.InventoryPro.InventoryManager.CanAddItem (ItemAmountRow row) (at Assets/Devdog/InventoryPro/Scripts/Managers/InventoryManager.cs:478)
    13. Devdog.InventoryPro.InventoryManager.CanAddItem (Devdog.InventoryPro.InventoryItemBase item) (at Assets/Devdog/InventoryPro/Scripts/Managers/InventoryManager.cs:473)
    14. Devdog.InventoryPro.ItemTrigger.CanUse (Devdog.General.Player player) (at Assets/Devdog/InventoryPro/Scripts/Modules/Triggers/ItemTrigger.cs:54)
    15. Devdog.InventoryPro.ItemTrigger.Use (Devdog.General.Player player) (at Assets/Devdog/InventoryPro/Scripts/Modules/Triggers/ItemTrigger.cs:70)
    16. Devdog.General.TriggerBase.Use () (at Assets/Devdog/General/Triggers/TriggerBase.cs:146)
    17. Devdog.InventoryPro.ItemTriggerInputHandler.Use () (at Assets/Devdog/InventoryPro/Scripts/Modules/Triggers/ItemTriggerInputHandler.cs:100)
    18. Devdog.InventoryPro.ItemTriggerInputHandler.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at Assets/Devdog/InventoryPro/Scripts/Modules/Triggers/ItemTriggerInputHandler.cs:84)
    19. UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:50)
    20. UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.EventFunction`1 functor) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:261)
    21. UnityEngine.EventSystems.EventSystem:Update()
    22.  
    23. NullReferenceException: Object reference not set to an instance of an object
    24. Devdog.InventoryPro.CurrencyDecoratorSerializationModel..ctor (Devdog.InventoryPro.CurrencyDecorator currency) (at Assets/Devdog/InventoryPro/Scripts/Modules/Serialization/Models/CurrencyDecoratorSerializationModel.cs:23)
    25. Devdog.InventoryPro.ItemCollectionSerializationModel.<FromCollection>m__0 (Devdog.InventoryPro.CurrencyDecorator o) (at Assets/Devdog/InventoryPro/Scripts/Modules/Serialization/Models/ItemCollectionSerializationModel.cs:31)
    26. Devdog.General.ThirdParty.UniLinq.Enumerable+<CreateSelectIterator>c__Iterator10`2[Devdog.InventoryPro.CurrencyDecorator,Devdog.InventoryPro.CurrencyDecoratorSerializationModel].MoveNext () (at Assets/Devdog/General/ThirdParty/UniLinq/Enumerable.cs:2211)
    27. Devdog.General.ThirdParty.UniLinq.Enumerable.ToArray[CurrencyDecoratorSerializationModel] (IEnumerable`1 source) (at Assets/Devdog/General/ThirdParty/UniLinq/Enumerable.cs:2816)
    28. Devdog.InventoryPro.ItemCollectionSerializationModel.FromCollection (Devdog.InventoryPro.ItemCollectionBase collection) (at Assets/Devdog/InventoryPro/Scripts/Modules/Serialization/Models/ItemCollectionSerializationModel.cs:31)
    29. Devdog.InventoryPro.ItemCollectionSerializationModel..ctor (Devdog.InventoryPro.ItemCollectionBase itemCollection) (at Assets/Devdog/InventoryPro/Scripts/Modules/Serialization/Models/ItemCollectionSerializationModel.cs:21)
    30. Devdog.InventoryPro.JsonItemsSerializer.SerializeCollection (Devdog.InventoryPro.ItemCollectionBase collection) (at Assets/Devdog/InventoryPro/Scripts/Modules/Serialization/JsonItemsSerializer.cs:15)
    31. Devdog.InventoryPro.CollectionSaverLoaderBase.Save () (at Assets/Devdog/InventoryPro/Scripts/Modules/Serialization/CollectionSaverLoaderBase.cs:37)
    32. Devdog.InventoryPro.SaverLoaderBase.OnApplicationQuit () (at Assets/Devdog/InventoryPro/Scripts/Modules/Serialization/SaverLoaderBase.cs:97)
     
  7. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    @magique - Would you please update to the latest Dialogue System version and import the Inventory Pro Support packages? (There are two: one in Common/Third Party support, one in Dialogue System/Third Party Support.) If you don't want to update the Dialogue System, you can pull down the latest version into a temp project to get access to the Inventory Pro Support packages. I'm not sure that this will fix the issue, but at least we'll be on the same page. My example scene's Canvas also has a missing prefab; that's from Inventory Pro, but it doesn't seem to cause an issue here.
     
  8. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I'm a bit concerned the latest Dialogue System will not work because I'm on Unity 2017.1.5f1. Although I usually don't have issues with slightly newer assets as long as they are still 2017 versions. I will first try just downloading to get the new support packages.
     
  9. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @TonyLi I updated Dialogue System and support packages and get the same issues. I see, however, that it complains that there are 10 issues in Inv Pro. I think that the problem is that I cleaned up my project and removed all the items that weren't being used such as the apple, etc. I think your sample dialogue database must be pointing to those things. That's one thing I found out about InvPro is that you can reference items from another database, but it's not a good idea as there can be a lot of confusion and issues. If you make a new InvPro database you should create new items just for that database. I'll see if I can somehow clean it up and get rid of the 10 errors.
     
  10. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    BTW, version 2.2.2 technically works with Unity 5 and above. Unity has asked publishers to submit assets using Unity 2017.4 or higher because they no longer support earlier versions of Unity.

    That sounds like the issue. If you really want to see it working, you can create a new, temporary project and import Inventory Pro, Dialogue System, and the integration and example scene package.

    Or, if you don't care about the example, you could just try setting up your own scene using the steps I mentioned above. One thing I didn't include there is that, in the example scene, the player's Inventory component has Don't Destroy On Load unticked
     
  11. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Ok, so I got past the 10 errors and was able to pick up an item but it didn't persist across scenes.
    After cleaning it up, it still behaves the same way even with latest Dialogue System. The interesting thing is that in my scene when I switch scenes, it loads the inventory 3 times and I get 3 copies of every item I had in inventory, but they are added to the scene outside the Managers hierarchy. This is the message I see 3 times:


    Loaded collection Inventory
    UnityEngine.Debug:Log(Object)
    Devdog.General.DevdogLogger:LogVerbose(String) (at Assets/Devdog/General/Misc/DevdogLogger.cs:25)
    Devdog.InventoryPro.CollectionSaverLoaderBase:<Load>m__1(Object) (at Assets/Devdog/InventoryPro/Scripts/Modules/Serialization/CollectionSaverLoaderBase.cs:55)
    PixelCrushers.InventoryProSupport.InventoryProCollectionSaverLoaderHelper:LoadItems(Action`1) (at Assets/Pixel Crushers/Common/Third Party Support/Inventory Pro Support/Scripts/InventoryProCollectionSaverLoaderHelper.cs:35)
    Devdog.InventoryPro.CollectionSaverLoaderBase:Load() (at Assets/Devdog/InventoryPro/Scripts/Modules/Serialization/CollectionSaverLoaderBase.cs:53)
    PixelCrushers.InventoryProSupport.InventoryProCollectionSaver:ApplyData(String) (at Assets/Pixel Crushers/Common/Third Party Support/Inventory Pro Support/Scripts/InventoryProCollectionSaver.cs:37)
    PixelCrushers.SaveSystem:ApplySavedGameData(SavedGameData) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:579)
    PixelCrushers.<LoadSceneCoroutine>c__Iterator5:MoveNext() (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:688)

    I will try a clean project with InvPro store version and your latest Dialogue System and the test scenes. Perhaps I've messed something up with all the things I've been working on.
     
  12. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @TonyLi OK, so a fresh project with latest DS and last InvPro store version works with your demo scenes. Interesting though is that it still loads all items outside the Managers hierarchy. If an item was already in Inventory at the start then it also shows it in the Managers hierarchy, but also has a copy outside the hierarchy. The only difference right now that I see in the fresh project and mine is that I get 3 Loaded collection Inventory debugs and 3 copies of everything. If I could figure out that part then it might work as expected.
     
  13. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @TonyLi I figured out how to eliminate the duplicates. I had multiple places that were calling apply saved data. Inventory seems to restore fine from scene to scene now. I have another issue, but it's unrelated to DS or InvPro specifically. Thanks for all your help as always.
     
    TonyLi likes this.
  14. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Always happy to help!
     
  15. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I spoke too soon. When I had made the changes that seemed to eliminate the duplicates, the frames to wait before apply for the Save System were 1. Then I changed it to 4 to try to fix another issue and now I get 5 duplicates. So, somehow it's like it's loading the inventory for each frame to wait plus 1. I'll try to figure out why, but this seems to be the reason for the duplicates.

    [EDIT]
    Maybe not. I'm back to 3 copies even if I increase the wait frames.

    [EDIT 2]
    Tried at 0 frames and then got 5 copies again. Just seems to be random. I'm trying to figure out why it would trigger loading it so many times.
     
    Last edited: Nov 18, 2019
  16. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    @magique - Make sure your InventoryProCollectionSaver components all have unique Keys, and that all your inventories have unique names.

    If you peek at the code for InventoryProCollectionSaver, you'll see that it's very short. When saving, it just calls InventoryProCollectionSaverHelper, which tells Inventory Pro to serialize the inventory data. Then it returns the serialized string, which gets saved under the Key. When loading, it again calls InventoryProCollectionSaverHelper, which tells Inventory Pro to apply the data that Inventory Pro had previously serialized. So the Dialogue System's saver components aren't doing any actual work; they're passing off all the work to Inventory Pro.

    Speaking of which, are there perhaps any Inventory Pro components that are also saving the inventories? Maybe you have a component that's automatically saving the inventories to PlayerPrefs on quit and restoring them on start. This could explain why you're getting multiplle copies as you play, quit, and restart multiple times.

    If that doesn't help, please feel free to send a reproduction project to tony (at) pixelcrushers.com. I'll be happy to take a look.
     
  17. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I have 2 components that have InventoryProCollectionSaver components and they both have unique keys.

    I don't know what to look for on this. I don't see any additional components on those collections that would be doing that as far as I can tell.

    I'll do some serious debugging step by step and see if I can figure out what's going on.

    The other issue I'm seeing is that if an inventory item has stats on it then only the values of the stats are saved across scenes, but not the stat itself.So when I go to equip the item it gets a null reference on the stat.
     
  18. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @TonyLi OK, so I started checking this and so far very interesting results. I put a breakpoint on the call to ApplySavedGameData in SaveSystem::LoadSceneCoroutine and this particular time it hit that breakpoint 5 times and each time it ran through ApplySavedGameData for 5 different savers causing it to load them 5 times. Now I need to figure out just why this coroutine is getting called so many times.

    [EDIT]
    I think I found it. I am using the Playmaker LoadSceneAtSpawnpoint action to kick off the scene change. It must not be behaving correctly and must be calling the LoadScene multiple times. I'll check my Playmater fsm and see if it's somehow triggering multiple times.

    [EDIT 2]
    Scratch that. I'm not using Playmaker there. My debugging sent me on a wild goose chase. I'm using ScenePortal. I'll continue checking.
     
    Last edited: Nov 18, 2019
  19. Bogu-94

    Bogu-94

    Joined:
    Dec 11, 2013
    Posts:
    58
    Hi tony. Just wondering if we can create custom Markup Tags, and what's the limitation.
     
  20. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Are you saying that ApplySavedGameData is being called 5 times? Or is it only being called once but it's calling the ApplyData method on 5 different savers?

    Are your Inventory Pro components configured to survive scene changes? Generally you want to turn this off. It's still possible to make this work with the Dialogue System, but make sure you're not piling up a new set of Inventory Pro components that survive scenes every time you enter a new scene.

    Were you able to get the example scenes working?

    Hi @johanesnw - You can add a script to the Dialogue Manager that has an OnConversationLine method. In the method, extract your custom tags out of the text and process them however you want. For example, this script will handle a custom tag "[beep]" that adds a sequencer command to play an audio clip:

    Code (csharp):
    1. using UnityEngine;
    2. using PixelCrushers.DialogueSystem;
    3.  
    4. public class HandleBeepTag : MonoBehaviour
    5. {
    6.     void OnConversationLine(Subtitle subtitle)
    7.     {
    8.         // Look for [beep]:
    9.         int tagPosition = subtitle.formattedText.text.IndexOf("[beep]");
    10.         // If no [beep], exit:
    11.         if (tagPosition == -1) return;
    12.         // Otherwise remove [beep] from the text:
    13.         subtitle.formattedText.text = subtitle.formattedText.text.Remove(tagPosition, "[beep]".Length);
    14.         // And add the sequencer command:
    15.         subtitle.sequence = "Audio(Beep); " + subtitle.sequence;
    16.     }
    17. }
     
  21. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @TonyLi I found the issue. The ScenePortal doesn't account for a case where the triggering object might have more than one collider. It checks for required tag, but if the player has more than one collider then each of those will have the same tag. In the case of Ootii Motion Controller, it adds six sphere colliders on the main object at runtime and thus triggers the portal multiple times. I guess depending on how fast the scene loads will determine just how many times the LoadScene gets called at any point. That's why I was seeing fluctuations from 3-5 copies. I added a bool flag to check if the portal is already in use so it won't run that LoadScene more than once. That fixes that issue. Now, I just need to figure out why it isn't restoring the inventory item stat keys on load. That's probably an InvPro bug I would think.
     
    TonyLi likes this.
  22. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Thanks for the explanation! I'll also update ScenePortal to handle this case in the next version. I suspect you're right about the inventory item stat keys since the Dialogue System is just using Inventory Pro's serialization.
     
    magique likes this.
  23. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @TonyLi I found the other issue with the stats. It was just like I was saying with your demo scenes. I apparently had the item stats defined in a different InvPro database, but they were assigned to an item in the database I was using. Because they weren't actually defined in that database, it couldn't resolve the reference. InvPro seems to allow cross assigning things, but doesn't really support it. That's one of the reasons I went through and deleted all the demo stuff so I wouldn't get databases mixed up. but apparently, I didn't do this part right. Now it's all working perfectly.
     
    TonyLi likes this.
  24. Sigma266

    Sigma266

    Joined:
    Mar 25, 2017
    Posts:
    99
    Hi, @TonyLi. This might be a little complicated and I'm not sure if your system is able to that do being with, but bear with me. I decided for my project to have animated npc portraits for it feel more alive. Now, the way I want portraits to be animated is to open and close their mouths whenever the typewriter effect is doing its thing, BUT only on characters that are I have NOT silenced(ie letters and numbers), then when the line has finished, the portrait has to change its Animator state to one where the NPC is just blinking, in other words, it just finished its line. Another tough thing I'm not sure how to pull off is making the Dialogue System understand which animation to play depending on which actor is speaking at that moment. I understand if this is something that it's too complicated, you don't have to think about it too much. Thanks a lot though!
     
  25. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @Sigma266 - The dialogue UI video tutorial shows how to set up animated portraits:



    (The talking/blinking animation part is at the end of the tutorial.)

    Normally you can use the typewriter effect's OnBegin() and OnEnd() UnityEvents, or start the talking animation when the line starts and stop it when the sequencer receives the message "Typed". For example, you can set the Dialogue Manager's Default Sequence to:
    AnimatorPlay(Talk,Portrait Image);
    required AnimatorPlay(Idle,Portrait Image)@Message(Typed)
    This plays the animator state "Talk" during the typewriter and "Idle" when the typewriter is done. You can assign a different animator controller to each actor's Dialogue Actor component, so the Talk and Idle states can be unique for each actor.

    If you want to switch between Talk and Idle for each typed character depending on whether it's a silent character or not, it's probably best to make a subclass of the typewriter effect script and override the Play() coroutine.
     
    Sigma266 likes this.
  26. Sigma266

    Sigma266

    Joined:
    Mar 25, 2017
    Posts:
    99
    This is extremely helpful! Thank you very much!
     
    TonyLi likes this.
  27. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Black Friday Sale - 50% Off

    The Dialogue System for Unity is 50% off in the Black Friday Sale! If you've been waiting for a sale to add AAA-quality conversations, barks, and quests to your project, now's the time.

    Bonus: If you've bought the Dialogue System, you can get Quest Machine for 50% off as an "upgrade" price at any time -- or get it for 50% now, too, in the Black Friday Sale.
     
    Last edited: Nov 25, 2019
  28. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Dialogue System 2.2.3 Released + Black Friday Sale

    Version 2.2.3 is now available on the Asset Store -- and for 50% off in the Black Friday Sale this week!


    Version 2.2.3 Release Notes:

    Core:
    • Improved: Added syntax checker to Sequence field editor.
    • Improved: Added Standard Dialogue UI 'Use First Response For Menu Portrait' checkbox.
    • Improved: Exposed UIPanel.deactivateOnHidden property.
    • Improved: Usable component no longer caches name at start in case it changes during play.
    • Improved: When Selector is set to Distance From GameObject, initial raycast check is not clamped by Max Selection Distance.
    • Fixed: Updated Chat Mapper XML output for compatibility with Chat Mapper 1.9.1.0+ import.
    • Fixed: Typewriter could send Typed sequencer message at start instead of end.
    • Fixed: TextMeshProTypewriterEffect didn't handle pause characters properly when paused.
    • Changed: Reverted sequencer to give one frame to early-executed sequencer commands (e.g., using required keyword) to finish processing.
    • Save System: Scene Portal now prevents multiple triggerings if interacting GameObject has multiple colliders.
    Third Party Support:
    • Emerald AI: Added option to control individual AI instead of entire factions, EmeraldAIAttacksPlayer(), SetEmeraldFactionRelation(). Saver saves faction relations.
    • Invector: Added Y-Axis Only option to Face Conversant.
    • ORK: Updated for 2.27.0.
    • TopDown Engine: Fixed PauseTopdownDuringConversations to look for base TopDownController instead of 2D version specifically.
    • uMMORPG: Added 'Allow Lua To Change Data' checkbox to allow disabling Lua functions.
    • uRPG: Added Trade() Lua function. Interactable GameObjects can now have more than one Dialogue System Trigger.
     
    DMRhodes likes this.
  29. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Check out the upcoming game The Way of Wrath, being made with the Dialogue System for Unity:

     
    treshold likes this.
  30. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Congratulations to Studio ZA/UM for all the accolades being earned by Disco Elysium, which was made with the Dialogue System for Unity. If you enjoy deep RPGs with amazing writing and voice acting, don't miss this game.

     
    hopeful likes this.
  31. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Wishlist on Steam the dark fantasy adventure Framing Dawes, made with the Dialogue System and Adventure Creator. The Dialogue System includes Adventure Creator integration among dozens of integrations, and both the Dialogue System and Adventure Creator are 50% off this week in the Asset Store's Black Friday Sale.

     
  32. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Another great game made with the Dialogue System for Unity: Jenny LeClue: Detectivu, available on Apple Arcade, Steam and GOG, and coming to PS4 and Nintendo Switch. One of my top picks for Outstanding Visual Style in annual awards voting.

    Mografi has also generously shared their text-based dialogue importer with the Dialogue System community. You can download it from the Dialogue System Extras page.

     
  33. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Check out Dwerve, a tower defense dungeon crawler with great pixel art, being made with the Dialogue System for Unity. Available to wishlist on Steam.

     
  34. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    For 1980s nostalgia, Stranger Things has nothing on Crossing Souls, the hit adventure game on Switch, PS4, Windows, Mac, and Linux, made with the Dialogue System for Unity. It's currently 75% off in Steam's Autumn Sale, and the Dialogue System is currently 50% off in the Asset Store's Black Friday Sale.

     
  35. wangyucheng1992

    wangyucheng1992

    Joined:
    Feb 19, 2019
    Posts:
    59
    how to set camera when dialogue? what i want is that who speaking and the camera look at his head.
     
  36. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    In the Dialogue Manager's Default Sequence, use Camera(Closeup):

    upload_2019-11-28_22-18-48.png

    If you don't want to type it manually, you can use the wizard (Tools > Pixel Crushers > Dialogue System > Wizards > Dialogue Manager Wizard):

    upload_2019-11-28_22-19-46.png

    More info:
     
  37. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,616
    TonyLi likes this.
  38. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    You can also add a Default Camera Angle component to each character, and use the command Camera(default) to point to that angle. This is useful if not all of your characters are the same height. If the character doesn't have a Default Camera Angle, the value of default is Closeup.
     
  39. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
  40. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    City of the Shroud, made with the Dialogue System for Unity, is available on Steam for Windows and Mac. In addition to the innovative combat system, it has really fun dialogue written by popular sci-fi/fantasy author Moira Katson.

     
  41. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    You can follow the development of Heartstep Studios' Shadows of Solomon on Twitter. The game, being made with the Dialogue System for Unity, was nominated for an Excellence in Narrative award at DevGAMM Minsk 2019.

     
  42. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Check out Tale of Toast, which uses the Dialogue System for conversations, barks, gameplay messages, and quests. This full-size, free-to-play MMO is developed by a team of two. You can support their efforts on Patreon.

     
  43. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Follow the development of Blue Goo Games' adventure game Space Chef, being made with the Dialogue System for Unity, at their website, or on Twitter.


    upload_2019-12-1_9-9-20.png

    upload_2019-12-1_9-6-25.png

    Reminder:
    The Asset Store's Black Friday Sale ends today. If you've been waiting for a deal on the Dialogue System, you can get it at 50% off before the sale ends at midnight PST.

    upload_2019-12-1_9-11-22.png
     
  44. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    This Black Friday Sale week I've been bringing attention to some of the many, many games made or being made with the Dialogue System for Unity. As the sale comes to a close (midnight PST), I thought I'd post a few of the Dialogue System-powered games made by lone developers, with most of them being their first game, that perhaps you can find inspiring in your own game dev journey!

    Grimsfield



    After Life - Story of a Father



    AvoCuddle



    Brave the Lonely



    Suppressed



    NB-107A



    What If I Were Brave Enough
     
  45. wangyucheng1992

    wangyucheng1992

    Joined:
    Feb 19, 2019
    Posts:
    59
    thank you
    I ran into the same problem. When the UI dialog was displayed, the camera look at speaker, but when the conversation started, the NPC position was changed.

    When I clear the Sequence in START NODE,NPC`position was ok,but no camera switchover upload_2019-12-2_15-51-43.png
    upload_2019-12-2_15-43-48.png upload_2019-12-2_15-44-25.png

    NPC`s position was changed,and conversation UI was OK, In the scene i was uesd cinemachine camera, upload_2019-12-2_15-47-10.png
    I don't know if that's the reason?
     
  46. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @wangyucheng1992 - Please set the <START> node's Sequence back to: None()

    It's best to leave the <START> node unchanged.

    Instead, put the sequencer commands in the first actual node:

    upload_2019-12-2_8-56-20.png

    The Sequence for "First actual line" will make the NPC (SharkMan) look at the player. Then it will do a closeup of SharkMan.

    Make sure the conversation is using SharkMan's GameObject as the conversation conversant. There are several ways to do this:
    1. Assign SharkMan's GameObject to the Dialogue System Trigger's Conversation Conversant field:
      upload_2019-12-2_8-59-21.png

    2. Or add the Dialogue System Trigger to SharkMan's GameObject, and leave the Conversation Conversant field blank:
      upload_2019-12-2_9-1-21.png

    3. Or leave the Conversation Conversant field blank, add a Dialogue Actor component to SharkMan's GameObject, and select the SharkMan actor:
      upload_2019-12-2_9-2-38.png
    To verify that the conversation conversant is the SharkMan GameObject, temporarily set the Dialogue Manager's Other Settings > Debug Level to Info. When the conversation starts, it will log information like this:

    Dialogue System: Starting conversation 'XXX' with actor=Player and conversant=SharkMan
     
  47. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Dialogue System 50% Off in Cyber Week Sale

    If you missed out on the Black Friday Sale, you're in luck! The Dialogue System is still half price in the Cyber Week Sale.
     
    Last edited: Dec 5, 2019
  48. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Updated Behavior Designer Integration

    Opsive hosts the Dialogue System integration package for Behavior Designer on opsive.com. They just updated the package to include additional tasks that make it simple to get and set Dialogue System variables. If you're using Behavior Designer, you may want to grab this updated integration package to get the new tasks.
     
  49. digiross

    digiross

    Joined:
    Jun 29, 2012
    Posts:
    323
    @TonyLi I'm working on a game that needs a robust quest system, procedural would be great like Quest Machine. However, the conversation part of Dialogue System seems great too. I see it does quests too. Is it feature rich like Quest machine. Await your input, thanks.
     
  50. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @digiross - Quest Machine has a few more quest-related conveniences -- and it's the only asset that can also procedurally generate quests -- but the Dialogue System probably has the next most quest-related features on the store. Plenty of games, such as Disco Elysium, Crossing Souls, City of the Shroud, etc., use the Dialogue System's quest system.

    With both assets, you get to define how the quests work. You're not limited to a restricted set of quest templates.

    Quest Machine doesn't do branching conversations, but it has integration with the Dialogue System if you want branching conversations with your Quest Machine quests.

    Please feel free to try out the evaluation versions of both. The Asset Store pages have links to the eval versions (Dialogue System, Quest Machine).