Author Topic: Damage reduction algorithm - looking for advice  (Read 29951 times)

Paul Jeffries

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 257
  • Karma: +1/-0
    • View Profile
    • Vitruality.com
Re: Damage reduction algorithm - looking for advice
« Reply #15 on: October 08, 2014, 08:48:59 PM »
The way that some games (I think POWDER, maybe some others) deal with this is to display your total cumulative armour score but when you get hit the game randomly determines which part of your body was struck and then uses only the armour value of the item you are wearing in the relevant slot.  This keeps damage reduction within a manageable range and if you think about it makes a lot more sense than the alternative; if somebody stabs you in the chest it's not going to make the slightest bit of difference that you're wearing a helmet as well as a breast plate.  The downside is that the AC rating shown to the player is a bit of an abstraction but higher numbers are still always better, so it's not super misleading.

I just want to put in a word against this interpretation of AC. AC is an average value which reflects overall difficulty of landing a damaging blow. The point is not that if someone tries to stab you in the heart when you're wearing a breastplate, they won't be able to stab your heart as hard once they've gotten through. The point is that stabbing through a breastplate is not a viable option in an active combat situation and an opponent must seek less straightforward alternatives, reducing their odds of landing a good hit, making it easier for you to avoid such hits, and on average reducing their deadliness. It is in this sense that wearing a helmet and a breastplate gives you a cumulative advantage.

The rock'em sock'em robot-like combat mechanics of D&D and roguelikes seems to encourage thinking that AC and HP are supposed to model combatants taking turns randomly flailing and pounding on each other with whatever's in their right hand until one's head comes off, but this isn't the right picture to have in mind.

Come on.  They're *both* wildly abstracted and completely unrealistic takes on real combat, you can't arbitrarily declare one of them 'right' and one of them 'wrong', especially since both systems model the cumulative advantage you're talking about - the only difference is that the system I mentioned models it on a per-body-part level.  Personally I prefer that way because it designs out the problem of heavily armoured characters only taking tiny amounts of damage per turn and therefore having tedious risk-free combat and also prevents the silly situation of characters striding around the dungeon with impunity wearing only their underpants and some really really good gloves.  But to each their own.

Bear

  • Rogueliker
  • ***
  • Posts: 308
  • Karma: +0/-0
    • View Profile
Re: Damage reduction algorithm - looking for advice
« Reply #16 on: October 08, 2014, 10:53:41 PM »
One thing to remember is that increases in randomness *always* are to the disadvantage of the player character. 

You can have two monsters, give them each a damaging attack with exactly the same mean and standard deviation, but cap one of them at +/- 2 standard deviations and cap the other at +/- 5 standard deviations, and the player will have to be incredibly more careful in dealing with the second for fear of that occasional (less than 1 in a thousand) lucky shot that gets +5 standard deviations.

On the other side, it does nothing for the player character.  If the player gets a 1 in a thousand extra-whomp attack, he is unlikely to notice because it's random.  He'll either defeat some major mob in 1 or 2 rounds less than expected time, or waste it one-shotting some goblin he'd have one-shotted anyway.

Armor protection is the same way.  The more randomness it leaves in the damage the player is taking, the less it matters to how the player will have to play and the player's odds of winning.


mushroom patch

  • Rogueliker
  • ***
  • Posts: 554
  • Karma: +0/-0
    • View Profile
Re: Damage reduction algorithm - looking for advice
« Reply #17 on: October 09, 2014, 01:33:26 AM »
First, I emphatically agree with Bear's point.

Come on.  They're *both* wildly abstracted and completely unrealistic takes on real combat, you can't arbitrarily declare one of them 'right' and one of them 'wrong', especially since both systems model the cumulative advantage you're talking about - the only difference is that the system I mentioned models it on a per-body-part level.  Personally I prefer that way because it designs out the problem of heavily armoured characters only taking tiny amounts of damage per turn and therefore having tedious risk-free combat and also prevents the silly situation of characters striding around the dungeon with impunity wearing only their underpants and some really really good gloves.  But to each their own.

I agree that they're both wildly abstracted, but I think the D&D model of AC, properly understood, is both simpler and better thought out. Really, really good armor of any kind tends to have some kind of magical properties in these game settings, so I don't buy your gloves objection.

Regarding the possibility of over-equipped characters, I guess this kind of min-maxing (or just mindless grinding) style of play appeals to a certain kind of player and I don't begrudge them their fun. The balance issue is in what lengths the player has to go to to achieve the invincibility you talk about, not the raw fact of whether or not it's achievable. My own play style gravitates toward speed running, so I'm sympathetic to your perspective on the potential for silliness from that side of things, but I don't see any reason to reject the possibility out of hand as a matter of design.
« Last Edit: October 09, 2014, 02:02:45 AM by mushroom patch »

Kevin Granade

  • Rogueliker
  • ***
  • Posts: 83
  • Karma: +0/-0
    • View Profile
Re: Damage reduction algorithm - looking for advice
« Reply #18 on: October 09, 2014, 01:39:23 AM »
at the cost of a little more complication, you can have the monster evaluate armor and chose to attack body parts based on that evaluation and their abilities, then you get the best of both worlds.

