Dialogue System 2.2.0 update!

Announcements, support questions, and discussion for the Dialogue System.
nicmar
Posts: 133
Joined: Wed Aug 21, 2019 2:39 am

Dialogue System 2.2.0 update!

Post by nicmar »

I just got it, feeling lucky! :)

For anyone reading this, the instructions was For best upgrade results, delete the previous Plugins / Pixel Crushers / Dialogue System folder before importing this version.

Great that you now can type directly into the fields, very nice. The layout on the right side is a little crammed, especially with the new character count. Not sure if there is some easier way to enter a Menu. I added an image to show what I mean. Everything kind of looks like the same. One idea is to have a small margin on top of Menu Text, Dialogue text and Sequence labels, so they would be a little easier to find.

I can't think of a usable way to have the menu text inside the bubbles, but it's nice to see the menu text before, and then the real text when double clicking.
Image

I was waiting for this feature " - Improved: Added option to delay typewriter effect until Show animation completes." but I can't find it. Is it supposed to be in the Typewriter? The code for UnityUITypeWriter was moved to another location it seems, to I can't seem to compare it easily with the old one.
Image

Well this was the two most important things for me. Also Default Sequence fields are now multiline text areas was nice :)

Thanks!
Working on SpaceChef - A wacky open world space western, featuring a chef with nothing to loose, after he loses everything.. ;) Follow our work on @BlueGooGames.
User avatar
Tony Li
Posts: 22100
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue System 2.2.0 update!

Post by Tony Li »

nicmar wrote: Tue Sep 03, 2019 5:07 pmThe layout on the right side is a little crammed, especially with the new character count. Not sure if there is some easier way to enter a Menu. I added an image to show what I mean. Everything kind of looks like the same. One idea is to have a small margin on top of Menu Text, Dialogue text and Sequence labels, so they would be a little easier to find.
I'll experiment with that.
nicmar wrote: Tue Sep 03, 2019 5:07 pmI was waiting for this feature " - Improved: Added option to delay typewriter effect until Show animation completes." but I can't find it. Is it supposed to be in the Typewriter?
The Standard UI Subtitle Panel component has a new checkbox: Delay Typewriter Until Open. If you tick that, the typewriter will not start until the Show animation completes.
alfa995
Posts: 30
Joined: Mon Dec 03, 2018 11:31 pm

Re: Dialogue System 2.2.0 update!

Post by alfa995 »

I tried enabling the Delay Typewriter Until Open option on the DemoScene1, on both the PC and NPC panels, and also changed the first line of the default sequence to AudioWait(entrytag)@1 so the sound wouldn't start right away, giving some time for the show animation to finish before playing, but it seems to work inconsistently. Sometimes it types the text instantly but waits for the sound, sometimes it does both instantly, sometimes waits for both, sometimes it plays the sound but waits for the text.
nicmar
Posts: 133
Joined: Wed Aug 21, 2019 2:39 am

Re: Dialogue System 2.2.0 update!

Post by nicmar »

Ah, I can see that Delay Typewriter Until Open works now, but now it showed the text a little bit too late, but I solved it.

I'm using the animator with a custom script on Show/Hide, so it runs a code OnStateEnter, which displays bubbles with DOTween. So no actual animation is playing. But I could change the speed of the animation node (?) to 3, and it starts typing at a good rate.

Is it possible to have Delay Typewriter Until Open on barks, or can I do something else to fix that? Maybe make a custom BarkUI-code to use the code from the subtitle panel?

It's getting closer to a fully working dialogue system. I'm having some issues with setting gameobjects on/off to make sure they are invisible on start of the game, but still work when they need to popup. I haven't fully understood that yet.

Thanks! :)
Working on SpaceChef - A wacky open world space western, featuring a chef with nothing to loose, after he loses everything.. ;) Follow our work on @BlueGooGames.
User avatar
Tony Li
Posts: 22100
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue System 2.2.0 update!

Post by Tony Li »

