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

    SOSolacex

    Joined:
    Jan 10, 2018
    Posts:
    121
    Hey TonyLi, I tried downloading the latest Opsive UCC integration from the site, but it says the download doesn't exist. Is there a download link up anywhere else?
     
  2. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    From the Opsive site? That's where it's hosted now. Select menu item Tools > Opsive > Ultimate Character Controller > Integrations Manager.
     
  3. SOSolacex

    SOSolacex

    Joined:
    Jan 10, 2018
    Posts:
    121
    Ohh, been a while since I've been around so I was still checking pixelcrushers.com. I'll take a look, cheers.
     
    TonyLi likes this.
  4. SamRock

    SamRock

    Joined:
    Sep 5, 2017
    Posts:
    250
    Hi @TonyLi!
    Hope all's well :)

    Working on various "Gameover" Scenarios . Since your awesome asset as so many hidden gems, was wondering if there is a example of triggering "Game over" message or fadeout followed by "Load" menu?
    I already using your "Dialogue System Menu Framework"
     
  5. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @SamRock - It never hurts to check, but that's something that's probably better handled outside of the Dialogue System. You can still open the Menu Framework's Load menu after the fadeout, or better yet copy of the Load menu and customize it for this case.
     
    SamRock likes this.
  6. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Dialogue System 2.2.12 Released!

    Version 2.2.12 of the Dialogue System for Unity is now available on the Asset Store.

    In addition to several improvements and bug fixes, this version has additional starter UI prefabs and some handy new utility windows, such as a Variable Viewer popout window that you can use to manage variables and watch their values at runtime. It's super handy to have it open alongside the Dialogue Editor window or while you're playtesting in play mode. The Dialogue Editor's Variables section can now also collapse grouped variables in foldouts by group, helping keep the lists more manageable.

    Release Notes:

    Core:
    • CHANGED: Deprecated dialogue UI prefabs have been moved out of the Dialogue System. They are available on the Dialogue System Extras page.
    • Changed: Dialogue System Trigger's Start Conversation > Skip If No Valid Entries checkbox now defaults to false.
    • Added: Variable Viewer utility window.
    • Added: Variable Renamer utility window.
    • Added: SMS style, Nuke, Computer, Old School dialogue UI prefabs.
    • Improved: Lua wizards now provide shortcut to add new variable.
    • Improved: Dialogue Editor Variables tab now has option to collapse variable group foldouts.
    • Improved: Conversation properties can now override cancel subtitle/conversation inputs.
    • Improved: Sequencer commands can now find inactive GameObjects by tag.
    • Improved: Added C# method to set current selection in Selector.
    • Improved: Updated DemoScene1 computer terminal to demonstrate world space dialogue UI.
    • Improved: If dialogue UI instantiates missing EventSystem and using new Input System, now adds InputSystemUIInputModule.
    • Improved: If editing an auto-backup database instead of the original, database name watermark will be bright red.
    • Fixed: Bug with Delay() sequencer command when Dialogue System Trigger's Pause Game During Conversation was ticked.
    • Fixed: SetDialoguePanel() didn't re-show continue button if it was previously visible.
    • Fixed: Warm Up Conversation Controller with certain UIs would briefly show UI at start.
    • Fixed: Sequence field Check button now allows sequences containing only a {{shortcut}} to pass.
    • Fixed: Bug in SimStatus if loading saved game containing different SimStatus values for the most recent conversation and then playing same conversation.
    • Fixed: If including invalid responses, [auto] tag now doesn't auto-select invalid responses.
    • Fixed: QuestState fields can now be set to grantable at design time.
    • Fixed: Automatic explicit response button navigation now bypasses non-interactable buttons.
    • Fixed: Updated input field UIs in several example prefabs.
    • Save System: Fixed potential timing issue with AutoSaveLoad and DiskSavedGameDataStorer.
    Third Party Support:
    • Action-RPG Starter Kit: Updated for 6.55b.
    • Adventure Creator: Updated for 1.72.
    • articy:draft: Fixed actor assignments for certain "decorator" nodes (jumps, pins, etc.).
    • Opsive Controllers: Updated to allow specifying item collection by name; save min & max attribute values; save non-slot items.
    • ORK: Added ORKGetQuestStatus() Lua function.
    • PlayMaker: Added Bark action option to specify text instead of conversation.
     
    DMRhodes likes this.
  7. DMRhodes

    DMRhodes

    Joined:
    May 21, 2015
    Posts:
    81
    Thank you for the update!
     
    TonyLi likes this.
  8. goutham12

    goutham12

    Joined:
    Jul 14, 2016
    Posts:
    53
    Hi i have two questions for you,
    1. How to disable selectable leble. i mean "(spacebar to interact)" , i want to disable this leble but selector mechanim should work.
    2. I have an NPC character. the components that are there for the character is Collieder, Usable, Dialogue trigger and an Audio source. NPC conversation has audio sequence. it is playing the audio but not from the NPC audio source it is playing from the Dialogue system prefab's audio source. because of this reason "SetTypewritterLengthToAudio" giving me the error.
     
  9. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    You can set the Use Message to a blank string. Or editor your selector UI (the default prefab is 'Basic Standard UI Selector Elements') and remove the Use Message Text.

    Check these things:
    • Assign your NPC to the Dialogue System Trigger's Actions > Start Conversation > Conversation Conversant field.
    • Make sure the conversation's conversant is set to the NPC actor. To inspect the conversation's properties, inspect the conversation and click on blank canvas space.
    • Make sure the node is assigned to the NPC actor.
     
  10. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Space Farm Released

    Check out Digital Decade's Space Farm, which just released on Steam and uses the Dialogue System for Unity:

     
    SamRock likes this.
  11. Stickeyd

    Stickeyd

    Joined:
    Mar 26, 2017
    Posts:
    174
    I want to change the focused/unfocused animation to make the characters more black/grey rather than changing their transparency. How do I do that? It seems that I can't change the focus/unfocus animations as the "add property" button is grayed out.

    https://gyazo.com/7078ae27b0e39bb8b8c8590e9f06ece3

    Also, I want to add the words which can be hovered to see the additional info(basically show the additional window), like here in Pyre. Any easy way to do this?
     
  12. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @Stickeyd - Notice that when Subtitle Panel 0 or Subtitle Panel 1 is selected in the Hierarchy, you can add properties to the Focus and Unfocus animations. If the subtitle panel isn't selected in the Hierarchy, Add Property will be grayed out.

    In your Focus animation, remove the Portrait Image: Canvas Group.Alpha property. Add Portrait Image: Image.Color.
     
    SamRock likes this.
  13. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Yes. First, use TextMesh Pro for your dialogue UI. (See: TextMesh Pro Support.) Then use <link> tags in your dialogue text. More details: Tooltips in TextMesh Pro Text.
     
  14. Stickeyd

    Stickeyd

    Joined:
    Mar 26, 2017
    Posts:
    174
    The add property certainly gets white when I select Subtitle Panel, but it isn't "Focus" animation, it's some different animation, and I can't figure out which one. When I then click on Focus or Unfocus to choose the focus animations I want to change it's grey again.
     
  15. Stickeyd

    Stickeyd

    Joined:
    Mar 26, 2017
    Posts:
    174
    After I changed to TextMesh Pro the dialogues are acting weird. Before, I was pressing left mouse button to skip each of the dialogue lines, now sometimes it skips and sometimes is not

    Edit: So the problem is that the text in inspector is changing as it should, but visuals are not updating. Not sure what's going on
    https://gyazo.com/3c8829ca211ea73ab08daab964e2d006
     
    Last edited: Oct 21, 2020
  16. Stickeyd

    Stickeyd

    Joined:
    Mar 26, 2017
    Posts:
    174
    Also, with the default text UI I used to press on the screen once, and then the typewriter would show all the text it currently writes, and only if I clicked twice it would skip to the next dialogue entry. Now when I changed to TextMesh Pro it changes to next dialogue entry instantly after one click, what could go wrong?
     
    Last edited: Oct 21, 2020
  17. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Does this screenshot help?

    upload_2020-10-21_11-3-58.png

    I assume the Subtitle Text is assigned to the subtitle panel's StandardUISubtitlePanel component > Subtitle Text field?

    If so, then you're probably hitting a bug in an earlier version of TextMesh Pro. Please use the Package Manager window to update TextMesh Pro to the latest version.

    If that doesn't fix it, does your dialogue UI use any custom code?

    Inspect the continue button. Assign the TextMeshProUGUI Subtitle Text element to to it.
     
  18. Stickeyd

    Stickeyd

    Joined:
    Mar 26, 2017
    Posts:
    174
    All problems solved, thank you! Support for this asset is best on the market, like always
     
    SamRock and TonyLi like this.
  19. Stickeyd

    Stickeyd

    Joined:
    Mar 26, 2017
    Posts:
    174
    What changes the canvas group alpha on the portrait images of the character on the dialogue? I want it to always be 1 yet it keeps changing to 0.5
     
  20. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    It changes in two places:
    • The subtitle panel's StandardUISubtitlePanel component has an OnOpen() UnityEvent that sets the alpha. You could change this to set the portrait image color to a darker color instead.
    • The focus animation (unless you've changed it) animates the alpha.
     
  21. aloneandsuffering101

    aloneandsuffering101

    Joined:
    Apr 21, 2018
    Posts:
    15
    Hi,
    I'm sorry if this was asked before but I haven't found anything about animating the dialogue UI?
    I would like the dialogue UI panel to shake or move around or change color using animation clips.
    I know there is the Animation() command, but this is for the actors in the dialogue not the dialogue UI panel.
    Is there a way to do this?
     
  22. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi! The Animation() and Animator***() sequencer commands are for any GameObject with an Animation or Animator component. If you give your dialogue UI panel a unique name, you can specify it in the sequencer command. For example, say your panel is named "Dialogue Panel" and it has an Animator with a state named "Shake". To shake the panel, use this sequencer command:

    AnimatorPlay(Shake, Dialogue Panel)
     
  23. SamRock

    SamRock

    Joined:
    Sep 5, 2017
    Posts:
    250
    Hi @TonyLi

    Thanks for the updates :)

    I am working on the "Death Menu". I followed your suggestion and duplicated the Pause menu (from the Menu System) and kept only "Load", "Options" and "Quit" button. The Panel is shown whenever player dies (used your MessageSystem!)

    1. I have an issue and not able to identify the root cause, every property set is same as the Pause menu. When the Death Menu screen opens up and I click on (say) "Load", it doesnt bring the screen to the front or hide the "Death Menu" Panel. The button on the behind screen functions.
    This is happening only in this case, works find on every other Menu screen. Could you please help me here?

    tmp.PNG

    2. I added the Menu System to the Dialogue Manager's "Instantiate Prefab" section, so that the menu is loaded along with other Screens and it does load fine. However, I noticed two issues. Firstly, once I run the game, the main "Menu System" prefab seems to get deactivated and this state is saved into the Prefab as well! I have to manual activate it everytime. Havent seen this behavior if I add Menu System directly into the scene.
    tmp.PNG

    Secondly and something I can live with, but want to understand. The Prefabs added into Dialogue Manager seems to remain under the its own "Canvas" . However, the "Menu system" always spawns outside the Dialogue system's canvas. I tried remove the "Canvas" component from menu system but it doesn't help
    tmp.PNG

    Also your UI prefab have these "Canvas (Environment)" as parent object, How do I add that? (Sorry couldn't find any reference online)
    tmp.PNG
     
  24. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @SamRock -
    Move your death menu panel above the LoadGamePanel. This way it will be drawn under the LoadGamePanel. When the LoadGamePanel opens, it will hide the death menu panel:

    upload_2020-10-26_9-44-40.png


    Don't add it to Instantiate Prefabs. Let it be its own separate GameObject. It's much easier to manage that way, and it will use its own Canvas, which is more efficient.

    That's just a result of opening the prefab in the editor. When you open a UI prefab for editing, Unity will create a temporary canvas to display it in. This canvas only exists while you're editing the prefab. It's not used at runtime.
     
    SamRock likes this.
  25. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Recent Releases: Legends of Ethernal and Meta Form

    I'd like to highlight a couple of excellent recent releases that use the Dialogue System for Unity.

    Meta Form (itch.io)

    A free game made for the Spooky "REVIVAL" Jam, with excellent and timely writing, great visuals and music, and a neat game mechanic that they incorporated into the dialogue.


    Legends of Ethernal (PS4, Nintendo Switch, Xbox One, Steam)

    An action adventure platformer with evolving gameplay, crafting, and more.
     
    SamRock likes this.
  26. Alain_Berset

    Alain_Berset

    Joined:
    Nov 2, 2018
    Posts:
    10
    Hello!
    I have a beginner's question and I don't know if I'm in the right place.

    I'm trying to access custom fields in the dialogue current entry from a C# script.
    But I can't find a method (neither from DialogueLua nor from DialogueManager) to access this information.
    It should be simple, but I can't find it.

    Anything I can think of?
     
  27. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @Alain_Berset - When you create content in the Dialogue Editor window, it's added to a dialogue database asset. At runtime, the Dialogue System loads the dialogue database content into an in-memory dialogue database called DialogueManager.masterDatabase, which should be considered static and read-only. It also copies certain info that can change during play -- such as Actors, Quests, and Variables -- into the Dialogue System's runtime Lua environment, which is read-write. Use DialogueLua to access the Lua values.

    To read a field from any arbitrary dialogue entry, access it through DialogueManager.masterDatabase. For example:
    Code (csharp):
    1. DialogueEntry entry = DialogueManager.masterDatabase.GetDialogueEntry(conversationID, entryID);
    2. string customFieldValue = Field.LookupValue(entry.fields, "My Custom Field");
    When a conversation is active, the current conversation state is always accessible through DialogueManager.currentConversationState. This includes the current dialogue entry:
    Code (csharp):
    1. DialogueEntry currentDialogueEntry = DialogueManager.currentConversationState.subtitle.dialogueEntry;
    The Dialogue System has a number of C# event hooks and script messages (reference). One of these messages is OnConversationLine(Subtitle), which you can also use to work with the current dialogue entry:
    Code (csharp):
    1. void OnConversationLine(Subtitle subtitle) // Called when the conversation gets to a dialogue entry.
    2. {
    3.     string fieldValue = Field.LookupValue(subtitle.dialogueEntry.fields, "My Custom Field");
    4.     Debug.Log("Current line's 'My Custom Field' value is: " + fieldValue;
    5. }
     
    Last edited: Nov 1, 2020
    SamRock likes this.
  28. FeastSC2

    FeastSC2

    Joined:
    Sep 30, 2016
    Posts:
    978
    Hey I also have a beginner question.

    In my game the conversation text reveals itself like a typewriter.

    If the player presses continue, the text should be entirely revealed (if it's not completely revealed).
    If the text is completely revealed and the player presses continue, it's on to the next message.

    Currently if I use the "Cancel Subtitle Input", it skips to the next message without revealing the text first.
    If I click on the skip conversation button it works correctly
    How can I have the input replicate what the button does?
     
    Last edited: Nov 2, 2020
  29. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @FeastSC2 - The continue button (skip conversation button) and the Cancel Subtitle Input are two separate things. Cancel Subtitle Input always cancels the entire subtitle and immediately progresses to the next stage of the conversation.

    Try this:
    • Inspect the Dialogue Manager. Set Input Settings > Cancel Subtitle Input > Key to None, and clear Button Name. This will disable the Cancel Subtitle Input.
    • Add a UI Button Key Trigger to your dialogue UI's Continue Button(s). Set its Key to Escape and/or assign an input button name. This will map Escape as a hotkey to the Continue Button.
     
    SamRock and FeastSC2 like this.
  30. FeastSC2

    FeastSC2

    Joined:
    Sep 30, 2016
    Posts:
    978
    @TonyLi Thanks that worked like a charm :)

    I have another quick question, how can I play an animation when the speaker is done with the conversation?

    Originally the speaker is in idle then he plays various talk animations with the AnimatorPlay commands, when he gets to conversation nodes.

    So on the last node I call:
    AnimatorPlay(Talk8,, .25);
    {{default}}

    But how can I play the Idle animation when the conversation is over (with a sequence)?
    I don't have a node to enter a sequence in anymore.



    PS: It would have been nice to have a more consistant naming for conversant, speaker, listener, actor, barkTarget, ... in scripts.
    If it can be done without damaging users it's nice, if not nevermind.
     
    Last edited: Nov 2, 2020
  31. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @FeastSC2 -

    Here are a few ways:

    - You can play the idle animation at the end of the last node. If you require the player to click a continue button to continue:
    Code (csharp):
    1. AnimatorPlay(Talk8,,.25);
    2. {{default}};
    3. required AnimatorPlay(Idle,,.25)@9999
    If you don't require the continue button and want to idle when the end of the node duration is reached:
    Code (csharp):
    1. AnimatorPlay(Talk8,,.25);
    2. {{default}};
    3. required AnimatorPlay(Idle,,.25)@{{end}}
    - Or you can add another Dialogue System Trigger to the character. Set it to OnConversationEnd. Select Add Action > Play Sequence, and set the Sequence field to:
    Code (csharp):
    1. AnimatorPlay(Idle,,.25)
    - Or you can add a Dialogue System Events component to the character. Configure the OnConversationEnd() UnityEvent to play the Idle animation.
     
  32. Stickeyd

    Stickeyd

    Joined:
    Mar 26, 2017
    Posts:
    174
    Hello. I want to have a button "Get to the point" which skips the each of the conversations entry in each dialogue to my custom specified entry in this dialogue. What's the best way to do it? What I'm trying to do right now is have the additional button on the dialogue window which if pressed somehow switches entry of the conversation to specified. I'm not sure how to switch to the entry I want to via code. Any help?
     
  33. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @Stickeyd - To switch to a specific dialogue entry:
    Code (csharp):
    1. // Get the conversation model state for the specified entry:
    2. var state = DialogueManager.conversationModel.GetState(entry);
    3.  
    4. // Move the conversation to that state:
    5. DialogueManager.conversationController.GotoState(state);
    You can add a custom Boolean field to your conversation, maybe called "The Point". On the specific dialogue entry, set the field true. When the player clicks the "Get to the point" button, find that dialogue entry and jump to it:

    Code (csharp):
    1. // Get the "to the point" entry.
    2. // Could use DialogueManager.lastConversationID, but the technique below is better because it handles cross-conversation changes:
    3. var conversationID = DialogueManager.currentConversationState.subtitle.dialogueEntry.conversationID;
    4. var conversation = DialogueManager.masterDatabase.GetConversation(conversationID);
    5. var thePointEntry = conversation.dialogueEntries.Find(entry => Field.LookupBool(entry.fields, "The Point") == true);
    6.  
    7. // Jump the conversation to the entry:
    8. var state = DialogueManager.conversationModel.GetState(thePointEntry);
    9. DialogueManager.conversationController.GotoState(state);
     
    SamRock likes this.
  34. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Updated Packages Available for DS 2.2.12: Corgi, i2 Localization, Invector

    The Dialogue System Extras page has several updated packages for version 2.2.12. These updates will also be in the next full release.
    • Corgi Platformer Engine: Updated for Corgi 6.6.
    • i2 Localization: Improved import/export.
    • Invector controllers: Updated for Invector 2.5.3+.
    • Delay() sequencer command bug fix: Fixes bug with format Delay(#)->Message(message)
     
  35. Scynoth

    Scynoth

    Joined:
    Apr 25, 2016
    Posts:
    10
    TonyLi,

    I just wanted your feedback/input. I'm working on a simple 2d game that heavily relies on text. It's a classic adventure text-based game with a more modern UI that uses buttons to progress the game (Move south, Enter House, etc). The dialog/text isn't really in the traditional "NPC talks, Player talks, and back and forth as you see with visual novels or RPGs" but rather more of a narration in a story format of what's happening and whos talking depending on where you are, your actions, etc. So these will be large blocks of text as well. Do you think the Dialogue system would be a good tool for the job at hand for something like this?

    I was thinking that basically in the dialogue editor, each location, NPC, etc would have the story/narration tired to the dialogue and just display it all in one big text instead of an actual dialogue that would be going back and forth. This way the player gets the story narration and the people talking all in one text (like a book). Then they have options/responses that can drive the story further like normal.
     
  36. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @Scynoth - Yes, you can certainly do that with the Dialogue System. One example of a game that uses the Dialogue System to do something similar is Inkborne Tales' When Silence Fell:

    upload_2020-11-6_16-1-33.png

     
    SamRock likes this.
  37. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Ultimate Notification System - with Dialogue System integration

    Animmal Tech recently released Ultimate Notification System, a slick notification system that has Dialogue System integration:

     
  38. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    509
    Hello,

    I want to have one main conversation and then randomly player options can pop up that will make the NPC change the course of the conversation for some time and when done reconnect back to the main flow. Because it's random, I can't really connect these new options to the main conversation and I Im going to need a new UI specifically for these options.

    The main idea is that I have an AI that is constantly talking and the player can also select some options from this conversations, for now pretty standard stuff for the Dialogue System, but sometimes (randomly no matter what the AI is currently saying) I want to get instructions on screen (2 or 3 options where the player can choose from) for example [Ask the AI about X] [Make the AI do Y] - those options will shift the conversation for awhile and when done the AI should reconnect to where it was before these options appeared, after about a minute or so a new set of options may randomly pop up and do the same.

    Do you have any idea how to do something like that?
     
  39. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @skinwalker - Yes. Use the conversation position stack. (Add a Conversation Position Stack component to your Dialogue Manager to enable the stack.) You can push the current conversation state onto the stack, then make the conversation jump elsewhere. At the end of that diversion, pop the saved conversation state off of the stack.

    To make your AI code interrupt, use DialogueManager.conversationController.GotoState(). Example:

    Code (csharp):
    1. ConversationPositionStack.PushConversationPosition();
    2. var diversionState = DialogueManager.conversationModel.GetState(someDialogueEntry);
    3. DialogueManager.conversationController.GotoState(diversionState);
    In the last node of the diversion conversation branch, include PopConversationPosition() in the Script field.
     
    skinwalker likes this.
  40. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    509
    I will give this a try in the next couple of days. Just to ask, is there a way to add a time limit to those buttons that pop up and if it runs out then the AI will just continue its current branch and the options will disappear.
     
  41. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Nothing built in. But you could start your own timer in an OnConversationResponseMenu method. When the timer runs out, pop back to the original position, which should update the response menu to its original buttons.
     
  42. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Dialogue System for Unity 2.2.13 Released

    Version 2.2.13 is now live on the Asset Store!

    Release Notes

    Core:
    • Added: Scrolling dialogue UI template.
    • Added: Menu > Conversation Properties (alternative to clicking blank canvas space to inspect properties).
    • Added: HidePanel() sequencer command.
    • Improved: Dialgoue entry sequences set to Continue() now skip subtitle same as None().
    • Improved: Subtitle panel > Add Speaker Name format now replaces \n with newlines.
    • Improved: Added smooth scroll option to UIScrollbarEnabler & UnityUITypewriterEffect.
    • Improved: Added extra warmup modes to Dialogue Manager.
    • Improved: Dialogue Manager's Persistent Data Settings > Initialize New Variables checkbox now also adds new actor fields added since save.
    • Improved: Loading from addressables now logs clearer error message when specified key doesn't exist.
    • Improved: If actor's Current_Portrait field is set, now checks if sprite is in actor list by name before trying to load asset.
    • Fixed: Delay(#)->Message(message) would send message immediately instead of after delay.
    • Fixed: Timing of RPG Maker codes in TextMeshProTypewriterEffect could be off when text contained certain TMP tags.
    • Fixed: Dialogue Editor's Show Portraits option wouldn't persist across play mode changes.
    • Fixed: Editor play mode issue with SimStatus when disabling domain reloading.
    • Fixed: Bug when using SimStatus and loading saved game containing conversation that was subsequently deleted.
    • Fixed: Reconnected basic bark UI's animator controller.
    • Fixed: StandardBarkUI now checks Camera.main null.
    • Fixed: AlwaysFaceCamera issue with z-axis when Y-Axis Only is ticked.
    • Fixed: MissingReferenceException when calling Close() on a panel whose GameObject has been destroyed in same frame.
    • Save System: Added SaveSystem.ResetGameState().
    Third Party Support:
    • Corgi Platformer Engine: Updated for 6.6+.
    • i2 Localization: Leaves [/i2nt] tags untouched. Fixes issue where changes to existing fields in database weren't recopied to i2 Localization asset. Handles case when languages and language codes lists aren't the same length.
    • Invector Controllers: Updated for 2.5.3+.
    • Opsive Controllers: Updated for 2.2.5.
     
    SamRock and skinwalker like this.
  43. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Dialogue System - 70% Off in Singles Day Sale

    In selected regions, the Dialogue System for Unity is available for 70% off during the Singles' Day Sale using coupon code SINGLESDAY70OFF.

    Quest Machine and Love/Hate are also available for 50% off!

     
  44. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    509
    Regarding my previous question, is it possible to display a second dialogue system UI from that same npc? I'd like to keep the main conversation on screen and the second one (where it can branch off) shouldnt stop the voice / typewriter of the main conversation unless a button is clicked from there.

    If not I think I can write my own UI to do that.
     
  45. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    @skinwalker - Two UIs open on two different conversations at the same time, running in parallel? If so, that's possible. If that's what you want to do, the easiest way is to add an Override Dialogue UI component to the NPC but leave it disabled. Assign your second UI. Before starting the second conversation, enable the Override Dialogue UI component. After starting the second conversation, disable it again.

    If, on the other hand, you want to keep running the same conversation but just branch off temporarily and show the branch's content in another subtitle panel and response menu panel, the process is different. There are a few ways you can do it, but the simplest may be to add one or more additional subtitle panels to your dialogue UI. Assign a different actor (e.g., instead of NPC, use NPC-Aside) to the branch's dialogue entry nodes. Use the SetPanel() sequencer command to tell the conversation to use your new subtitle panel for NPC-Aside. If you want to use a different response menu panel, too, use SetMenuPanel().
     
    SamRock likes this.
  46. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    509
    Well I want to show the 2nd dialogue first line and options in a new UI (so they dont interfere with the current convo displayed on screen) and then if the user actually decides to click any of the options that lead to more node from that 2nd convo I want to start displaying the rest of the dialogue where I was displaying the main one and when its over branch back to where the main stopped. I will try your first suggestion.
     
  47. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    @skinwalker - In that case, use the second suggestion. I'll put together a quick little example and post it here.
     
    SamRock likes this.
  48. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    @skinwalker - I'm attaching an example to this post. It demonstrates how to show an interjection in separate subtitle and menu panels. It doesn't demonstrate the conversation stack because I wanted to this example straightforward and to the point.

    The conversation looks like this:

    upload_2020-11-12_8-31-20.png

    Before the interjection point, the UI looks like this:

    upload_2020-11-12_8-31-42.png

    When the interjection happens, it looks like this:

    upload_2020-11-12_8-31-55.png

    When the player click the menu button, the interjection panels disappear and it resumes with the regular panels.
     

    Attached Files:

    SamRock likes this.
  49. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    509
    Okay. Can these interjections be triggered at random points in the conversation (Id assume from another conversation that I start from code randomly)? Can the main convo responses and the interjection convo be visible at the same time?

    Btw is there something required to run the demo because it shows missing scripts on the UI and nothing happens when I start it?
     
    Last edited: Nov 12, 2020
  50. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Yes. Let's distinguish between two uses of the word "conversation":

    1. A database conversation is a conversation (a tree of dialogue entry nodes) in the dialogue database.

    2. An active conversation is runtime activity. The active conversation goes through conversation states. Each conversation state includes the current dialogue entry's subtitle and, optionally, a response menu.

    You won't actually start a separate active conversation. Instead, you'll tell the current active conversation's DialogueManager.conversationController to go to a new state (i.e., a new dialogue entry), which can be in a different database conversation.

    No, it should work as-is in Unity 2019.3 or higher. I made the scene in Unity 2019.3.15. If you're using an earlier version of Unity, let me know and I'll recreate it in that version.
     
    skinwalker likes this.