Help with damage calcuation

Ok so I'm remaking an old game and playing about with the combat system.

Firstly the old games damage calculation for most weapons is:

Damage = Weapon Damage * (Character's Natural Damage + 30) / (Enemy Defense + 30) +- Random Variable (assumed to be around 10% or so of formula up to that point, or it could be as little as 1-2).

So because of the way RPG Maker handles this I am using A.ATK for Weapon Damage and A.LUK for Natural Damage, basically stealing that stat.

I am using this website to help me work out curves and levels etc: http://sumrndmdde.github.io/RPGMV-Damage-Calculator/

However the result comes out as null or no damage? I've tested it in game and for some reason I don't generate damage.

a.atk*a.luk+30/b.def+30

a.atk + 0 (8)
Damage: NaN (NaN%)

This is on the assumption basic enemy level 1 has 10 hp and 2 def. My character has 8 atk from knife and 5 luck (or natural damage is its called) at level 1


Anyone have any ideas why?
1) you're missing the () to prevent the mathematical priority from getting the correct values.
2) by default, any partial number is cut down to full integer, so divisions need to come last.

A.atk * (a.luk + 30) / (b.def + 30)
Should get your result

If that doesn't help, make a Screenshot of the skill so that we can check for other possible errors
If he's getting NaN, there's something else going on besides just an order-of-operations mishap. What exactly is in your damage formula box?
This is a "How do I...?" (implementation) question, rather than a design one. Implementation questions go in the Support forum for the engine you are using. However, you do not specify which one it is, nor is it included in the info under your avatar.

Please post and clarify this so that the thread can be moved. You might also consider editing your Profile Page to include it so that everyone will know in the future.

Thanks.
Done and done. RPG Maker MV very sorry! don't use these forums much
@Muzzsjm you didn't answer the questions we asked above - we need to see a screenshot of your exact skill with what you have written inside the damage box to help you.
Moved to: RPGMaker MV
So if I use this website http://sumrndmdde.github.io/RPGMV-Damage-Calculator/ I can get damage than isn't 0% or null if I add element rate of 10%. Without this element rate it's always 0 or null. Even with variance.

a.atk * a.mat+30 / b.def + 30

a.atk + 0 (8)
Damage: 9 (90.0%)

Anyone care to explain what that is and how it translates to RPG Maker?

a.mat now being a.luk
The damage has a lot of effects applied to it, and it is impossible to know what happens if you don't show us a screenshot of the skill you're using like you were asked above.
Repeatedly typing incomplete nonsense like that "a.atk + 0 (8)" does not help in any way, because that isn't even a mathematical formula.
@Muzzsjm: I cannot replicate what you seem to be suggesting...for me it looks like the result only returns zero when [enemy] element rate is set to zero, as expected. Maybe hard refresh the page (Ctrl/Cmd + F5) and re-enter the values. Since you mentioned a NaN error: if you've put quotes around any of the numbers, remove them.

As to your two obfuscated lines, here are my guesses:
  • "a.atk + 0 (8)": base atk of skill user (i.e. atk + 0) is eight; compare to increment/decrement results listed below it.
  • "Damage: 9 (90.0%)": final damage (after variance?) expressed as a fraction of the enemy's max HP.

@Andar: unfortunately the confusing stuff appears to be copied directly from the linked calculator...
It's fine guys I'm at work but I'll grab some screenshots when I'm home and working on the project.

Original thread: https://forums.rpgmakerweb.com/threads/help-with-damage-calcuation.95615/