Page 1 of 2

Short Subtitles as Barks disabling text too soon

Posted: Mon Mar 16, 2015 8:39 pm
by wrongtarget
Hey Tony,



When using the UnityUIBarkSubtitleDialogueUI, if a line of dialogue in a conversation is too short (because of the voice file being short, for example), the line text component is disabled before the bark starts fading out according to the duration in the character Bark script.

As a result, the player can see the empty dialogue box for some instants before any fading animations starts.



Any pro tips on how to fix this? ;)

Thanls

Short Subtitles as Barks disabling text too soon

Posted: Tue Mar 17, 2015 4:24 am
by Tony Li
Hi,



Hmm, I'll look into this. The bark should use whichever is longer:



The value of the Duration property, or

The duration of the sequence (if Wait Until Sequence Ends is ticked).



You can set the Dialogue Manager's Min Subtitle Seconds to the same value as the bark UI's Duration property. Then include "Delay({{end}})" in the bark dialogue entry's sequence. For example:

Sequence: Voice(entrytag,entrytag); Delay({{end}})

This will tell the bark to wait for at last Min Subtitle Seconds.



I'll double-check if there are any other gotchas and reply back here later today.







Short Subtitles as Barks disabling text too soon

Posted: Tue Mar 17, 2015 11:53 am
by wrongtarget
That doesn't work very well for us :( Since we use barks UI for everything,  from looking at hotspots in AC to conversations, placing a delay interrupts the pace of conversations.

Also, for it to really work I had to reduce the duration property, setting them to the same value still showed the box as blank for an instant before fading.

Short Subtitles as Barks disabling text too soon

Posted: Tue Mar 17, 2015 5:42 pm
by Tony Li
Hi Claudio,



Would it work to make sure the sequence is always at least the same duration as the bark UI's duration? You can do this by editing UnityUIBarkSubtitleDialogueUI.cs. Add a Delay() to subtitle.sequence before sending it to the barkUI:

subtitle.sequence += "; Delay(" + (barkUI.duration + 0.5f) + ")"; //<-- Add this.

barkUI.Bark(subtitle);

(The code above adds an extra 0.5 seconds to give the bark box time to fade out.)



I recommend making a new class instead of directly editing UnityUIBarkSubtitleDialogueUI.cs. This way you won't accidentally overwrite your changes if you import a Dialogue System update.



BTW, unrelated to this, version 1.4.8 has some new articy:draft converter features:



1. You can now set connection priorities by using color codes.



2. The converter has a new dropdown to specify how to handle flow fragments. The default changed. Instead of converting flow fragments into quests, the default is to make them conversation groups.







Short Subtitles as Barks disabling text too soon

Posted: Thu Mar 19, 2015 2:18 am
by wrongtarget
Hey Tony,



Great update :)   We were looking for some changes on how to handle fragments, thanks.

The code for the delay it's not helping though. It now takes the duration time before the dialogue even runs, so if I look at a hotspot, there's a huge delay before and after the dialogue shows.

If I make the duration in the inspector a small float (say, 0.5f) , then the dialogue show and hides too quickly.



I should ask first, how do I make sure barks are lasting duration of the voice file? All these other values seem to be overriding that.



Thanks!

Short Subtitles as Barks disabling text too soon

Posted: Thu Mar 19, 2015 6:35 am
by Tony Li
Hi Claudio,



On the bark UI, is Wait Until Sequence Ends ticked? If ticked, the bark UI will:



1. Set the bark text.



2. Trigger the Show animation (i.e., fade in).



3. Wait until the sequence ends.



4. Trigger the Hide animation.



If this doesn't help, could you please send me an example project? It doesn't need to be the full project; anything that demonstrates the issue would be fine.

Short Subtitles as Barks disabling text too soon

Posted: Wed Apr 22, 2015 7:48 pm
by wrongtarget
I'm still having some issues with this, Tony :(

Trying to build an example project for you but did you know DS projects that are using the AC integration are not buiding because the ActionConversationPicker uses UnityEditor namespace?

Short Subtitles as Barks disabling text too soon

Posted: Thu Apr 23, 2015 2:55 am
by Tony Li
Hi Claudio,



That was fixed in the support package included in the Dialogue System v1.4.9. This support package was also updated to work with AC 1.43.



There's a new support package for AC 1.44. (As AC keeps improving, the API changes. This requires updates to the support package.)



You can download them here:



AC 1.44-compatible

AC 1.43-compatible



If you're using AC 1.42 or earlier, manually edit ActionConversationPicker.cs. Add this line at the top:

#if UNITY_EDITOR

and add this line at the bottom:

#endif

Short Subtitles as Barks disabling text too soon

Posted: Thu Apr 23, 2015 10:09 am
by wrongtarget
Great, Tony.

I was trying to do platform dependent compilation before with that script and it wasn't working.

Anyway, installing the latest version of AC and the DS package fixed that.

I've sent you the demo scene to your email,hoping that I can illustrate the issue.

Cheers

Short Subtitles as Barks disabling text too soon

Posted: Thu Apr 23, 2015 10:35 am
by Tony Li
Claudio,



I got the file, and I'll get back to you in email.



I'm very sorry that I forgot to mention that the AC 1.44 support package contains a breaking change. The category for the Dialogue System's AC actions ("Dialogue System conversation", "Dialogue System bark", etc.) changed from "Custom" to "ThirdParty". As soon as you inspect an actionlist containing any of these actions in the Unity editor, it will reset the action to "ThirdParty: Cinema Director cutscene". You'll have to re-select the Dialogue System action again. Sorry about this change. I try to avoid breaking changes as much as possible. I think this is only the second in the history of the Dialogue System, the first being caused by a change in Chat Mapper very early on.