Give me an example of a good, simple stat and damage formula

Discussion in 'Game Mechanics Design' started by Brandon Thomason, Mar 22, 2019.

  1. Brandon Thomason

    Brandon Thomason Dragon Rearling Veteran

    Messages:
    31
    Likes Received:
    6
    First Language:
    English
    Primarily Uses:
    RMMV
    I'm creating a game that involves the following stats:

    HP - The hit points of the character
    ATK - The physical attack power of the character, monster, or boss. Determines how much physical damage is delivered. Higher ATK means more physical damage done to an entity.
    DEF - The physical defense power of the character, monster, or boss. Determines how much magical damage is warded off. Higher DEF means less physical damage done to the entity.
    MGC - The magical attack power of a character, monster, or boss. Determines how much magical damage is delivered. Higher MGC means more magical damage done to an entity.
    RST - The magical defense power of a character, monster, or boss. Determines how much magical damage is warded off. Higher RST means less magical damage done to the entity.
    SPD - The speed of the character, monster, or boss. Determines the attack order of entities. Higher speed means more attack chances.
    EVD - The evasion chance of an entity. Higher evasion means more chances of completely avoiding an attack.
    ACC - The accuracy of an entity's moves. Higher accuracy means more chances of hitting another entity.
    CRIT - A critical hit, which virtually doubles the damage done to an entity.
    OBLQ - An oblique hit, which virtually halves the damage done to an entity.

    Each character, monster, or boss has all of these stats.

    But I don't know of a decent formula except pokemon which would take these stats into effect. There are no IVs, EVs, etc.

    If the game does not support this, please tell me. If I (or my programmer) would have to design this, please tell me as well.
     
    #1
    atoms likes this.
  2. Andar

    Andar Veteran Veteran

    Messages:
    28,002
    Likes Received:
    6,327
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    that list is how the RPG-Makers of VX and later work (98% identical, just no oblique hits), only XP has different stats than what you listed.

    However what you want does not exist - because the balance of a game contains much more than only the damage formula. For example it matters when in the game a skill with a formula becomes available to the player - a good beginner damage formula will not be a good end-boss-formula.

    That said the base attack formula for the later makers is 4*user.atk - 2*target.def and this is considered good enough for most cases as a start before you balance
     
    #2
    atoms and kirbwarrior like this.
  3. Wavelength

    Wavelength Pre-Merge Boot Moderator

    Messages:
    3,909
    Likes Received:
    3,278
    Location:
    Florida, USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    Most of those stats would not factor into your damage formula, meaning that you're actually asking a lot of questions that, together, would represent the entire skeleton of a battle system. A lot of the formulas (such as Critical Hit rate) are done for you by default in RPG Maker, though you can change them with programming or a script.

    I personally like (a.atk * sp) / (b.def + n) as a damage formula. Replace sp with the Skill's relative Power level - higher numbers for more powerful skills - and n with any positive integer (usually an amount smaller than or equal to low-level enemies' DEF stats). I usually like sp around 10-80 and n around 10. For magical skills, you can replace a.atk with a.mag and b.def with b.mdf (which are your MGC and RST stats respectively). I explain in several similar threads why I feel this kind of "multiplicative" damage formula works well.

    For stuff like Critical Hits/Oblique Hits, I usually like to start with a percentage to Crit/Oblique, and modify it based on the attacker's and target's stats. For example, Oblique Hit if Math.random() < 0.15 * b.evade / a.accuracy would make it so that low-accuracy battlers would have a high chance to Oblique Hit high-evade battlers.

    With all that being said, I highly recommend to all designers to try to simplify your stat system until it's almost too simple. I personally think you have too many. Allow stats to represent big choices about the way characters play; don't make them about small choices or complex math. My game timeblazer originally had 8 stats and I simplified down to 4: ATK, DEF, AGI, and DEX (which controls Crit rate). My game How Badly originally had a lot of stats and I found I could simplify it down to 3: VIG (which directly controls Max HP and represents defensive play), PWR (which enhances the power of all your abilities and represents offensive play), and SPD (which controls how often you get to act in combat and represents utility/tactical play).
     
    #3
    Starfox likes this.
  4. Milennin

    Milennin "With a bang and a boom!" Veteran

    Messages:
    2,140
    Likes Received:
    1,188
    Location:
    Fiore
    First Language:
    English
    Primarily Uses:
    RMMV
    a.atk-b.def?

    Even the most simple damage formulas can work, as long as you balance your stats around them. It's not rocket science, unless you make it so. Almost none of those stats have anything to do with damage formulas. You only need to take this into account for regular damage formulas:
    -Is the attacker applying physical (ATK) or magical damage (MAT)?
    -Is the defender applying physical (DEF) or magical defences (MDF)?
    Anything going beyond that is going the fancy route.
     
    #4
  5. bgillisp

    bgillisp Global Moderators Global Mod

    Messages:
    11,609
    Likes Received:
    11,599
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    The way I handled it was I first assigned number values to level 1 and level 99 characters. Then I also figured out where on the curve everyone would be on average when entering an area, and used that to set my monster stats for the zone.

    As for damage formula, I did some tweaking based on the damage I wanted done, and ended up with a version of @Wavelength 's formula in the end. The only problem I noticed with that formula is for it to work well with the HP values I used and for large ATK/DEF values I had to make sure that ATK was about 2x DEF at all points of the game. But that's stuff you again will learn in testing of the game.
     
    #5
  6. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,150
    Likes Received:
    4,585
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    Good is something subjective, but here the simplest one

    Disregard all stats, and just go with ATK and HP. Defense is basically just another HP. You get rid the def and up the maximum HP and you will have the same effect.

    Magic attack and Physical attack is basically also the same. So you can just use one single attack stat. If a mage use magic attack of all of their skill and warrior use a physical attack, then there's no point of having both.

    So the damage formula can be just as simple as
    a.atk * <skill power constant>
     
    #6
    Engr. Adiktuzmiko and Wavelength like this.
  7. Oddball

    Oddball Veteran Veteran

    Messages:
    1,209
    Likes Received:
    236
    First Language:
    English
    I usually use something like a.atk*12/b.def
     
    #7
  8. kirbwarrior

    kirbwarrior Veteran Veteran

    Messages:
    602
    Likes Received:
    299
    First Language:
    English
    Primarily Uses:
    N/A
    It's perfectly usable and what I recommend for new makers
    Is incredibly simple and something I generally like. It says on the tin what your numbers mean. If you have 12 atk and are dealing 9 damage, you know the enemy has 3 defense.
     
    #8
    dreamfall887, atoms and Wavelength like this.
  9. atoms

    atoms Veteran Veteran

    Messages:
    438
    Likes Received:
    264
    Location:
    United Kingdom, England
    First Language:
    English
    Primarily Uses:
    RMMV
    I like what is almost completely default in VX Ace/MV, that is also what a few others have said here.

    Which is, a.atk * 4 - b.def * 2.

    And then I also like a.mat * 4 - b.mdf * 2

    I do use a.agi on rouges/thieves/treasure hunter type of classes. I can use that with both a.agi * 4 - b.agi * 2 and separately, a.agi * 4 - b.def * 2, I would normally have at least two different skills that have both these formula's for them.

    And a.luk can be on healing. So maybe a.luk * 4 for healing? I just make sure to balance it so it gives a good amount of HP that makes it worth using.

    And I do make basic custom formulas for some of the skills, just to add a nice variety, but I just match it all with what each actor's class can equip.

    It seems to all work fine and well for me so far...
     
    Last edited: Jun 9, 2019
    #9
    GrayCrow and Milennin like this.
  10. SolonWise

    SolonWise The Lonely Maker Veteran

    Messages:
    150
    Likes Received:
    326
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    The problem with the "default" damage formula (A.Atk*2 - B.Def) is that 1 point in Strenght has more value than 1 point in Defense, so, in games with you can choose what attribute to gain points, it is more suitable to invest in attack.

    I like the damage formula of Final Fantasy Tactics, which the character's attack is multiplied by the weapon's damage. So, let's say your character have 6 in attack, and he is using a sword with 5 attack. 6*5 = 30 damage. You can also take this number and subtract by the foe's defense, or, like in FFT, there is no defense, only HP. Please note that in this formula, you propably will have to make your characters gain a single point in attack every 3 or 4 levels, otherwise the party will be extremly overpowered if the player grind even a little bit. Also, you will have to make a different damage formula for every weapon in the game.
     
    #10
    atoms likes this.
  11. kirbwarrior

    kirbwarrior Veteran Veteran

    Messages:
    602
    Likes Received:
    299
    First Language:
    English
    Primarily Uses:
    N/A
    That's not always true. Each point of defense is 2 less damage and investing in it could just mean taking 0 damage. When you're invincible, it doesn't matter how much damage you do.

    Just mimic FFT and have Weapon Power be it's own stat. If you're not using defense, you can just replace that stat with it.
     
    #11
    atoms and Engr. Adiktuzmiko like this.
  12. SolonWise

    SolonWise The Lonely Maker Veteran

    Messages:
    150
    Likes Received:
    326
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    If the damage formula is (A.atk*2 - B.def), each defense point reduces damage in only 1, while each point in attack raises your damage output in 2. Maybe its fair, because an attack is suposed to do damage, and if the formula was only A.atk - B.def, a lot of attacks would cause zero damage.

    Weapon power in its own stat is indeed a good idea.
     
    #12
    atoms and kirbwarrior like this.
  13. atoms

    atoms Veteran Veteran

    Messages:
    438
    Likes Received:
    264
    Location:
    United Kingdom, England
    First Language:
    English
    Primarily Uses:
    RMMV
    Edit: I am liking the idea mentioned a few times above about Weapon Power stats, I may try and test that out in future.

    But you really can balance the default formulas, when still gaining lots of new weapons that increase Attack Power (a.atk), by increasing defence power by a bit more on each of the enemies (b.def). If you feel it's still too low, you could try to increase Defense by a little more. I.e. Instead of + b.def * 2, you can make that + b.def * 2.8. Just playtest further untill it's a good formula for you with your weapons increasing stats.



    My response for now:
    I edited my first post, since I put the wrong formula in it by mistake, whoops!

    I also now want to add what I'm now doing. It's a bit odd, but I like it at the moment. Anyway for now, in my current project, I now have a mixture of stats on some classes/actors but otherwise default formulas.

    I.e.
    a.agi * 2 + a.atk * 2 - b.def - b.agi. For example.

    Or

    a.luk * 3 + a.atk - b.def * 3 - b.luk. For a odder example.

    I have to make every formula clear in the description box though, and since you don't have much room, I expand the window size by default and then just paste that formula so the player knows the damage done.

    This is just one example.

    To make my enemies slightly stronger, when I want them to be, I just add an extra +1 number onto there formulas.

    For example.

    a.atk * 5 - b.def * 2. instead of a.atk * 4 - b.def * 2. (This total, if stats are all 10, would be 30 damage output.)

    Or if it's very little, then a.atk * 5 - b.def * 2.5. (This total, if stats are all 10, would be 25 damage output.)

    Decimal numbers seem to work as well, I think it has for me anyway.


    I also am now liking multiple hits a lot more than single hits, but mostly only adding them by one. So normal skills hit twice, but skills that usually hit three times would hit four too. Everything increases by 1.

    I just like the idea of everything having slightly higher powered, and higher emphasis or evasion and critical hit. But I've change the critical multiple hits from the default * 3 to * 1.7 at the moment. I may change that to * 1.8 or *1.9 as I'm playtesting with things.

    All I've done is one map with different enemy setups so far, only to test the mechanics formulas out and make sure they work ok.

    It does work nearly ok with the default setup, but I do have to adjust health bars and things like that, at the moment while I'm still testing things out anyway.

    You could use the same formulas I'm chosen here, without multi-hits, and it should work nearly 100% fine with the default systems though. That's because it's still all basic and default really, just a little bit of a twist to things.
     
    Last edited: May 12, 2019
    #13
  14. GLM

    GLM ブラッドシェド © 1989 POLOCOM Member

    Messages:
    28
    Likes Received:
    11
    First Language:
    English
    Primarily Uses:
    RMMV
    I disagree. There are instances in some games where DEF can entirely mitigate some damage and not others. That's not as simple as saying it's just extra HP.

    In my own game firearms ignore most armour (but not natural defense, aka VIT), while melee weapons do not. It's one of the core mechanics and simply adding HP wouldn't get you the same thing at all.
     
    #14
  15. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,150
    Likes Received:
    4,585
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    Beyond that point, it's not "simple" anymore. My formula is the simplest one that works at the fundamental level. Your formula is good for a more complex one or more innovation. But innovation without the base is going nowhere. I'm not saying specifically your design is going nowhere, but devs need to know the base of stat interaction. Most of the time, the base stats are ATK and HP. Based on that, the modifier can get more complex.

    Before I put a defense/armor mechanic in my game, that was the question I had to thought a lot. Why I need a def? Why do I have to decide the defense stat of an enemy? I have two enemies, why I need to bother to even put a number to the defense stat on those two? Can I just ignore it and bump their HP instead? My game isn't complex as "pick the right equipment/whatever to counter specific enemy because they can't get hurt by a specific setup". Besides, for some reasons, I didn't have a plan (and still dont) to have a full damage cut that cuts 100% of damage taken. So I felt I always had no reason to have a defense stat that eventually blocks all attack.

    I tried to completely kick defense stat in my damage formula. Guess what? everything went simpler, easier to understand, easier to dev, and not really take away the game experience. The only thing that matter was some of the skill is overlapping with each other. By that time, I realized I need more interaction to make some of the skills aren't like a carbon copy of each other. Then I wanted a defense stat, but not by the way how people handle it. Flat reduction? no. I don't like the way it works. Armor scaling? also no, it just makes things complicated and hard to control as a dev. I'd like to link my another reply to a specific thread explaining how I did my armor formula, but I lost where I posted it.

    Besides, why don't you answer the actual question served in this thread?
     
    Last edited: Jun 7, 2019
    #15
  16. SolonWise

    SolonWise The Lonely Maker Veteran

    Messages:
    150
    Likes Received:
    326
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    I came up with a simple damage formula I intend to use from now on, in most or all my projects. The attributes I use are Attack, Defense, M.Attack, M.Defense, Agility and Guts. (I don't like "Luck"). So, the damage formula is either (a.atk + a.agi - b.def) or (a.atk + a.luk - b.def). That way, agility and guts gains importance as attributes. For attacks with sword, gloves, axes and so on, the secondary attribute is guts, and for attacks with bows, knives and even rods, the secondary attribute is agility. Small numbers, simple like that. I'm doing some tests and it fits perfectly my kind of projects.

    For skills, something simple as (a.atk + a.atk + a.agi - b.def) will make the skill damage output do always more damage than the normal attack. In this case, the character's attack value will be the difference between the normal attack and the skill. Yeah, I've seen some projects where the normal attack does more damage than a high consuming MP skill. You can even do a skill where the guts of the character is more important than attack. (a.atk + a.luk + a.luk - b.def). Same case. This skill's damage output will be the character's normal attack PLUS his guts value. Please note it can change if the skill have some elemental propreties.
     
    #16
  17. M.I.A.

    M.I.A. Goofball Extraordinaire Veteran

    Messages:
    749
    Likes Received:
    531
    Location:
    Seattle
    First Language:
    English
    Ah, simple damage formulas.. my specialty!!

    Since I use small and predictable numbers, I will tell you all my proprietary and flawless Damage Formula for my main project. Are you ready for this? Here it is:

    (A.Atk)

    Ta Da!!
    Whatever an Actor or Enemy has for ATK is pretty much the damage they will deal. I don't use a defense stat. Instead, I mitigate incoming damage by Percentile defenses against Damage Types. It takes a little longer, but it's super easy to manage, play test, and figure out how much Damage will be dealt. :) Hope this helps.

    -MIA
     
    Last edited: Jun 15, 2019
    #17
    kirbwarrior and atoms like this.
  18. Kupotepo

    Kupotepo Fantasy realist Veteran

    Messages:
    733
    Likes Received:
    722
    Location:
    Oblivious
    First Language:
    Thai
    Primarily Uses:
    RMMV
    #18
    atoms likes this.
  19. GLM

    GLM ブラッドシェド © 1989 POLOCOM Member

    Messages:
    28
    Likes Received:
    11
    First Language:
    English
    Primarily Uses:
    RMMV
    I was just making a comment on that statement. No offense meant.

    If I were to use the standard MV combat system, I would probably have your damage equal your a.atk, do the "no DEF" thing and use a percentage-based damage reduction using resistances and make like "slice, thrust and blunt" elements.

    I was just trying to make a point because I guess I misinterpreted your post.
     
    #19
  20. Calvynne

    Calvynne Veteran Veteran

    Messages:
    96
    Likes Received:
    57
    First Language:
    English
    I honestly use some extremely complex systems for getting the numbers I want, but in essence they can be boiled down to a few rather simple formulas.

    Attack = Weapon Attack Power (I set this as another variable, or use a formula to pull it out of the users a.atk value)
    Multiplier = (a.level*a.atk)/128 + 2 (or +/- whatever value you want, the M value is how hard you want to push things around)
    Defense = b.def

    (Attack - Defense) * Multiplier = Damage

    With this, I then can do things like having Agility, Accuracy, Evasion, Luck all interact with the formula in different ways, for different skills. Have Accuracy impact the Multiplier value before the final damage calculation is done for example.
    This formula starts to scale up pretty quickly, and if you push the Multiplier up to x4 or x6, you'll quickly get into the 10K-20K damage range even with a relatively low weapon attack power (100-150).

    Here's a damage formula that just uses the formula box for the calculation and nothing else:

    (a.atk/2 + (a.atk/2*ChargeValue)) + Math.random(a.atk*(a.luk/40)) - (b.def/2 + Math.random(b.def/2))

    The charge value is the character's TP value, maximum 3, minimum 0.
    I use this formula for smaller number games. At the 255 stat range it gives you around 2K damage before defenses.
     
    #20

Share This Page