Advertisement

Damage and Armor and equations (oh my!)

Started by July 22, 2001 08:51 PM
18 comments, last by Blacktalon 23 years, 6 months ago
One thing I''ve always kinda noticed fell short was good old martial arts. If you watch any movie they almost never hit each other! While martial artists can''t stand up to something like an automatic rifle, they usually are incredibly sneaky and can come up on the enemy and deal a bunch of damage. Anyway, I think each class should have inherent dodge modifiers etc.
This could be accomplished by comparing attacker speed to target distance then using that value against target dodge. Of course, this is only for direct hits. Area affects such as missles or grenades never really hit their exact target but rely on their explosion.

... or maybe I just watch too many kung fu movies
Here is a simple idea that I had a while ago that could easily be expanded to (hopefully) help out your final equations.

Player gets hit points, HP.
Weapons get Damage points, DP.

You need to determine these things with some sort of workable relationship, based on how you want your gameplay. Now, add in armor.

Armor gets hit points, AP, perecntage of total AP, A%, and Damage Value, DV.

AP is transparent to the user. They have no idea what there AP is exactly, they only have a percentage to work with, i.e., leather jacket 65% usable. AP should be higher than HP, much higher with good armor, i.e. if main weapons are pistols then Bullet proof vest AP ~= 5 * HP. Damage is the # of DP that it can with hold. If a 9mm does damage 7, a bullet proof vest should be able to stop a few of those, so its DV should be ~12. You figure out the specifics for your game.

Now the damage system.

Enemy Fires. Do your hit check. If a hit is scored, damage as follows:

damage_inflicted = DP - A% * DV;

if (damage_inflicted < 0)
damage_inflicted = 0;

HP = HP - damage_inflicted;

AP = AP - DP;

updateA%();

Basically, the functional percentage of the Armor, multiplied by the Armor''s Damage Value, absorbs that many Damage points from the attack. If there are any leftover, these are removed from the players HP. No matter what, this affects the armor to some extent (but not a whole lot, as the Armor Points should start with a high value). This updates the A%, so eventually it starts absorbing less and letting more damage through. This system is versatile in its tweaking ability, its ease of porting to component style attack/armor/damage, and being able to keep armor found through the course of the game (or scavenged) not ''good as new''.

I don''t know of any pen and paper implementations of this, as it would be a lot of rolls for each hit, but then I don;t play pen and paper games too much.

Let me know if you have any questions and if this was helpful. I am also innterested in other peoples feedback if they see any obvious general improvements (this could obviously be tweaked differently based on game specifics).

--OctDev
The Tyr project is here.
Advertisement
Since you''re talking about an RPG rather than an FPS, I would think the ability to avoid being hit (or at least avoid taking a lot of damage from a hit) would be good. The idea of "hit points" doesn''t necessarily relate to physical damage. You could think of it as some sort of potential death indicator or some other abstract measure. The classic concept of hit points is that as you attain higher levels in an RPG, you suddenly become resistant to physical damage. You can actually add up the number of shotgun blasts you could take without dying -- sometimes this number is rather rediculous. But it''s tried and true, so I guess why fix it.

Rather than having players have more hitpoints as they advance, you could reduce damage caused to them based on level. It really boils down to the same thing, I suppose, but why not be different? For example at level 1 damage is 100%, at level 2 it''s 90%, etc. Obviously you''d never get to 0%... Maybe it''s staggered based on weapon types. This would fall in line with intrinsic knowledge of the ways those weapons are employed and how best to avoid having them deal lethal damage. Or maybe rather than a hit/miss decision then a damage calculation, maybe it''s all done in one step. A sort of damage "window" that is modified by armor, level, skill, etc. No damage = miss, lots of damage = good hit.

Okay, it''s late, I''m rambling...

Altho, I do think there''s some potential in that last bit...

Along those same lines....

I agree (tentatively). Especially for futuristic...focus should be that your hero should get better at avoidance with experience, and also should have better equipment available at higher levels, rather than constantly adding more hit points. Better armor fits nicely into my previous example, as armor with a high damage value will absorb most of the hits that get through. This was also a consideration when I first hammered out this idea a while ago. I do think some strength/vitality/hitpoint increase is justified...I know that when I am in good shape I am a hell of a lot tougher than when I am in bad. This led me to think of an adrenaline factor too. When I played really competitive soccer, I rarely felt pain, even when delivered a brutal hit. A few hours the game though, I would discover cuts, bumps, bruises, and a general body ache. I used that as the basis of my adrenaline theory--the better your training and skill (experience) the less likely you are to be hindered by wounds. My two thoughts were 1.) this justifies hp increase with experience, although it should be something like inverse logarithmic...in the beginning it makes a noticeable difference, later you only rely on your skill to avoid those injuries, or 2.) Factor in the adrenaline factor. Track adrenaline increases, and use this as a hp increaser in situations, calculated with percentages. Upside--your still moving after getting hit by that bullet. Downside--you kill everyone in the room, no more threat, adrenaline starts to slowly dissipate. If you don't find a hospital soon, or some place to rest and stitch up, you get killed after the fact.

