Under the hood: A look at the battle formulae behind RM2k
--- 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:
If attacker has a weapon:
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.
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...
Now, if the skill does not ignore the defender's defense, we have to take that into consideration.
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.
If the skill hits and it changes a condition, we have to make a minor adjustment...
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...
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
Remember the skill damage formula?
These values give this modified damage formula.
Let's reduce it down a bit.
Shave off a little more...
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
Here we go again. Since we're ignoring defense, we don't need to include the entire block that factors in opponent defense.
And of course, this reduces down to..
Leaving us with...
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 |