Advertisement

Determining Hits and Damage

Started by January 14, 2003 04:46 PM
17 comments, last by WebsiteWill 22 years ago
You see many games like EQ and DAOC where you turn on autoattack and watch the fun. Or possibly you click a button to do a "special" move. Your character swings and hits then swings and misses etc. Anyone know what type of system EQ or DAOC use for this? I know characters have an AC (armor class) but when it comes to determining if a strike connects is it a simple roll to see if I roll something higher than the opponents AC? Or is it a summed total kinda like the THAC0 where each swing adds points until a hit is scored at which time the score results to zero. The THAC0 systems means you eventually will hit something because even if you roll a 1 every time you will eventually get a high enough total. The THAC0 seems reasonable but I''d like more info on it. As far as just randomly rolling to see if you hit, this seems like it would be difficult to control advantages. I know it''s all numbers but the THAC0 seems easier since you can designate every type of attack a certain number of points and it would be easier to designate certain strengths and weaknesses in characters. When these points add up past an opponents THAC0 you will score a hit. But I can see flaws with this. Say a character has a really deadly attack that has a low rate of success. The player could concievably know in his mind when to use the attack and guarantee it will hit. Example, I know my character hits roughly one in four swings. So if after three swings I haven''t drawn blood I know it''s pretty guaranteed that I will hit on my next swing. Voila! use massave damage attack and pretty much guarantee it will hit. So there is a big flaw with a purely THAC0 based system and a flaw with a purely randomly (weighted random numbers) system. Just curious about others thoughts on this and if anyone knows what system the pros use? Webby
I thought THAC0 was just an abbreviation for "To Hit Armor Class 0" - and the number you''d need on a d20 to hit AC n would be THAC0 - n. (eg, if you had a THAC0 of 13 and were swinging at something with AC 5, you''d need an 8 on a d20). Nothing cumulative about it.

But maybe they reappropriated it for 3rd ed. I don''t touch that stuff any more.
Advertisement
Wait, what was the problem with the purely random number system? It''s like that old logic exercise, if the odds of a coin flip resulting in heads or tails are even, 50% either way, and it''s come up heads five times, what are the odds that it will be tails next time? The answer is obviously 50%, just like the first five times, and the millionth time.

The THAC0 system is an abberation. With a good random number system you''ll have more unpredictable and realistic results. Sure, you may miss fifty times in a row, but maybe you''ll have a streak of fifty straight hits, too. In reality, a 3-year-old kid can''t hit me just by swinging a thousand times. I am five times his size and can move so much faster than him that he''ll never get me on a level playing field. If I''m backed up against a wall, or if he''s got a big stick, or if I''m suffering from head trauma, then his odds improve, but "building up" a hit percentage is fuzzy logic. You can say you''re due to hit, but that doesn''t make it more likely.

I''m not sure what EQ and DAoC use, but I''d shy away from the THAC0 system as you describe it, and also from purely mathematical systems. Make sure there''s a random number in there, for variation, and don''t let past hits or misses affect the percentage directly. indirectly, the opponent might be dazed from an earlier hit, or have overextended himself dodging the latest in a series of attacks, but trying to contrive it with THAC0 is just crap.

My $0.02
Hey, I think scaught''s right. Well, take everything in my above post that refers to "THAC0" and replace it with "The system WebsiteWill mistakenly referred to as THAC0". Everything else is valid.
Probably some screwed up memory of playing Icewind Dale a long time ago. I thought it was added up in some manner.

So, I''d like a system where characters can have strengths and weakness affected by their armor, their stats and even by circumstances in the game.

Just difficult to play with the numbers in my head to see good equations for it. I agree with the coin 50/50. I''d like to do things like if a level 60 meets a level 1 there is a very very minor chance that the level 1 can actually do some (very minor like one hit) and the level 60 would be fairly guaranteed to pulverize the level 1 in one hit simply because he''s stronger and has better skills.