mushroom patch

  • Rogueliker
  • ***
  • Posts: 554
  • Karma: +0/-0
    • View Profile
Re: Damage reduction algorithm - looking for advice
« Reply #19 on: October 09, 2014, 02:01:28 AM »
But the character realizes that the monster will aim for weak points and defends himself accordingly. The monster's probability of landing effective blows against a wary opponent is then best understood as a function of some single average of armor values. The result is an understandable, reasonably realistic model of combat.

Yeah, a situation where your armor is only as good as its weakest component may have the virtue of low variance outcomes, but it creates an even worse situation with respect to the marginal utility of each piece of armor.

Something like this could be workable if you had some carefully tuned, balanced, and intuitive system of body part/region localized armor class, evasion, damage reduction and capacity values. I doubt it would play better than the d20 derived systems already in use in major roguelikes though.

Xecutor

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 263
  • Karma: +0/-0
    • View Profile
Re: Damage reduction algorithm - looking for advice
« Reply #20 on: October 09, 2014, 02:35:15 AM »
I beg you - do NOT do damage reduction like in Crawl. It's the worst idea.

Could you elaborate why it's such a bad idea? I thought it was a really good way of solving it. What are the main drawbacks with this method?
Now there is gdr and it's a little better (for players), but more complicated and harder to understand.
But originally both armor and damage were rolled from min to max, which resulted in extremely random combat.
You could stand and exchange blows with monster for 10 rounds, dealing minor damage to each other and then suddenly either
you roll max and his armor roll min and you kill him with one lucky swing (which is good, but it's just another monster, so you'll forget
about it in a minute), or vice versa, which is hugely disappointing and frustrating.
Basically Bear described why.

BtS

  • Newcomer
  • Posts: 24
  • Karma: +0/-0
    • View Profile
    • The Ground Gives Way
Re: Damage reduction algorithm - looking for advice
« Reply #21 on: October 09, 2014, 06:10:28 PM »
Thanks! I can see the problem there now.

Kevin Granade

  • Rogueliker
  • ***
  • Posts: 83
  • Karma: +0/-0
    • View Profile
Re: Damage reduction algorithm - looking for advice
« Reply #22 on: October 10, 2014, 07:42:32 AM »
But the character realizes that the monster will aim for weak points and defends himself accordingly. The monster's probability of landing effective blows against a wary opponent is then best understood as a function of some single average of armor values. The result is an understandable, reasonably realistic model of combat.
Aspirationally you have the same armor value across every location, but aspirationally you have even protection across all attack types, and therefore all attack and defense can be best summed up as a single pair of numbers, right? (reducto ad absurdum)

No, in any interesting system there would be both scarcity and various tradeoffs for different armor types, making the decision of what armor to assign to what body part an interesting tradeoff to make.  Also you can assume a "appropriately wary" player if you like, but if you then allow the player to wear just gauntlets (or just a breastplate, or whatever) and get protection for their entire body, it is not in fact "reasonably realistic".

mushroom patch

  • Rogueliker
  • ***
  • Posts: 554
  • Karma: +0/-0
    • View Profile
Re: Damage reduction algorithm - looking for advice
« Reply #23 on: October 10, 2014, 11:03:06 AM »
And indeed, in D&D and similar systems, attack and defense are represented by a small set of numbers -- THAC0, AC, hit and damage rolls. Such systems have been consistently popular for what, forty years now? Sure, people who don't understand the logic behind these rules come along and say: "I'm going to make a more complex system. It'll be more realistic and therefore interesting and fun." They don't seem to gain the kind of traction you would expect from something as straightforwardly superior as your "any interesting system."

Quote
No, in any interesting system there would be both scarcity and various tradeoffs for different armor types, making the decision of what armor to assign to what body part an interesting tradeoff to make.

Well, that does sound interesting. Should you put your glove on your hand or your helmet on your hand?

I question how interesting the medieval doll simulation system you're describing can be. Mercifully, D&D rules don't cover mixing and matching of pieces of armor. Some roguelikes do, for example angband. Luckily, they have the sense to view armor class as an average of armor values, not some multidimensional gibberish that ignores the fact that people move, make an effort to block attacks, and yes, allow themselves to take a hit if they don't think it'll get through whatever they're wearing. If you don't think a shield or a gauntlet provides protection to your whole body in a sword fight, I don't know what to tell you. You're just wrong.

reaver

  • Rogueliker
  • ***
  • Posts: 207
  • Karma: +0/-0
    • View Profile
Re: Damage reduction algorithm - looking for advice
« Reply #24 on: October 10, 2014, 11:39:16 AM »
it is not in fact "reasonably realistic".

Who cares. The point of combat in such roguelike/rpg games is not realism, otherwise they'd be in the "Medieval Combat Simulator" genre. Fun/interesting mechanics is the point, and being plausible only adds to the immersion factor.

Paul Jeffries

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 257
  • Karma: +1/-0
    • View Profile
    • Vitruality.com
