This tutorial is just a introduction into the overall power that you possess while using the YERD Engine for Rpg Maker VX found here http://www.pockethouse.com/
Before I get started however, I would like to say this. The YERD Engine is a collection of tools that are available to enhance game play beyond what RMVX allows by default. Besides the numerous fixes listed which are recommended to be used in your game, the rest of the scripts are not necessary nor are they needed to make your game better. In the end, all you can do is rely on your own skills as a game designer.
With that out the way, lets get into the reason your reading this.
The first script that I will be helping you learn how to utilize to your advantage is Custom Damage Formulas RD
By default, the script uses the default algorithms in VX shown here.
Content Hidden
Code:
module NATK # Normal Attacks Default Formula Modifier
ATK_X = 4 # Multiplier for attacker's power.
AGI_X = 0 # Multiplier for attacker's agility.
SPI_X = 0 # Multiplier for attacker's spirit.
DEF_X = 2 # Multiplier for defender's defense.
MIN_DMG = 0 # Minimum damage allowed from a normal attack.
VARYDMG = 20 # Random number applied to normal attacks.
end # module Normal Attacks
module CRIT
# This is the damage modifier for critical hit. First, it's multiplied
# by CRIT_MOD and then divided by CRIT_DIV.
CRIT_MOD = 300
CRIT_DIV = 100
# This allows whether criticals will occur for normal attacks and skills.
# Note that custom skills will need criticals to be applied manually.
CRIT_NORMAL = true
CRIT_SKILL = true
end
module SKILL # Skill Damage Formula Modifier
ATK_F = 4 # Caster's Attack F multiplier for skills.
DEF_F = 2 # Caster's Defense F multiplier for skills.
SPI_F = 2 # Caster's Spirit F multiplier for skills.
AGI_F = 2 # Caster's Agility F multiplier for skills.
ATK_D = 2 # Defender's defense multiplier against Attack.
DEF_D = 1 # Defender's defense multiplier against Defense.
SPI_D = 1 # Defender's defense multiplier against Spirit.
AGI_D = 1 # Defender's defense multiplier against Agility.
end # module Skills
module OTHER # Other effects
PHARMACIST = 2 # If Pharmacist is checked, item effectiveness modifier.
GUARD_NORMAL = 2 # Normal damage reduction modifier.
GUARD_SUPER = 4 # Super damage reduction modifier.
SLIP_MAXHP_X = 10 # This is the percentage of the max HP for damage dealt.
SLIP_FIELDMG = 10 # This is how much damage is dealt when on the field.
end # module Other
end # module BATTLE
end # module YE
I personally modify the code so that the overall damage is smaller. Specifically, I use this code as it helps not only to keep track to see if the formula is correct, but prevents insane 1000HP Damage at early levels in the game
Content Hidden
Code:
module NATK # Normal Attacks Default Formula Modifier
# (Lowell: With this, Attack versus Defense is {user.atk * 2 - self.def}
ATK_X = 2 # Multiplier for attacker's power.
AGI_X = 0 # Multiplier for attacker's agility.
SPI_X = 0 # Multiplier for attacker's spirit.
DEF_X = 1 # Multiplier for defender's defense.
MIN_DMG = 0 # Minimum damage allowed from a normal attack.
VARYDMG = 20 # Random number applied to normal attacks.
end # module Normal Attacks
module CRIT
# This is the damage modifier for critical hit. First, it's multiplied
# by CRIT_MOD and then divided by CRIT_DIV.
CRIT_MOD = 300
CRIT_DIV = 100
# This allows whether criticals will occur for normal attacks and skills.
# Note that custom skills will need criticals to be applied manually.
CRIT_NORMAL = true
CRIT_SKILL = true
end
module SKILL # Skill Damage Formula Modifier
#(Lowell: i Lower all of this so it's similar to the above formula}
ATK_F = 2 # Caster's Attack F multiplier for skills.
DEF_F = 2 # Caster's Defense F multiplier for skills.
SPI_F = 2 # Caster's Spirit F multiplier for skills.
AGI_F = 2 # Caster's Agility F multiplier for skills.
ATK_D = 1 # Defender's defense multiplier against Attack.
DEF_D = 1 # Defender's defense multiplier against Defense.
SPI_D = 1 # Defender's defense multiplier against Spirit.
AGI_D = 1 # Defender's defense multiplier against Agility.
end # module Skills
module OTHER # Other effects
PHARMACIST = 2 # If Pharmacist is checked, item effectiveness modifier.
GUARD_NORMAL = 2 # Normal damage reduction modifier.
GUARD_SUPER = 4 # Super damage reduction modifier.
SLIP_MAXHP_X = 10 # This is the percentage of the max HP for damage dealt.
SLIP_FIELDMG = 10 # This is how much damage is dealt when on the field.
end # module Other
end # module BATTLE
end # module YE
Not so much required, just letting you know how I set things up.
The real chunk of this tutorial will be revolving around making custom skill damage effects such as Gravity, or Stock Break from FF9
By default, you have the first four effects which are called by adding <custom x> into the notes field, with x relating to the value below. (You'd know this if you read through the script)
Content Hidden
Code:
when 1 # This is custom damage formula number one
# Damage is more or less your Max HP * Your Level. (Level 3 * 50 HP ) will be 150 Damage
damage = user.level * user.maxhp
@ignore_def = true
when 2 # This is custom damage formula number two
# As a quick note, {user.x} refers to the person using the skill x is of course a variable. that pulls from whatever parameter your using for the skill
damage = user.level * user.maxmp * user.mp
@ignore_def = true
when 3 # This is custom damage formula number three
# Direct Values work as well, useful if you want to make a skill like 1000 Needles
damage = 0
@ignore_def = true
when 4 # This is custom damage formula number four.
# Think of this as an instant kill. {self.x} is like user but pulls from the enemies stats. self.def would deal damage equal to the foes defense
damage = self.maxhp
@ignore_def = true
when 5 # If you haven't caught on yet, <custom 5> will pull from this custom formula.
# This skill would be the equivalent of Gravity. As it deals 1/4 of the targets current HP, key word current
# .hp refers to current HP (So if the target has 400 HP out of 1000, the skill does 100 as it's 1/4 of 400)
# .maxhp refers to maximum HP (So if the target has 1000 Max HP, it deals 250 each time it's used)
damage = self.hp / 4
@ignore_def = true
when 6 # You'll have to test these for yourselves as I'm not testing the skills as write this tutorial
# Depending on how RMVX handles equations, you can do one of two formulas, the former being the better choice imo
# Formula 1: {self.maxhp - 1) Technically it should do the targets max hp in damage - 1, leaving them with 1 HP
# Formula 2: {self.maxhp = 1) Not to sure about this as you already having an = sign in the formula and I'm unsure how it will interpret it
damage =
@ignore_def = true
when x #(New Formula ID)
damage = #(Custom Damage Formula)
As you can see, adding a new effect is quite simple as it's simply two steps, since @ignore_def = true is not required in any of them
I'll add more as I feel like it, or if someone request some of them (highly unlikely I'll do it though)