Temple of The Roguelike Forums
Development => Design => Topic started by: Brigand on October 01, 2014, 07:41:00 PM
-
In a nutshell, I am looking for a way to have unbounded integer values representing armor mean something without having damage get ridiculously high for attackers simply for them to actually damage the player - any advice?
More detailed description: My game has a value representing armor as an integer. There are around 6 armor slot and a potential shield, so the absolute lowest value a player can have with a full set of the worst armor is 7. As armor quality improves, this value gets higher...and higher...and higher. I can reduce it somewhat by saying a "better" piece of armor has other positive values, such as lower weight or lower evasion penalty, but these are marginal improvements. Ultimately, unless I have just 3 classes of armor (for example), I end up with armor values 30, 40,...etc....
(Just a note: armor in my game is purely damage reduction - there is a separate evade stat that is negatively impacted by armor, but only affects a hit landing, not how much damage it does.)
Well, you say, just make higher level creatures do more damage increasing at a rate somewhat relative to the expected armor at said level. This is fine...IF you are wearing lots of armor. If I increase damage to give creatures a chance to do damage to a heavily armored character (I don't want the player to be 100% invulnerable), then this makes low-armor characters die ridiculously easy.
I have tried several approaches, but none are satisfactory:
1) Armor reduces damage by its flat value, or a percentage of its value (still results in a linear growth in damage to keep up with increasing armor).
2) Armor reduces damage by a relative percentage (damage is reduced by something like damage/armor, which obviously is a problem with damage > armor, resulting in multiple case-specific damage calculations...ugh).
3) The CURRENT choice is a hybrid - armor reduces damage on a 1 to 1 basis, up to half of the incoming damage. I have toyed with it reducing the remaining damage by a random amount up to total armor.
4) I supposed I could change armor value to a single precision number, but it's still a linear growth progression, and ugly in terms of player presentation (Of course I can present it as other than a fractional number, but the point still stands about linear growth.)
5) A poly function might work for damage reduction, but what kind? Parabolic or logarithmic seems the natural fit, as the value of armor decreases the more you have, but where to place the limits?
Playtesting has shown none of these approaches to be exactly what I want.
Does anyone have a suggestion for such a problem? I only have 2 requirements 1) I don't want an arbitrary armor limit imposed, because it limits the differentiation of armor pieces (or at least makes the differences almost superficial.) 2) I don't want to simply increase damage to create a creature capable of hitting a high armor character, due to the existence of low armor characters, and their resulting 1 hit deaths.
Any advice from anyone who has balanced a roguelike around a similar idea?
-
Have you looked at the way crawl handles this? How is their approach unsatisfactory to you? I wouldn't say they solve exactly the same problem or that their approach is very elegant, but they certainly solve a related problem in a way that's reasonably balanced. Some discussion of what, if anything, you don't like about how crawl does it might suggest a way forward.
-
I have not looked at Crawl's implementation - I will download their source tonight and take a look, but do you know in broad terms how they do it?
-
In broad terms, it's complicated -- lots of step down functions, special rules, and so on. The crawl wiki outlines some of the details. Check the pages on armor class, guaranteed damage reduction, shields, and evasion to get a feel for the whole picture.
-
Sure. Start the user with something like a damage resistance of 5, just standing there naked. That means whatever damage he gets, divide it by 5 before applying it. Then just add to the damage divisor per armor class. If he has 5 armor, he's taking half the damage he otherwise would. If he has 10 armor, he's taking a third of the damage he otherwise would. If he has 15 armor, he's taking a quarter of the damage he normally would. And so on. If you wanna be nice, you can add a rule that the same number (or half of it) is also subtracted from whatever damage remains, meaning that a well armored character is actually immune to weak attacks.
Divisors are reasonably self-scaling. Each point of armor with this system is then worth less than the previous one.
-
Sure. Start the user with something like a damage resistance of 5, just standing there naked. That means whatever damage he gets, divide it by 5 before applying it. Then just add to the damage divisor per armor class. If he has 5 armor, he's taking half the damage he otherwise would. If he has 10 armor, he's taking a third of the damage he otherwise would. If he has 15 armor, he's taking a quarter of the damage he normally would. And so on. If you wanna be nice, you can add a rule that the same number (or half of it) is also subtracted from whatever damage remains, meaning that a well armored character is actually immune to weak attacks.
Divisors are reasonably self-scaling. Each point of armor with this system is then worth less than the previous one.
Oooooh, I like that, thank you. That's worth some play testing.
-
In Steam Marines I keep overall armor and damage values low. Armor works as flat mitigation and a unit's armor degrades when that unit gets hit. Because you have multiple pieces of gear that grant armor (Steam Marines does not) you could random which piece of armor gets degraded on a hit, or implement some targeted hit system.
You might consider an armor penetration (ignore) stat for higher level creatures to tailor damage/armor scaling.
-
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.
-
Actually, the basic idea of Crawl is really simple (if we disregardguaranteed damage reduction and special cases): on a hit reduce damage by a random number between 0 and AC.
-
I like Bear's Armor Class = divisor, it's intuitivly clear.
Let me describe one more approach, I use it in Wanderers. Each piece of armor has the property D = the probability to block an attack.
Let's say you can wear a chain mail (50%), a shield (20%), and a saber that also gives you small defense (10%).
When you equip multiple items, the combined probability is not simply added up (otherwise you could easily get >100% probability). We add the probabilities assuming that all items block as independent events:
When two items are equipped:
50% and 20% = 50% + 20% - 50%*20% = 50% + 20% - 10% = 60%.
When three items are equipped:
50% and 20% and 10% = (50% and 20%) and 10% = 60% and 10% = 60% + 10% - 6% = 64%.
And so on, you can continue for multiple items. In general, this is called inclusion-exclusion principle, and the probability can be computed iteratively the way I just showed.
This resulting probability can be interpreted both as a chance to block, or as a factor to damage, so 60% block reduces the damage by 60%. With this approach its difficult to get very high defense, and it's impossible to become 100% immune to damage, unless you put on a 100%-blocking armor. And it fits better those games where your strength does not grow exponentially.
-
I beg you - do NOT do damage reduction like in Crawl. It's the worst idea.
Some kind of diminishing return might be a good idea.
One possible way:
armor from 0 to 10 blocks damage in 1:1 proportion.
armor from 11 to 20 blocks damage in 1.25:1 proportion. i.e. 16 armor blocks 10+6/1.25=15 damage.
armor from 21 to 30 blocks damage in 1.5:1 proportion. i.e. 28 armor blocks 10+10/1.25+8/1.5=23 damage.
etc
you can choose ranges and proportions to your liking.
-
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?
-
These are some great ideas - thank you guys. I have ended up settling on something pretty simple:
damage reduction = armor / (armor + modifier)
where the modifier is just an arbitrary number which produces results that work well for the armor levels in question - the bigger the number, the less effect each point of armor has. This is a slightly modified version of what Bear was talking about. It provides a bounded number from 0 to 1 (simple ratio), and lets me explicitly adjust the effect of each point of armor. Why I just didn't consider this from the start, I have no idea, considering I was headed down a much more complicated path using logs and parabolas adjusted to an arbitrary range.
I am considering combining this formula with what Paul Jeffries was talking about as far as discrete armor slots being hit, but if I do, I will need to consider what the effect on the game is if your hand gets hit, as opposed to an arm or leg. This would require a good bit of refactoring, and a lot of thought before I implement it.
I may also modify this damage reduction to not be guaranteed, but a random value bounded by the calculated damage reduction - again, play testing will bear out any good ideas.
Bottom line, thanks everyone - very constructive responses.
-
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.
-
Just throwing out another possibility:
Damage Reduction Factor = Armor / (Armor + Modifier * Damage)
I think it is easiest to see what this does with a picture:
(http://1.bp.blogspot.com/-lFJ_EMNp3QQ/U9rWMjGy4XI/AAAAAAAAAyY/7GQVVn6otmg/s1600/figure_1.png)
This plot was done with the modifier set to 1. Playing with that modifier changes the slope of the surface, but not the overall trends. As you can see, when the amount of damage is low relative to the armor, the percent reduction is high, though damage is never completely eliminated. Imagine throwing rocks at a guy in full plate armor - its not gonna do that much, although if it hits it will probably do something. On the other hand, if you use a firearm or something on our armored opponent to do a large amount of damage, the armor does a lot of damage reduction, but it has a lower damage reduction factor. In this way more armor always helps damage reduction, but you get some diminishing returns on the damage reduction factor, meaning that you don't have to increase the damage to extraordinary amounts in order to hurt heavily armored opponents.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
Thanks! I can see the problem there now.
-
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".
-
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."
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.
-
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.
-
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.
-
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.
-
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.