Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here: unity.com/legal/terms-of-service.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice
  4. Join us on Thursday, September 29, for a day with Unity's SRP teams here on the forum or on Reddit, and discuss topics around URP, HDRP, and the Scriptable Render Pipeline in general.
    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. wechat_os_Qy0z_aF7Nfhquhava38GLxUWU

    wechat_os_Qy0z_aF7Nfhquhava38GLxUWU

    Joined:
    Dec 22, 2021
    Posts:
    35
    Thank you!It works!
    I tried deleted a “ .data” file had a same name with DialogueManager and this file is at Corgi Eengin‘s MMData fold.I think this is a save data file.So are they the same function?
     
  2. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    If you're using Corgi, it has its own save system. The Dialogue System can work with Corgi's save system if you want (see the integration guide) or you can continue to use the Dialogue System's save system like you currently are.
     
  3. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    Dialogue System + Game Kit Controller Integration

    Two Cubes Studio (the makers of Game Kit Controller) just released an integration video showing how to use the Dialogue System for Unity with their popular controller:



    You can get Game Kit Controller on the Asset Store.
     
    hopeful likes this.
  4. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    Dialogue System 2.2.30 Released

    Version 2.2.30 is now live on the Asset Store!

    This version adds integration with More Mountains' Feel. It also updates integrations for the several third party assets, including Adventure Creator and the latest versions of More Mountains' Corgi Engine and TopDown Engine.


    Release Notes

    Core:
    • Fixed: When exiting play mode with Time Scale set to zero while Dialogue Editor window was open, Time Scale could remain zero.
    • Fixed: No longer reports null texture error on conversation group boxes if user removed Editor Default Resources folder.
    • Fixed: Issue with AudioWait() sequencer command and complex audio clip filenames; issue stopping audio in certain Unity versions when using Addressables.
    • Improved: Added DialogueLua.GetAllVariables() method.
    • Improved: DialogueManager.GetLocalizedText now checks UILocalizationManager tables if Localization Settings text table doesn't have field.
    • Improved: Subtitle text set to prepend actor name now doesn't add speaker name if name is blank.
    • Addressables: Removed restriction that asset name and key must match.
    • Localization Package: Fix for locale change.
    Third Party Support:
    • Adventure Creator: Added AC actions for Relationship & Status Functions.
    • Arcweave: Jumpers can now cross conversations; now uses element's outputs list for order of connections; space character no longer required in [SEQUENCE:xxx] tag.
    • articy: Flow Fragment conversations now apply Flow Fragment's custom Sequence field (if present) to <START> node's Sequence.
    • Celtx: Fixed menu item that enables Celtx Gem 3 importer.
    • Corgi Engine: Updated integration for version 7.6.
    • Feel: Added integration.
    • PlayMaker: Added Get Variable Type action; Get All Lua Elements action now has option to get all elements named in database or all including runtime-created elements.
    • Text Animator for Unity: Added support for Typed sequencer message, computing {{end}} based on TextAnimatorPlayer duration.
    • TopDown Engine: Updated integration for version 3.
     
  5. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    Dialogue System for Unity -- Indie Innovation Sale

    Right now, you can get the Dialogue System for Unity on sale in the Asset Store's Indie Innovation Sale.

    Use coupon code INSPIRE2022 to get 5% off when you spend over $100, 10% off when you spend over $175, and 15% off when you spend over $250.*

    upload_2022-7-26_13-28-55.jpeg
     
  6. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,132
    Hey @TonyLi, I'm working on an idea that basically involves NPCs having conversations on their own--more similar to barks. Think Oblivion.

    Anyway, the wrinkle is that I want them to adapt to include multiple NPCs joining or leaving in the middle of a conversation, not just a pair (and for that matter I'm interested in regular conversations with the player that have the same ability, but that's down the road).

    My current method of doing this involves creating conversation "hotspots" and having NPCs in a certain range join the "hotspot" if they pass an RNG check. Periodically there's another RNG check and they may leave the hotspot to do something else.

    This feels pretty far outside of the bounds of traditional Dialogue System usage, but is this something you have a method of handling? My current idea is to continue to handle the "conversation" myself, but maybe implement Dialogue System Barks (hopefully with audio) through code. The hotspot might assign barks to characters randomly (roughly following one another in their topic and dialogue act).

    I took a quick look at the Bark Tutorial, but didn't see anything there or elsewhere for generating individual barks (with associated world space GUI and VO) on the fly through code. Is that in the documentation anywhere?
     
  7. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    Hi @EternalAmbiguity - Technically you can bark arbitrary strings with VO using the C# method DialogueManager.BarkString():

    Code (csharp):
    1. DialogueManager.BarkString("Hello, friend!", someNPC, characterBeingAddressed, "AudioWait(hello)");
    But it might be easier to write the lines of dialogue in the Dialogue System and run it as a conversation using overhead bubble subtitle panels. (See How To: Overhead Conversation Bubble Text for UI setup.) It's easy to specify different characters for the primary actor and conversant. Let's say you use generic actors named NPC1 and NPC2 as the conversation's actor and conversant, respectively. If you want Ann to speak NPC1's lines and Bob to speak NPC2's lines, specify them in DialogueManager.StartConversation() (or on the Dialogue System Trigger component if you don't want to write any code):

    Code (csharp):
    1. DialogueManager.StartConversation("Some Conversation", Ann, Bob);
    Additional characters require an extra step. Let's say you write generic actor NPC3 into the conversation, where NPC3 is not the primary actor or conversant.

    If you want Ann to speak NPC1's lines, Bob to speak NPC2's lines, and Carl to speak NPC3's lines, use CharacterInfo.RegisterActorTransform() first:

    Code (csharp):
    1. CharacterInfo.RegisterActorTransform("NPC3", Carl);
    2. DialogueManager.StartConversation("Some Conversation", Ann, Bob);
     
    EternalAmbiguity likes this.
  8. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,132
    Thanks a ton!

    The main issue that makes a conversation more difficult is that I want the conversations to be systemic and based on higher-level ideas like, again, dialogue acts (here's a place with a list of a few). My far-flung goal is an actual sort of cognitive model with things like grounding and actual exchange of information, but in the interim the dialogue acts can offer a simple way to have non-deterministic but still logical conversations that develop in real time.
     
  9. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    Got it. In that case, yes, barks might be the way to go unless you can build the conversation at runtime just before playing it. If so, see this page for a description of how to build the conversation at runtime.
     
    EternalAmbiguity likes this.
  10. claudius_I

    claudius_I

    Joined:
    May 28, 2017
    Posts:
    225
    Hello Tony.

    I have a question about barks

    is possible continue a bark? One node dialogue and after other dialogue node. I tried to did, but only bark the first node dialogue appear.
    Thanks
     

    Attached Files:

  11. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    Barks are single, one-off lines. They always bark only the first node in a conversation tree. You can link multiple nodes from <START>. Depending on how you set up your trigger, each bark can choose one at random or in order.

    upload_2022-8-4_18-54-54.png

    If you want to play more than one line, use a conversation:

    upload_2022-8-4_18-55-42.png

    You can make the conversation use bark UIs by adding an Override Dialogue UI and Bark Dialogue UI to the barker. Or you can make it use overhead bubble subtitle panels: How To: Set Up Overhead Conversation Bubble Text
     
    claudius_I likes this.
  12. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    New ChardiTronic Tutorial In Spanish, New Games, Idea Innovation Sale


    Spanish Language Dialogue System Tutorial by ChardiTronic

    Spanish streamer ChardiTronic just released a nice Dialogue System tutorial. It covers conversations, quests, interaction, and even language localization:




    New Games

    To inspire you, here are some recently-released and announced games that use the Dialogue System:

    Indie dev Xiri just released the solo-developed Moonyolk for free on itch.io:

    upload_2022-8-5_10-49-0.png

    Zaltick Games just released the trailer for their really fun-looking action game Adventure Kitty: Drill Buster:



    Bohemian Pulp's Steam page for Let Bions Be Bygones, being published by Microprose, recently opened for wishlists:




    Dialogue System on Sale

    upload_2022-8-5_10-57-5.jpeg

    The Dialogue System is currently on sale in the Asset Store!
     
  13. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    Dialogue System for Unity, Quest Machine, and Love/Hate on Sale

    upload_2022-8-9_11-19-16.png

    The Dialogue System, Quest Machine, and Love/Hate are all on sale in the Asset Store's Indie Innovation Sale!

    They all integrate nicely with each other. Here's the first video in the integration tutorial series:



    Use coupon code SPEEDUP2022 to get 5% off when you spend over $100, 10% off when you spend over $175, and 15% off when you spend over $250.
     
    Last edited: Aug 9, 2022
  14. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    Forever Ago - Development & Reveal Trailer

    Check out the development and reveal trailer for Third Shift's Forever Ago, being made with the Dialogue System for Unity and published by Annapurna Interactive:




    upload_2022-8-10_10-55-21.png

    The Dialogue System, Quest Machine, and Love/Hate are all on sale right now in the Asset Store's Indie Innovation Sale.
     
  15. Stickeyd

    Stickeyd

    Joined:
    Mar 26, 2017
    Posts:
    171
    Hey. I'm working on the comic-style rework of the dialogues. I'm facing a problem where when the dialogue text is "[auto] "(like in the choices, and in some other places) it creates an empty dialogue box
    https://gyazo.com/13646e09d027c8c9a8f7f63a81dc6ef8

    Here is the screenshot of the dialogue tree:
     
    Last edited: Aug 13, 2022
  16. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    Hi - You may need to adjust the custom script that I sent you to use the currentMenuText property instead of MenuText, or otherwise adjust it to work the way you want.
     
  17. Stickeyd

    Stickeyd

    Joined:
    Mar 26, 2017
    Posts:
    171
    Hey, I can't find a "MenuText" property in the script you sent me, can you tell me what script and where?
     
  18. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    Hi - Disregard. It doesn't need to use menu text. In the example scene I sent you, the Dialogue Manager is set up like this:

    upload_2022-8-13_14-17-18.png

    I tested it with this [auto] and it seems to work correctly:

    upload_2022-8-13_14-18-14.png
     
  19. Stickeyd

    Stickeyd

    Joined:
    Mar 26, 2017
    Posts:
    171
    It didn't work at all for me. I had all the checks already except "Always force response menu", when I turned that one on too I suddenly started having choices(response menus) where they weren't supposed to me, but the problem with "[auto] " stayed the same. I think it happens when it's only "[auto] ", not when it's part of other dialogue text like on your screenshot
     
  20. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    Hi - If you don't want response menu choices to show as subtitle boxes, UNtick Always Force response menu again, and tick Subtitle Settings > Skip Subtitle After Response Menu. I just PM'ed you another example scene to try to understand what the issue is. Please compare it to your setup and let me know what the difference is.
     
  21. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    Pixel Crushers Assets On Sale!

    upload_2022-8-15_13-0-7.png

    Reminder: The Dialogue System for Unity, Quest Machine, and Love/Hate are all on sale right now. They work great individually or as a team. Here's an integration tutorial if you're interested in using them together:



    Remember to use coupon code SPEEDUP2022 at checkout for extra discounts on your entire cart.
     
  22. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    Hunt the Night

    Check out Moonlight Games' Hunt the Night, being made with the Dialogue System:



    You can wishlist it on Steam.
     
  23. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    Dialogue System for Unity in Non-Game Applications

    You know the Dialogue System for Unity is used in many games, including Disco Elysium, Eternights, Lake, Peglin, Suzerain, Voodoo Detective, and many more.

    But did you know that the Dialogue is also used in a variety of non-game applications? You can find the Dialogue System running in VR training systems, business compliance courses, educational applications, and in WackoMedia's very cool-looking Emergency Convention Hologram debuting at Dragon Con's Trek Track September 1-5.




    Reminder: If you want to use the Dialogue System, Quest Machine, or Love/Hate in your games or other applications, they're on sale right now in the Asset Store. Remember to use coupon code SPEEDUP2022 get additional discounts at checkout.

     
  24. mario_code4ever

    mario_code4ever

    Joined:
    Jan 9, 2020
    Posts:
    16
    I would like to ask if is possible with this asset to pick dialogue options with keybindings: Like if you press 1 u select the first option, 2 you select the second option, etc... Mouse(cursor) is disabled in my game so I cannot do that with clicking. And joystick controls are still not viable. Would it be possible to pick options from a conversation with 1 2 3 if it is can you tell me how Thanks!
     
  25. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    Hi @mario_code4ever - Yes, just tick the response menu's Autonumber > Enabled:

    upload_2022-8-25_8-46-32.png
     
  26. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    Dialogue System-Powered Games at Gamescom

    At Gamescom? Check out the many games there that use the Dialogue System for Unity, such Animmal's The Way of Wrath in Hall 10.2, and say "hi" to devs:



    Reminder: You can currently get the Dialogue System on discount in the Asset Store's Best Of Indie Innovation sale and use it in your own games!
     
  27. mario_code4ever

    mario_code4ever

    Joined:
    Jan 9, 2020
    Posts:
    16
    Hello there. I added quest to my conversation while following your youtube tutorial for quest. But my response menu is not showing at all. It stays unactive in my conversation zone prefab. I got options to select but he just show first message and then deactives. Can you help me with this one?
     
  28. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    Hi - While playing, keep the Dialogue Editor window open on your conversation. It will show which responses' Conditions are true (available to show in the response menu) and which are false. True Conditions will have a green link arrow. False Conditions will have a red arrow.

    Also make sure the player responses are assigned to the Player actor; the nodes should be blue. If they're not blue, inspect the node and click the button to switch the actors:

    upload_2022-8-29_14-17-19.png

    Notice in the demo conversation that the player's responses are all blue:

    upload_2022-8-29_14-18-41.png
     
    mario_code4ever likes this.
  29. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    Best of Indie Innovation Sale Ends Soon - Dialogue System for Unity on Sale

    The Best of Indie Innovation sale ends in just a couple of days. If the Dialogue System for Unity is on your wishlist, make sure to get it before the sale ends. You can also get Love/Hate on sale. And remember to use coupon code BESTOF2022 to get an extra discount at checkout.

     
  30. mario_code4ever

    mario_code4ever

    Joined:
    Jan 9, 2020
    Posts:
    16
    My kill quest doesent increament after i killed the Boss(enemy). Still showing nill/1
    This is my script on the boss
    upload_2022-8-31_15-1-52.png
    upload_2022-8-31_15-2-28.png
     

    Attached Files:

  31. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    Let's first figure out why it reports "nil/1". What is your quest entry text? Does the database that's assigned to the Dialogue Manager have a variable named "Boss Killed"?

    This link may also help: How To: Set Up Quests
     
  32. mario_code4ever

    mario_code4ever

    Joined:
    Jan 9, 2020
    Posts:
    16
    upload_2022-8-31_16-34-54.png
    VARIABLES
    upload_2022-8-31_16-35-14.png
    CONVO
    upload_2022-8-31_16-35-41.png
    upload_2022-8-31_16-36-1.png
     
  33. mario_code4ever

    mario_code4ever

    Joined:
    Jan 9, 2020
    Posts:
    16
    I uploaded screenshots above
     
  34. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    Since your variable is named "Boss Killed", your quest entry text should be "[var=Boss_Killed]/1 Killed".
     
  35. mario_code4ever

    mario_code4ever

    Joined:
    Jan 9, 2020
    Posts:
    16
    Thanks! This fixed nill/1 it is displaying correctly now in quest HUD. But after i kill boss it is still showing 0/1. It doesent increment.
     
  36. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    Is your KinCrawler GameObject destroyed when the player kills it? If it's only deactivated (and not destroyed), set Increment On Destroy to Increment On: Disable.
     
    mario_code4ever likes this.
  37. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    Reminder - Indie Innovation Sale Ends Today

    The Indie Innovation Sale ends today. If you want to get the Dialogue System for Unity or Love/Hate, make sure to check out before the sale ends, and use code BESTOF2022 at checkout for extra discounts if your cart is $100+.

     
  38. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    Emergency Command Hologram at Dragon Con

    Here's Garrett Wang of Star Trek: Voyager trying out WackoMedia's Emergency Command Hologram at Dragon Con:



    WackoMedia used the Dialogue System for Unity to create this awesome interactive virtual assistant.
     
  39. mario_code4ever

    mario_code4ever

    Joined:
    Jan 9, 2020
    Posts:
    16
    After i killed boss once and i completed quest. Every time i restart the game now in editor quest is always completed.
    After i take quest from npc after i restart game he shows me 1/1 boss killed completed. Its there some way to reset quest completed or ?
     
  40. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    Are you loading a saved game? For example, are you using an AutoSaveLoad component? If so, you can reset the game state by calling PixelCrushers.SaveSystem.ResetGameState() in C# or adding a SaveSystemMethods component to a GameObject and configuring a UnityEvent to call its SaveSystemMethods.ResetGameState method.

    To reset only this quest, set the variable back to zero and the quest state to unassigned. C# example:
    Code (csharp):
    1. using PixelCrushers.DialogueSystem; // (put at top of script)
    2. ...
    3. QuestLog.SetQuestState("Kin Crawler Threat!", QuestState.unassigned);
    4. DialogueLua.SetVariable("Boss Killed", 0);
    You can also do the same in a Dialogue System Trigger or via Lua.
     
  41. UltimateVenom

    UltimateVenom

    Joined:
    Aug 7, 2021
    Posts:
    3
    With TextMesh Pro support enabled and Portrait Name referencing a Text Mesh Pro UGUI component in a Standard UI Subtitle Panel, the behaviour of Portrait Name appears to change.

    When referencing a normal text object the Players name will show when the response menu is visible, when referencing a Text Mesh Pro UGUI the NPC's name is shown until a response is selected.

    Any idea how to have fix this or what I may be doing wrong?
     
  42. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    Hi - Are you using one of the prefab dialogue UIs that ship with the Dialogue System? If so, did its OnOpen() or OnFocus() UnityEvent point to the Text element? If so, you may need to assign your TextMeshProUGUI GameObject instead. A couple of the prefab UIs do this, such as the VN Template Standard Dialogue UI:

    upload_2022-9-4_0-11-21.png
     
  43. UltimateVenom

    UltimateVenom

    Joined:
    Aug 7, 2021
    Posts:
    3
    I had used the Runic Standard Dialogue UI as a base, but it doesn't seem like there are any UnityEvents preset for that prefab.

    In double checking there were no Unity Events preset, I noticed that the Response Menu Panel also holds a reference to PC Name (which was blank in my prefab, probably because I removed the old Text object). Setting this to the Text Mesh Pro GUI field solved my issue.

    Thank you for your help and assistance, it is much appreciated!
     
    TonyLi likes this.
  44. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    Glad to help!
     
    UltimateVenom likes this.
  45. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    Dialogue System 2.2.31 Released

    Version 2.2.31 is now available on the Asset Store!

    This version adds Speech Recognition System integration.

    It also has lots of miscellaneous improvements to dialogue UIs (including the ability to use different fonts for different localizations) and cutscene sequences. It also adds a Default Bark Sequence option to the Dialogue Manager

    Release Notes:
    Core:
    • CHANGED: Entrytag Format dropdown value for Custom changed. If your existing project has previously set Entrytag Format to Custom, you must set it again.
    • Improved: Added %Entrytag Format option Title.
    • Improved: Optimized GetEntrytag.
    • Improved: Dialogue %Actor can now apply formatting codes when applying custom subtitle color.
    • Improved: Added SaveSystem.validSceneName delegate.
    • Improved: Standard Bark UI now has checkbox to cancel previous wait for sequence if showing new bark while old bark is still visible & waiting.
    • Improved: Sequencer commands can now specify subjects using actor:actorname format.
    • Improved: Fade(stay/unstay) work from fader's current alpha value.
    • Improved: Added 'noactivate' option to AnimatorPlay() sequencer commands.
    • Improved: If subtitle actor doesn't have animated portrait, subtitle panel disables portrait image's Animator.
    • Improved: Added Input Settings > Em Tag for Old Responses & Invalid Responses override options to conversation properties.
    • Improved: StandardUISubtitlePanel and StandardUIMenuPanel Use Portrait Native Size now works with packed sprites.
    • Improved: VN Template Standard Dialogue UI prefab now brings actor's portrait to front when speaking.
    • Improved: Bark order Random will now avoid sequential repeats if possible.
    • Added: Dialogue Manager - Display Settings > Bark Settings > Default Bark Sequence.
    • Added: Localized Fonts.
    • Added: ListExtensions.Shuffle.
    • Fixed: Bug in which all quest data was saved even when Persistent Data Settings specified saving only states.
    • Fixed: Tools.StripRichTextCodes & StripTextMeshProCodes now strips paragraph rich text codes.
    • Fixed: CinemachinePriority() sequencer command wasn't observing "except:name" syntax.
    • Fixed: DiskSavedGameDataStorer.RetrieveSavedGameData checks if save file is empty.
    Third Party Support:
    • Arcweave: Fixed import issue with "Speaker:" syntax.
    • articy:draft: CHANGED: Importer window's Stage Directions Mode is now a dropdown with additional options.
    • Devion Inventory System: Can now add DevionItemCollectionSaver to an active GameObject to save inactive ItemCollections; improved dgGetItemCount(); added DevionUpdateQuestUIs component.
    • Ink: Fixed issue with playing sequences twice; added Actor Names Case Sensitive checkbox.
    • PlayMaker: Updated for 1.9.5.
    • Speech Recognition System: Added support.
    • Spine: SpineAnimation() work with SkeletonGraphic
    • Twine: Added "Description:" syntax.
    • Yarn: Added Merge Variables option to retain current variable values in dialogue database.
     
    EpicMcDude likes this.
  46. EpicMcDude

    EpicMcDude

    Joined:
    Apr 15, 2013
    Posts:
    79
    Heya Tony,

    I searched around but couldn't find anything regarding this, I must be missing something.
    How can I set up a GameObject variable on a Dialogue Database? There's actor, item, number, text...
    I'm using Playmaker, so this is so I can use the FSMEvent sequencer command to send an event to that game object variable.

    Thank you
     
  47. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    You can't assign a GameObject to a dialogue database variable. For FSMEvent(), you can specify a GameObject name or the name of an actor that's represented in-scene by a Dialogue Actor component. Some examples:

    Code (sequence):
    1. FSMEvent(SomeEvent, SomeGameObject);  // Do SomeEvent on GameObject named SomeGameObject.
    2. FSMEvent(SomeEvent, actor:Player); // Do SomeEvent on GameObject whose Dialogue Actor component is set to Player.
    3. FSMEvent([var=event], [var=subject])
    The last example above uses [var=variable] markup tags. [var=event] will be replaced by the value of the dialogue database variable Variable["event"], and [var=subject] will be replaced by the value of Variable["subject"].
     
    EpicMcDude likes this.
  48. EpicMcDude

    EpicMcDude

    Joined:
    Apr 15, 2013
    Posts:
    79
    Ah okay gotcha. So in theory, could I put a Dialogue Actor component on an NPC that doesn't have dialog? This is just so I could reference this NPC game object as an actor during a dialogue.
    For example, I'm talking to NPC 1 and there's a dialogue option that sends an event to NPC 2 that has the Dialogue Actor component. Could I send this sequencer command FSMEvent(Event, NPC 2, FSMName) whilst talking to NPC 1 since NPC 2 has the component?

    Thank you
     
  49. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,087
    Yes. If the name of the GameObject is "NPC 2", and no other GameObjects in the scene are named "NPC 2", you don't even need to add a Dialogue Actor component. Just use:

    FSMEvent(event-name, NPC 2, fsm-name)

    If there are other GameObjects named "NPC 2", add a Sequencer Shortcuts component to the scene, and assign your intended "NPC 2" GameObject to the GameObject References section.

    If the GameObject is named differently from the actor (e.g., GameObject "NPC 2", actor "Bob"), then use:

    FSMEvent(event-name, actor:Bob, fsm-name)
     
    EpicMcDude likes this.
  50. EpicMcDude

    EpicMcDude

    Joined:
    Apr 15, 2013
    Posts:
    79
    So cool, thanks!

    EDIT: Just a side note, using "actor:" before the actor name wasn't firing the event, was scratching my head for a bit until i tried just the actor name.
     
    Last edited: Sep 8, 2022
unityunity