Feature suggestion (pretty epic IMHO) ^_^

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

Feature suggestion (pretty epic IMHO) ^_^

Post by Abelius »

Hi there Tony,

It's been a while since I'm using your awesome plugin. It's so powerful that it's almost indecent. :lol:

Nevertheless, it just occurred to me that I'm missing one thing above others that regularly pass through my mind...: Sequence commands alias.

Elaborating on what that would be, let me explain how I do things in my game...

Image

Here you have a typical dialogue node for the main character. I'm using PlayMaker throughout the game to make things happen (I'm no coder), so in this case the speaking animation is played by the two first lines (first one starts the angry talking cycle, and the second one stops it). The third and the fourth make the character adopt a given expression when she stops talking.

And this is just for one speaking combination. I could have a lot of things happening in there, like starting another animation at the same time (I have Spine, so I can mix them) or focusing the camera (which is also a non-standard one) on one spot.

Anyway, what I'm doing is copying+pasting node templates to build my events-conversations. There is a problem with that, however...: if at some point, you realize your sequence commands are not correct, or as good as they could be, and want to modify them... well, you'd need to go through EACH of those pasted nodes and replace the appropriate commands by hand. That's awful, of course. But I think I may have an idea to eliminate that inconvenience and make our convo scripting much more flexible and even faster.

Let's imagine we could replace those commands with this...:

Image

...or this...:

Image

If that Alias command could be interpreted like "Search for a node with this title and execute its sequence commands like if you were doing it in this node instead"... that would eliminate the need to manage and debug hundreds of nodes!

The key here would be just parsing the contents of that "remote" Sequence field, so @time/message modifiers could be still understood like if they're local to the calling node, not the "remote" one. That is, @{{end}} commands in that node should be executed when "Go away!" stops playing.

Now, I can foresee this *may* cause some performance problems if those alias titles should be searched for in the entire DB, every time they're needed. Thing is, the ideal case would be referring to them just by their titles AND being able to put all of those alias nodes in one "conversation" specially added for this purpose. But if you think a better approach would be to refer to them by Conversation ID/Node ID, that could also work. Problem with that is that we'd lose the ability to recognize what those aliases do at a glance, and that would be a real hassle.

Maybe a better approach would be to add a specific place/tab to add those alias as if they were multiline text variables.

So what do you think of this? I'm pretty positive it would be a great enhancement, but you're the boss. :P

Thank for reading!

Ps.: I have another question, somewhat related to this...: could it be possible to add a PlayMaker action to wait for a Sequencer message?
Unity 2019.4.9f1
Dialogue System 2.2.15
User avatar
Tony Li
Posts: 22059
Joined: Thu Jul 18, 2013 1:27 pm

Re: Feature suggestion (pretty epic IMHO) ^_^

Post by Tony Li »

Hi,
Abelius wrote: Wed Mar 21, 2018 8:06 am...Sequence commands alias...
I'll need to give this some thought. I'm tempted to use double-braces, such as {{PlayerSpeakAngry}}, but Alias(PlayerSpeakAngry) works just as well. A localized text table might be a good place to store the sequences, although it might be more convenient to keep everything within the same dialogue database using titles as you describe.
Abelius wrote: Wed Mar 21, 2018 8:06 am...could it be possible to add a PlayMaker action to wait for a Sequencer message?
Can you use FSMEvent()? For example:

Code: Select all

AnimatorPlayWait(Dance)->Message(done);
FSMEvent(SomeEvent)@Message(done)
This will send the FSM event "SomeEvent" when the speaker's Dance animation is done.
User avatar
nathanj
Posts: 303
Joined: Sat May 28, 2016 12:30 am

Re: Feature suggestion (pretty epic IMHO) ^_^

Post by nathanj »

Hi, Abelius and Tony

I think this is a great idea. I've recently started using style sheets with Text Mesh Pro and it makes these types of global changes so much easier.

Given that there is drag and drop functionality for audio in the sequencer, what are the chances of having an "alias" as a prefab that can be dragged into the sequencer. This way we could build libraries of sequences and drop them in in a modular fashion.

No idea what would actually be required to implement this or if it's even possible, just brainstorming.

Nathan
User avatar
Tony Li
Posts: 22059
Joined: Thu Jul 18, 2013 1:27 pm

