Creating HP/MP Skill Conditions

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

Hello RPG Makers! 🌻

Continuing on from our last exercise, today we will be doing more work with Visustella Battle Core and Action Sequences, focusing squarely on creating skill mechanics, rather than fancy graphical movements that you might assume are all Action Sequences are for.

MirageVAvatar.png This is an article written by MirageV.

This article was transcribed over from RPG Maker Web by Arisu.


Instructions

Today, we will be focusing on creating skill effects using an actor's health and skill resources as triggers to perform additional effects. Namely, HP and MP. TP can also be used, but we won't be using it for this exercise.

Our goals today will be two-fold:

  • A Skill that performs an additional effect when HP is below 50%
  • A Skill that performs an additional effect when MP is above 75%.

Now that we have our goals set, let's get down to business! First, we'll tackle the HP skill.

For this, we'll make use of our already existing Flame Aura skill. Do you remember how we made that skill an action sequence despite it not doing anything out of the norm? Well, now we're going to be doing just that!

Common Event Setup

Head over to the Common Event tab, and open up Flame Aura's Action Sequence.

MirageV ActSeqTut2 01.png

Next, we'll open up a variable event command and create two new variables. For these ones, let's create variables we can continue to reuse as we need them. For our purposes, we'll call them 'Skill Condition 1' and 'Skill Condition 2'

MirageV ActSeqTut2 02.png

Next, we'll select Skill Condition 1 and set its value to be that of Reid's Current HP and confirm it.

MirageV ActSeqTut2 03.png

MirageV ActSeqTut2 04.png

After that, let's open up another variable command, and this time, let's set Skill Condition 2 to the value of Reid's Max HP and confirm it.

MirageV ActSeqTut2 05.png

MirageV ActSeqTut2 06.png

Now that we have our variables in order, it's time to do some simple calculation! First, let's use another variable command with Skill Condition 2, and divide it by 2 to get 50% of Reid's Max HP.

Then we'll use a Conditional Branch to check whether Skill Condition 1(Reid's Current HP) is less than or equal to Skill Condition 2(50% of his Max HP). Like so:

MirageV ActSeqTut2 07.png

Once we have our variables and operations in order, let's add in that extra effect! For this exercise, let's say that when Reid's HP is at or below 50%, Flame Aura will restore 25% HP to him on top of its state granting effect!

We'll use an HP/MP/TP Action Sequence command targeted at the user like so:

MirageV ActSeqTut2 07.png

MirageV ActSeqTut2 08.png

With this, our skill modification is finished! Let's test it out...

First we'll start by using Flame Aura when HP is above 50%

MirageV ActSeqTut2 09.png

As expected, it works as normal. Now let's try it below 50% HP...

MirageV ActSeqTut2 10.png

There we go. It restores HP in this case, since the condition was met! Perfect. With this, our HP Condition exercise is finished.


Skill Creation

Now, let's move on to our second exercise. This time, we'll start with a new skill.

Let's name it 'Gale Blade'. After all, what aspiring hero doesn't have a sword skill or two to show off, right? Make sure everything is in order, especially your <Custom Action Sequence> note tag!

MirageV ActSeqTut2 11.png

As you can see from the description, our effect this time focuses on MP. When Reid's MP is above 75%, this skill will proc 2 extra times for 3 hits total. Sounds pretty useful, doesn't it?

Well, let's give it a whirl! Off to the Common Events tab!

You know the drill by now, I hope. Set up a new Action Sequence, and name it 'Gale Blade'. We can give it all the usual setup, animation, and effect commands.

MirageV ActSeqTut2 12.png

After we finish that, let's head back over to Flame Aura, and copy our variable operations from there. Why spend time reinventing the wheel when you can just copy, paste, and edit, right?

Paste the event block into Gale Blade after Action Effect, since that's where we'll have our extra effects process.

Conditional Effect

Now it's time to edit these operations so that they calculate whether MP is greater than 75%, rather than below 50%.

  • We'll have Skill Condition 1 point to Reid's Current MP. Next, Skill Condition 2 will point to Reid's Max MP. Finally, we'll make some additions to the formula.
  • Use a Variable Operation to multiply Skill Condition 2 by 75. Then use a second Variable Operation to divide it by 100.
  • Finally, let's use a Conditional Branch to check whether Skill Condition 1 is greater than or equal to Skill Condition 2. Like so:

MirageV ActSeqTut2 13.png

Now that this is done, let's add in those extra effects! For the sake of balance, we'll lower the damage of those two extra hits by using a Multipliers Action Sequence command. Let's make the 2 extra hits 30% of the original skill's damage.

MirageV ActSeqTut2 14.png

With that, we'll add two action effect commands, and our Common Event should now look like this:

MirageV ActSeqTut2 15.png

Looks like we're done! Let's go back to our skill and add the Gale Blade Common Event to the trait list. Never forget that part! Once that's out of the way, we can finally give our skill a test run!

First, we'll use the skill with less than 75% MP left...

MirageV ActSeqTut2 16.png

...As expected, it only hits once. Now, let's top off our MP and try it again...

MirageV ActSeqTut2 17.png

...There we go! A 3 hit combo!

Looks like both of our skills work well. Which means that this is the end of today's Action Sequence exercise! Hopefully this little outing has opened your eyes a bit more to the possibilities of Battle Core's Action Sequences to make skills a bit more interesting.

That's all for now. Till next time!

End of Article


Pferde Krankenversicherung