Devising a system to do this is the difficult part
I was thinking of something along the lines of EQ type where characters have a little bit of AC when nekked. Then armor pieces add AC when they are worn. Also, agility should affect this AC score probably on a percentage basis. Then take into account AC spell buffs and strengths/weaknesses to certain weapons and spells. Very complicated.

So say a human has 10 AC when nekked (think skin). He has a set of armor that adds a total of 100 AC. His agility is 45. He has 110 AC plus whatever extra AC his agility attributes. Something like 110+45*.10 BASE AC plus 10% of agility. This would give him 115AC rounding up. Now, to figure out if the attacker gets a hit. AS proposed, the attacker would have to roll a 116 or greater to score a hit (possibly with critical hits being 200 or greater).

The hard part will be keeping this balanced over a lot of levels. Many games falter here in the sense that 1 level increase means the difference between victory and defeat. Levels in other games, some Final Fantasy''s come to mind, don''t mean much of jack on a small scale. Meaning that there is a large range where creatures are fightable.

For a MMO it seems like at first the levels would be more of a difference. A level 2 would destroy a level 1. But a level 50 might have a hard time defeating a level 40. This is another failure. Games where a level 60 can still get destroyed by creatures as low as level 50 (ahem Everquest).

So, basically, if at each level we assume that a characters AC will increase (either by armor, magic buffs, base stat increases) then we must also figure out how much to increase the attack ability. I''m a fan of doing a lot of damage in later levels. Love the epic Final Fantasy battles and would like to see more of these in MMOs. Where at first players can get from level 1 to level 2 by killing 50 orcs in 10 minutes. But at later levels you have to keep killing lots of high level orcs for hours. I''d like to see more of a mixture. Some creatures are fairly fast fights and low exp per kill and some creatures could take a wile but the exp gains should be worth it.

In a nutshell I''d like to see games where there are creatures with very high strength but low dex an agility. If they can hit you it''s gonna really hurt. And creatures who are very fast but not very powerful, if they hit you it tickles and you lose a few hitpoints. This would allow a system where fighting a camp of orcs for exp can actually mean a lot. Some orcs will have tons of hitpoints due to high stamina but not much else. Overall, the diversity would be amazing in a system that allows for this.

Balancing a system like this is maddening but I know it can be done.


Webby

To simplify an issue.

I was thinking of a system where how much damage is done and how often a hit is scored would be based on a comparison of the attacker and defender. A system that would take the defenders AC from armor, extra from agility, and from buffs and come to a solid number, say 135. Then the attacker when he swings would calculate a number based on things like dexterity, skill with weapon, spells that affect damage, strength. This way, two level 10 creatures could fight completely different because one may have high agility and low dexterity (hard to hit and doesn''t hit hard) or the opposite. Not to mention any variation between that will affect these numbers.

The problem is coming up with a system of progression. Say at level 10 the average mob has a total AC of 150 and my attacker will then need to score at least 11 to hit. I can see spending way too much time balancing these stats without some solid formulae.

So I am now thinking this is why most games simply use AC to determine whether or not you get hit. How much damage you take will depend on the attacker. For instance a dragon can hit for 555 points. An armor clad warrior will get hit for 555 damage just like a mage in a robe, but the warrior would get hit a lot less often because of his high AC. This seems to be the way many games do it and I admit, it''s kinda boring because it only allows for cookie cutter battles. When you face one black wolf you''ve faced them all.

So any help in determining a system that is based on stats and abilities compared between two creatures? As opposed to simply saying, if I hit I''m hitting for 10 unless I critical hit. I''d much rather have it so that my chances of hitting are somewhat determined between my ability to hit and my attackers ability to dodge or absorb the damage. Then have the amount of damage done take into account things like strength, quickness of strike, weaknesses to this type of weapon, etc. This way, a level 10 warrior can do 12 damage to a nicely armored foe but will do less to a heavier armored for or one that happens to have more strength. And more damage to a softbodied enemy.

