RMMZ (Visustella) Call a common event before the skill and its damage

Indinera

Indie Dev
Veteran
Joined
Mar 13, 2012
Messages
2,410
Reaction score
1,106
First Language
French
Is it possible to run a common event before the skill animation (on target) and the dealt damage?

I thought this would do it:

<JS Pre-Start Action>
$gameTemp.reserveCommonEvent(1);
</JS Pre-Start Action>

But it seems not. I put a dialogue box in the common event to check and the dialogue box shows up AFTER the damage is dealt.
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
4,338
Reaction score
3,375
First Language
EN
Primarily Uses
RMMZ
Use an action sequence instead (VisuStella Battle Core).

"Reserve common event" is the core script behaviour. It queues the event to be run at the next opportunity, but by default events do not update mid-action.
 

Indinera

Indie Dev
Veteran
Joined
Mar 13, 2012
Messages
2,410
Reaction score
1,106
First Language
French
How do I write a simple action sequence that just runs that common event (before the damage obviously) and nothing else as extra but the normal animation?
I've never coded any of such "action sequences" so I've got zero idea how to proceed.
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
4,338
Reaction score
3,375
First Language
EN
Primarily Uses
RMMZ
I haven't made a VisuStella action sequence before either. However, I read the Battle Core documentation and found this:
1. Insert the <Custom Action Sequence> notetag into the skill or item's notebox (or else this would not work as intended).

2. Give that skill/item a Common Event through the Effects box. The selected Common Event will contain all the Action Sequence data.

3. Create the Common Event with Action Sequence Plugin Commands and/or event commands to make the skill/item do what you want it to do.
So here is my guess:
  1. Make a new common event.

  2. Fill it with the ACSET plugin commands (Setup, All Targets/Each Target, and Finish):
    I assume the default parameter values represent the default sequence phases.

  3. Add your own event commands in wherever you like.

  4. Put a <Custom Action Sequence> notetag in the Note field of your skill.

  5. Add a Common Event effect to the skill, to connect the sequence to the skill.
 

Dungeonmind

Lvl 4000 Humanoid
Veteran
Joined
Sep 2, 2013
Messages
667
Reaction score
542
First Language
English
Primarily Uses
RMMZ
Put a <Custom Action Sequence> notetag in the Note field of your skill.

Alternatively, you can set it in the plugin parameters to have that note tag automatically applied when the common event is called from effects in the skill database. This way, you don't have to worry about that and just go right to action sequences when you want.
 

Indinera

Indie Dev
Veteran
Joined
Mar 13, 2012
Messages
2,410
Reaction score
1,106
First Language
French
I assume the default parameter values represent the default sequence phases.

It looks to me a bit more complicated than this, as they are tons more options than just "Setup, All Targets/Each Target, and Finish".
Hasn't anybody made a quick tutorial on how to set up an action sequence so that it just replicates what RM does by default? And from that I could insert my common event where I want (at the beginning before everything else starts, allegedly)?
 

Dungeonmind

Lvl 4000 Humanoid
Veteran
Joined
Sep 2, 2013
Messages
667
Reaction score
542
First Language
English
Primarily Uses
RMMZ
It looks to me a bit more complicated than this, as they are tons more options than just "Setup, All Targets/Each Target, and Finish".
Hasn't anybody made a quick tutorial on how to set up an action sequence so that it just replicates what RM does by default? And from that I could insert my common event where I want (at the beginning before everything else starts, allegedly)?

Here you go.
ex1.jpg

ex2.jpg

This is as basic as it gets. If you don't want the actor moving to the target, then just remove "move to targets" and the attack will happen from the actor's home base. You can leave all the default settings too.
 

Indinera

Indie Dev
Veteran
Joined
Mar 13, 2012
Messages
2,410
Reaction score
1,106
First Language
French
Thank you. SUPER helpful.
 

Latest Threads

Latest Posts

Latest Profile Posts

Now that I have linklists on large trees and cars, is there any theme that would interest you?
Debugging multiplayer issues... I'm having fun, right?
yay_streaming.jpg

For just starting streaming on the 10th... Definitely not the worst. :LZScheeze:

Granted I need 333.34 hours a month on average to achieve money. So I don't really expect that, but it sure has helped my game dev go much faster.
Proud on how this map turned out.

FnmhDLIXgAAOvIC
I just finally fixed a huge problem that wouldn’t let my game load and would crash it.. I thought that I was gonna have to trash the project and start over lol

Forum statistics

Threads
128,328
Messages
1,193,648
Members
168,813
Latest member
jasper1hu
Top