Game Development Reference
In-Depth Information
Damage Formulas
Up to now, we have created one new skill, as well as one item that used the damage formula box. However, we have
used the default formula. What if we wanted to use different formulas? If you take a look at the many premade skills
in RMVXA, you'll see that not all skills are created equal. Following are some examples of different circumstances that
can be covered by different damage formulas.
An attack that pierces the enemy's defense : If you want to alter the basic formula, use [a.atk*4]
instead of [a.atk*4 - b.def*2] . A skill that doesn't factor in an enemy's defense in the
damage formula will do damage based on the user's attack. Likewise, you can make a spell in
the format [a.mat] , instead of [a.mat - b.mdf] , to have a magic defensive piercing skill.
An attack that does damage based on the target's HP : You can plug MHP (Maximum HP) and
HP (current HP) into formulas as well (MMP and MP too). What if you wanted to make a
gravity attack in the vein of Final Fantasy 's Demi spells? Gravity skills, by definition, cannot
kill their target. So, let's use HP. Writing in [b.hp/4] would result in a skill that causes damage
equal to a quarter of the enemy's remaining HP. If we were to switch HP with MHP, said skill
would do a quarter of its maximum HP in damage instead.
A skill that boosts the user's stats while damaging the enemy : If you look at the stock
functionality of RMVXA, you'll notice that this is seemingly impossible. If you create an attack
and use Effects to add states or buff/debuff stats, you'll see that the target will get them as well.
But, perhaps I want a skill that increases my AGI for two turns every time I connect with it. We
can use .add_buff() to accomplish that ( .add_debuff() lowers a stat instead). So, a skill that
boosts the user's AGI for two turns while damaging an enemy would look something like this:
[a.add_buff(6,2); a.atk*4 - b.def*2] .
What's with the numbers in the .add_buff parentheses? Perhaps I should explain, eh? When you add buffs or
debuffs via the damage formula box, you can declare the parameter (stat) to affect, as well as the turn duration.
Parameter 6 is AGI, and the turn duration is 2.
Parameter Abbreviations
If you head into the Script Editor (in which your functionality is essentially nil, if you're using RMVXA Lite), you will
see a bunch of code. Make your way to Game_BattlerBase under the Game Objects section of the available code and
left-click it. If you scroll down that page of code, you'll find a list of parameters and their internal values. Take a look at
the following code, which shows which parameter the numbers refer to.
 
Search WWH ::




Custom Search