RPG Maker VX Ace Wiki
Advertisement

This tutorial explains how to create a skill which "marks" a chosen enemy. This mark allows a particular actor to deal more damage to that enemy so long as the mark is up. So, for example, Nick the Ninja can cast the skill "marked for death" on Slime B, and then deal increased damage to Slime B for X turns. It then explores a few variations on that theme.


Requirements[]

None. This can be done exclusively through the database.

Details[]

Make the State[]

Mark-1

The state id is circled in red. These IDs in the database are the keys to the kingdom of RPG Maker.

We’ll first need to create a state. I named mine “Mark”. We'll only be dealing with two parts to this screen:

  • Handle the removal timing as you see fit; this is how many turns the "mark" will be applied.
  • Give a clever message for when an enemy is marked (“(target name" is marked for death!). Don’t include any other features at all – this state is just a placeholder for us to check for. Use of "dummy" states like this can be helpful for creating more complex skills. Make a note of the state ID – the number next to the state in your database.

Also make a note of Nick the Ninja's actor ID in the database.


Make the Skill[]

Next we need to make a skill which applies the state. There are a few strategic considerations here:

  • "Hit Type" - if you consider your mark to be "physical" or "magical" in nature, you might use this opportunity to apply Nick's Chance to Hit to the skill, meaning that it can occasionally miss. If you choose Certain Hit, the skill will always make contact with the enemy. You can also use Success % to effect the same - this would make it so that Nick has a chance to "fumble" casting the skill. 
    Mark-2

    Whereas the state page was almost blank, use this skill page to really beef up your skill. Animation, text, resource costs and gains - all of those contribute to "juicing" your game.

  • % Chance to Apply State - just because the skill makes contact doesn't mean the state is applied. You can alter the chance of your skill applying the state by changing the % in the "Effects" window.
  • Resistences - while not handled in the skill window, consider also whether you want certain enemies to resist the application of the mark. A thief, or a mutant chameleon, might have the inherent ability to dodge the mark.

Once you've figured out these parameters, set up your skill. It's up to you to decide things like resource costs, MP or TP, speed, how many enemies can get marked, animation, etc. In addition:

  • Make sure your occasion is set to "Only in Battle" - wouldn't make sense to cast this skill when there are no enemies!
  • Under "Effects", set the parameter to "Add State," and then select the state you created in the first step.

Upgrade Your Attacks[]

Here's where the bulk of the work takes place. For any attack that Nick can do, we want to increase it to marked enemies. We do this in the damage "Formula" bar. That bar determines the damage dealt by an attack, and uses two letters – a and b – to signify the attacker and target, respectively. So the default attack formula, “a.atk * 4 – b.def * 2″, means that the attack will deal attacker’s attack stat multiplied by 4, minus target’s defense stat multiplied by 2.

Here is a reminder of the abbreviations you can use to point to your character or your target's characteristics:

  • The letters atk mean "attack".
  • The letters def mean "defense".
  • The letters mat mean "magic attack".
  • The letters mdf mean "magic defense".
  • The letters agi mean "agility".
  • The letters luk mean "luck".
  • The letters mhp mean "maximum hit points".
  • The letters mmp mean "maximum mana points".
  • The letters hp mean "current hit points".
  • The letters mp mean "current mana points".
  • The letters tp mean "current tension points".
  • The letters level mean "current level".

We can replace this with a ternary operator, which looks like:

x > y ? 1 : 2

You can read x > y ? as “is x greater than y?” After the question mark are the results for yes and no. So, is x greater than y? If yes, the result is “1”; if no, the result is “2”. You can use this writing to give variables values. 

As an example, let’s take a look at an attack I just made for Nick, “Ninja Attack.” No one else will be able to use it except Nick. 

Mark-3

It attacks twice,but as with all of Nick’s attacks, we want it to do more damage if the target is marked. So the damage side of our equation might look something like

a.atk*8 – b.def*3 : a.atk*4 – b.def*2

That is, if our question is answered “yes”, do a lot more damage; if it’s answered “no”, do standard damage.

But what’s our question? Whether the enemy has the Mark state. My Mark state id is “25”, so I would write:

b.state?(25) ? (a.atk*8 – b.def*3) : (a.atk*4 – b.def*2)

b.state? asks if the target has a state (as you guessed, a.state? asks if the attacker has one). I put our attack values in parens for easier reading. So now we’ve got our Ninja Attack!


Skills Usable By Other Actors[]

We want Nick’s regular Attack to do more damage to marked targets as well. But he shares the regular attack skill with everyone else. So we need to ask a better question – does target have the marked state, and is the attacker Nick? Remember when I said to note Nick’s actor ID? We need it here:

a.id == 4
Mark-4

Use && between the two parts of the question to ensure that they're evaluated together.

That asks if the attacker’s actor id is 4. Combine this in the ternary provided above to get:

(a.id == 4 && b.state?(25)) ? (a.atk*8 – b.def*3) : (a.atk*4 – b.def*2)

Do this for every skill that Nick has access to, and you'll have succesfully implemented a "mark" skill.



Variations[]

"Marks" can be used to affect the enemy in a wide variety of ways. Here are two examples:

Changing Defense[]

A fighter who is having a tough time with an armored unit may want to swap an enemy's DEF for its MDF. We can represent that in the Formula bar as well, for all of the fighter's attacks:

b.state?(25) ? (a.atk*4 - b.mdf*2) : (a.atk*4 - b.def*2)

Changing Damage Type[]

A fire mage's mark could convert any damage the enemy takes into fire damage. We can measure the enemy's resisitance to an element by looking up its ID in the database. The formular "b.element_rate(x)" - where x is replaced by the element ID - returns the enemy's resistence or weakness. So, if an enemy take 200% damage from fire, b.element_rate(1) would return "2". We can use this as a multiplier in the Formula Bar:

b.state?(25) ? (a.atk*4 - b.def*2) * b.element_rate(1) : (a.atk*4 - b.def*2)
Advertisement