Games' damage calculation

We Are The Witches

True & Honest Fan
kiwifarms.net
Joined
Feb 23, 2019
You're trying to create a game and you need to implement the combat damage system, i.e: the calculations that need to exist when a character inflicts damage to another, based on "attack", "defense", "health", and other metrics.
Which one do you use and why?

There is discussion about this elsewhere, but I want to ask here on Kiwifarms as well, and if you want to introduce other metrics to the equation (like magic damage/defense, agility/evasiveness, poison, criticals, bleed, frost, paralysis, field/environment, etc) please do so.

I think it's important to get this right, because depending on what you choose, it could give you a game with glass-cannons, slow/fast, fair/unfair battles. As an example, it could be this one: [Damage = (100 * Atk)/(Def + 100)], which ensures damage as long as the attack is not 0, or another more complex, what seems to be the formula for one of the Pokémon generations (it includes new variables like the level or type of the character):

ExamplePKMN01245478451.png


If you want, post why you think your formula is better, or what does it try to accomplish.
 
what type of game?
what genre?
singleplayer? multiplayer? PvE or PvP?
what kind of gameplay?

you need to answer these questions before designing your combat stats and damage calculations.
world of warcraft, hearts of iron, street fighter, counterstrike, different games require different damage systems.
 
But that would be entirely dependent on the game itself and what it's trying to accomplish.
Like for example, based upon memory a game like dark souls 3 has a system where you get static damage reduction, like up to 150 for having all pieces of armor equipped I think, then leveling up certain stats will provide more static damage reduction.
But then protection granted by actual armor itself provides a percentage damage decrease aside from that.

All in all damage can't be reduced below 50%.

But armor also provides poise, which doesn't necessarily reduce damage, but does make it harder to stagger someone in order to make using heavier, slower swinging weapons more viable, especially in PvP, which occurs in world.

It's a relatively simple system, but it wouldn't really make sense in a turn based RPG for example. It's in DS3 because it's intended to be a game where stacking up armor is never going to allow you to just face tank your way through.
World of Warcraft had its whole system, but it was another example where they had to aim to keep it simple at its foundation because you'd be exposed to a lot of different variables.

In that case though a little like how poise in Dark Souls was more aimed at PvP, resilience was added to WoW a little later on.

PvE equipped characters were dominating PvP and people died way too fast, which meant that people who just liked PvP were shafted, you had to go do raids if you wanted to advance. Therefore they introduced resilience, a stat that would be on armor earned through PvP that reduced the chance to be critically hit, reduced critical hit damage, and reduced duration of crowd control effects.

That wasn't originally a thing, but how damage was calculated followed how the game was played. Janky unbalanced PvP wasn't originally as big a deal, until later on when it become systemized in the form of battleground and then arena.
A game like Terreria is even simpler. It's just that armor reduces damage by however much armor it is, down to a minimum of 1 damage. I think Minecraft does something similar, a lot of castlevania games do.

Action oriented games almost always tend to have fairly simple damage calculations, and they operate in service of the playstyle.

Even if you're looking at turn based RPGs, you look at ones that have interactive attacks like the old Legend of Dragoon games, or I guess Paper Mario would be a simpler example, and then that has to be done depending on how important player input should be.

Sometimes the idea is that it's very important, so if the player flubs the attack it'll miss completely. Other times it's just meant to slightly modify it, so if the player fails it'll do a little less damage. That depends on the game's intent.


So point is it depends on the game. I dislike turn based RPGs like pokemon, I prefer ARPGs, so to me the ideal damage system would be pretty simple.
 
Last edited:
In general a lot of stats are pointless in modern gaming and are only put because it's the standard. Like a magician shouldn't have strength and a Barbarian should have magic, just have a single attack power for both of them and the skills damaging by a percentage of that. Ditto, just unify defence and HP. Hit and evasion should also be numbers with their difference being the hit chance. Crit shouldn't exist since, by design, player character have a lot less tolerance to attacks while enemies have fuckton of health. So PC crit only slightly increases a gauge, while NPC crit can instantly lose you the game. Better make crit just hitting weaknesses.

