Possible subtitle clearing bug (?)

Announcements, support questions, and discussion for the Dialogue System.
User avatar
Abelius
Posts: 312
Joined: Fri Jul 21, 2017 12:45 pm

Possible subtitle clearing bug (?)

Post by Abelius »

Hi there,

I've been observing a weird behavior for some time back, but only when upgrading to 1.8.1 the thing has propagated to many other places and I've finally identified some scheme.

In my UI, I've got both PC and NPC subtitles in the same location, so my objective is that only one of them is visible at any given time. This is my DS Controller config...:

Image

All is working well, except when a conversation is initiated by an NPC and the following node is either a Player dialogue line or a decision tree. For example...:

Player nodes are blue
Image

And see what happens...:

NPC talks first...
Image

...followed by a decision tree...
Image

and both subtitles overlap...
Image

Later on, when the NPC talks again this doesn't happen anymore in the conversation, so I'm not sure if this is about some kind of initialization problem or something.

In fact, I can avoid this happening if I put an empty node, with a Continue() command, in between the NPC and Player nodes. Then it seems the NPC subtitle gets cleared (or maybe overwritten with a null string) so the Player line doesn't show overlapping the NPC previous one.

As I mentioned, this also occurs with a normal Player dialogue node (no deferred option subtitle is needed for this to happen).

Hope I've been clear enough for some troubleshooting, but if you need more feedback, please tell me.

And thank you! :mrgreen:
Unity 2019.4.9f1
Dialogue System 2.2.15
User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

Re: Possible subtitle clearing bug (?)

Post by Tony Li »

Hi,

Could you please post a screenshot of the inspector view of your dialogue UI? Expand the NPC Subtitle, NPC Subtitle Reminder (although probably not used) and PC Subtitle sections. It may be more than one screenful vertically, so it may need to be more than one screenshot. Also, do any of them use an animator, for example to fade in and out? I'm finishing work for the day, but I'll check back in on it in the morning.
User avatar
Abelius
Posts: 312
Joined: Fri Jul 21, 2017 12:45 pm

Re: Possible subtitle clearing bug (?)

Post by Abelius »

Ah yes, ofc. I knew I forgot something. :P
Spoiler
Image
Image
I don't think I'm using animations. The text shows up immediately, all at once.

Thank you.
Unity 2019.4.9f1
Dialogue System 2.2.15
User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

Re: Possible subtitle clearing bug (?)

Post by Tony Li »

Does the scene in this unitypackage exhibit the same behavior?

TestSubtitles_2018-05-01.unitypackage

I set it up to match your screenshots and wasn't able to reproduce the issue. I may have missed some things, though -- for example if there are Sequences assigned to any of the dialogue entry nodes. Apart from the SETUP node's Continue(), I just used the Dialogue Manager's Default Sequence.

If the unitypackage doesn't give you any insight into what's going on, would it be possible for you to send me a reproduction scene?
User avatar
Abelius
Posts: 312
Joined: Fri Jul 21, 2017 12:45 pm

Re: Possible subtitle clearing bug (?)

Post by Abelius »

Hi there!

I've run the test scene and the overlapping doesn't occur.

In the Setup node I have this...:

Image

Those shortcuts point to...

Code: Select all

FSMEvent(Off,Camera,ForwardFocusOnStopFSM);

Code: Select all

FSMEvent(Yes,Camera,FilterFSM);
FSMEvent(Yes,speaker,ModelCamFSM);
FSMEvent(Yes,listener,ModelCamFSM);
...respectively. They're events that control the camera movement and whether or not activate a blur filter and the bigger model versions.

Then, the next NPC node...
Image

...has this config...
Image

{{FemaleHappySmile}} points to...

Code: Select all

FSMEvent(SpeakHappy,speaker,SpeakFSM);
required FSMEvent(Stop,speaker,SpeakFSM)@{{end}};
SetVariable(expressionNPC,Exp_Default);
required FSMEvent(Called,speaker,ExpressionFSM)@{{end}};
Mmm... I'm gonna test it with something much simpler on a new convo, and return to you.
Unity 2019.4.9f1
Dialogue System 2.2.15
User avatar
Abelius
Posts: 312
Joined: Fri Jul 21, 2017 12:45 pm

Re: Possible subtitle clearing bug (?)

Post by Abelius »

Okay, so I've made a copy of the previous convo and erased everything except the first nodes...

Image

I've also removed any sequence commands, leaving only the Continue() command at the Start node...:
Spoiler
Image
Image
Image
Image
And I still got this...

Image

I've also confirmed that if you start the convo a second time, it happens again.

Another test I've done is to switch the starting nodes owners...:

Image

...and in this case, as I mentioned in my OP, there is no overlapping in the following nodes.

