Formula Headaches

Trying to replicate the damage formulas used in Persona 5


5f1c485e8867fbf5d062fe52d3a7288a8fc33c15.png


d5350734d54dce512eacb7f1de6be2e1af01a37a.png


Effectively Skill Power is how much base damage the skill does, Magic Stat is your M. Attack.

Base Power is the result of the above calculation and endurance is your Defense/M. Defense and obviously Armor Defense doesn't exist.

Top formula is the attack part.

The bottom formula is how much damage should be subtracted from the total.


I haven't gotten to the defense part because I can't even get the attack part to work.

70 + 70 x a.atk / 30

It only results in doing zero damage, no equipment is on the actor and all their stats are 1 so effectively the formula is

70 + 70 x 1 / 30 which according to google should result in 72.3333333333

I'm terrible at math so maybe it's off, or the formula isn't formatted correctly in MZ, any ideas?
the operator used for multiplication, specifically in RPG Makers, is "*", not "x".

e.g.

70 + 70 * a.atk / 30
On a side issue, if you change the colour of the text from automatic to black it is hard for anyone using the dark theme to see what you've written. That's because it ends up as black on grey.

To show what I mean here is how it appears to me, with the automatic text in white and the black in, well, black.

1656530832006.png


It might be kinder to stick to automatic.
the operator used for multiplication, specifically in RPG Makers, is "*", not "x".

e.g.

70 + 70 * a.atk / 30
You know, I knew that it was * but I guess it slipped my mind when converting all the symbols.

Thank you, that saved me a lot of headaches.

On a side issue, if you change the colour of the text from automatic to black it is hard for anyone using the dark theme to see what you've written. That's because it ends up as black on grey.

To show what I mean here is how it appears to me, with the automatic text in white and the black in, well, black.

View attachment 231176

It might be kinder to stick to automatic.
This was because it's an embedded image, sorry about that -- I didn't have time to write the entire thing directly.




Final notes: If anyone is reading this in the future this formula seems to work, and might save you some trouble.

70 + ((70 * a.atk) / 30) - Math.sqrt(b.def * 8)

70 is the base damage, replace a.atk & b.def with relevant damage types

Original thread: https://forums.rpgmakerweb.com/threads/formula-headaches.149017/