Author Topic: Modeling Armor in Roguelikes  (Read 4219 times)

XLambda

  • Rogueliker
  • ***
  • Posts: 208
  • Karma: +0/-0
    • MSN Messenger - tau_iota@live.de
    • View Profile
    • The Weird Rogue
Modeling Armor in Roguelikes
« on: February 19, 2012, 11:31:00 PM »
While I was working on the (admittedly simple) combat system for my project, I came across the problem of modeling armor. I've taken a look at some games and came up with a few variations.

1) Armor as a second health bar
The armor absorbs a fixed amount of damage and is destroyed after that. The DoomRL model, doesn't really work because armor is not really expendable in most fantasy settings.

2) Armor blocks with a fixed probability
With a certain probability the armor will absorb all damage, otherwise the entire damage is done to the attacked creature.

3) Armor blocks a fixed percentage of damage
All damage dealt to the attacked creature is reduced by a fixed percentage. Since most games use only integer values, this could be bad.

4) Armor blocks a fixed amount of damage
All damage dealt to the attacked creature is reduced by a fixed value.

5) Armor block every attack dealing less than a fixed amount of damage.
The same as above, but when the dealt damage is larger than the armor value, there is no reduction.

Of course, most of these can be combined in some way, but I think these are the most common basic approaches.

My question is, which ones do you find viable? I have a hard time deciding which one would make more sense. I don't really care for realism if an unrealistic solution promises better gameplay. I don't have much experience with combat models, so I'd appreciate it if some of the more seasoned developers could give me a few hints. :(
« Last Edit: February 19, 2012, 11:33:41 PM by XLambda »

Z

  • Rogueliker
  • ***
  • Posts: 905
  • Karma: +0/-0
    • View Profile
    • Z's Roguelike Stuff
Re: Modeling Armor in Roguelikes
« Reply #1 on: February 20, 2012, 12:31:28 AM »
My VoI uses a different model, with two stats for an attack: damage and Weapon Class, and Armor Class for an armor. The percentage of damage absorbed by armor depends on the difference between WC and AC. So for example a swarm of bees could have lots of damage and low WC (cannot penetrate armor, but lots of damage to unarmored ones), while a phase dagger could deal minor damage, but due to its high WC, deal it even to highly armored enemies.

george

  • Rogueliker
  • ***
  • Posts: 201
  • Karma: +0/-0
    • View Profile
    • Email
Re: Modeling Armor in Roguelikes
« Reply #2 on: February 20, 2012, 12:39:46 AM »
I think a good system goes something like this. Attacks have a type (like crush, cut, stab, fire, etcetera) and armor has a soak (like % or integer reduction of damage type). Attacks naturally can have more than one type as armor has more than one soak.

Whether you hit is not based on armor, but on dodge, parry, force fields, etcetera. If you do hit, apply the soak for each type. Of course you can finesse this if you want layers of armor, hit locations, etcetera. Any attack type not reduced to zero applies as damage.
« Last Edit: February 20, 2012, 12:43:29 AM by george »

guest509

  • Guest
Re: Modeling Armor in Roguelikes
« Reply #3 on: February 20, 2012, 06:45:23 AM »
  Gosh man there are just so many ways to do armor. It depends on what type of game you are going for. What purpose do you want it to serve? Obviously you want it to extend the life of your character by defending against hits. But certain themes and genres require different mechanics.

  For example in my fantasy style card game armor is going to allow you to ignore certain numbers of hits per combat round. This is the same as number 4, in essence. But it's easy to use for players because there is no book keeping.

  The opposite of this is a sci fi game, like a ship, can have armor that is ablative and also reduces in effectiveness. So when it is at 100% it blocks all incoming attacks. But when shields are lowered to 80% effectiveness they let 20% of damage squeak through. This works because this is how shields are modeled in Star Trek.

  Warhammer has an Armor Save mechanic. Where certain hits can be ignored if you roll high enough on your armor. But certain weapons ignore armor completely and certain armors are not powerful enough to block higher powered weapons. This really works in this game because it adds the tension and thrill of rolling to save. You miss the roll you die. You make the roll and you live to fight another day. Very fun!

  In your standard hack and slash roguelike the blocking style schema, where all damage is either blocked or is allowed through, is standard. No reduction in armor effectiveness with use. But reduction of effectiveness can be a key mechanic in an open world survival game where it is imperative that you keep finding new gear to replace the increasingly ineffective and worn out gear you have on.

  Or maybe it doesn't matter to your gameplay. Like in the original Rogue. Block all, block %, block fixed amount. With some balancing tweaks it would not matter to the core gameplay. #5 though, where armor is ignored by higher powered weapons. That might be game changing. Powerful attacks would become all that much more powerful.

  I'm thinking #5 is appropriate when penetration of bullets and what not is being taken into account.

  You also did not talk about how Warcraft/Starcraft handle things. In those games (not WoW) each attack has a minimum that cannot be blocked and an added amount that can. So for example magic attacks can hit with 10 unblockable points. But a powerful melee attack can be listed as 5+10 for a potential of 15 points of damage. But 10 of those can be blocked by armor. It's quick to calculate for an RTS engine. It also gives predictability as randomness is not needed in this context.

  So anyway that's my take on it all. It just depends on what you are going for.