The balance should still be there. If two level 10 character face off there should be an approximate 50/50 chance of winning. But how you win would be different. You might bring out your hammer because this foe has a weakness to crush attacks and has a lot of hitpoints. But if he has a lot of hitpoints means he will take longer to kill than your average level 10 foe so in return he should not hit as hard as normal. The end effect is all the same, this just seems a lot more interesting and a lot more open to a game that applies strategies which exploit character strengths and weaknesses.

Webby
Advertisement
I''ve played a fair number of games in which during combat my character''s chances of striking his opponent are based solely on a comparison of my and my opponent''s statistics, with a random factor added. All D&D style RPGs do this, and so do most Japanese console RPGs. I''ve come to be frustrated by this sort of system.

My frustration reached its highest point while playing Neverwinter Nights. This game was built on an interpretation of D&D 3rd Edition rules. Under these rules, the average combatant makes one attack every six seconds, usually with a less than 50% chance of connecting. This is fine and good for pencil and paper roleplaying, where a more complex simulation of the combat is not feasible. Some forward-thinking DMs offer a bonus to hit for an interesting description of the mode of attack, but generally each player takes his turn rolling the dice and marking the damage, and combat is taken care of in a reasonably efficient fashion.

Unfortunately, Bioware chose to take no artistic license whatsoever with the ruleset designed for P&P gaming. In fact, the computer now automates the only interesting part of P&P combat: the die rolls. In other words, the combat is now resolved entirely by the computer, with me as the player waiting patiently for one of the combatants to drop. Add the fact that they remained faithful to the six-second round, and combat becomes by far the most dreary and thankless part of the game. Well, with the possible exception of looting the bodies for 5 gp apiece... but I digress.

I now believe that the best choice for a combat system is one which replaces the "random factor" with the player''s own skill. Even a ludicrously simple rock-paper-scissors attack and defense system would give me as a player the sense that I was participating in the combat rather than observing it. Certainly, because we''re talking about RPGs rather than action games, the statistics of the character should also play a major part. However, I as a player and as a designer forsake any and all random factors in combat. If the player isn''t participating, then it''s not a game, it''s a movie.

There are many exciting, fast, and deeply strategic melee combat engines already fully developed and ready for integration into an RPG. If you don''t believe me, go to your local arcade and play a couple of rounds of Street Fighter II or one of its myriad descendents against a fellow who knows what he''s about.

I know many RPG players aren''t much for the quick reflexes - myself included. However, a Worms style simultaneous timed turn system might cut the mustard: 2 seconds of live combat, then 10 seconds for each participant to lock in their next sequence of moves, then another 2 seconds, and so on...

At least, that''s what I think.

---------------------------------------------------
-SpittingTrashcan

You can''t have "civilization" without "civil".
----------------------------------------------------SpittingTrashcanYou can't have "civilization" without "civil".
Man, glad I never played Neverwinter Nights. I think that would drive me insane. I''d prefer something akin to. How much my character hits for is determined by my characters level, weapon skill, weapon, strength and whatever other stats I tie into damage caused. Then factor on strengths or weaknesses of the foe so if I hit the soft underbelly of a snake I do 150% damage. If I hit it on a spot that''s fairly resistant to damage from axes then I do 50% of my damage. Otherwise I do 100% of my damage. Add in a little randomizing to the strikes and it looks more like a real battle.

But, I also want players to be able to increase their stats when they level and through some quests so that a warrior can actually increase his base strength. In fact, I''d probably designate what weapons and armor can be used based on certain stats. Sword that requires 55 strength to use, something like Dungeon Siege did.

Keeping the classes differnt and allowing people to customize stats is difficult. I was thinking of some limiting factor. Say a warrior increases to level 10. At level 10 he learns a new attack style but his trainer says "Sorry son, I cannot teach you this new style until your strength has increase". So, player has points to spend and he puts some points into strength, now the trainer will train him. He also has som extra points, these he can put into intelligence, quickness, strength or whatever, it''s up to him. Some will go for well rounded, others for strength laden buffoons. The point is that it all should matter. The two character should have a different feel of play. For instance, a warrior that pours more points into str is likely to get more offensive techniques allowing more damage output. Warrior putting points into agility will learn more defensive attacks. He won''t do as much damage to a creature than the first guy but he can take more. The end result is that both players can kill the same creature. Stronger guy will kill it faster but take more damage along the way. Second guy takes longer to kill it but takes less damage. All in all (healing time taken into account) the net effect is still the same, 1 creatures killed in x amount of time.

