Page 2 of 3

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

Posted: Wed Apr 11, 2018 1:02 pm
by Abelius
Uhm... I'm gonna feel like a bitch asking for this but... could the shortcuts list (or array) be reorderable on the 'Sequencer Shortcuts' component? :P

So we could order them (obviously) at our own leisure? As that list grows, it's gonna be a little hard to find something there, I guess.

Not a priority, ofc.

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

Posted: Wed Apr 11, 2018 1:17 pm
by Tony Li
You got it. Now that the data and functionality are in place, in the next release (which will be a big one), I'll add a custom editor with a reorderable list.

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

Posted: Wed Apr 11, 2018 2:00 pm
by Abelius
Awesome, thank you!

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

Posted: Mon Apr 16, 2018 10:52 am
by Abelius
I've been playing a little with this and works well.

My only doubt, for now, is if I can have multiple 'Sequencer Shortcuts' scripts, or only one can exist in the whole scene. In the temporary absence of a way to sort shortcuts inside the component, I've thought of adding one script for every character and put its shortcuts inside.

Is this possible, or the whole thing will explode? :P

Also, remember that 'search & replace' feature I suggested some time ago? Now that I'll need to replace all my node scripts with shortcuts, that would be awesomely useful, ha ha! :mrgreen:

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

Posted: Mon Apr 16, 2018 11:36 am
by Tony Li
Hi,

Multiple 'Sequencer Shortcuts' components are fine. When a component is enabled (e.g., when its scene starts), it registers its shortcuts with the Dialogue System. When the component is disabled (e.g., when the scene is unloaded), it unregisters the shortcuts. You can also manually register and unregister shortcuts by calling the C# methods Sequencer.RegisterShortcut() and Sequencer.UnregisterShortcut().

I do have plans to add 'search & replace', but I'm in the middle of the huge overhaul to version 2.0. It's probably something that will be added in 2.0.1.

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

Posted: Fri Apr 27, 2018 3:03 pm
by Abelius
Hi Tony,

I've been thinking and if multiple 'Sequencer Shortcuts' components are supported throughout the scene, there's one suggestion I'd like to give.

I'm going to use one 'Sequencer Shortcuts' per character/actor, so for organization purposes, I'll place the component inside each character GameObject.

Of course, as each shortcut name needs to be unique, I'll need to name and customize them differently in each component. But what if that wasn't necessary?

I was thinking of how useful would be being able to substitute part of the shortcut name and its value (the sequencer commands) with the title of the GameObject where the component is placed. So we would go from this...:

Image
...to this...:

Image

The distinct advantage of being able to do this would be that after having configured one "master" component, we could just copy+paste it to every character GameObject that would need their own shortcuts to do similar things, with just some clicks instead of needing to manually write the appropriate names in each shortcut.

What do you think? Is this possible?

In fact, I was going to try it myself, editing the component script, but it's inside a DLL and I can't open it. :?

Thank you!

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

Posted: Fri Apr 27, 2018 5:16 pm
by Tony Li
To edit the source code, you could import it from the included unitypackage, but in version 1.x that is way more trouble than it's worth. Which is why in version 2.0 the source code will be included in the Plugins folder rather than a separate unitypackage, as mentioned in this post.

What if you set your shortcut to:
  • Shortcut: SpeakerSpeakHappy
  • Value:

    Code: Select all

    FSMEvent(SpeakHappy,speaker,SpeakFSM);
    required FSMEvent(Stop,speaker,SpeakFSM)@{{end}}
The special keyword 'speaker' points to the GameObject associated with the actor speaking the current node.

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

Posted: Fri Apr 27, 2018 8:17 pm
by Abelius
Oh...

So some form of substitution is already supported in sequencer commands? I didn't know that! :shock: I've dug a little in the documentation and I see there's also a 'listener' keyword. That would prove extremely useful for triggering events involving two characters, only taking care of selecting the correct actor and conversant in every convo. I'll be sure to use it! :mrgreen:

However, I'm wondering now if instead of using those magical keywords I could use the value of a DS variable...? To further enhance the flexibility of that feature. :roll:

Thank you for your reply. Just in time to change my strategy, he he...

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

Posted: Fri Apr 27, 2018 8:20 pm
by Tony Li
Of course! The sequencer processes variable and Lua tags first, then it processes sequencer shortcuts, then it runs the result through the command parser.

For variables and Lua, you can use [var=varName] and [lua(code)] tags in your sequences.

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

Posted: Fri Apr 27, 2018 8:35 pm
by Abelius
Also Lua code??? Holy fuck... future looks bright! :lol: