Timed Hits with Action Sequences

From Yanfly.moe Wiki
Jump to navigation Jump to search

Welcome to the wiki! This is where you can find resources from Yanfly.moe, Ækashics.moe,
VisuStella, Caz Wolf, Fallen Angel Olivia, Atelier Irina, and other affiliated content creators.



Introduction

VisuMZ.142.jpg

Those familiar with Super Mario RPG know about the existence of Timed Hits and the flavor they bring to the battle system. However, we aren't here to talk about what the benefits of Timed Hits are, we are here to explain how to do them in RPG Maker MZ through the usage of Action Sequences.

Keep in mind that this is NOT a beginner's tutorial on Action Sequences. If you want a beginner's tutorial on Action Sequences, read about it in this tutorial article by MirageV.

ArisuAvatar2.png This is an article written by Arisu.

Now, without further ado, let's begin.


What You Need

We will need two plugins:

VisuMZ.002.jpg
The first is the Battle Core.
VisuMZ.142.jpg
The next is QTE and Trigger System.


Tutorial 1: Timed Hits

TimedHitIntro.jpg

Just as a reminder, this is NOT a beginner tutorial on how to do Action Sequences. If you need a tutorial for that, read this tutorial article by MirageV.

We are going to skip right into the Common Event that is going to be used as the Action Sequence for the Timed Hit. Our goal here is to make an attack where if the attacking player presses the Z button at the right timing, the attack will yield a 3x Damage Bonus. Otherwise, it will deal normal damage. If the player is receiving this attack and defends in time by pressing the Z button, then the damage will be reduced to 10%.

Simple enough? Yeah, let's do this.


Timed Hits: Full Action Sequence

TimedHitTut1.png

Here is what the base Action Sequence should look like. The attack we'll be using will be an ice attack using animation 71: Ice I.

◆Plugin Command:VisuMZ_1_BattleCore, ACSET: Setup Action Set
:              :Display Action = true
:              :Immortal: On = true
:              :Battle Step = true
:              :Wait For Movement = true
:              :Cast Animation = true
:              :Wait For Animation = true

◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Motion Type
:              :Targets = ["user"]
:              :Motion Type = spell
:              :Show Weapon? = false