nicmar wrote: Wed Sep 04, 2019 8:55 amIs it possible to have Delay Typewriter Until Open on barks, or can I do something else to fix that? Maybe make a custom BarkUI-code to use the code from the subtitle panel?
I plan to add it as an option. It will work like the subtitle panel, based off an animation. If you're using DOTween, you might want to make a subclass of StandardBarkUI and override the Bark() and Hide() methods to use DOTween. When the "show" tween is done, you can start the typewriter. You can do that now; you don't need to wait for an update.
nicmar wrote: Wed Sep 04, 2019 8:55 amI'm having some issues with setting gameobjects on/off to make sure they are invisible on start of the game, but still work when they need to popup. I haven't fully understood that yet.
Let me know if you need a hand with that.
nicmar
Posts: 133
Joined: Wed Aug 21, 2019 2:39 am

Re: Dialogue System 2.2.0 update!

Post by nicmar »

That sounds like a good idea! I will check into that, and then I guess I don't need the animator in between, and will have a little easier to control when things happen.

That will maybe solve the other issue too, if I do the same on the UI subtitle panel to control the Show/HideSubtitle() methods instead.

Thanks a lot for the input!
Working on SpaceChef - A wacky open world space western, featuring a chef with nothing to loose, after he loses everything.. ;) Follow our work on @BlueGooGames.
nicmar
Posts: 133
Joined: Wed Aug 21, 2019 2:39 am

Re: Dialogue System 2.2.0 update!

Post by nicmar »

Just a little feedback on overriding the Standard Bark UI, there are some private properties and methods, shouldn't they be protected instead? Since now I can't delete them, as the child class cannot access them from the parent.

For example:

Code: Select all

        private Canvas canvas { get; set; }
        private Animator animator { get; set; }
        private Vector3 originalCanvasLocalPosition { get; set; }
        private int numSequencesActive = 0;

...

        private bool CanTriggerAnimations()
        {
            return (animator != null) && (animationTransitions != null);
        }
No biggie, it's just that I need to keep those parts of the code, even if I don't change them.

Hopefully it will go well anyways :)
Working on SpaceChef - A wacky open world space western, featuring a chef with nothing to loose, after he loses everything.. ;) Follow our work on @BlueGooGames.
User avatar
Tony Li
Posts: 22100
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue System 2.2.0 update!

Post by Tony Li »

Go ahead and make them protected in your copy of StandardBarkUI.cs. I'll make sure they're protected in the next update.
nicmar
Posts: 133
Joined: Wed Aug 21, 2019 2:39 am

Re: Dialogue System 2.2.0 update!

Post by nicmar »

Do I need to worry about wrappers when making my Custom Standard Bark UI?
Working on SpaceChef - A wacky open world space western, featuring a chef with nothing to loose, after he loses everything.. ;) Follow our work on @BlueGooGames.
nicmar
Posts: 133
Joined: Wed Aug 21, 2019 2:39 am

Re: Dialogue System 2.2.0 update!

Post by nicmar »

If I keep the private variables, the code kind of works, but gives these errors on compile:

Code: Select all

The same field name is serialized multiple times in the class or its parent class. This is not supported: Base(CustomStandardBarkUI) <canvas>k__BackingField
The same field name is serialized multiple times in the class or its parent class. This is not supported: Base(CustomStandardBarkUI) <animator>k__BackingField
The same field name is serialized multiple times in the class or its parent class. This is not supported: Base(CustomStandardBarkUI) <originalCanvasLocalPosition>k__BackingField
The same field name is serialized multiple times in the class or its parent class. This is not supported: Base(CustomStandardBarkUI) numSequencesActive
But if remove them, the script can't access those values. I'm not very good as C# but might it be related to private/protected that I mentioned before..?

EDIT: When I changed the parent class from private to protected, and removed them from the subclass, it worked. However that will be overwritten in an update, so if you think that's the correct way to to, maybe you should do it for SetUIElementsActive and CanTriggerAnimations too.

Thanks :)
Working on SpaceChef - A wacky open world space western, featuring a chef with nothing to loose, after he loses everything.. ;) Follow our work on @BlueGooGames.
Post Reply