Re: Damage reduction algorithm - looking for advice
« Reply #25 on: October 10, 2014, 06:11:09 PM »
I don't see any reason to reject the possibility out of hand as a matter of design.

Oh I completely agree; to be clear my whole point is that neither system should be rejected out of hand; as I said it's only personal preference that leads me towards the per-item system.  It has advantages (it's much easier to balance because of the smaller range of possible damage reduction factors, avoidance of risk-free combat and silly wardrobe choices, etc.) and disadvantages (greater complexity, built-in randomness, etc.) and you can only really judge the overall merit of any armour system within the context of a game design as a whole.

One thing to remember is that increases in randomness *always* are to the disadvantage of the player character. 

I broadly agree with this (indeed, the game I'm currently making has completely deterministic combat) but with the caveat that I don't think 'always to the disadvantage of the player character' necessarily equates to being always of disadvantage to the player's enjoyment.  I think that randomness has its place in the game designer's toolkit, even though it is often used badly.  For instance:

Armor protection is the same way.  The more randomness it leaves in the damage the player is taking, the less it matters to how the player will have to play and the player's odds of winning.

There's a flip-side to this, which is that if combat is very deterministic and you have high enough armour and/or HP that the enemy you're fighting can only do inconsequential damage to you each turn, the action you take next turn also doesn't matter that much because a 'bad' decision won't have any serious consequences.  Ideally, you want to avoid either extreme in order to keep the player's decisions meaningful.

Which is a major reason why I slightly shy away from cumulative damage reduction; the more armour you can stack up the less significant the consequences of being hit until, on a turn-by-turn basis, you don't really care that much whether you're getting hit or not.  To combat this the designer might introduce more powerful enemies which could easily one-shot a character without heavy armour, making unarmoured playstyles much less viable and the decision of what kind of armour to wear less interesting.  With a per-item system a full suit of plate-mail doesn't give you a maximum damage reduction any greater than just having the cuirass; adding extra pieces to the set just increases the odds of you getting that maximum damage reduction, so it's a question of managing vulnerabilities rather than just gaining a flat rate of damage reduction.  Your damage reduction range can be much less and so your potential damage range can also be less.  Of course, it's all a matter of balance and with care either system can be made to work successfully.

Bear

  • Rogueliker
  • ***
  • Posts: 308
  • Karma: +0/-0
    • View Profile
Re: Damage reduction algorithm - looking for advice
« Reply #26 on: October 10, 2014, 10:30:53 PM »

One thing to remember is that increases in randomness *always* are to the disadvantage of the player character. 

I broadly agree with this (indeed, the game I'm currently making has completely deterministic combat) but with the caveat that I don't think 'always to the disadvantage of the player character' necessarily equates to being always of disadvantage to the player's enjoyment


Yes, this is absolutely true.  Enjoyment requires challenge.  If nothing is to the player's disadvantage, there's really no point in playing. You have to think about your combat system (including armor) in terms of where you want each of the player's challenges to come from and what balance you want to strike between them.   I pointed out randomness because it's easy to miss as a source of challenge. 

If much player disadvantage comes from large variances in damage, winning requires risk management and tight combat tactics.  If player disadvantage comes mainly from food shortage, winning requires resource and time management.  Both games can be fun, but they're likely fun for different people with different sets of skills. 

I prefer combat where the absolute maximum damage that any normal source can ever do is no more than about two-and-a-half times the mode. 

But different games balance different, and if you want to put in a unique artifact sword that has a ridiculously high max on a normal mode, you can do that.  The player will meet a monster carrying the sword 'Overkill', and in combat he'll take 3 damage, 5 damage, 12 damage, 3 damage, then suddenly 155 damage, DYWYPI, HOLY CRAP WHERE DID THAT COME FROM?!

if the player knows about that sword and can recognize it when he sees it, it's an interesting tactical challenge when you meet a monster using it.  OTOH, if he doesn't know about it or couldn't possibly have recognized it on sight, it can feel like a really cheap and unfair death. 


groovy9

  • Newcomer
  • Posts: 4
  • Karma: +0/-0
    • View Profile
    • Email
Re: Damage reduction algorithm - looking for advice
« Reply #27 on: October 31, 2014, 01:55:49 PM »
I'm in favor of keeping systems simple and depending on emergent complexity.  Making your armor rating a simple percentage reduction of incoming damage is very simple.  It maxes out at 99% (or whatever number you need to balance your game). 

Body armor can be 1 to 20% depending on quality.  Gloves 1 to 5, etc.  You determine how many armor slots there are and can set the armor range of individual pieces so they add up to an absolute max of whatever you need.

You also control the monster stats, so you determine how their damage scales up, can give them non-damaging abilities to gain effectiveness against the player.  Give 'em extra hit speed, or magic abilities that get around armor or knock off armor.

Or give the player abilities that allow him to survive with low armor.  Movement speed, ranged attacks, invisibility, etc.

Basically, I think the answer is in creativity rather than designing the perfect one-size-fits-all combat system.  Keep the system simple and understandable by players.

So many times I start a game, find an item with "20 armor" and have no earthly idea what that means in practice.