Dialog not appearing over correct object

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
RetroVertigo
Posts: 55
Joined: Fri Apr 16, 2021 4:32 pm

Dialog not appearing over correct object

Post by RetroVertigo »

So, I run into this sometimes when I create a new cutscene, and I am not sure why it happens.

I have the Actor for the conversation as Wyrmking
The Actor for the dialog box is Wyrmking
The Object is set correctly with the Dialog Actor script - WyrmKing

Yet, the dialog appears over the character name Bishop.

I have no idea why this is happening. Any ideas on what I might be missing with my configuration?

Actor for convo and Dialog are both set to Wyrmking:
Image

Object has the Dialog Actor Script set to WyrmKing:
Image


Here is the game view that has the dialog over the Bishop character:
Image


This seems to happen at random for me, but I have no idea why. I appreciate any input you guys might have.
User avatar
Tony Li
Posts: 22152
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialog not appearing over correct object

Post by Tony Li »

Hi,

In the lower right of the Dialogue Editor window, you can see which actors are assigned as the conversation's primary actor and conversant. Try setting both of them. The conversation actor is typically the player. The conversation conversant is typically the NPC with the most lines in the conversation.

Then make sure the corresponding actor GameObjects are being used in your Dialogue System Trigger or Start Conversation timeline clip. Keep in mind that the Start Conversation track's GameObject will be used as the conversation actor, and you can assign a Conversant in the clip's inspector.
RetroVertigo
Posts: 55
Joined: Fri Apr 16, 2021 4:32 pm

Re: Dialog not appearing over correct object

Post by RetroVertigo »

OK, so I got the first problem fixed, but now I have another character whose dialog will not come up. The Continue track was hit and the timeline paused, but nothing comes up. I am also confused on how I can get this to work with my game. I thought I had it all working, but with how you are describing the Actor and Conversant, it doesn't seem like it will work with my Cutscenes, unless I leave both Actor and Conversant blank, and just ignore those fields.
For my cutscenes, I don't really have a Player/Actor character. It is a bunch of party members in a scene and they all will have speech bubbles, etc. Just like a Final Fantasy or Octopath.
So is there a different setup I need to look at for this, since it is not something like a single player or Mass Effect kind of speech system, with a single player and few party members, and the single player is the one interacting with all NPCs?

Thanks again for the help
User avatar
Tony Li
Posts: 22152
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialog not appearing over correct object

Post by Tony Li »

Hi,

Party-based dialogue is fine, and it's the default behavior. The exceptions are the conversation's primary actor or conversant -- that is, the characters assigned to the conversation properties Actor and Conversant dropdowns. The Dialogue System allows these two to be flexible.

For example, say you've assigned character B as the conversation's primary conversant. But then in your Dialogue System Trigger or Start Conversation timeline clip, you specify character C as the conversant. In the active run of the conversation, all nodes that were assigned to B will now be spoken by C. But if you assign character B, those nodes will be spoken by B as originally written in the database. (more details)

For all other characters (not the primary actor and conversant), the Dialogue System will use the GameObject whose Dialogue Actor matches the conversation node's actor.

Timeline Continue and pause may be a different issue. Check the conversation in the Dialogue Editor to confirm that the current node (shown in green) is correct and not stuck on the previous node.
RetroVertigo
Posts: 55
Joined: Fri Apr 16, 2021 4:32 pm

Re: Dialog not appearing over correct object

Post by RetroVertigo »

Thanks for the info Tony. So, I think I understand how this works better, and I get how I can reuse dialog, like an innkeeper you have gave an example of in another post, but I am not sure why I am running into this error.

My thought for my setup is this. I don't want a main Actor or Conversant, and I would like to use just the dialog boxes to decide who that is for each one within my Cutscene. The cutscenes are not reusable, they are one off, so I don't need to assign a main Actor and Conversant. So, those are blank in my current cutscene dialog. I use the Start Conversation Timeline for the Bishop character, and then on the Continue conversation for Timeline, nothing happens.

I used the Debug Info for the scene, and the initial Link for the next node is showing correct: WyrmKing link, but then when it goes to the actual dialog box, the Actor is blank:

Image

So the entry, CutsceneEntityBishop says "Master" is working correctly, but then the next one for the Wyrmking just doesn't display.

I went and did a scene earlier that I had working, and all of this is working fine in that scene, so I have no clue what I am doing differently in this one.
User avatar
Tony Li
Posts: 22152
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialog not appearing over correct object

Post by Tony Li »

Does WyrmKing's GameObject have a Dialogue Actor set to the actor 'WyrmKing'?

Assuming so, please make sure your project is backed up, then import this debug version of ConversationModel.cs:

DS_DebugConversationModel_2022-01-23.unitypackage

It will log info like this before each line of dialogue:

Code: Select all

DEBUG: 'We need to intercept the launch codes before the enemy launches their weapon at our home world.' identifying speaker actor ID=2...
DEBUG: GetCharacterTransform(2) matches primary conversant ID. Returning Private Hart (UnityEngine.Transform)
DEBUG: GetCharacterInfo(2, Private Hart (UnityEngine.Transform)) info is cached. Using transform PixelCrushers.DialogueSystem.CharacterInfo
DEBUG: 'We need to intercept the launch codes before the enemy launches their weapon at our home world.' speaker ID=2, transform=Private Hart (UnityEngine.Transform)
(That's from the conversation in DemoScene1.)

Please post the same logs from the WyrmKing line.

It's also possible that the correct characters will be used, if you were on an older DS version. If so, you can try updating to version 2.2.24 and test that.

It's also also possible that it won't compile if you're on a significantly older DS version, in which case you might also try updating to 2.2.24.
RetroVertigo
Posts: 55
Joined: Fri Apr 16, 2021 4:32 pm

Re: Dialog not appearing over correct object

Post by RetroVertigo »

Imported the package, had some errors, upgraded the DS system, got more errors. They had to do with how I had my folders laid out within the Assets folder. Got all those sorted out, and now my dialog cutscenes won't play at all. I believe this is due to an error where the Dialog System cannot find the database, which is odd.
I have the Database selected correctly within the Prefab, and also double checked the created object in the scene, but when I go to play the Scene, the database disappears:


Prefab with Dialog selected:
Image

Dialog selected in Scene as well:
Image

Database is now gone when Scene is loaded:

Image
User avatar
Tony Li
Posts: 22152
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialog not appearing over correct object

Post by Tony Li »

Hi,

Make sure your dialogue database is assigned to your Dialogue Manager GameObject. That's the only place where it's absolutely critical to assign it.
RetroVertigo
Posts: 55
Joined: Fri Apr 16, 2021 4:32 pm

Re: Dialog not appearing over correct object

Post by RetroVertigo »

Looks like that was the crux of my problem, as I am now able to run everything smoothly now, with the dialog going to the proper objects in the cutscene. Thanks again for the help!
User avatar
Tony Li
Posts: 22152
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialog not appearing over correct object

Post by Tony Li »

Glad to help!
Post Reply