◆Plugin Command:VisuMZ_2_QTE_TriggerSys, QTE: Timed Hit (OK)
:              :Timed Hit Picture = >>>ATTENTION<<<
:              :Coordinate X = Graphics.width / 2
:              :Coordinate Y = Graphics.height / 2
:              :Press in X Frames = 40
:              :Success Switch ID = 1
:              :Timing Variable ID = 0
:              :Success Common Event = 0
:              :Success Sound = {"name:str":"Skill2","volume:num":"90","pit…
:              :Miss Common Event = 0
:              :Miss Sound = {"name:str":"Buzzer1","volume:num":"90","pitch…
:              :Input Start Delay = 0
:              :Wait for QTE? = false

◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Show Animation
:              :Targets = ["all targets"]
:              :Animation ID = 71
:              :Mirror Animation = false
:              :Wait For Animation? = false

◆Wait:40 frames

◆If:Timed Hit Success is ON

  ◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Balloon Animation
  :              :Targets = ["all targets"]
  :              :Balloon Type = Exclamation
  :              :Wait for Completion = false

  ◆If:Script:BattleManager._subject.isActor()

    ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Multipliers
    :              :Critical Hit% = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    :              :Critical Damage = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    :              :Damage/Healing = 
    :              :Rate = 3.00
    :              :Flat = +0.00
    :              :Hit Rate = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    ◆

  :Else

    ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Multipliers
    :              :Critical Hit% = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    :              :Critical Damage = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    :              :Damage/Healing = 
    :              :Rate = 0.10
    :              :Flat = +0.00
    :              :Hit Rate = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    ◆
  :End
  ◆
:End

◆Plugin Command:VisuMZ_1_BattleCore, MECH: Action Effect
:              :Targets = ["all targets"]

◆Plugin Command:VisuMZ_1_BattleCore, MECH: Multipliers
:              :Critical Hit% = 
:              :Rate = 1.00
:              :Flat = +0.00
:              :Critical Damage = 
:              :Rate = 1.00
:              :Flat = +0.00
:              :Damage/Healing = 
:              :Rate = 1.00
:              :Flat = +0.00
:              :Hit Rate = 
:              :Rate = 1.00
:              :Flat = +0.00

◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Wait For Animation

◆Plugin Command:VisuMZ_1_BattleCore, ACSET: Finish Action
:              :Immortal: Off = true
:              :Wait For New Line = true
:              :Wait For Effects = true
:              :Clear Battle Log = true
:              :Home Reset = true
:              :Wait For Movement = true


Timed Hits: Breakdown

For those who aren't able to follow, let's break down the event commands and Action Sequences used here.

◆Plugin Command:VisuMZ_1_BattleCore, ACSET: Setup Action Set
:              :Display Action = true
:              :Immortal: On = true
:              :Battle Step = true
:              :Wait For Movement = true
:              :Cast Animation = true
:              :Wait For Animation = true

Above is the typical setup action set. Nothing is really changed there. All it does is play the action name, setup immortality flags, play cast animations, and wait for the cast animation to finish.


◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Motion Type
:              :Targets = ["user"]
:              :Motion Type = spell
:              :Show Weapon? = false

Above is just a motion request for the user to perform a spell motion if the user has a Sideview Battler sprite.


◆Plugin Command:VisuMZ_2_QTE_TriggerSys, QTE: Timed Hit (OK)
:              :Timed Hit Picture = >>>ATTENTION<<<
:              :Coordinate X = Graphics.width / 2
:              :Coordinate Y = Graphics.height / 2
:              :Press in X Frames = 40
:              :Success Switch ID = 1
:              :Timing Variable ID = 0
:              :Success Common Event = 0
:              :Success Sound = {"name:str":"Skill2","volume:num":"90","pit…
:              :Miss Common Event = 0
:              :Miss Sound = {"name:str":"Buzzer1","volume:num":"90","pitch…
:              :Input Start Delay = 0
:              :Wait for QTE? = false

A QTE Plugin Command occurs. The QTE Plugin Command doesn't use any special graphics (though it could) and requires the player to press Z in 40 frames. If it succeeds, then Switch 1 is turned on. Wait for QTE is also turned OFF (very important). If you're wondering why 40 frames specifically, that's because for animation 71: Ice I, that we're using for this tutorial, the hit lands at frame 40. If you need help figuring out the duration of animations, read this article here on How to Get Animation Frame Durations.

The same timing is used for both if the target is an enemy or an actor.


◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Show Animation
:              :Targets = ["all targets"]
:              :Animation ID = 71
:              :Mirror Animation = false
:              :Wait For Animation? = false

Next, we just show animation 71, which is the Ice I animation that we're using for this tutorial. Wait for Animation is also turned to OFF.


◆Wait:40 frames

We wait 40 frames because that's when the animation displays a hit on the target. Once again, if you need help figuring out the duration of animations, read this article here on How to Get Animation Frame Durations.


◆If:Timed Hit Success is ON
  ◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Balloon Animation
  :              :Targets = ["all targets"]
  :              :Balloon Type = Exclamation
  :              :Wait for Completion = false
  ◆If:Script:BattleManager._subject.isActor()
    ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Multipliers
    :              :Critical Hit% = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    :              :Critical Damage = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    :              :Damage/Healing = 
    :              :Rate = 3.00
    :              :Flat = +0.00
    :              :Hit Rate = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    ◆
  :Else
    ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Multipliers
    :              :Critical Hit% = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    :              :Critical Damage = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    :              :Damage/Healing = 
    :              :Rate = 0.10
    :              :Flat = +0.00
    :              :Hit Rate = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    ◆
  :End
  ◆
:End

Here's where things change up. We do a Conditional Branch event command to check the status of Switch 1. If Switch 1 is ON, that means the Timed Hit QTE is successful. We play a Balloon Animation Action Sequence to indicate the success.

Next, we do another Conditional Branch event command but with the script call BattleManager._subject.isActor() to check if the user is an actor. If the user is actor, then we use the MECH: Multipliers Action Sequence Plugin Command to increase the damage multiplier to 3x. If the user is NOT an actor (and therefore an enemy), then MECH: Multipliers Action Sequence Plugin Command changes the multiplier to x0.1


◆Plugin Command:VisuMZ_1_BattleCore, MECH: Action Effect
:              :Targets = ["all targets"]

Normal MECH: Action Effect stuff to apply the damage and effects.


◆Plugin Command:VisuMZ_1_BattleCore, MECH: Multipliers
:              :Critical Hit% = 
:              :Rate = 1.00
:              :Flat = +0.00
:              :Critical Damage = 
:              :Rate = 1.00
:              :Flat = +0.00
:              :Damage/Healing = 
:              :Rate = 1.00
:              :Flat = +0.00
:              :Hit Rate = 
:              :Rate = 1.00
:              :Flat = +0.00

Reset the multipliers.


◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Wait For Animation

Wait for the rest of the animation to finish.


◆Plugin Command:VisuMZ_1_BattleCore, ACSET: Finish Action
:              :Immortal: Off = true
:              :Wait For New Line = true
:              :Wait For Effects = true
:              :Clear Battle Log = true
:              :Home Reset = true
:              :Wait For Movement = true

Finish up the rest of the Action Sequence.


Timed Hits: Test Play

Let's look at how the damage appears without landing any Timed Hits.

TimedHitTut2.gif


Now, let's look at the damage when Timed Hits are landed.

TimedHitTut3.gif

There's a 3x multiplier when used by the player and a 0.1x multiplier when defended.


Tutorial 2: Fireball Button Mash

FireballSpam1.jpg

Just as a reminder, this is NOT a beginner tutorial on how to do Action Sequences. If you need a tutorial for that, read this tutorial article by MirageV.

We are going to skip right into the Common Event that is going to be used as the Action Sequence for the Timed Hit. Our goal here is to make an attack where when it is used by a player character, the player can button mash Z to unload a barrage of fireballs to the enemy at 10% damage per fireball. When the attack is used by an enemy, it will be a single attack that the player can use a Timed Attack to block damage and reduce it to 10%.

Understood? Let's go!


Fireball Button Mash: Full Action Sequence

Here is what the base Action Sequence should look like. The attack we'll be using will be a fire attack using animation 66: Fire I.

◆Plugin Command:VisuMZ_1_BattleCore, ACSET: Setup Action Set
:              :Display Action = true
:              :Immortal: On = true
:              :Battle Step = true
:              :Wait For Movement = true
:              :Cast Animation = true
:              :Wait For Animation = true

◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Motion Type
:              :Targets = ["user"]
:              :Motion Type = spell
:              :Show Weapon? = false

◆If:Script:BattleManager._subject.isActor()

  ◆Plugin Command:VisuMZ_2_QTE_TriggerSys, QTE: Button Mash (OK)
  :              :Trigger Variable ID = 1
  :              :Trigger Common Event = 228
  :              :Trigger Sound = {"name:str":"Skill2","volume:num":"90","pit…
  :              :Input Start Delay = 20
  :              :QTE Duration = 180
  :              :Wait for QTE? = true
  ◆

:Else

  ◆Plugin Command:VisuMZ_2_QTE_TriggerSys, QTE: Timed Hit (OK)
  :              :Timed Hit Picture = >>>ATTENTION<<<
  :              :Coordinate X = Graphics.width / 2
  :              :Coordinate Y = Graphics.height / 2
  :              :Press in X Frames = 80
  :              :Success Switch ID = 1
  :              :Timing Variable ID = 0
  :              :Success Common Event = 0
  :              :Success Sound = {"name:str":"Skill2","volume:num":"90","pit…
  :              :Miss Common Event = 0
  :              :Miss Sound = {"name:str":"Buzzer1","volume:num":"90","pitch…
  :              :Input Start Delay = 0
  :              :Wait for QTE? = false

  ◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Show Animation
  :              :Targets = ["all targets"]
  :              :Animation ID = 66
  :              :Mirror Animation = false
  :              :Wait For Animation? = false

  ◆Wait:80 frames

  ◆If:Timed Hit Success is ON

    ◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Balloon Animation
    :              :Targets = ["all targets"]
    :              :Balloon Type = Exclamation
    :              :Wait for Completion = false

    ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Multipliers
    :              :Critical Hit% = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    :              :Critical Damage = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    :              :Damage/Healing = 
    :              :Rate = 0.10
    :              :Flat = +0.00
    :              :Hit Rate = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    ◆

  :Else

    ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Multipliers
    :              :Critical Hit% = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    :              :Critical Damage = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    :              :Damage/Healing = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    :              :Hit Rate = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    ◆

  :End

  ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Action Effect
  :              :Targets = ["all targets"]
  ◆

:End

◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Wait For Animation

◆Plugin Command:VisuMZ_1_BattleCore, MECH: Multipliers
:              :Critical Hit% = 
:              :Rate = 1.00
:              :Flat = +0.00
:              :Critical Damage = 
:              :Rate = 1.00
:              :Flat = +0.00
:              :Damage/Healing = 
:              :Rate = 1.00
:              :Flat = +0.00
:              :Hit Rate = 
:              :Rate = 1.00
:              :Flat = +0.00

◆Plugin Command:VisuMZ_1_BattleCore, ACSET: Finish Action
:              :Immortal: Off = true
:              :Wait For New Line = true
:              :Wait For Effects = true
:              :Clear Battle Log = true
:              :Home Reset = true
:              :Wait For Movement = true


There is a Once Parallel Action Sequence that is put on a different Common Event and that is called by the Button Mash QTE. Here are its contents.

◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Show Animation
:              :Targets = ["all targets"]
:              :Animation ID = 13
:              :Mirror Animation = false
:              :Wait For Animation? = false

◆Wait:4 frames

◆Plugin Command:VisuMZ_1_BattleCore, MECH: Multipliers
:              :Critical Hit% = 
:              :Rate = 1.00
:              :Flat = +0.00
:              :Critical Damage = 
:              :Rate = 1.00
:              :Flat = +0.00
:              :Damage/Healing = 
:              :Rate = 0.10
:              :Flat = +0.00
:              :Hit Rate = 
:              :Rate = 1.00
:              :Flat = +0.00

◆Plugin Command:VisuMZ_1_BattleCore, MECH: Action Effect
:              :Targets = ["all targets"]


Fireball Button Mash: Base Breakdown

For those who aren't able to follow, let's break down the event commands and Action Sequences used here.

◆Plugin Command:VisuMZ_1_BattleCore, ACSET: Setup Action Set
:              :Display Action = true
:              :Immortal: On = true
:              :Battle Step = true
:              :Wait For Movement = true
:              :Cast Animation = true
:              :Wait For Animation = true

Above is the typical setup action set. Nothing is really changed there. All it does is play the action name, setup immortality flags, play cast animations, and wait for the cast animation to finish.


◆Plugin Command:VisuMZ_1_BattleCore, MOTION: Motion Type
:              :Targets = ["user"]
:              :Motion Type = spell
:              :Show Weapon? = false

Above is just a motion request for the user to perform a spell motion if the user has a Sideview Battler sprite.


◆If:Script:BattleManager._subject.isActor()

  ◆Plugin Command:VisuMZ_2_QTE_TriggerSys, QTE: Button Mash (OK)
  :              :Trigger Variable ID = 1
  :              :Trigger Common Event = 228
  :              :Trigger Sound = {"name:str":"Skill2","volume:num":"90","pit…
  :              :Input Start Delay = 20
  :              :QTE Duration = 180
  :              :Wait for QTE? = true
  ◆

:Else

  x

:End

Here is where things change up a bit. A Conditional Branch event command is added in to check for a script call: BattleManager._subject.isActor(). This determines if the user is an actor or not. If the user is an actor, the above Button Mash QTE happens. Whenever the Z button is pressed, the Trigger Common Event will play (in this case, 228). There is an Input Start Delay of 20 frames to let the player quickly start inputting and a total QTE Duration of 180 frames. The plugin command will Wait for QTE and the following event commands won't process until this QTE is done.


◆If:Script:BattleManager._subject.isActor()

  x

:Else

  ◆Plugin Command:VisuMZ_2_QTE_TriggerSys, QTE: Timed Hit (OK)
  :              :Timed Hit Picture = >>>ATTENTION<<<
  :              :Coordinate X = Graphics.width / 2
  :              :Coordinate Y = Graphics.height / 2
  :              :Press in X Frames = 80
  :              :Success Switch ID = 1
  :              :Timing Variable ID = 0
  :              :Success Common Event = 0
  :              :Success Sound = {"name:str":"Skill2","volume:num":"90","pit…
  :              :Miss Common Event = 0
  :              :Miss Sound = {"name:str":"Buzzer1","volume:num":"90","pitch…
  :              :Input Start Delay = 0
  :              :Wait for QTE? = false

  ◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Show Animation
  :              :Targets = ["all targets"]
  :              :Animation ID = 66
  :              :Mirror Animation = false
  :              :Wait For Animation? = false

  ◆Wait:80 frames

  ◆If:Timed Hit Success is ON

    ◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Balloon Animation
    :              :Targets = ["all targets"]
    :              :Balloon Type = Exclamation
    :              :Wait for Completion = false

    ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Multipliers
    :              :Critical Hit% = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    :              :Critical Damage = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    :              :Damage/Healing = 
    :              :Rate = 0.10
    :              :Flat = +0.00
    :              :Hit Rate = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    ◆

  :Else

    ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Multipliers
    :              :Critical Hit% = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    :              :Critical Damage = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    :              :Damage/Healing = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    :              :Hit Rate = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    ◆

  :End

  ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Action Effect
  :              :Targets = ["all targets"]
  ◆

:End

Now let's look at the else. This is what happens when the enemy uses this skill. A Timed Hit QTE will play and the player has to block a single attack with a timing of around 80 frames. Animation 66: Fire I will be played without a Wait for Animation. After 80 frames, if successfully blocked (Switch 1 ON), the damage multiplier is reduced to 10%. Otherwise, the damage multiplier is set to 100%. The typical Action Effect then occurs.


◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Wait For Animation

Wait for any remaining animations to finish.


◆Plugin Command:VisuMZ_1_BattleCore, MECH: Multipliers
:              :Critical Hit% = 
:              :Rate = 1.00
:              :Flat = +0.00
:              :Critical Damage = 
:              :Rate = 1.00
:              :Flat = +0.00
:              :Damage/Healing = 
:              :Rate = 1.00
:              :Flat = +0.00
:              :Hit Rate = 
:              :Rate = 1.00
:              :Flat = +0.00

Reset the multipliers.


◆Plugin Command:VisuMZ_1_BattleCore, ACSET: Finish Action
:              :Immortal: Off = true
:              :Wait For New Line = true
:              :Wait For Effects = true
:              :Clear Battle Log = true
:              :Home Reset = true
:              :Wait For Movement = true

Finish up the rest of the Action Sequence.


Fireball Button Mash: Once Parallel Breakdown

Within the Button Mash QTE, there is a Trigger Common Event that references this Once Parallel Common Event. Here is the breakdown for it.

◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Show Animation
:              :Targets = ["all targets"]
:              :Animation ID = 13
:              :Mirror Animation = false
:              :Wait For Animation? = false

We play a different animation that's shorter. No Wait for Animation though.


◆Wait:4 frames

A 4 frame wait.


◆Plugin Command:VisuMZ_1_BattleCore, MECH: Multipliers
:              :Critical Hit% = 
:              :Rate = 1.00
:              :Flat = +0.00
:              :Critical Damage = 
:              :Rate = 1.00
:              :Flat = +0.00
:              :Damage/Healing = 
:              :Rate = 0.10
:              :Flat = +0.00
:              :Hit Rate = 
:              :Rate = 1.00
:              :Flat = +0.00

Damage multiplier is set to 10% due to the huge volume of attacks.


◆Plugin Command:VisuMZ_1_BattleCore, MECH: Action Effect
:              :Targets = ["all targets"]

Perform an action effect to deal damage and any other effects.


Fireball Button Mash: Test Play

Let's take a look at the skill in action used by both the player and the enemy.

FireballSpam2.gif

When the player uses the skill, a barrage of fireballs occur deal multiple hits. When the enemy uses the skill, a single attack occurs with the chance of the player blocking most of the damage.

Also, this is just an opinion, but this would look great with Projectiles. They were left out of the tutorial in order to keep the tutorial simple and easy to digest.


Tutorial 3: Super Jump

SuperJumpTut1.jpg

Just as a reminder, this is NOT a beginner tutorial on how to do Action Sequences. If you need a tutorial for that, read this tutorial article by MirageV.

In Super Mario RPG, the Super Jump is a special move where upon landing a successful Timed Hit, the character jumps back up into the air again for another Timed Hit QTE. We'll do the same thing here. Though the difference will be that instead of doing the damage all at once like in Super Mario RPG, we'll be applying the damage each time there's a jump landing.

Our goal here is to make an attack that can be repeated for multiple instances of damage when used by the player or the enemy. If done by the player, the player will need to successfully land Timed Hits in order to continue the jumping spree up to a maximum of 10 times. If done by the enemy, the enemy will continuously jump on the player character until a Timed Hit blocks the attack. The enemy will jump for a maximum of 3 times.

Capeesh? Let's do this!

WARNING! This will require at least version 1.01 of the QTE and Trigger System plugin for this effect to work as we will need the Clear Current QTE Plugin Command.


Super Jump: Full Action Sequence

Here is what the full Action Sequence should look like for Super Jump. The animation we'll be using will be a thunder attack animation using animation 76: Thunder I.

◆Plugin Command:VisuMZ_1_BattleCore, ACSET: Setup Action Set
:              :Display Action = true
:              :Immortal: On = true
:              :Battle Step = true
:              :Wait For Movement = true
:              :Cast Animation = true
:              :Wait For Animation = true

◆If:Script:BattleManager._subject.isActor()

  ◆Control Variables:#0020 Total Jumps = 10
  ◆
:Else

  ◆Control Variables:#0020 Total Jumps = 3
  ◆
:End

◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Move To Target(s)
:              :Targets (Moving) = ["user"]
:              :Targets (Destination) = ["all targets"]
:              :Target Location = middle head
:              :Melee Distance = 24
:              :Offset Adjustment = horz
:              :Offset: X = 0
:              :Offset: Y = 0
:              :Duration = 40
:              :Face Destination? = true
:              :Movement Easing = Linear
:              :Movement Motion = walk
:              :Wait For Movement? = false

◆Loop

  ◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Jump
  :              :Targets = ["user"]
  :              :Desired Height = 300
  :              :Duration = 40
  :              :Wait For Jump? = false

  ◆Plugin Command:VisuMZ_2_QTE_TriggerSys, QTE: Clear Current QTE

  ◆Plugin Command:VisuMZ_2_QTE_TriggerSys, QTE: Timed Hit (OK)
  :              :Timed Hit Picture = >>>ATTENTION<<<
  :              :Coordinate X = Graphics.width / 2
  :              :Coordinate Y = Graphics.height / 2
  :              :Press in X Frames = 40
  :              :Success Switch ID = 1
  :              :Timing Variable ID = 0
  :              :Success Common Event = 0
  :              :Success Sound = {"name:str":"Skill2","volume:num":"90","pit…
  :              :Miss Common Event = 0
  :              :Miss Sound = {"name:str":"Buzzer1","volume:num":"90","pitch…
  :              :Input Start Delay = 0
  :              :Wait for QTE? = false

  ◆Wait:40 frames

  ◆If:Timed Hit Success is ON

    ◆If:Script:BattleManager._subject.isActor()

      ◆Control Variables:#0020 Total Jumps -= 1
      ◆
    :Else

      ◆Control Variables:#0020 Total Jumps = 0

      ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Multipliers
      :              :Critical Hit% = 
      :              :Rate = 1.00
      :              :Flat = +0.00
      :              :Critical Damage = 
      :              :Rate = 1.00
      :              :Flat = +0.00
      :              :Damage/Healing = 
      :              :Rate = 0.10
      :              :Flat = +0.00
      :              :Hit Rate = 
      :              :Rate = 1.00
      :              :Flat = +0.00
      ◆
    :End
    ◆
  :Else

    ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Multipliers
    :              :Critical Hit% = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    :              :Critical Damage = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    :              :Damage/Healing = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    :              :Hit Rate = 
    :              :Rate = 1.00
    :              :Flat = +0.00

    ◆If:Script:BattleManager._subject.isActor()

      ◆Control Variables:#0020 Total Jumps = 0
      ◆
    :Else

      ◆Control Variables:#0020 Total Jumps -= 1
      ◆
    :End
    ◆
  :End

  ◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Show Animation
  :              :Targets = ["all targets"]
  :              :Animation ID = 76
  :              :Mirror Animation = false
  :              :Wait For Animation? = false

  ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Action Effect
  :              :Targets = ["all targets"]

  ◆If:Total Jumps < 1
    ◆Break Loop
    ◆
  :End
  ◆

:Repeat Above

◆Plugin Command:VisuMZ_1_BattleCore, MECH: Multipliers
:              :Critical Hit% = 
:              :Rate = 1.00
:              :Flat = +0.00
:              :Critical Damage = 
:              :Rate = 1.00
:              :Flat = +0.00
:              :Damage/Healing = 
:              :Rate = 1.00
:              :Flat = +0.00
:              :Hit Rate = 
:              :Rate = 1.00
:              :Flat = +0.00

◆Plugin Command:VisuMZ_1_BattleCore, ACSET: Finish Action
:              :Immortal: Off = true
:              :Wait For New Line = true
:              :Wait For Effects = true
:              :Clear Battle Log = true
:              :Home Reset = true
:              :Wait For Movement = true


Super Jump: Breakdown

For those who aren't able to follow, let's break down the event commands and Action Sequences used here.

◆Plugin Command:VisuMZ_1_BattleCore, ACSET: Setup Action Set
:              :Display Action = true
:              :Immortal: On = true
:              :Battle Step = true
:              :Wait For Movement = true
:              :Cast Animation = true
:              :Wait For Animation = true

Above is the typical setup action set. Nothing is really changed there. All it does is play the action name, setup immortality flags, play cast animations, and wait for the cast animation to finish.


◆If:Script:BattleManager._subject.isActor()

  ◆Control Variables:#0020 Total Jumps = 10
  ◆
:Else

  ◆Control Variables:#0020 Total Jumps = 3
  ◆
:End

Here, we setup the total number of jumps through a Control Variable event command. The Conditional Branch using the script call BattleManager._subject.isActor() allows you to set different values for actors and enemies.


◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Move To Target(s)
:              :Targets (Moving) = ["user"]
:              :Targets (Destination) = ["all targets"]
:              :Target Location = middle head
:              :Melee Distance = 24
:              :Offset Adjustment = horz
:              :Offset: X = 0
:              :Offset: Y = 0
:              :Duration = 40
:              :Face Destination? = true
:              :Movement Easing = Linear
:              :Movement Motion = walk
:              :Wait For Movement? = false

This Action Sequence Plugin Command moves the user to the head of the target. There is no Wait for Movement.


◆Loop

  x

:Repeat Above

We will be using a Loop event command to process the multiple jumps. The following content will be found inside of the Loop Command.


◆Loop

  ◆Plugin Command:VisuMZ_1_BattleCore, MOVE: Jump
  :              :Targets = ["user"]
  :              :Desired Height = 300
  :              :Duration = 40
  :              :Wait For Jump? = false

  x

:Repeat Above

At the start of each loop, the skill user will jump for a total of 40 frames. There is no Wait for Jump.


◆Loop

  x

  ◆Plugin Command:VisuMZ_2_QTE_TriggerSys, QTE: Clear Current QTE

  ◆Plugin Command:VisuMZ_2_QTE_TriggerSys, QTE: Timed Hit (OK)
  :              :Timed Hit Picture = >>>ATTENTION<<<
  :              :Coordinate X = Graphics.width / 2
  :              :Coordinate Y = Graphics.height / 2
  :              :Press in X Frames = 40
  :              :Success Switch ID = 1
  :              :Timing Variable ID = 0
  :              :Success Common Event = 0
  :              :Success Sound = {"name:str":"Skill2","volume:num":"90","pit…
  :              :Miss Common Event = 0
  :              :Miss Sound = {"name:str":"Buzzer1","volume:num":"90","pitch…
  :              :Input Start Delay = 0
  :              :Wait for QTE? = false

  ◆Wait:40 frames

  x

:Repeat Above

Afterwards, we clear any QTE sessions that may be occurring. This Plugin Command does not exist in QTE and Trigger System's version 1.00 and requires at least version 1.01.

Follow that up with a Timed Hit QTE that lasts for 40 frames. There is no Wait for QTE.

For those curious why we need the Clear Current QTE Plugin Command, it's because upon completing a QTE usually, there's a small bit of delay afterwards to allow the player to know if they've succeeded in landing the QTE or not. The clear command allows you to drop that delay and instantly go onto the next QTE.

We then wait for 40 frames.


◆Loop

  x

  ◆If:Timed Hit Success is ON

    ◆If:Script:BattleManager._subject.isActor()

      ◆Control Variables:#0020 Total Jumps -= 1
      ◆
    :Else

      ◆Control Variables:#0020 Total Jumps = 0

      ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Multipliers
      :              :Critical Hit% = 
      :              :Rate = 1.00
      :              :Flat = +0.00
      :              :Critical Damage = 
      :              :Rate = 1.00
      :              :Flat = +0.00
      :              :Damage/Healing = 
      :              :Rate = 0.10
      :              :Flat = +0.00
      :              :Hit Rate = 
      :              :Rate = 1.00
      :              :Flat = +0.00
      ◆
    :End
    ◆
  :Else

    ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Multipliers
    :              :Critical Hit% = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    :              :Critical Damage = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    :              :Damage/Healing = 
    :              :Rate = 1.00
    :              :Flat = +0.00
    :              :Hit Rate = 
    :              :Rate = 1.00
    :              :Flat = +0.00

    ◆If:Script:BattleManager._subject.isActor()

      ◆Control Variables:#0020 Total Jumps = 0
      ◆
    :Else

      ◆Control Variables:#0020 Total Jumps -= 1
      ◆
    :End
    ◆
  :End

  x

:Repeat Above
If the Timed Hit succeeds, then Switch 1 is enabled and set to ON.
Another Conditional Branch follows up with the usual script call BattleManager._subject.isActor() to check if the user is an actor.
If the user is an actor, reduce the Total Jumps Variable by -1.
If the user is not an actor (therefore an enemy), then consider the Super Jump blocked and halted prematurely. Set the Total Jumps Variable remaining to 0 reflect this. Also, since the attack is blocked, set the damage multiplier to 10%.
If the Timed Hit fails, then Switch 1 is disabled and set to OFF.
The multipliers are reset back to 100%.
Another Conditional Branch follows up with the usual script call BattleManager._subject.isActor() to check if the user is an actor.
If the user is an actor, the Super Jump ends prematurely and we set the Total Jumps Variable to 0 to reflect this.
If the user is not an actor (therefore an enemy), then the player has failed to block the Super Jump and the combo continues. Reduce the Total Jumps Variable by -1 to reflect this.


◆Loop

  x

  ◆Plugin Command:VisuMZ_1_BattleCore, ANIM: Show Animation
  :              :Targets = ["all targets"]
  :              :Animation ID = 76
  :              :Mirror Animation = false
  :              :Wait For Animation? = false

  ◆Plugin Command:VisuMZ_1_BattleCore, MECH: Action Effect
  :              :Targets = ["all targets"]

  x

:Repeat Above

Typical animation stuff here. We use animation 76: Thunder I for the effect. There is no Wait for Animation.

Follow this up with MECH: Action Effect to produce damage and any other skill effects.


◆Loop

  x

  ◆If:Total Jumps < 1
    ◆Break Loop
    ◆
  :End
  ◆

:Repeat Above

Finally, before the loop repeats, we check to see if the Total Jumps Variable has a value of less than 1. If it does, the loop is broken and we can finish the skill. If not, the loop continues and another jump will occur, dealing more damage.


◆Plugin Command:VisuMZ_1_BattleCore, MECH: Multipliers
:              :Critical Hit% = 
:              :Rate = 1.00
:              :Flat = +0.00
:              :Critical Damage = 
:              :Rate = 1.00
:              :Flat = +0.00
:              :Damage/Healing = 
:              :Rate = 1.00
:              :Flat = +0.00
:              :Hit Rate = 
:              :Rate = 1.00
:              :Flat = +0.00

Reset the multipliers.


◆Plugin Command:VisuMZ_1_BattleCore, ACSET: Finish Action
:              :Immortal: Off = true
:              :Wait For New Line = true
:              :Wait For Effects = true
:              :Clear Battle Log = true
:              :Home Reset = true
:              :Wait For Movement = true

Finish up the rest of the Action Sequence.


Super Jump: Test Play

Let's look at the Super Jump skill without landing any Timed Hits.

SuperJumpTut2.gif

Reid only gets in 1 jump and ends the Super Jump prematurely while the Treant gets in all 3 that is allowed of it.


Now, let's look at the Super Jump when landing all of the Timed Hits for both the actor and enemy.

SuperJumpTut3.gif

Reid gets in all 10 jumps while the Treant's blocked jump only gets in 1 and ends the Super Jump prematurely. Reid also takes less damage.


Good Practices

What the tutorial shows you is the bare minimum needed to produce a Timed Hit effect with QTE's, but the tutorials do NOT include good practices that go along with them. Here's some of the good practices that I recommend:


Telegraph the timed attacks
Make the timed attacks easy to recognize from startup so that the player has enough time to react and time the presses properly. The average human reaction time is 250 milliseconds. That's 15 frames. And that's just being able to register the image mentally. Then to think about what to do and which button to press adds another 250 milliseconds. That's about 30 frames total. Make sure you give your players enough time.
Use Indicator Graphics
The enclosing graphic effect for the Timed Hits QTE Plugin Command is a great way to help the player properly time the Timed Hit. The indicator graphics help the player know when to press the Z button instead of trying to guess the timing. This is especially helpful for new attacks that the player may have learned and to remove any feelings of unfairness.
Positive Reinforcement vs Negative Reinforcement
Give bonus effects to landing Timed Hits (like more damage) rather than punishing the player (no damage) for not landing them. Not everybody is skilled enough to land Timed Hits consistently and you don't want to alienate your audience into those who can complete the game versus those who can't over something like this.


More to Come?

I may (or may not) add more tutorials to this article at a later date if I can think of more things that may help.


Conclusion

Timed Hits are made possible by VisuStella MZ's Battle Core and QTE and Trigger System plugins. While there aren't any notetags to make timed attacks happen, they are definitely possible through clever usage of Action Sequences. I hope this tutorial article helps you figure out how to create Timed Hits for your battle system should you wish to include them in.

Happy RPG Making!


End of Article


Hotelsoftware mit Channelmanager