# RMMV Damage Formula - ideas and help

#### Shaz

##### Keeper of the Nuts
The damage formula box in MV is waaaaayyyyyyyy longer than in Ace, so we can now use it for some more complex situations.

It still works the same way, but the method and class names are different.  So grabbing a formula that worked in Ace doesn't mean it's just going to work in MV.

Post in this thread if you need some help working out the correct formula for your needs.

#### JosephSeraph

##### White Mage
Would you mind making a list on the first post with the known differences in syntax? I know the stats themselves are gracefully spelled the same.

#### Shaz

##### Keeper of the Nuts
Archeia has a thread already on script call equivalents to event commands.  That would be a good start.  But yes, I can look at doing that ... when I can find the time

#### JosephSeraph

##### White Mage
Ahaha yeah don't stress ^-^'

Just add them there as users point them out! I'm still far from making skills tho.

#### Drago9

##### Corsair
Any body working on a low number damage scaling game? What would be a good formula for a regular attack if around 200 - 300 is the high end damage.

#### JosephSeraph

##### White Mage
The default formula cuts it if you keep the numbers low. But I'd use a simple a.atk - b.def. Remember to keep your def values roughly half than atk.

Still, I hate directly subtractive formulae.

#### Drago9

##### Corsair
The default formula cuts it if you keep the numbers low. But I'd use a simple a.atk - b.def. Remember to keep your def values roughly half than atk.

Still, I hate directly subtractive formulae.
Would a.atk - b.def * 0.33 be balanced? My actors start at like 30 HP at level 1.

#### Milennin

##### "With a bang and a boom!"
Finally, a formulae thread. I just need to know how to work with states, like adding or removing, since add_state(n) no longer works in MV.

Never mind, got it now.

Would a.atk - b.def * 0.33 be balanced? My actors start at like 30 HP at level 1.
That's what I use for my basic attack, and I like it.

Last edited by a moderator:

#### OneManArmy

##### Regular
Can someone write what some letters and signs like * in formulas means? Something like a guide for newbies?

#### Kes

##### Regular
a = the user of the skill

b = the target of the skill (enemy - bear in mind that this is from the point of view of the user.  So an 'enemy' of the Demon Lord is your hero.)

* = multiplication sign.

the main stats use the normal abbreviation.  So

a.atk * 4 - b.def * 2

means that you have the attack value of the user multiplied by 4, from which you deduct (the minus sign) the defence of the target, times 2.  The resulting number is how much damage is inflicted.

There are other things, but if you are a complete newbie, I think those are the main things to remember.  Once you've worked that out, it is simpler to follow what is going on.

Last edited by a moderator:

#### Joronjo

##### Regular
Does v[n] still work or do we need to spell out \$game_variables.value[n]?

#### Kes

##### Regular
Not sure about that, but one thing I do know is that the a_b structure has gone.  So it is gameVariable (one word, with the second word beginning with an upper case letter).  Similarly instead of game_player it is gamePlayer.  I have found in a couple of cases by using the new structure in ordinary script calls it works, so I assume it is the same in any damage formula.

#### JosephSeraph

##### White Mage
I'm not a fan of dividing any numbers by more than 1 in damage formula. a.atk - b.def * 0.33 means that every 3 points of defense will make a difference. This is TERRIBLE for games with small numbers (or big numbers)

You want every point to be meaningful, so give them sparingly, or use bigger numbers.

There are other ways to increase defense other than straight def+, for instance. You can give some bonus HP, increase evasion, elemental resistance, crit nullification, etc.

#### SmashBroPlusB

##### Villager
This is probably really obvious and I apologize in advance for not realizing it on my own...

... but how would I go about adding a random number to a formula? Specifically, doing something like "ATK + d4" where the random element is a flat value, and isn't percentage-based like the core Variance value on skills.

#### Joronjo

##### Regular
I don't know if it works in MV the same, but in ace it would have been something like

a.atk + (rand(4)+1) or

a.atk + (rand(4.0)+1) if you wanted to use float values

#### SmashBroPlusB

##### Villager
Just tried that, it's making all my attacks deal 0 damage. I remove the rand(4) part of the equation, and now the attack deals 3 damage (4 ATK - 1 DEF).

#### Shake0615

##### Reanimator
This may be a stupid question, but I always hit the "Quick" button in VxAce for my formulas so I'm clueless. Is there a way to force a critical hit so that the damage numbers react the same way as a random crit in battle? (You know...the glowing, multi-colored, FF7 limit-breaky looking effect). If not, what is the formula for a critical hit anyway? And what about a standard physical attack?

Last edited by a moderator:

#### Shaz

##### Keeper of the Nuts
Guys, please don't say "it was like ... in Ace, so try that" - MV does NOT use the same language, class or method names, so chances are it's NOT going to work and will just fill up the thread with incorrect answers.  If you don't know, please don't answer, and just let it wait until someone can come along who does know, or can look it up.  Thanks

Having said that, if you HAVE a formula that works in Ace and want to know what to do in MV to achieve the same thing, by all means copy and paste it here (code tags will help with the formatting).  If you use the Quick button, go ahead and use it in Ace, then paste in the formula that it gives you.  Then we've got something definite to work with.

Sorry

#### SmashBroPlusB

##### Villager
Well, guess it's as good a time as any to say I haven't solved the random number issue yet.

a.atk + (rand(4) + 1) - b.defThis formula breaks things. Every attack now deals 0 damage... actually, they deal 1 damage since I'm using that one Minimum Damage plugin Yanfly whipped up, but it's still a broken formula. (Turning off the plugin shows 0 damage as well.)

a.atk +1 - b.defThis makes Shiki (my test actor) deal 4 damage (5 ATK - 1 DEF on bats), which is the intended result.

Anyone know how to generate random numbers in MV?

### Latest Profile Posts

I want to go play piano now. This is gonna be my stopping point today (yes, I’m very slow at drafting). Might have a few too many curly Qs? Obviously gotta finish the limbs and clean up. There are a few more outfit details I need to add. Probably going to do a background so that the pose makes sense, LOL.

Pumpkin Season

Do you believe me now?

BTW not my insta, not my post. Different John.
It's been long time since last I'm tinkering with RPG Maker ~
Turns out. I wasn't in my head accounting for when the Actor doesn't have a weapon equipped but DOES still have a Grimoire equipped... 40+ SV Spritesheets!!! D'x