How do video games calculate damage? || Mechanics Dismantled 6

Поділитися
Вставка
  • Опубліковано 3 лис 2024

КОМЕНТАРІ • 65

  • @thomasfplm
    @thomasfplm 2 роки тому +21

    Some games that use Damage=Attack-Defence have a minimum damage value.
    Age of Empires, as an example has a minimum damage of 1, if one player is using very low damage units and your unit already starts with a high armour, sometimes it is unnecessary to increase it's armour more.

    • @dmas7749
      @dmas7749 Рік тому +2

      was literally typing that out

  • @gabrielserra
    @gabrielserra 3 роки тому +21

    this is the most useful video on youtube about this subject, thank you!

    • @Carpengizmat
      @Carpengizmat  3 роки тому +1

      You're welcome! I'm glad to see they're useful to some people :)

  • @Carl_Maxwell
    @Carl_Maxwell 8 місяців тому +2

    Good video! Thanks for making this. I've been thinking about Damage Formulas a lot lately (I just played Dark Souls 1 for the first time a few months ago so I've been getting into it from that angle).
    I definitely think that your point around 2:00 that the meaning of damage fundamentally comes from knowing how many hits it takes to take down a given enemy. Really at the end of the day the question is: does it take 3 hits or 10 hits to deal with that enemy? How many seconds does it take to defeat them? That's really the effect that a damage formula is having. It's the
    Some common elements used in damage formulas:
    - *_Atk minus Def_* -- A simple linear relationship between Atk & Def
    - *_Atk divided by Def_* -- a ratio of Atk to Def. Useful when you want rules like "if Atk is less then Def then such-and-such, and if Atk is great than Def than so-and-so."
    - *_Random Variation_* -- Maybe getting less common now, but the original damage formula was just 1d6. No math at all, it was always just a flat dice roll.
    - *_Clamping Values_* -- it's really useful to just clamp values to certain ranges. For example, making it so that you can't deal negative damage, or making it so you can't deal less than 1 damage with an attack. I quite like the Dark Souls 1 floor where minimum damage is 10% of Atk.
    - *_Damage Type_* -- video games commonly break up damage types into physical, magical, uhh, etc. Tabletop RPGs generally tried to break it down into an exhaustive list of all possible sorts of harmful things that could potentially happen in the worldbuilding (such as burning, acid, psychic, etc). This came as a consequence of the thought process those games came out of (trying to simulate / understand the fantasy world). Whereas games like League of Legends just focus directly on combat relevant stats like Magic Resist. -- Generally an attack can deal more than one type of damage, such as 10 physical damage & 2 lightning damage, and so you'd calculate each damage separately and then add them together at the end.
    - *_Character Stats_* -- A lot of RPGs add a character's Strength to their damage, etc. Characters might have all sorts of things that influence damage, such as class features, feats, items, skills, boons, status effects, etc...
    - *_Character Level_* -- In OD&D I believe damage was actually multiplied by character level (or maybe you just got one extra attack per level?). Nowadays I think its generally either a lot less extreme than that or its indirect (through other character stats).
    - *_Critical Hits_*
    - *_Hit Locations_* -- In GURPS if you hit a character in the head you deal 4x damage, but first you lose 2 damage (because you have to get through the skull). In other games I think they just make a hit to the head a critical hit.
    - *_Backstabbing_* -- A lot of games just let you instantly kill a target if you can get behind them.
    - *_Weapons_* -- In D&D weapons determine the sort of randomness in the damage formula, and in Dark Souls 1 they determine the Motion Value of the attack (which is similar).
    - *_Damage Mitigation_* -- A lot of games feature a variety of ways to reduce or prevent damage. In Dark Souls you can block, parry, dodge, and evade enemy attacks. In Gloomhaven when you take damage you can either use items such as shields or armor to reduce the damage or else discard an Ability Card to completely negate the damage. In the World of Darkness ttrpg you can roll dice to "soak" the damage, basically a percentage reduction in how much damage you take.
    Another thing is what I'm calling "Attack to Damage Percent." For example in Dark Souls 1 Dmg ranges from 10% of Atk up to 90% of Atk.
    There are lots of things to think about when it comes to damage formulas. Some basic edge cases:
    - What if Atk is low but Def is high?
    - What if Def is high but Atk is low?
    - What if a player had a choice between a build which attacks really fast but with low Atk versus one with just really high Atk. Is one of these builds going to be strictly better with your Damage Formula?
    There are lots of questions to consider when designing a damage formula.
    - Should Dmg ever exceed Atk? Is there a reason why Dark Souls 1 chose to limit Atk to Dmg to the 10% to 90% range? What would the consequences be if players could deal 200% Atk to Dmg?
    - In each situation, what happens if you get +1 Atk or +1 Def? Does it feel good? Should it feel good? Does the amount of benefit for that +1 make sense in that situation for your game?
    - Will players be able to develop a mental model of damage in your game?
    - Should weather be a factor in your damage formula? For example, if its raining, maybe lightning attacks deal more damage, etc.
    - Should you just have one damage formula in your game? It might make sense to have a more complex Dark Souls-esque damage formula for normal physical damage, but then use a simplified formula for elemental or magical damage, depending on the game. Similarly, would it make sense to have the enemies use a different damage formula when they hit the player versus the one that is used when the player hits enemies? In general I think that would tend to blur or confuse the player's mental model, so it doesn't seem like a strong option in a general sense.
    - Are you designing for PvP or PvE?
    - How is damage communicated to the player? Typically in games like Dark Souls the player gets to see the enemy health bar go down with an animation (so they visually see a motion of what percentage of the enemy health was lost) and they also get to see a damage number that pops up to show them exactly how much damage they dealt. In other games you see neither damage number nor enemy health bars (for example Vampire Survivors doesn't show you enemy health bars). Some games won't show you health bars but will communicate enemy health by how the enemy looks or how they're animated.

  • @leeuwengames315
    @leeuwengames315 Рік тому +1

    shame this is the last mechanics dismantled video i could find ... would have liked to watch more because they're really good.

  • @maxamillion3437
    @maxamillion3437 6 місяців тому +1

    This is great, makes me feel more confident in the formula I'm using for my game thanks.

  • @Posby95
    @Posby95 Рік тому +2

    I want to add something. The formula Dmg = Atk - Def has the problem of resulting in 0 damage if Atk is equal to or smaller than Def, but this can be avoided by inserting a hard cap. For example, the formula could be Dmg = max(1, Atk-Def). This would ensure that Dmg is at least 1 so the target is not invincible. It's what Fire Emblem does in games 2, 4 and 15.

  • @IAmSuperWeirdGal
    @IAmSuperWeirdGal 2 роки тому +4

    I've been stuck on this for a while. Thanks for the help! 🙂

    • @Carpengizmat
      @Carpengizmat  2 роки тому +2

      No worries, glad it was helpful :)

  • @mags5297
    @mags5297 3 роки тому +4

    bro, your videos are literally amazing, how do you not have more subs?

    • @Carpengizmat
      @Carpengizmat  3 роки тому

      Possibly cause it's a very niche topic but it's one I really enjoy doing so I don't mind too much. I'm trying to establish some kind of community of other people who enjoy talking about this kind of thing, so if you want to come along you'd be more than welcome!

    • @dundun246
      @dundun246 2 роки тому

      @@Carpengizmat you were the first video suggested to me and I'm really glad i found your channel. I hope youtube algorism will make your channel grow. Wish you would have gone a bit more in depth but you probably wanted to keep your vids short. Maybe you already explained it in your vid but what is the benefit of the "1-x/(x+Armor)" formula?

  • @michaelgum97
    @michaelgum97 2 роки тому +3

    A minor expansion of the first example, outside of critical hits, that's how every Fire Emblem game calculats damage.

  • @Cjoudan
    @Cjoudan 10 місяців тому +1

    I want to use that secondary formula, with some randomized damage mods, but then also add in an accuracy value so that the random damage can be slightly higher (minimum damage) as you add accuracy. not entirely sure how taht formula would look. But this video got me on the right track.

  • @Maumoleseullevrailunique
    @Maumoleseullevrailunique 3 роки тому +4

    well man, this kind of stuff is my job, and your video was already super helpful. there's a lot more reasons why atk - def is pretty bad (especially when getting into modifiers), but yeah you got it right. I'dd add that some RPG mobile games use a super complicated damage mitigation formula that ranges from 0 to 85% damage mitigated, and the formula is often kept secret (like Raid Shadow Legends). Great video!

    • @Posby95
      @Posby95 2 роки тому

      What reasons? I'd like to know.

    • @Maumoleseullevrailunique
      @Maumoleseullevrailunique 2 роки тому

      @@Posby95 Hey sorry for the late answer, but basically, Atk - Def scales pretty badly mainly because if both values grow up over time in the same fashion, their difference becomes smaller relatively. For example, 4 atk vs 2 def when you have 10 hp means you lose 2 hp, which is 1/5 of your life. if all the stats go up by 10, it would be 14 atk vs 12 def and 20 hp, meaning you still lose 2 hp which is 1/10 now. And boosting defence , if possible, is extremely good as you get far less damage from it, and can even get 0 damage. Now I'm not saying you should never do it, it actually works super well for games with very little growth in stats. I have a board game that is a bit like that, where damage = atk - def, but the damage rarely goes above 6, and the defense is nearly always 2, very rarely 3, even over the entire game. Also it's very straightforward for the player

    • @Posby95
      @Posby95 2 роки тому

      @@Maumoleseullevrailunique One possible solution for the diminishing health depleted is to simply make attack grow faster than defense and/or health. Fire Emblem does this and it works most of the time. Not only do attack stats grow faster, but both player and enemies get progressively stronger weapons to pierce through the opponent's bulk.

    • @Maumoleseullevrailunique
      @Maumoleseullevrailunique 2 роки тому

      @@Posby95 yeah, if you can thematically have it make sense, it can work. Usually then games would call it "armor" instead of defense. and adding piercing allows you to do some very neat systems and balancing.

    • @furyberserk
      @furyberserk 2 роки тому

      Couldn't you just do
      Total dmg = 30%=(atk-def) + 40%=(atk/def)+30%=(super complex modifier calc)?
      This way, scale matters, low to huge numbers matter and mods matter, but not necessarily those exact percentages along with a max and min dmg allowance?
      Ps
      I'm trying to figure out a good example myself.

  • @Numba-3
    @Numba-3 9 місяців тому

    Okay, I'll take the "exponential growth" one since I'm making a game, a roguelike, with a simple statistics system. Maybe I'll put some critical damage component, STAB or something like that, but for now that one will serve me well.
    Thanks for the help, comrade.

  • @keeganmackey250
    @keeganmackey250 8 місяців тому

    That's an interesting exponential formula.. don't think I've ever seen that one before.

  • @Posby95
    @Posby95 2 роки тому +3

    Interesting video. When applied to Fire Emblem (not Heroes, the mainline games), the formulas fare as follows. For context, HP varies between 15 and 60, and defense can't get higher than 30 in most games.
    * Atk - Def is the standard. It does give way to invincibility, but it takes a lot of effort to get there. You can only get 1 defense point per levelup, and you usually have less than a 50% chance to get it (unless you're an armor knight - being bulky is the whole point). The 0 dmg problem can be avoided by giving enemies more than 30 atk, which is easy because lategame enemies usually have 20 strength and weapons with 15 might.
    * Atk / Def prevents invincibility, but damage values get really low really fast. Getting 1 defense point can suddenly reduce damage by 50% or 33%, instead of just 1 point like in the Atk - Def formula. Attack values in Fire Emblem vary between 8 and 30 for the most part. Imagine a playable unit with 10 defense, something common in midgame. An enemy with 30 atk will only do 3 damage, while with the standard formula the damage will be 20. It would change the game completely - everyone would hit like a wet noodle. To make this work you would need to nerf defense bases and growths like crazy. Those early defense levelups make you more of a god than the late ones in the standard formula, ironically enough.
    * Atk / (k^(Def/Atk)) depends on how big k is. Comparing this formula to Atk - Def: When it's 2, everyone takes more damage regardless of their defense. When it's 3, damage values stay about the same for low defense, but then damage is higher for high defense. When k is 4, damage is a little bit lower for low defense (and may be equivalent when rounding), but higher for high defense. The trend seems to be: the higher k is, the less damage you take. I think this formula can work in Fire Emblem, but it makes high-defense classes like armor knights worse at their intended purpose. It can alleviate the juggernauting problem that plagues enemy phase games like FE7-9 and Awakening, though.
    I wish you would have talked about Atk^2 / Def. I did the math myself and it turns out, it has the opposite problem of Atk / Def. Dmg values get so high that everyone would be one-shot by midgame and beyond.

    • @Carpengizmat
      @Carpengizmat  2 роки тому

      Yup, you summed it up very well!

    • @dmas7749
      @dmas7749 Рік тому +1

      my fellow internet person, i would like to introduce you to my personal favorite of the damage formulae
      DMG = atk * atk / (atk + def)
      i can't tell you where i found it but i thinks its smoother than atk/def or atk/(2^(def/atk))
      atk/def style formulas tend to have move-based power multipliers, such as the pokemon example. if fire emblem did that, weapon mt would likely fill the same role, and be (atk*pow)/def, rather than (atk+pow)/def
      there's nothing wrong with any of these, but i tend not to like formulas that involve level, or are exponentially increasing, such as the last one here, as it tends to have stats overpower strategy

    • @Posby95
      @Posby95 Рік тому +1

      @@dmas7749 So the formula is
      Atk²
      Dmg = ------------------ ?
      Atk + Def

    • @dmas7749
      @dmas7749 Рік тому +1

      @@Posby95 yes

  • @PBStriker101
    @PBStriker101 2 роки тому

    I have been searching for this information for a DECADE NOW

  • @naejimba
    @naejimba 2 роки тому +3

    First person I've seen go into this... I also LOVE the charts. My question is: is there a tool to plot this out, where you can alter the curve to determine what the formula is? Essentially, where you are able to first mess with the end result to get the curve you want and then figure out how to get there? I'm wondering how this is done for something complex like an MMORPG. It isn't just the value of stats and how they scale with variables like levels, but also there are things like talents (which tend to use increases by percentages) and especially the effects of gear.
    I just wonder since in MMORPGs we see different classes scale at different rates which causes long term balance issues that require constant patches... if there was some way to first ensure that various classes would scale the same with levels and gear, then it would be much easier to then balance them against each other.

    • @Carpengizmat
      @Carpengizmat  2 роки тому +2

      That's a very interesting question. I've never seen the kind of tool you're describing, since it's a very niche thing to need! I can't imagine something like that would have been made specifically for game devs, since at this level it's really all maths.
      Mathematically speaking, it's possible to determine how fast a given formula will increase. For example, exponential formulae will always scale faster than quadratics/ polynomials, which will always scale faster than linears, etc etc.
      There are plenty of graphing tools which have you plug in the function and they produce a graph (Desmos is one, and I think microsoft excel/ google sheets has a function for it). I think it might just be a matter of trial and error, sticking various formulas in until you get the one you want.

    • @naejimba
      @naejimba 2 роки тому +2

      @@Carpengizmat , nice, this is a big help (like I would be making an MMORPG anytime soon but I'm a huge dork lol). I suppose you could use that to get the type of line you want to see for the specs, and work backwards (assuming gear is equal given a certain item level) to alter the talents (which tend to have exponential modifiers) and then back further to balance the damage of individual spells. That way you could have tightly tuned balance even across the gearing process.
      I just don't know why they wouldn't have something like this, given that these kind of games are an absolute NIGHTMARE to try to balance; having specs scale differently requires balance patches every tier, which messes up pvp balance so something else would have to change, and on and on in a cascade of consequences and wasted dev time. Thanks for the response!

    • @pomelo9518
      @pomelo9518 2 роки тому +2

      desmos?

  • @nirmeout
    @nirmeout 3 роки тому +9

    Nice explanation. I love building out heavy defense characters in games.... cuz tank is fun :3.
    I wonder if the formulas for agility /dexterity are any different (seems like it has a similar relationship that atk/def have with each other except they constitute a hit /miss instead of calculating the damage itself).

    • @Carpengizmat
      @Carpengizmat  3 роки тому +2

      Well, In a lot of video games hitting is often based on actual aim (in first person shooters and so on), and in a couple of the games I talked about (such as Othercide, Xcom and I think FEH), hitting is based on a flat % chance. I'm sure there are formulae for dodging attacks/ factors that affect dodge chance but they tend to be less complicated from the admittedly small selection of games I've seen.

    • @furyberserk
      @furyberserk 2 роки тому

      In dsouls, dex weapons do more dmg with higher dex than str. In dragon's crown, ark dmg will be such as 25 - 56 or 55 - 57 and higher dex means likelihood of higher end dmg, but for the closer numbers, it's more str based. Otherwise dex is generally accuracy. Though sometimes agility, agility should be mov spd and atk spd, while accuracy goes for crit.
      Overall, each game has their own explanation.

    • @dmas7749
      @dmas7749 Рік тому

      i'm the opposite, glass cannon all the way
      you'd be correct, most games use HIT - EVA, and that's your chance to land a hit. so, 95 - 15 = 80, but it has a similar problem to ATK - DEF, where if you can raise your EVA high enough you're effectively invulnerable

  • @SingingSpock
    @SingingSpock 2 роки тому +3

    “The most complex they’ll ever get is a few dice rolls plus a modifier.”
    **Laughs in Shadowrun 5e plastic explosives**
    “An explosive’s Damage Value is calculated as its Rating (modified by the Demolitions Test, if you made one) times the square root of the number of kilograms used (rounded down). The Blast value for a circular explosion is -2 per meter, while the Blast value for a directional explosion (up to 60 degrees in a specific direction) is -1 per meter. When explosives are attached directly to a target, the target’s armor is halved; otherwise the explosive has an AP value of -2.”
    That’s right. The square fucking root

    • @Carpengizmat
      @Carpengizmat  2 роки тому +8

      I... never knew about that... I think it's fair to say that's an exception to the rule xD

    • @pomelo9518
      @pomelo9518 2 роки тому +1

      i would just use an inverse-square relationship lol

    • @SingingSpock
      @SingingSpock 2 роки тому +1

      @@Carpengizmat definitely the exception to the rule, but Shadowrun as a whole is a very crunchy system.

  • @DJaycerOfficial
    @DJaycerOfficial Рік тому +1

    I was really struggling with just coming up with a formula that didn’t deal 1 or 0 damage or dealt 5000 when strength is 2.
    I have two stats being calculated to make the totaldmg variable, strength and rawdmg, and when the player starts with 0 strength, it’s hard to make anything of the attacks.
    The totaldmg variable is then reduced by the defense formula. (Totaldmg *totaldmg / (totaldmg + enemydf)) this video helped me out a lot.

    • @imadust
      @imadust 10 місяців тому

      You can always just change the formula based on level range, stat range etc with a conditional statement.

    • @DJaycerOfficial
      @DJaycerOfficial 8 місяців тому

      @@imadust Currently in my game I use
      dmg = attack - basedef*0.05 + weaponattack - armordef*0.025
      which just means that basedef is always worth 5% of its value and armordef is always worth 2.5% of its value. Since this is subtractive I throw it into dmg*dmg/(dmg+df) where df is just basedef+armordef.
      This formula basically does nothing when I could just do dmg = attack + weaponattack and plug it into the second formula. There are a bunch of other factors but I won't go through them here.

  • @Script4506
    @Script4506 2 роки тому

    you definetly deserve more subs

  • @Ratstail91
    @Ratstail91 Рік тому +1

    D = ((a + 4) / (d + 4)) * S * T * C * r
    The last three and a half years of my life have been dictated by that equation.

  • @AJarOfYams
    @AJarOfYams 2 роки тому

    One way to stop the defence stats from becoming overpowered in to set a limit to the damage reduced, for example 75% or 95% maximum damage reduction

    • @Numba-3
      @Numba-3 9 місяців тому

      In the rogue clone that I have on my phone the same problem happens, but it is solved by making it so that if the defense is greater than the damage, then the resulting damage is 1.

  • @anthonygill718
    @anthonygill718 2 роки тому

    Great video - subscribed!

  • @top1hit
    @top1hit Рік тому +1

    it is very useful

  • @LunarBulletDev
    @LunarBulletDev 2 роки тому

    Whaaaaat, this is an amazing video, why so little views ?

  • @JustGabe
    @JustGabe 3 роки тому +2

    Super helpful video! The only thing is... how the hell does someone comes up with such formulas!?!? Should I hire some kind of mathematician for this?

    • @Carpengizmat
      @Carpengizmat  3 роки тому +3

      You probably wouldn't need a mathematician! In a professional sense, a game dev team would likely design a formula on a case-by-case basis. For a PvP game (pokemon, for example), you don't want high defense to totally nullify all damage inflicted on a player (because that's very exploitable and can end up being no fun), but for some kind of PvE or singleplayer game (such as Othercide, which I mentioned) you wouldn't need to worry about that, because pre-programmed enemies aren't going to find unfun ways of exploiting the game's mechanics.
      If you were making a game yourself, I'd suggest coming up with a few damage formulas and experimenting with which one you like best. You may find that some result in too much damage, and some result in not enough. It's a bit of a balancing act, but experimentation is the key!

    • @furyberserk
      @furyberserk 2 роки тому

      Easy answer.
      No dmg is ever 0. Least dmg possible is 1/1000 character's hp. Pvp may be a 10th. And no multiplier except power over weaknesses(water vs fire) as the core dmg necessity in games like pokemon do double. Lvl bonuses, dmg buffs, etc are all 1.## added to base dmg. Dmg stacks start low and increase to strongest of the non weakness buffs.
      Tl;dr
      Weakness is double dmg. All other buffs are % plus base dmg.
      Personally, the real question, is what is the purpose of blocking if it wastes a turn and should you add a % of atk power to def as a block stat?

    • @dmas7749
      @dmas7749 Рік тому

      @@furyberserk i'm not sure what you said, but for the last one, the only turn-based RPG i've seen blocking useful is in the Grandia games, and not because of any kind of formula change, it still halves damage. what changes is that you can see what move enemies are about to use, and WHO they're going to use it on. guarding also takes less time than attacking or magic.
      and i wanna know what kind of scaling you're using if 1/1000th of an HP is considerable instead of, you know, 1.

    • @furyberserk
      @furyberserk Рік тому

      @@dmas7749
      The least amount of dmg someone should take shouldn't be 0 because it makes def more important than atk, but 1 is just as meaningless. Personally, it being 1000th respectfully means it will take 1k hits to defeat. It's somewhat meaningless too, but it doesn't show that a boss is impervious, just that the target is too strong. In many factors, it would still be 1dmg if the target has less than 1k of hp.
      If a super boss has 8mil hp, the least you can do is 8k. It means you are strong, but ineffective.

  • @bomfirit75
    @bomfirit75 Рік тому +1

    So, the correct formula is dmg = atk / ^2(def/atk)? Because sometimes you write atk/def and sometimes def/atk. Which one is correct? :-)

    • @dmas7749
      @dmas7749 Рік тому

      the answer is, none is correct. atk/def is simpler, while the more complicated one divides damage by 2 for every multiple of def, giving a smoother curve. as long as you test appropriately it shouldn't be an issue, use what you want

  • @hyreonk
    @hyreonk 2 роки тому

    And then of course you have Minecraft's damage formula: Atk * (1 - 0.04 * Defense).
    Yep. Attack reduces attack. It makes sense in action (defense caps at 20), but it's weird, right?
    It's probably not a model model, since it's unsatisfying to tank builders. And exacerbates the defense creep problem. And means you have a hard progression cap... probably don't do this.

    • @dmas7749
      @dmas7749 Рік тому

      i personally don't love those defense formulas since, like with ATK - DEF, each point will be more useful than the last, but unlike those formulas, ATK will usually scale up with later enemies to prevent from happening, whereas there, 2 DEF only provides 8% protection, but getting from 18 to 20 is 72% to 80%, which is a MASSIVE 28% reduction

  • @manzell
    @manzell 6 місяців тому +1

    This formula doesn't work on it's face. If Attack is 10 vs. Defense of 5, then your damage = 10 / 4 = 2.5. Your chart indicates the answer should be 2.5. If you increase attack to 20, your damage goes DOWN to 1.25. If you keep Attack at 10 and increase Defense to 20, damages goes UP from 5 to 7.

    • @Carpengizmat
      @Carpengizmat  6 місяців тому +1

      I'll be honest I don't even know what I was cooking 3 years ago lol

  • @karolinesantos5339
    @karolinesantos5339 3 роки тому

    amei o video thanks.

  • @nxjan
    @nxjan Рік тому

    are u from MATFYZ?

  • @dmas7749
    @dmas7749 Рік тому

    1:28 uses level, cringe and bad formula
    "notable games that use this formula is FE Heroes"
    ah yes Heroes and not, idk...Fire Emblem ONE
    anyway here's a cool formula i decided on not too long ago
    DMG= atk * atk / (atk + def)
    its very similar to the other formula, however DEF has a higher input before reaching ATK, and
    20 ATK / 0 DEF = 20 DMG
    20 ATK / 20 DEF = 10 DMG
    20 ATK / 100 DEF = 3 DMG
    with the formula in the video, the first two numbers are the same, but the third registers a value of .625
    i've never been a fan of random variance in my damage formulas