💾 Archived View for yujiri.xyz › game-design › damage-formulas.gmi captured on 2023-12-28 at 15:34:56. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-09-08)

-=-=-=-=-=-=-

yujiri.xyz

Game Design

Damage formulas

Guest article by terepy.

so many of our games involve combat, but even so our damage formulas suck because they don't satisfy the goals we want. here are the goals:

this might not apply in short games such as mobas and some roguelikes, where scaling is actually a serious intentional factor. but I would argue that it still makes the game less interesting by forcing players into particular roles, and you can easily emulate scaling without having arbitrary stat scaling rules, by having mechanics that offer increased risk right now for a reward later, for example, rod of ages and mejai's soulstealer in league of legends.

in most mmos, lack of stability results in 100 hours of mandatory grinding while avoiding pvp, in order to get max level and max gear before being able to pvp at all, at which point, what's the point of pvping? you already completed the game.

in singleplayer games, lack of stability results in the game being balanced on a knife's edge, if the player gets slightly ahead the game becomes a joke, if the player gets slightly behind the game becomes impossible and they're forced to die (roguelikes) or grind (other games).

ok so here are the types of scaling I've seen and where they fail.

flat increase/reduction

this is the simplest method and also seems to have the most flaws. the formula is `damage = attack - defense`

there are some ways games try to address this such as true damage or occasional very large hits to counter defense stacking, or lots of small hits to counter attack stacking, but these are bandaid solutions that generally don't even work, and at best either remove one of the optimal strategies leaving one instead of two, or they shift the optimal from "100 attack, 0 defense" to "90 attack, 10 defense".

linear percent

this one is used in minecraft, in later versions they added the armor toughness factor, which sacrifices stability for diversity. the formula is `damage = attack × (1 - defense)`

additive

this one is common in a lot of mmos, as well as league of legends, dota, and probably lots of other games, probably because it appears diverse, a balance of stats seems diverse, but when that's the only way to play it's just another type of min-maxxing. the formula is `damage = c × attack / (c + defense)` c is a constant, typically 100.

other systems:

my proposed system: exponential

the effects of every stat scales exponentially, the formula is damage = c^(attack - defense)

c is a constant larger than 1, I propose something between 1.01 and 1.1.

other issues:

another way to address this issue is to remove max hp as a stat and just have defense, but this means that you need to decrease the amount of healing received proportional to defense, which causes wierd unintuitive interactions with buffs and debuffs, and is potentially abusable by doing things like momentarily taking off gear to decrease defense in order to receive more healing.

here's the amended formulas after taking the above into account:

max hp = c^(Vt/2)

healing = c^(Pa/2)

damage = c^(Pa - Vt/2 + c2(La * Pt + Pia * Vt) / (Pt + Vt))

where:

note: if you want lethality and pierce to be able to scale, try dividing them by the attacker's power

extending

attack, defense, and hp are not the only stats that exist, we can extend this kind of exponential system to other stats.

if the game does not have levels, some other statistic like cc resistance or a weighted average of all stats can be used in place of level disparity