<a href="http://www.game-advertising-online.com/" target=_blank>Game Advertising Online</a><br> banner requires iframes
  #1  
Old 10-05-2007, 03:54 PM
Satrina's Avatar
village idiot
 
Join Date: Jul 2007
Location: Canadia
Posts: 313
Blog Entries: 5
The Combat Table

How Does It All Work?
Hitting, missing and critting is a pretty important aspect of the warrior, most would agree. How does it all work, though? There's a common belief amongst players that when you swing your weapon, a series of checks takes place:

- Random to see if your attack misses
- Random to see if your attack is dodged
- Random to see if your attack is parried
- Random to see if your attack is blocked
- Random to see if your attack is a critical hit
- If you get here, your attack is a normal hit
This is a short-circuit evaluation - you run down the possibilities, and jump out at the first point that one of the conditions comes true. In this case, you jump out when a generated random number is less than or equal to the chance to miss/dodge/parry/block/crit, and if you get past crit, you have made a regular hit. When you first consider it, this is the idea that makes sense right away. It can't possibly be what actually happens, though, for two reasons. The first is mathematical, and ties into this statement from Blizzard:

The way WoW calculates crit rate is over ALL attacks. Crit rate is not based on hits only. In other words, if you have a 5% crit rate, that 5% chance includes misses.
(from here: WoW-Europe.com Forums -> 08/06/05 Info on crit and hit chances Read it all, we'll refer to it later).

If we determined the result of an attack using the above method, then the dodge, parry, block, and critical hit numbers would be wrong - you would not get your 5% critical hit rate over all swings - and so the above statement would be false. The proof of that is here. That's the real showstopper.

The second reason is technical. Consider this: How many attacks are being made every second on the server, when you count all players and mobs in combat at a given time? Thousands, certainly. The calculation power needed for thousands of simultaneous players adds up quickly, and if you throw in five random number calculations (six for mobs with crushing blows) for every combat action, you will very quickly bog down the server by sheer number of calculations. You definitely need a better, faster, way.

What's The Answer Then?
Table based combat - the stalwart mainstay of pen and paper games. EverQuest uses it, and so does every other MMO so far as we know, almost certainly including WoW. How do we know for sure? No Blizzard employee has explicitly confirmed it, but the above Blizzard quote is an implicit confirmation of tables. We also have shown (if you read it) that it is mathematically impossible for it to be short-circuit evaluation.

In a table based combat system, every possible outcome for an attack is, well, put in a table. Each entry in the table is assigned a numeric range. Now when you make an attack, a single random number is generated and the result is looked up on the table. It's definitely less costly for the server to generate tables as needed before combat starts, and tables are likely kept around for a period of time for efficiency before being deleted. A table might look like this:

- 000-049 = Miss (5%)
- 050-149 = Dodge (10%)
- 150-249 = Parry (10%)
- 250-349 = Block (10%)
- 350-499 = Critical Hit (15%)
- 500-999 = Hit (50%)
WoWWiki has a good article on the combat table - here.
For this table we generate a single random number between 0 and 999 and look up what happens. If it's not a miss, dodge, or parry, then generate the damage done. If it was a block, subtract the block value from it. If it is a critical hit, double it. And so on.

+ToHit +Crit
Since you read the blue post linked above, you know that when you add +1% to hit, you lose 1% to miss. Similarly, adding 1% to critical hit will remove 1% to hit - we know this because it's the only place it can come off. You aren't going to reduce the chance to dodge, block, or parry, so it leaves only your chance to hit to take it out of. Fair trade. Let's add 1% to hit and see what happens:

- 000-039 = Miss (4%)
- 040-139 = Dodge (10%)
- 140-239 = Parry (10%)
- 240-339 = Block (10%)
- 340-489 = Critical Hit (15%)
- 490-999 = Hit (51%)
Or, 1% critical hit chance:

- 000-049 = Miss (5%)
- 050-149 = Dodge (10%)
- 150-249 = Parry (10%)
- 250-349 = Block (10%)
- 350-509 = Critical Hit (16%)
- 510-999 = Hit (49%)
How about both:

- 000-039 = Miss (4%)
- 040-139 = Dodge (10%)
- 140-239 = Parry (10%)
- 240-339 = Block (10%)
- 340-499 = Critical Hit (16%)
- 500-999 = Hit (50%)
Adding items with +dodge, +parry, and +block will similarly affect the table when it is generated.

Precedence
The entries on the table have an order of precedence in terms of what gets knocked off before something else. The order is:

- Miss
- Dodge
- Parry
- Block
- Critical Hit
- Crushing Blow
- Hit
What this tells you is when you do something to alter the combat table, like activate your Shield Block ability, the stuff that gets knocked off to make room for the 75% block you gained starts at the bottom and works upwards. For example, using the last table above, if you activate Shield Block, we end up with:

- 000-039 = Miss (4%)
- 040-139 = Dodge (10%)
- 140-239 = Parry (10%)
- 240-999 = Block (76%)
In this case we see that while Shield Block is active, the only possible results you can see from an attack are miss, dodge, parry, or block. Crushing blows are taken off the table (and critical hits should already have been gone from your defense.) That's pretty important when tanking bosses. As the paladins have found out, if you raise your miss+dodge+parry+block to 102.4%, you naturally remove crushing blows from the table. Shield Block is not required to do it (as we once thought.)

The fact that you can do in-game testing to confirm this precedence order is, in and of itself, another proof of the combat table.

102.4%?
That's right. Not 100%, but 102.4%. Just as each level that the mob is above you increases its chance to crit by 0.2%, it also reduces its chance to miss by 0.2%, and your chance to dodge, parry, and block by 0.2%, or a total of 0.8% per level. For a mob +3 levels, that's 2.4% worth of extra hit chance the mob has that you need to make up for on the combat table, so you need 102.4% worth of dodge+block+parry+miss so that you are left with 100% combined on the combat table.

For warriors, this means you actually need 27.4% worth of dodge+block+parry+miss so that you are left with 25% combined on the combat table to add up with 75% from Shield Block. As a warrior with 490 defense, you are getting 5.6% dodge, block, parry, and miss from the 140 defense over 350, for a total of 22.4%. Your basic chances to dodge, block, and parry at level 70 easily cover the remaining 5%, and you probably have deflection and/or shield specialisation talents anyway. It's a difference that makes no difference (though it's important to paladins.)

Overpower And Other Special Cases
Overpower is a pretty special case. It can't be dodged, blocked, or parried - it can only miss, crit, or hit. With talents, you can get an additional 50% chance to critically hit. Overpower will have its own special table. Let's assume we still have a base 15% chance to crit:

- 000-049 = Miss (5%)
- 050-699 = Critical Hit (65%)
- 700-999 = Hit (30%)
If we had a 45% chance to crit as well as the overpower talents, the table would be either miss or critical hit...

Blocks and Critical Hits
Here we speak to the blocked critical hit. Actually, we speak to it here: (Go read about blocking)

Conclusion
We've shown that WoW cannot be using a short-circuit evaluation, even though we already knew that. What does that give to you? Not much, really =) It doesn't change the way the game plays for you, but hey, you have learned a bit more about how the game works! More seriously, you've got a clearer idea of what happens when you put on a piece of gear with +crit or +hit.
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

World of Warcraft™ and Blizzard Entertainment® are all trademarks or registered trademarks of Blizzard Entertainment in the United States and/or other countries. These terms and all related materials, logos, and images are copyright © Blizzard Entertainment. This site is in no way associated with or endorsed by Blizzard Entertainment®.