I've done a third experiment, consisting of placing a placeholder dialogue text for each character (NPC and Player)...

Image

...and surprisingly enough, I still get the overlapping problem...:

Image

...but not only on one node, but the next one also!

Image

So, at this point I'm suspecting some kind of problem with those Continue() commands, not letting DS do 'something' at the start of the convo, needed for DS working properly for the remainder of it.

Therefore, I've changed the Continue(); for that default None(); command I found at first.

And guess what? Now I don't have overlapping in any instance. I kind of knew I shouldn't have messed with the Start node... :roll:

However, I did that for a reason at the time. If I don't put a Continue() command in there, the convo starts but the player needs to click once for some text actually showing up. And I obviously need to avoid that in some way.

So, I've done this...:

Image

...and it seems that little delay is enough for the overlapping not happening anymore.

I observed this issue in some rare instances in the past, but 1.8.1 has exacerbated it. I wonder if the reason is related to those changes you made, for keyword retrieval working correctly in @{{end}} commands. Could it be something related to a default delay?

Well, I'm just lashing out in the dark, but I hope all this experimentation helps you. :P

About uploading a scene, I'm not sure how to do it properly. I use SO MANY plugins that I don't think I could do less than sharing my entire project with you. And it's about 2 GB already compressed. :lol:

Thank you!
Unity 2019.4.9f1
Dialogue System 2.2.15
User avatar
Abelius
Posts: 312
Joined: Fri Jul 21, 2017 12:45 pm

Re: Possible subtitle clearing bug (?)

Post by Abelius »

Btw, I'm always saying "clearing" the subtitle, but what I mean is that the whole NPC Subtitle panel doesn't get deactivated. That's what it's (not) happening if I don't introduce that delay at the Start node.

It doesn't have anything to do with the text field contents, which doesn't change between nodes unless overwritten.

Just to clear that up. I should have used proper words. :roll:

Edit: I've just realized your scene Start node also has a None() command and still is able to automatically continue to the next node... :?

That doesn't happen in my case...:

Image

...and I don't know why. It simply gets stuck in there until I click the continue button (that in my case is a transparent button that covers all of the screen).

Edit2: Okay, I've found out that if I put 'Player' as the Actor in the Start node, I need to click once to continue. But if I put anything else (none or another NPC actor), the node is skipped without needing to put Continue() in there. None() does the trick.

The weird thing about this is that in your (working) scene, you have Player as the actor and there's no problem about it. :?

I'm very confused at this point, so I'll just change all my Start nodes to a None() command and will put none in both actors. :P

Edit3: Ah, another possibly valuable piece of information... I'm firing up that convo from an Adventure Creator action list. Like in here...:

Image
Unity 2019.4.9f1
Dialogue System 2.2.15
User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

Re: Possible subtitle clearing bug (?)

Post by Tony Li »

The Dialogue System has a rule: If the START node has no Dialogue Text or Menu Text, it won't require a continue button click. It will however still play the START node's Sequence.

I set up the test conversation in an AC project and set the Dialogue Manager's Debug Level to Info. It logged this:

Code: Select all

Dialogue System: Starting conversation 'New Conversation 2', actor=Tin Pot (UnityEngine.Transform), conversant=.
Dialogue System: Add Link (NPC): ID=2:1 'Ah [var=Actor], there you are.' (True)
Dialogue System: Tin Pot says ''
Dialogue System: Sequencer.Play( None()@0 )
The player, Tin Pot in my case, is assigned as the START node's Actor. The player doesn't have any text (Tin Pot says ''), so it skips the continue button.

Can you temporarily set your Debug Level to Info and confirm that your player says the same thing (an empty string)? Maybe you have a custom process that's adding something to the text if the player is the actor.

It sounds like you have an approach that's working. However, if you'd like to investigate this further, yours wouldn't be the first 2 GB project I've downloaded. The record-holder so far is 67 GB uncompressed. (All customer files are handled confidentially, of course.)
User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

Re: Possible subtitle clearing bug (?)

Post by Tony Li »

I was thinking over your comment that it's exacerbated in 1.8.1. The release notes have this change:
  • Changed: When finishing a subtitle (eg, NPC), dialogue UI no longer also calls HideSubtitle on the other subtitle (eg, PC), which had been added as a failsafe but some found confusing.
This may be the issue. We may have found a case where the dialogue UI doesn't call HideSubtitle when it should. I'll dig into the code today and let you know if I find anything.
User avatar
Abelius
Posts: 312
Joined: Fri Jul 21, 2017 12:45 pm

Re: Possible subtitle clearing bug (?)

Post by Abelius »

Ah... okay, that sounds plausible. :P

I'll try to upload my project somewhere in the meantime, and send you the link over a private message.
Unity 2019.4.9f1
Dialogue System 2.2.15
Post Reply