Problem then is not allowing a warrior to pour all his points into agility thus making himself into a rogue

There has to be a limit on how points can be spent. I like the Morrowind way of character advancement where depending on what you did you get a level, you will get certain bonuses when you spend your points. So we could say that warriors get 3 str for every point the spend but only 1 agility for every point, And vice versa for rogues.

This way warriors are urged to put their points into strength as opposed to agility but they don''t have to. And if a warrior decided to pour all of his points into agility he should still never be able to become as agile as a rogue, nor a rogue as strong as a warrior.

I think it be more fun to advance a character this way. Especially considering that new techniques will be avialable to a warrior who has the proper stats. Want to learn Dismemberment? Put a point into strength. Want to learn Riposte? Put a point into Agility. By never allowing players to have all skills they will be forced to choose the skills they desire for their class.So some warriors may go the line of being more defensive, some more offensive, some in the middle. It will all depend on play style.

Add that to a place where instead of simply level 1, 2, 3 monsters there are monsters of every level that fit all these styles. This way, you can have certain advantages and disadvantages against monsters depending on your character. There will no longer be a generic orc. This orc monster can be generated to be highly offensive, the next highly defensive. What attacks and skills you use during battle will factor into how well you do.

Needs some work but I think I''m getting a handle on it.
Number systems scare me but I love them

Webby

I use a lot of different routines depending on the type of game I''m designing. Basically, if one strike is a big deal (it takes a whole turn and then you have to wait 10 seconds or more for the next turn), I try to keep the hit rate very high (well above 80% for most enemies). For that, I just have a hit stat, and maybe an evasion stat.

If you are going to be attacking constantly, like in an RTS, I use a system that allows for lots of missing. Basically the chance to hit is RandomNumber("Your Speed" + "Enemy Speed") < Your Speed. If you are the same speed as each other, it''s 50%. If he is twice as fast, it is 33.3%. If he is 9 times faster, it''s 10%.



*Only in darkness can one truely shine*
*Only in darkness can one truely shine*
quote: Original post by WebsiteWill
...I''d prefer something akin to. How much my character hits for is determined by my characters level, weapon skill, weapon, strength and whatever other stats I tie into damage caused. Then factor on strengths or weaknesses of the foe so if I hit the soft underbelly of a snake I do 150% damage. If I hit it on a spot that''s fairly resistant to damage from axes then I do 50% of my damage. Otherwise I do 100% of my damage. Add in a little randomizing to the strikes and it looks more like a real battle.

But, I also want players to be able to increase their stats when they level and through some quests so that a warrior can actually increase his base strength.
...


I developed a fighting system a long time ago for a text based program that seemed to work pretty well (I liked it, and the players seemed to like it). It was simple, and based on the fact that I hated DnD styled dice rules and attacks, but liked the idea of the traditional stats categories, and I felt since computers generate richer random numbers than 17-sided dice, why not take advantage of this to simplify things?

So my system was conceptually simple:
* A particular stat judges the overall strength of the attack as a cardinal number--corresponding to number of "hits" so to speak (hit is a bad term, because an attack really represents a single hit, but I''ll use it anyway to represent a single partition selection, as it''d make explaining things easier).
* Each hit is a selection of a particular partition.
* The weight of the partitions corresponded exactly with each of the statistics. For explanation purposes, if I say that the Defender''s Health partition was selected, I mean that the partition weighted by this statistic was selected.
* Since a higher stat should mean a better stat, and since a higher weight increases probability of selecting a partition, the attack rules compell an interpretation of selecting a particular partition as having to do with the corresponding statistic playing some sort of offensive role in the attack. Thus:
* After an attack (ie, after n hits, where n is the attack strength), the number of hits for each partition count against a particular other predetermined opponent statistic (ie, some defender''s statistic if this was an attacker statistic''s partition, and an attacker''s statistic if this were some defender''s statistic''s partition).

