Translating Damage Formulas to RPGMMZ

Hi all,

I've had a look around and I'm struggling to locate whereabouts I could get clarity on translating the damage formulas I've put together to a way in which RPGMMZ will allow.

Fairly inexperienced with using the software but I've done a bunch of work to try to make it scalable in a similar way to the Final Fantasy X damage formula.

Appreciate any and all help / guidance you can offer.

Note - The Screenshot holds these formulas and examples of the math with the scalable stats as I was unable to copy/paste them with the B bracket turning into an emoji. Sorry/
If you are willing to use a plugin for this Visualstella's Battle core (which is one of the free 10 plugins they have in the sample project) has an option to use the ffx damage formula.

BUT...that's if you want to take that approach. If not, you will need to enter it all into the damage formula for each and every skill appropriately.
as I was unable to copy/paste them with the B bracket turning into an emoji.
that only happens if you try to paste as text.
the code tag (the last symbol on the right) is available exactly for posting code

as for your questions:

the damage formula is basically an eval of javascript, so any mathematical function works directly.

the main point that your formulae are missing is the battler-selector, the decision if you want the DEF from the skill user or the DEF from the skill target (and same for any other values)
a is the placeholder for the skill user, which means a.atk is the attack value of the skill user/attacker
b is the placeholder for the skill target, which means b.def is the defence value of the attacked (or the healed)

your other problem is that there is no base weapon damage at all, all the equipment does in the engine is to add points to the actor's parameters like ATK - and it is difficult to get only part of the ATK.
you might have to rethink your formulae in that part.
Appreciate any and all help / guidance you can offer.
i took my damage formulas and wrote them into a standalone plugin to make them into global functions that i can just call from anywhere. Then i just pass them the stats I want to use with whatever scaling for them in each skill's formula box like PDmg(a.atk*1.2, b.agi*0.5, a.level, b.level)

You can do a similar thing, but maybe with the entire battlers as arguments for convenience's sake
Code:
function PPDmg(attacker, defender)
{
    var dmg = ((attacker.weapons ? attacker.weapons()[0].params[2] || 0 : 0) + attacker.atk)**3;
    dmg *= defender.def * ((16 + attacker.atk) * ((attacker.level || 0) + defender.def))/270;
    dmg /= 270;
    return Math.ceil(dmg);
};

and then have your physical physical damage skills formulas include PPDmg(a, b), but youre going to have to do more to make it work the way you want it. by default:
theres no base weapon damage. so youre going to have to make that a thing somehow and replace what i left in.
not sure what statA is, but if its some attack value the battler has separate from their atk, youll have to get that too and replace the values used. same for statB
enemies dont have equipment by default, so you need to find something to use as their weapon damage while attacking.
Enemies dont have levels either, so that'll have to be added in somehow

Original thread: https://forums.rpgmakerweb.com/threads/translating-damage-formulas-to-rpgmmz.166539/