Tricky questions about possibilites of The Dialogue System

Announcements, support questions, and discussion for the Dialogue System.
User avatar
Hulda_Gnodima
Posts: 19
Joined: Fri Jan 17, 2020 9:04 am

Re: Tricky questions about possibilites of The Dialogue System

Post by Hulda_Gnodima »

Thank you for your reply, and it was super fast at that!

1. Having trouble figuring out how to make my character's animation's show properly
(Still having animation-difficulties, detailing below. Warning, it's a lot of text to clearly describe what's happening.)

Thanks for the animation-video link. I followed this tutorial before, and it is after it I got stuck. It's my bad I didn't formulate this clearly in the message above, sorry. The tricky thing in the video is it gives the following steps:

1. Make animations (as you say they are sprite-based in the video-tutorial, mine are composed of several sprites)
2. For each Subtitle panel tick "Use Animated Portraits""
3. In the Dialog actor drag the animator associated with the animations into the "Portrait Animator Controller" field.
(4. (Optional) preview your animations by dragging the animator into the Portrait Image-gameobject)

I've done all of this (Except the fourth as I have multiple-sprites per animation), and afterwards I'm stuck. Just to be sure I followed the video-tutorial again now to be sure I hadn't missed a step and I get the same results.

My issues:
The issue for me is I get errors "Parameter 'Hide' does not exist." & Parameter 'Show' does not exist." if I stop where the vid-tutorial steps stop.
I tried remedying this error by not calling any animations in Dialog Entries and adding Show/Hide boolean-parameters to the Animators. That removes the error-messages, but the portraits aren't hiding/showing as I intended.
So I guessed perhaps these parameters should be connected to animations that hide/show the portraits. So I tried to connect these hide/show booleans to transition between animations that hide/show animation-parts. This is what I did:

1. make an animation that hides NPC/PC portrait animation-parts.
2. Make a transition to this hide-animation with a condition "Hide" =true.
3. Make an animation that shows NPC/PC portrait animation-parts.
4. Make a transition to this show-animation with condition "Show" = true

However the portraits are still not behaving as intended. Depending on how I set up the conditions the the characters hide, sometimes they flicker, sometimes the Portrait name Text persists after the portrait-animation is gone etc., but I can't get them to work as intended: Simply display when they're talking and not display when not talking. It's super strange.

An interesting caveat is that when I just used a single-sprite for the Portrait-Images(no animaton), the portrait's toggled perfectly with the dialog. Perhaps it causes problems that I'm using multiple sprites for my animations and I need to set it up in a special way?

To show super-clearly my current setup (to make it easier to see clues to what I might be doing wrong) I've put together the following video where I:

(hotlink: https://streamable.com/uem7k)
A. Show me having fulfilled the video-tutorial-steps you linked to on my PC, plus my setup with Hide/Show bools + animations.
(see 00:00 - 00:40)
B. Shows the same step as A but for the NPC.
(see 00:40-01:40)
C. The dialog behaving in game, with the portraits not showing/hiding as they should.
Here you can also see the errors in the bottom Console "Animator.GotoState: State could not be found" & "Invalid Layer Index '-1', UnityEngine.Animator:Play(String, Int32)"because I'm making the call: "AnimatorPlay(Player_default_talking)" in the Dialog entry sequencer for when Vulpie first replies (I wanted to see if it finds and plays the animation, even if it doesn't show/hid correctly). But it seems it's not finding the animation.
(see 02:00-02:26)
D. Me tweaking the conditions to try to fix the blinking, but this causing other problems (Portrait name text not disappearing/portrait remaining etc.).
(see 02:26-02:56)

It feels to me like I'm missing important understand and steps on how to actually set the Dialog character-animations up using The Dialog System. The show/hide parameters and what I should do with them is unclear to me. I looked at your tutorials and couldn't see them mentioned, and I didn't see any hide/show animations in your animators shown in your videos. I also tried googling/looking through the forum/looking through the documentation but haven't found solutions to my issues. I don't know how to proceed.

I'm also wondering what I should do with the "Portrait Image" Image-field in each Subtitle Panel's "Standard UI Subtitle Panel"-script. Should I leave it at None (as I'm using multiple sprites that are contained in an empty gameObject, and not a single Image-sprite for my animations)? I have left it on None for now because it's made most sense to me now, but I don't know if I should.

Again, thanks for assisting me. You've been amazing. I've decided to wait trying to achieve the other things I asked yesterday to make sure I fix the animations first. Can't wait to dig into them later however.
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Tricky questions about possibilites of The Dialogue System

Post by Tony Li »

Hi,

Thanks for the details. I'm going to be out of the office this afternoon. Tomorrow morning I'll run through the same steps here, make a note of any gotchas. and reply back here.
User avatar
Hulda_Gnodima
Posts: 19
Joined: Fri Jan 17, 2020 9:04 am

Re: Tricky questions about possibilites of The Dialogue System

Post by Hulda_Gnodima »

Thank you so much Tony! :D
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Tricky questions about possibilites of The Dialogue System

Post by Tony Li »

I wasn't sure exactly what might be causing the issue, so I put together an example scene:

DS_TestPortraitAnimation_2020-02-03.unitypackage

Here are some notes on how I set it up, along with some things that I think might be going on in your scene:
  • There are 3 characters: Player, NPC, and NPC2. Player and NPC share the same animator controller, but they use different subtitle panels (PC Subtitle Panel and NPC Subtitle Panel, respectively). NPC2 shares the same subtitle panel with NPC, but its Dialogue Actor points to a different animator controller.
  • I ticked the subtitle panels' Use Animated Portraits checkbox. (Make sure you've ticked this.)
  • I set Dialogue Manager's Default Sequence & Default Player Sequence to play animations on NPC Portrait Image and PC Portrait Image, not NPC Subtitle Panel / PC Subtitle Panel. The Portrait Images should be uniquely named and have Animator components.
  • The 'Show' & 'Hide' warnings refer to subtitle panel's Animator. If your subtitle panels don't have an Animator or their animator controllers don't have Show and Hide triggers, inspect the subtitle panels and clear the Show Trigger and Hide Trigger fields.
User avatar
Hulda_Gnodima
Posts: 19
Joined: Fri Jan 17, 2020 9:04 am

Re: Tricky questions about possibilites of The Dialogue System

Post by Hulda_Gnodima »

Tony ............. holy hell, through your scene and replies I finally discovered the issue. All along It was that I hadn't erased the "Show" "Hide" parameters in the subtitle panels!!!

As soon as I'd done that everything worked PERFECTLY. It had caused all following issues. I just stared at my project in disbelief, thought I would die from relief haha. Thank you a BAZILLION!!!!!

Im very grateful for the example-scene/explanations. The dialog you wrote made me laugh. And I also tried the other things you replied to and they all work as well. Thank you thank you thank yooouuuuu! :mrgreen: :mrgreen: :mrgreen:
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Tricky questions about possibilites of The Dialogue System

Post by Tony Li »

Awesome, glad it's working now!
Post Reply