Your thoughts?

--OctDev

Edited by - OctDev on July 25, 2001 6:36:36 AM
The Tyr project is here.
That sorta touches on bleeding rules. You could liken the effect of ignored damage to damage that creates more damage later. Both of these could follow the same basic rules. Like a wound of a certain magnetude will continue to cause damage till it''s tended to. So a smallish wound that continues to affect you might not be as much a problem as the bad guys with guns. Once they''re outta the way, you can stop and lick your wounds. At which time, you''ve taken more damage and are perhaps not so well off...


I really like the idea of non-lethal damage being different from lethal damage. The Hero pen-and-paper system does this with STUN and BODY. BODY damage is physical damage your being takes (or walls, or other physial entities) whereas STUN is very temporary. You generally get knocked out before killed, unless a weapon is designed to kill. If you take too much STUN in one round, you''re stunned for a moment.

quote:
Original post by Thrump
This may be just me, but I''ve always disliked systems where you miss a lot. Give me crappy damage, anything, just don''t make me miss every 2nd time.


I hadn''t really thought about it before, but I agree with you. Missing too much can be frustrating. Movie makers must agree too. Just look at all these movies where the combatants take major beatings, but are still standing. It might not be realistic, but it works and looks good too.


--
http://www.3dcgi.com/
Advertisement
miles vignol: While cutting damage is nice, one reason people add hit points is that it gives the player a feeling of accomplishment and continuity(sp?). Players get bored if they character never changes and numbers getting bigger represents more power. Its a simple mind thing but not everyone that plays games is an avid pen''n''paper fan. They want "real" results!
>You could mix the two have armor serve as protection from
>damage but also get worn with time. I dunno of any pen and
>paper systems that encorporate this because, after-all, it''s a
>bit of a head-ache to deal with. But hey, computers don''t have
>heads to ache, so what the heck.

Sneak into a fantasy store of your choice and read the

CYBERPUNK

rulebook. It incorporates exactly that: Gunfights, Armor,
Armor piercing, Armor gets worn down the more you get hit...


It''s a great system that relies on really easy to implement
principles. After all some juveniles with a pen should get it ;-)

hth
-nv

Some systems use shock points or some such, where you regain some shock points every round, but if you get down to 0 you go unconscious (you can probably also get into negatives (to a point) so that if you get knocked out you stay down for a while). Then just have weapons deal both kinds of damage.

Also, many systems have armor absorb a certain amount of damage (but always taking a minimum amount), and then either have a durability that gets knocked down a certain percent of the damage it absorbed each time, or the actual armor rating goes down a certain percent each time (and then eventually gets destroyed at a certain point).

And there should probably be a chance to hit and some variance in damage. Perhaps you hit 60%-80% of the time? And a weapon would do like 25-30 damage (opposed to some crappy systems where it''s like 1-50 damage).

I dunno, just spilling some ideas.

-----------------
The Goblin (madgob@aol.com)
-----------------
"Before critisizing somebody, walk a mile in their shoes. That way, when you do critisize them, not only will you be a mile away, but you''ll also have their shoes!"
- The Goblin (madgob@aol.com)
As far as figuring out whether or not an attack hits or misses, I have a simple function that I wrote.

  typedef struct CHARINFO{USHORT HitPercent;USHORT Evade;... //other statsUSHORT ErrorFactor;  // The key to the whole thing...}FAR* LPCHARINFO;bool CheckHit(LPCHARINFO Attacker, LPCHARINFO Defender){        // This function returns true if the attack was a hit.    // Basically, a random factor is figured for each character    // and then subtracted from the character''s Hit/Evade.    // If the attacker''s result is better than the defender''s     // result, BAM!    int AttResult;       int DefResult;    Attacker->ErrorFactor = rand() %100;    Defender->ErrorFactor = rand() %100;    AttResult = (Attacker->Hit - Attacker->ErrorFactor);    DefResult = (Defender->Evade - Defender->ErrorFactor);    bool RetVal = (AttResult >= DefResult ? true:false);    return RetVal;}  


I''m not exactly sure if this is what I had, but it''s pretty close.

Good luck in getting this figured out.




DracosX:

Master of the General Protection Fault
DracosX:Master of the General Protection Fault

This topic is closed to new replies.

Advertisement