Don't have luck. Just don't, it almost never worth any investment. Elemental resistance is usually pointless since it will only work for a tiny subset of the game so it isn't worth the investment. Also differentiate combat and social skills in games so a player can have the fun of interacting in unique ways rather than take a hit to is abilities.
 
  • Like
Reactions: Lowlife Adventures
Simplicity is key, that's why I adore Paper Mario's old combat systems. If you have 10 attack and they have 4 defense, the result is 6 damage. I don't need complicated damage formulas I can only guess at or get a general estimate of without breaking out math, this is a video game.

I also generally dislike random elements like damage variations for no reason. I tolerate critical hits though.
 
In general a lot of stats are pointless in modern gaming and are only put because it's the standard. Like a magician shouldn't have strength and a Barbarian should have magic, just have a single attack power for both of them and the skills damaging by a percentage of that
Only in a game that has been dumbed down for casuals and children. Stats like strength, intelligence, dexterity etc. should do different things. A game where only each character is only affected by one of these things is designed badly. A wizard might want more intelligence than strength, but strength is not useless to a wizard, and intelligence is not useless to a barbarian. In a well designed game a barbarian will all stats in strength and none in intelligence should play worse than one with mostly strength and some intelligence.
 
  • Like
Reactions: SSj_Ness (Yiffed)
what type of game?
what genre?
singleplayer? multiplayer? PvE or PvP?
what kind of gameplay?

you need to answer these questions before designing your combat stats and damage calculations.
world of warcraft, hearts of iron, street fighter, counterstrike, different games require different damage systems.
So point is it depends on the game. I dislike turn based RPGs like pokemon, I prefer ARPGs, so to me the ideal damage system would be pretty simple.
Yeah, I was thinking more of games like the Pokémon Mystery Dungeon ones, Final Fantasy RPGs, or another ones that I liked, Izuna and Izuna 2 (dungeon crawlers). The standard Pokémon as well, singleplayer, turn based.

But it's fine if you also put examples of other types of games, which some of you have done. I think I'd personally prefer to not have a system that's super simple, like (attack - defense), but anyways, this thread is just for ideas on the different genres, if you believe a certain system is more appropriate for it or not.
 
Games' Damage Calculation? More like Games' Damage Ejaculation.
 
Only in a game that has been dumbed down for casuals and children. Stats like strength, intelligence, dexterity etc. should do different things. A game where only each character is only affected by one of these things is designed badly. A wizard might want more intelligence than strength, but strength is not useless to a wizard, and intelligence is not useless to a barbarian. In a well designed game a barbarian will all stats in strength and none in intelligence should play worse than one with mostly strength and some intelligence.
It's very rare and in most cases a magic knight type character will underperform compared to its pure counterparts. It's also usually one way, in that a barbarian will maybe want utility spells while a mage reaching melee range is fucked.
One way of justifying different attributes is tying skills/saves to them but it's very artificial.

I don't think reducing the number of stats is "dumbing down", if anything casuals are the ones who like to mistake complexity with depth. It's more important to have good design
 
  • Like
Reactions: Lowlife Adventures
In a well designed game a barbarian will all stats in strength and none in intelligence should play worse than one with mostly strength and some intelligence.
This depends on your definition of "play worse". Even in the games where all of this stuff comes from, aka DnD, you have to dump your stats somewhere and you just roll with the disadvantages. This is what min/maxing actually means, you knowingly take a disadvantage in somewhere uncommonly applied application like with DnD you have mental saves.

It wildly varies on how your stat system works and how balanced your classes are to determine just how much of a good idea it is to spread out your stat points like that. Some classes just need to min/max to compete, and sometimes the occasional mental save means fuck all in the grand scheme of things.

Stats are complicated.

