RMMV Damage Formula - ideas and help

Discussion in 'RPG Maker MV' started by Shaz, Oct 25, 2015.

  1. Shaz

    Shaz Veteran Veteran

    Messages:
    37,590
    Likes Received:
    11,309
    Location:
    Australia
    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.
     
    #1
    Bonkers, Volis and JosephSeraph like this.
  2. JosephSeraph

    JosephSeraph White Mage Restaff

    Messages:
    810
    Likes Received:
    659
    Location:
    Santos, Brasil
    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.
     
    #2
  3. Shaz

    Shaz Veteran Veteran

    Messages:
    37,590
    Likes Received:
    11,309
    Location:
    Australia
    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 :)
     
    #3
    JosephSeraph likes this.
  4. JosephSeraph

    JosephSeraph White Mage Restaff

    Messages:
    810
    Likes Received:
    659
    Location:
    Santos, Brasil
    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.
     
    #4
  5. Drago9

    Drago9 Corsair Veteran

    Messages:
    60
    Likes Received:
    41
    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.
     
    #5
    SirCumferance likes this.
  6. JosephSeraph

    JosephSeraph White Mage Restaff

    Messages:
    810
    Likes Received:
    659
    Location:
    Santos, Brasil
    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.
     
    #6
  7. Drago9

    Drago9 Corsair Veteran

    Messages:
    60
    Likes Received:
    41
    First Language:
    Thai
    Primarily Uses:
    RMMV
    Would a.atk - b.def * 0.33 be balanced? My actors start at like 30 HP at level 1.
     
    #7
  8. Milennin

    Milennin "With a bang and a boom!" Veteran

    Messages:
    2,184
    Likes Received:
    1,243
    Location:
    Fiore
    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.
     

    That's what I use for my basic attack, and I like it.
     
    Last edited by a moderator: Oct 25, 2015
    #8
  9. OneManArmy

    OneManArmy Veteran Veteran

    Messages:
    91
    Likes Received:
    24
    Can someone write what some letters and signs like * in formulas means? Something like a guide for newbies?
     
    #9
  10. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,613
    Likes Received:
    10,515
    First Language:
    English
    Primarily Uses:
    RMVXA
    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: Oct 25, 2015
    #10
    Sauteed_Onion and PokarFace like this.
  11. Joronjo

    Joronjo Veteran Veteran

    Messages:
    155
    Likes Received:
    29
    First Language:
    English Spanish
    Does v[n] still work or do we need to spell out $game_variables.value[n]?
     
    #11
  12. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,613
    Likes Received:
    10,515
    First Language:
    English
    Primarily Uses:
    RMVXA
    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.
     
    #12
  13. JosephSeraph

    JosephSeraph White Mage Restaff

    Messages:
    810
    Likes Received:
    659
    Location:
    Santos, Brasil
    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.
     
    #13
  14. SmashBroPlusB

    SmashBroPlusB Villager Member

    Messages:
    14
    Likes Received:
    14
    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.
     
    #14
  15. Joronjo

    Joronjo Veteran Veteran

    Messages:
    155
    Likes Received:
    29
    First Language:
    English Spanish
    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
     
    #15
  16. SmashBroPlusB

    SmashBroPlusB Villager Member

    Messages:
    14
    Likes Received:
    14
    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).
     
    #16
  17. Shake0615

    Shake0615 Reanimator Veteran

    Messages:
    118
    Likes Received:
    63
    Location:
    USA
    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: Oct 26, 2015
    #17
  18. Shaz

    Shaz Veteran Veteran

    Messages:
    37,590
    Likes Received:
    11,309
    Location:
    Australia
    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.
     
    #18
  19. Joronjo

    Joronjo Veteran Veteran

    Messages:
    155
    Likes Received:
    29
    First Language:
    English Spanish
    Sorry
     
    #19
  20. SmashBroPlusB

    SmashBroPlusB Villager Member

    Messages:
    14
    Likes Received:
    14
    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?
     
    #20

Share This Page