Shaz

Keeper of the Nuts
Global Mod
Joined
Mar 2, 2012
Messages
46,153
Reaction score
16,960
First Language
English
Primarily Uses
RMMV
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
Restaff
Joined
Mar 7, 2014
Messages
1,259
Reaction score
1,540
First Language
Portuguese
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
Global Mod
Joined
Mar 2, 2012
Messages
46,153
Reaction score
16,960
First Language
English
Primarily Uses
RMMV
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
Restaff
Joined
Mar 7, 2014
Messages
1,259
Reaction score
1,540
First Language
Portuguese
Ahaha yeah don't stress ^-^'

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

Drago9

Corsair
Regular
Joined
Jul 16, 2013
Messages
70
Reaction score
63
First Language
Thai
Primarily Uses
RMMV
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
Restaff
Joined
Mar 7, 2014
Messages
1,259
Reaction score
1,540
First Language
Portuguese
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
Regular
Joined
Jul 16, 2013
Messages
70
Reaction score
63
First Language
Thai
Primarily Uses
RMMV
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!"
Regular
Joined
Feb 7, 2013
Messages
3,225
Reaction score
2,599
First Language
English
Primarily Uses
RMMV
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
Regular
Joined
Sep 26, 2015
Messages
91
Reaction score
24
Primarily Uses
Can someone write what some letters and signs like * in formulas means? Something like a guide for newbies?
 

Kes

Regular
Regular
Joined
Aug 3, 2012
Messages
23,808
Reaction score
13,729
First Language
English
Primarily Uses
RMMZ
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
Regular
Joined
Sep 17, 2015
Messages
155
Reaction score
30
First Language
English Spanish
Primarily Uses
Does v[n] still work or do we need to spell out $game_variables.value[n]?
 

Kes

Regular
Regular
Joined
Aug 3, 2012
Messages
23,808
Reaction score
13,729
First Language
English
Primarily Uses
RMMZ
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
Restaff
Joined
Mar 7, 2014
Messages
1,259
Reaction score
1,540
First Language
Portuguese
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
Member
Joined
Oct 25, 2015
Messages
14
Reaction score
18
First Language
English
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
Regular
Joined
Sep 17, 2015
Messages
155
Reaction score
30
First Language
English Spanish
Primarily Uses
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
Member
Joined
Oct 25, 2015
Messages
14
Reaction score
18
First Language
English
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
Regular
Joined
Nov 3, 2012
Messages
120
Reaction score
69
First Language
English
Primarily Uses
RMMV
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
Global Mod
Joined
Mar 2, 2012
Messages
46,153
Reaction score
16,960
First Language
English
Primarily Uses
RMMV
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.
 

Joronjo

Regular
Regular
Joined
Sep 17, 2015
Messages
155
Reaction score
30
First Language
English Spanish
Primarily Uses

SmashBroPlusB

Villager
Member
Joined
Oct 25, 2015
Messages
14
Reaction score
18
First Language
English
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 Threads

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.

IMG_0515.jpeg
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

Forum statistics

Threads
135,049
Messages
1,253,309
Members
178,024
Latest member
itaire
Top