Pueo

  • Rogueliker
  • ***
  • Posts: 263
  • Karma: +0/-0
    • View Profile
    • Email
Re: Modeling Armor in Roguelikes
« Reply #4 on: February 20, 2012, 06:50:46 AM »
I think the system I will be using is a mixture of George and Z's systems.  You have 4 stats: Damage (Dmg), Weapon Class (WC), Armor Class (AC), and Negation Rate (NR).  

Whether you hit or not is based on WC and AC.  If WC - AC ≤ 0, it's a miss.  If WC - AC > 0, then you hit with a percentage chance equal to: 14(WC - AC).  For example, if a creature's WC is 5 and your AC is 6, it will miss, but if a creature's WC is 4 and your AC is 0, it will have a 56% chance to hit you.

How much you hit is based on Dmg and NR:  Dmg - (Dmg * NR). NR is a percent, i.e. if Dmg is 16 and your NR is 10%, then  the creature will hit you for 14 damage (Dmg * NR is rounded up)

You can also implement Dmg and NR types, such as Acid, Fire, Ice, etc.
« Last Edit: February 20, 2012, 10:09:45 AM by Pueo »
{O.o}
 |)__)
   ” ”   o RLY?

Darren Grey

  • Rogueliker
  • ***
  • Posts: 2004
  • Karma: +0/-0
  • It is pitch black. You are likely to eat someone.
    • View Profile
    • Games of Grey
Re: Modeling Armor in Roguelikes
« Reply #5 on: February 20, 2012, 03:18:09 PM »
Some important things to consider:

A. Forget simulation.  Nothing will ever be in any way close to real life.  In real life you get stabbed and you die - there's no clanking multiple hits against armour.  This is a game, and dying from a single hit can be less fun, so you want a system that instead adds to the gameplay options.

B. Choose between armour power to make the player feel safe, or a system that can help mitigate damage but still leaves you feeling at risk.  Type 4 is good for the former, since the higher the number the less hits will significantly do damage.  Type 2 and 3 are more the latter - little hits still whittle away so you still have to worry about your resources.  Type 4 can be spiced up by still having some enemies ignore armour, or having criticals ignore armour.  Or you can make sure the victim always receives 1 point of damage so they can't just tank.  If you want tanking though you should really allow full negation of weak attacks.

C. The less stats and complications the better.  A player shouldn't need to juggle lots of numbers to understand if he's safe or not.  The whole damage types system is also poor as you end up with a flood of meaningless stats - see Dungeons of Dredmor for an example where so many stats have rendered the whole system meaningless.  They don't add meaningful choices to the game, they just get in the way.

D. Give your stats friendly and intuitive names.  I prefer "Absorption" over "Negation Rate" for instance.

E. Oftentimes the less randomness the better.  Dice rolls are great in pen and paper games as you have the tension of having to roll, hoping for the right number.  In a computer the rolls are automatic and a bad roll ends up feeling unfair.  Deterministic systems allows more informed choices and interesting gameplay.

F. Bigger numbers should always be better.  No messy THAC0 systems.  Make it simple for the player, even if in the background the formulae get weird.
« Last Edit: February 21, 2012, 12:01:42 AM by Darren Grey »

XLambda

  • Rogueliker
  • ***
  • Posts: 208
  • Karma: +0/-0
    • MSN Messenger - tau_iota@live.de
    • View Profile
    • The Weird Rogue
Re: Modeling Armor in Roguelikes
« Reply #6 on: February 20, 2012, 07:21:25 PM »
Huge thanks for your ideas and suggestions, everyone. This is really helpful. I'll think it over the next days and see what I decide to do.

Hi

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 154
  • Karma: +0/-0
    • View Profile
    • Email
Re: Modeling Armor in Roguelikes
« Reply #7 on: February 20, 2012, 11:07:15 PM »
my favorite is number 4 because that means that there is a clear difference between many small attacks and one large attack.

Snargleplax

  • Rogueliker
  • ***
  • Posts: 50
  • Karma: +0/-0
  • snargleplax
    • View Profile
    • SnargleQuest dev log
Re: Modeling Armor in Roguelikes
« Reply #8 on: February 23, 2012, 11:59:39 PM »
In my system, a strike has a degree of success, which is used in determining the severity of the wound.  Armor reduces this degree of success (with some variability, to avoid risk-free or too-predictable situations), so any strike that gets through the armor is attenuated in proportion to the efficacy of the armor.