The WhoopA Network

Under the hood: A look at the battle formulae behind RM2k
Devised by WhoopA / Dan Sandstrom

--- Introduction

Ahh, the glory of Custom Battle Systems. It seems they're all the rage, but who has the time to correctly implement them nowadays? So many variables, having to create formulae for damage, escape and whatnot... The RM2k help file has the actual values used by the engine, but the muddled engrish makes the help file hard to understand.

That's what I'm here for. I'll decipher the variables, formulae and all that other junk. Feel free to use it however you wish. Implement it in a CBS. Or just take the knowledge to augment your understanding of the default battle system and run with it.

Since this is a tech document looking at RM2k under the hood, there'll be no scripts. So don't bug me about 'em. A basic knowledge of algebra is also recommended. I'm not going to tell you HOW to make a CBS. I'll just give you some info and you can use it however you please... as long as you don't steal my shit.

--- Formula for to-hit percentage

First off is the good ol' standard attack. This'd be the one that's used most often. But before damage is dealt, one must be able to HIT the enemy...

If attacker is unequipped:
(Chance to hit) = 90 + ((Attacker's agility) / (Defender's agility) / 2)

If attacker has a weapon:
(Chance to hit) = (Attacker's weapon hit%) + ((Attacker's agility) / (Defender's agility) / 2)

That 90% for unequipped is a rough estimation there. The hit rate is further modified if the attacker is inflicted with a condition that affects the chance to hit. If the defender is fortunate enough to have equipment with "Increased evasion rate" (Rise avoidance of phys. attack), the chance to hit is cut by 25%.

Finally, special incidences. If an equipped weapon has "Ignore evasion", then the to-hit rate of the weapon is used straight instead of by going through the formula. Finally, if the defender is unable to act (asleep, paralyzed, etc...) then the chance to hit is 100%. Period.

Of course, both these conditions can be affected by abnormal status. =)

--- Formula for damage

This one's a little easier to understand than the one for a to-hit number.
(Damage) = ((Atttacker's offense) / 2) - ((Defender's defense) / 4)

The damage has a ±20% variance, so it actually hits from anywhere between 80% to 120% its base value. Finally, if the attacker scores a critical hit, the adjusted damage is doubled. (Or, the whole of the attacker's offense instead of just half. I can't really tell =/)

--- Formula for skill damage.

Get ready, this is a long one...
(Base damage) = ((Attacker's strength) x (Hit chance) / 20) + ((Attacker's mental) x (Mind chance) / 40) + (Base effect)

Now, if the skill does not ignore the defender's defense, we have to take that into consideration.
(Adjusted damage) = (Base damage) - (((Defender's defense) x (Hit chance) / 40) + ((Defender's mental) x (Mind chance) / 80))

And finally, take the variance into effect. This affects the value anywhere from 0% (for 0 variance) to ±50% (for 10 variance), in steps of 5%.

--- Formula for skill effectiveness

This one's easy.
(Chance for success) = (Basic success rate)

If the skill hits and it changes a condition, we have to make a minor adjustment...
(Chance for condition change) = (Basic success rate) x (Condition effectiveness)

The condition effectiveness is set on the Conditions page of the database, and is ranked from A (most effective) to E (least effective). The rate can be set with these five values individually for each hero and monster.

If the skill fails to hit, however, the chance to change conditions is instantly nil.

--- Chance to escape formula

This one involves the agility of both parties involved...
(Chance to escape) = ((Hero party's combined agility) / (Enemy party's combined agility)) x 50 + (10 x (Attempts to run this battle))

And if the heroes get the drop on the enemy with a preemptive strike, they get a unconditional 100% chance to run on the first round.

--- Fun stuff - Skills doing the same damage as normal attacks

The formulae are now out of the way. If you followed properly, you can make a skill that affects the enemy just like a normal attack - like this:

Damage HP, base effect: 0
Hit chance: 10
Mind chance: 0
Variance: 4

Remember the skill damage formula?
(Base damage) = (((Attacker's strength) x (Hit chance) / 20) + ((Attacker's mental) x (Mind chance) / 40) + (Base effect) - (((Defender's defense) x (Hit chance) / 40) + ((Defender's mental) x (Mind chance) / 80))) x (Variance x ±5%)

These values give this modified damage formula.
(Base damage) = (((Attacker's strength) x (10) / 20) + ((Attacker's mental) x (0) / 40) + (0) - (((Defender's defense) x (10) / 40) + ((Defender's mental) x (0) / 80))) x (±20%)

Let's reduce it down a bit.
(Base damage) = (((Attacker's strength) * 1 / 2) + ((Attacker's mental) x 0) - (((Defender's defense) x 1 / 4) + ((Defender's mental) x 0))) x (±20%)

Shave off a little more...
(Base damage) = (((Attacker's strength) / 2) - ((Defender's defense) / 4)) x (±20%)

Gee, doesn't this formula look a little familiar? =)

--- Fun stuff - A massive-damage skill

Since the HP for heroes is capped at 999, this'd be good for monsters to instantly decimate a hero with an ungodly powerful attack. Don't be cruel now... no fair using this on the entire party at once.

Damage HP, Ignore defense. Base effect: 999
Hit chance: 0
Mind chance: 0
Variance: 0

Here we go again. Since we're ignoring defense, we don't need to include the entire block that factors in opponent defense.
(Base damage) = ((Attacker's strength) x (0) / 20) + ((Attacker's mental) x (0) / 40) + (999)

And of course, this reduces down to..
(Base damage) = ((Attacker's strength) x 0) + ((Attacker's mental) x 0) + 999

Leaving us with...
(Base damage) = 999

Dear lord, that's going to hurt. Just don't make it hit all the time... please?

--- The final word

Here I have to send out a shout-out to Gemin-Eye for translating the help file. My computer is ill-equipped for Japanese language display, and wading through the mucky engrish is hard enough. But some translation is better than none.

Now go and use these tidbits of info to the best of your ability. Godspeed.

--- Legal and acknowledgements

This document is ©2002 Dan Sandstrom.

RPG Tsukuru 2000 / RPG Maker 2000 is ©2000 ASCII / Yoji Ojima.

Ask if you wish to use this tutorial on your site, I may update it in the future. Violators will be prosecuted to the fullest extent of my foot.

The WhoopA Network - Design and content ©2001-2006 Dan Sandstrom