Re: Feature suggestion (pretty epic IMHO) ^_^

Post by Tony Li »

I'm planning to add more drag-and-drop and dropdown menu functionality to the Sequence field. I'm open to ideas as I think this over.
User avatar
Abelius
Posts: 318
Joined: Fri Jul 21, 2017 12:45 pm

Re: Feature suggestion (pretty epic IMHO) ^_^

Post by Abelius »

Tony Li wrote: Wed Mar 21, 2018 11:38 am I'll need to give this some thought. I'm tempted to use double-braces, such as {{PlayerSpeakAngry}}, but Alias(PlayerSpeakAngry) works just as well. A localized text table might be a good place to store the sequences, although it might be more convenient to keep everything within the same dialogue database using titles as you describe.
Awesome! I'm very happy that you think it's a useful feature. :mrgreen:
Tony Li wrote: Wed Mar 21, 2018 11:38 am
Abelius wrote: Wed Mar 21, 2018 8:06 am...could it be possible to add a PlayMaker action to wait for a Sequencer message?
Can you use FSMEvent()? For example:

Code: Select all

AnimatorPlayWait(Dance)->Message(done);
FSMEvent(SomeEvent)@Message(done)
This will send the FSM event "SomeEvent" when the speaker's Dance animation is done.
Oh, I actually meant a PlayMaker action that would wait until a DS Sequencer message is received, not a PlayMaker event. :P Yes, I know that's kind of weird...
Unity 2019.4.9f1
Dialogue System 2.2.15
User avatar
Tony Li
Posts: 22059
Joined: Thu Jul 18, 2013 1:27 pm

Re: Feature suggestion (pretty epic IMHO) ^_^

Post by Tony Li »

Abelius wrote: Wed Mar 21, 2018 7:27 pmOh, I actually meant a PlayMaker action that would wait until a DS Sequencer message is received, not a PlayMaker event.
Sure, I don't see any reason to not add it. I'll add it in the next release, or sooner if I can get a patch out before then.
User avatar
Tony Li
Posts: 22059
Joined: Thu Jul 18, 2013 1:27 pm

Re: Feature suggestion (pretty epic IMHO) ^_^

Post by Tony Li »

Hi,

Version 1.8.0 is now available on the Pixel Crushers customer download site. It has a new component "Sequencer Shortcuts" that lets you define shortcuts on a per-level basis, or globally if you put the component on your Dialogue Manager.

You can, for example, define a shortcut named PlayerAngry1 containing:

Code: Select all

FSMEvent(SpeakAngry,Player,SpeakFSM);
required FSMEvent(Reset,Player,SpeakFSM)@{{end}};
required SetVariable(expressionPlayer,EXP_Angry_1);
required FSMEvent(Called,Player,ExpressionFSM)@{{end}}
and then use it in a sequence like this:

Code: Select all

Camera(Closeup);
{{PlayerAngry1}}
User avatar
Abelius
Posts: 318
Joined: Fri Jul 21, 2017 12:45 pm

Re: Feature suggestion (pretty epic IMHO) ^_^

Post by Abelius »

I'm so happy you implemented this... :mrgreen:

But I'm afraid I'm gonna need some assistance in making it work. I've done the following...:

Added the component to Dialogue Manager object and created a test shortcut:
Image

Then, on the conversation, I've set this in that NPC's dialogue nodes:
Image

However, I'm getting this...:
Image

Shortcuts should support parsing @time/message parameters as if they've been run from the calling node... right?

Or am I doing something wrong?
Unity 2019.4.9f1
Dialogue System 2.2.15
User avatar
Tony Li
Posts: 22059
Joined: Thu Jul 18, 2013 1:27 pm

Re: Feature suggestion (pretty epic IMHO) ^_^

Post by Tony Li »

Sorry about that; version 1.8.0.1 is now on the download site.
User avatar
Abelius
Posts: 318
Joined: Fri Jul 21, 2017 12:45 pm

Re: Feature suggestion (pretty epic IMHO) ^_^

Post by Abelius »

Great! Thank you so much!

I'll tell you if I find anything weird. ;)
Unity 2019.4.9f1
Dialogue System 2.2.15
Post Reply