It's very rare and in most cases a magic knight type character will underperform compared to its pure counterparts.
This wildly varies on the game type and how powerful spells are vs pure physical combat. In some games hybrids are the sometimes one of best non-pure magic class options because spells are busted, and physical sucks by comparison, but you need/want some kind of big armory guy or spells just augment in ability to fight with weapons that pure weapon fighting isn't enough. The reason most magic knights tend to suck is because all magic does is damage and maybe some CC effect (maybe), but when you can haste yourself or be a secondary rez bot/buffer to give your more dedicated counterpart more turns to do other things then great. Sometimes you throw a fireball, sometimes you heal, and your extra armor saves you from going down like the wizard just did.

Plus sometimes pure healers stink because the game doesn't encourage needing a dedicated healer so having some guy who can chuck out the occasional heal is honestly all you need vs dragging alone a healer who deals no damage which ironically makes the fight harder because the boss dies slower.

For example Rune Fencer/Valkyrie in Tactics Ogre Reborn is one of the best classes in that game because it has so many options beyond just hitting with big dumb weapon, it can remove debuffs, apply haste (which lasts about 3 turns in that game), and pocket heal if it needs to among other things. Plus MP is actually useful for physical characters in that game so being a hybrid is very useful.
 
  • Like
Reactions: Tarka Dhal
It sounds like you have a specific use case in mind already, so it would help to know the context. Personally I like algorithms that are easy to understand. Knowing that +10 attack will translate into +10 damage or that doubling my attack will double my damage lets me, as a player, make better informed decisions.

Regardless, you should know that there is no perfect solution. All algorithms will have strengths and weaknesses. Some scale up too much, others not at all. Some overvalue offensive stats, others break if you max your defence. Some are simple enough to run in your head, but many use square roots to keep stat scaling under control.

Consider the following formula: damage = (attack / defence) * 100
- If attack and defence are equal: damage is 100.
- If attack is twice that of defence: damage is doubled.
- If attack is half that of defence: damage is halved.

Seems pretty solid, but it has a flaw. Assuming attack and defence stay equal, damage does too - regardless of whether you have 10 attack or 999. That’s why the Pokemon formula, as many others do, factors in the attackers level as a multiplier. If it didn’t then the same move would do the same damage at level 1 as at level 100.
But even this solution might be seen as flawed as it can mean that level matters more than the actual attack stat.
 
Only in a game that has been dumbed down for casuals and children. Stats like strength, intelligence, dexterity etc. should do different things. A game where only each character is only affected by one of these things is designed badly. A wizard might want more intelligence than strength, but strength is not useless to a wizard, and intelligence is not useless to a barbarian. In a well designed game a barbarian will all stats in strength and none in intelligence should play worse than one with mostly strength and some intelligence.

D&D-style stats are only useful when the math is exposed, and min/maxing isn't the objectively correct thing to do. Obfuscating the meaning of build choices isn't "depth;" it's just bad design.
 
  • Like
Reactions: Lowlife Adventures
D&D-style stats are only useful when the math is exposed, and min/maxing isn't the objectively correct thing to do. Obfuscating the meaning of build choices isn't "depth;" it's just bad design.
I don't understand what you're saying. Maybe I read your post wrong or you read my post wrong?
 
I don't understand what you're saying. Maybe I read your post wrong or you read my post wrong?
I'm saying that games with ultimately pointless stats are not "dumbed down," they just have pointless complexity that in the end boils down to "here are the three good options" if you know the math behind the stats, and those games really should stop wasting people's times and just give the meaningful options. Lots of games that people extol as "deep" aren't actually "deep," they're just opaque, or worse, full of trap options.
 
  • Like
Reactions: Agent of Z.O.G.
Only in a game that has been dumbed down for casuals and children. Stats like strength, intelligence, dexterity etc. should do different things. A game where only each character is only affected by one of these things is designed badly. A wizard might want more intelligence than strength, but strength is not useless to a wizard, and intelligence is not useless to a barbarian. In a well designed game a barbarian will all stats in strength and none in intelligence should play worse than one with mostly strength and some intelligence.
You basically just invented Pillars of Eternity's stat system. If you min/max your character will end up with weird glaring weaknesses that you have to compensate for which is how it should be. All the stats are useful.
 
  • Like
Reactions: name68126988
Back