For that you’ll want to use the following calculation:
But another important one would be how to you get the Ability Modifier from the Ability Score. These formulas will be used for everything from determining the attack to the damage, so they are pretty much the cornerstone of this whole thing. In other words, for 3d6 don’t put (6 * 3) just put (18). So for now I strictly went for Attack Roll (Attack) vs AC (Defense) and Spell Attack (Magic Attack) vs Saving Throw (Magic Defense).įor the YdX formula, it’s important to note that you’ll be setting the range of the random numbers, when it says X*Y you should replace that with the actual value of X * Y. While I have started working on versions to incorporate all the different D&D ability scores, I haven’t hammered out all the nitty gritty of using them. Now take in mind that this is a very basic version of what I started working with. So I recently put my mind to work on figuring out how exactly you would be able to bring a d20 or D&D Style of combat to a RPG Maker game. RPG Maker’s combat calculations are more inspired by Final Fantasy or Dragon Quest than anything you’d find in a Pen & Paper RPG tome. Seems easy right? You’ve got dungeons, monsters, characters all there and ready to go! However, the big hurdle is quite simply that the way combat works does not overlap. Something I’ve often toyed with aside from my own game FateStone was the idea of re-creating a Dungeons & Dragons campaign in something like RPG Maker.
Substitute MOD for a.atk or a.mat or whatever parameter you want to use for the attack. Here is the corrected formula for use in the Damage Formula:ī.def <= (Math.randomInt(20) + 1 + (Math.floor((MOD – 10)/2)) + (Math.floor(a.level/2))) ? Math.random(X*Y) + 1 + (Math.floor((a.atk – 10)/2)) : 0 UPDATE: While the logic below is sound, a recent comment drew my attention to testing what I posted here to find a number of small but crucial JavaScript syntax errors that may cause the formula to result in always returning 0 (the universal RPG Maker sign that something broke).