This will become clear with an example.

Consider a simple attack in a simple game. Each player has his stats, like Hea/Str/Sta.

Suppose that the coded basic, simple attack rules are as follows: Hitting health drains stamina, hitting strength drains health, and hitting stamina drains strength.

Then suppose that my Hea/Str/Sta are 6/5/4, and I attack a Lawyer with Hea/Str/Sta of 15/5/1. Then the partitions are my Health (1..6), my Strength (7..11), my Stamina (12..15), Lawyer''s Health (16..30), Lawyer''s Strength (31..35), and Lawyer''s Stamina (36..36). Now my Strength statistic for this type of attack is, without coincidence, the same as the "strength" statistic in the general explanation--it is 5, so a single attack consists of 5 partition selections, which are based on a simple random number engine. Algorithmically, I select 5 random numbers from 1 to 36, and they might be 23, 3, 11, 29, and 26 (samples I took from a program I wrote really quick that used mod on rand() and didn''t seed the random number generator). Then based on the above partition layouts, I selected the Lawyer''s Health partition 3 times, my Health partition once, and my Strength partition once.

So now the aftermath... hitting my health once means the Lawyer''s Stamina goes down 1. Hitting my Strength once means the Lawyer''s Health goes down 1. And hitting the Lawyer''s Health 3 times means that my Stamina goes down by 3. So after the attack, I''m 6/5/1, and the Lawyer is 14/5/0. (Note: Not coming into play here, I had a rule in my game where stats can''t be negative--instead, an already drained stat counts to drain the next stat... if your Stamina is 0 and should be drained, your Strength gets hit. If your strength is 0 and should be drained, your health gets hit. Nobody in my game ever survived their health being 0).

What I liked about this system, and what I think the players liked, was that it was easy to humanly reason out what happened after an attack; and correspondingly it''s easy to vaguely reason what should happen before you bother attacking. Eg.: I had 6/5/4, my opponent had 15/5/1. My opponnent doesn''t have much stamina, but he''s extremely hearty--basically, it should "tire" me down quite a bit to knock his health to 0. But my opponent has no stamina, so my opponent should tire down extremely quickly. My health is fair. Our strength''s are pretty well matched. Looking solely at the stats, and judging that only I would be attacking, then the best I could hope for is to knock him down in 3 attacks, though the probability that could happen is pretty low. This is what I like about the system--you can compare the stats and get a rough idea of what would happen. And in this example, what did happen seems to match up pretty well with the reasoning--I "tired out" by 3 stamina points, he "tired out" all the way in one of my attacks, and he wound up losing a health point.

You can also reason about your own statistics. Having 6/5/4, I could potentially go to 1/5/4 if I attacked a strong enough player. If my stats were 4/5/6 instead, I could actually kill myself by attacking the wrong person a single time (in particular, someone who is extremely strong; but, since my stats are so low, it wouldn''t be terribly improbable if they had just mediocre strength). If I had stats of 3/90/90, then I''m basically near death, and it''d be risky for me to even swat the flies buzzing around my head. If I had 90/3/90, then I''m reasonably okay, but pretty weak.

There are other nice things that just work out with this system, but I won''t get into it in a lot of detail.

The system particularly works well when each attack has some sort of cost (eg, some movement point type system). This gives the strength statistic a little more strategic meaning.


-- Joshua Lusion           | If you will tell me why the fen Sr. Software Engineer/  | appears impassable, I then hobbyist game coder     | will tell you why I think that I                         | can get across it if I try. (M. Moore)

-- Joshua Lusion           | If you will tell me why the fen Sr. Software Engineer/  | appears impassable, I then hobbyist game coder     | will tell you why I think that I                         | can get across it if I try. (M. Moore)

This topic is closed to new replies.

Advertisement