There are a number of systems, statistics, and concepts on which combat in AO rests. These are the major gears of the combat engine that apply to all combat.
This guide will cover the following mechanics: Attack rating, defense rating/evades, initiative & the aggressive/defensive slider, critical hits, and damage rolls vs armor class.
The goal of this guide is to assemble this information in a single place for easy reference and thereby give a comprehensive look at what the combat engine does to resolve an attack cycle for each attack. The bulk of the information contained herein is not new; I do not take credit for researching any of it. Consider this a compilation of many posts made by many posters over time, as well as whatever official Funcom word was to be had on the matter.
II. Attack Rating.
Your Attack Rating is a measure of how good you are at inflicting damage on something. Attack Rating has three effects in combat: first, it determines how often you hit your target via a comparison with the target's Defense Rating; second, it factors into the damage you inflict on a hit as a multiplier; third, it effects your chances of landing a critical hit in comparison to the target's Defense Rating.
Your attack rating can be seen in your Status window. It is calculated by the attack skills your weapon uses plus a bonus called AddAllOff. To see your attack rating with a given weapon, look at the attack skill in its description. If the weapon is 100% pistol, for example, ((1 * your pistol skill) + AddAllOff) is your attack rating. If the weapon is 67% assault rifle 33% ranged energy, your attack rating is (((0.67 * assault rifle skill) + (0.33 * ranged energy skill)) + AddAllOff). Your AddAllOff bonus can be 0, or much higher. There are buffs, items (including your token board), and implants that have AddAllOff bonuses. There are also AddAllOff debuffs, notably blinds, that are quite nasty.
When you attack a target, your Attack Rating is compared to the target's Defense Rating. If your Attack Rating is about equal to or higher than the target's Defense Rating, your chances of hitting it are very good; if your Attack Rating is lower than the target's Defense Rating, your chances of hitting it are very poor. What Defense Rating is and how it's determined is covered in the next section.
Furthermore, your chance of landing a critical hit is increased or decreased proportionally to the difference between your AR and the target's DR. In other words: AR higher than DR, you crit more often, DR higher than AR, you crit less often. This is why high level characters will crit almost every attack against low level mobs: the high level's Attack Rating is far superior to the low level's Defense Rating.
Finally, your Attack Rating is applied in a multiplier to your damage after it's rolled on a hit. This multiplier is (1 + (Attack Rating / 400)) and is applied after the random damage is rolled for your weapon.
Update for Shadowlands: As part of the Shadowlands expansion, there have been two major changes to attack rating.
First, every weapon now has an attribute labeled "Max Beneficial Skill." This attribute is a cap on your attack rating with that weapon, at least as regards the damage multiplier. In other words, if your weapon has an MBS of 1000, the highest your damage multiplier will go is (1 + (1000/400)), even if you get a 2000 attack rating.
The devs have said that MBS should not affect your chance to hit with the weapon, only the damage multiplier, but this has not been confirmed by players via in-game testing to my knowledge.
Secondly, attack rating multipliers have changed for AR over 1000. These multipliers are different for every profession, and are not yet known, but generally have been reported as much lower than pre-SL.
III. Defense Rating / Evades.
Your Defense Rating is a number you cannot view. This may be because your defense rating varies depending on what sort of attack is being directed at you. You have four "defense" skills: Dodge Ranged, Evade Close Combat, Duck Explosions, and Nano Resistance. When you are attacked by something, one of these skills is what is chosen to be your basic defense rating. You can see what percent of a skill is used as the defense rating for weapons and nanos in their description, much like with attack rating. Multiply the skill(s) listed by the percents listed to get your basic defense rating.
Just like AddAllOff, there is an AddAllDef modifier for defense skills.
Having higher defense causes attacks to miss you more, and causes fewer critical hits to land on you. It's very easy in most teams, to tell who hasn't raised their evades: the mobs are critting them on almost every attack
The effectiveness your defense rating has is tied closely to your agg/def slider in your status window. When you are 100% aggressive you will not be missed often at all by most attackers around your own level, unless you have a massive defense rating (ie, Grid Armor), though critical hits are very rare for people with high evades even at 100% aggressive. If you are at 0% aggressive you will be missed very often, especially by attackers with lower attack ratings.
Update for Shadowlands: The agg/def slider is supposed to have a larger effect on your defenses now, according to the Shadowlands patch notes. However, this remains unconfirmed. Some players complain of seeing no effect from going defensive agg/def, others swear by it.
IV. Attack Speed: Initiatives and the Agg/Def Slider.
Every weapon has an Attack Time and a Recharge Time as part of its stats. The Attack Time represents how long it takes for the weapon to "charge up" before you attack, and the Recharge Time represents how long it takes to "recover" after you attack.
Attack time and Recharge time are both capped at 1 second apiece, so no matter how fast your weapon is, and how high your initiatives are, you will only attack once every two seconds (1s attack, 1s recharge - also called 1/1 speed).
A major influence on your attack speed is the position of your agg/def slider. At 100% (all the way right, or fully aggressive) you will attack more quickly. 100% agg/def modifies both attack and recharge time by -0.25 seconds. At approximately 88% agg/def, you have no modifier. Lower than 88% agg/def, you begin to experience penalties - at 0% agg/def you have a +1.75/1.75 penalty to your attack and recharge times.
After your attack speed is modified by the agg/def slider, your initiative applies a modifier to it too. Initiative affects your attack speed in the following way: 300 points of weapons initiative, results in -0.5 seconds to attack time, and -1 second to recharge time. So if you have a weapon that is 1.5/2 speed, getting 300 in your initiative skill will make it 1/1 speed. Or, if you have a 1/1 weapon, and pull your agg/def slider left, having a higher initiative will keep the weapon at 1/1 and you get the bonus of a better DMS too.
Update for Shadowlands: Some weapons now have speed caps on attack, recharge, or both that are individual to that weapon. Regardless of your initiative you cannot get these weapons under their own individual speed caps.
V. Critical Hits.
Occasionally you will land a Critical Hit in combat. Critical Hits are very damaging normal attacks that pass an additional percentage check after the game engine determines that you hit the target. The percent chance of landing a Critical Hit on your target is, at base, 3%. There are a number of ways this is modified, however.
First, there are items and nanos that add directly to your Critical Hit chance. These items, such as scopes, and nanos such as MA Mark of Peril, increase that base 3% chance by a set number. Something that is +5 critical hit mod, means you have a 5% greater chance of scoring a crit.
Second, there is the comparison between your attack rating and the target's defense rating. If your attack rating is higher than your target's defense rating, your chance of scoring a critical hit goes up. If your target's defense is higher than your attack, your chance of scoring a critical hit goes down. No one has figured out the numbers to attach to this but it is felt that the calculation is linearly proportional - in other words, having an attack rating 200 points higher than the target's defense rating, gives twice the crit chance increase as being 100 points higher.
VI. Damage Rolls and ArmorClass.
All weapons have a damage range statistic. This reads "min damage - max damage (crit bonus)" - in other words, a weapon that is 1-100 (100) has min damage 1, max damage 100, crit bonus 100.
When a normal hit is scored with a weapon, a random number is rolled between the min damage and the max damage. This random number is then multiplied by the attack rating multiplier of (1 + (attack rating up to 1000 / 400) + (profession specific AR multiplier over 1000)). This modified number is then subjected to armor class reduction based on the target's armor class for the damage type being used, divided by 10.
However: no matter how good the target's armor, no weapon can do less damage on a hit than (min damage * attack rating modifier). However, all damage is reduced by reflects - ie, reflects are calculated after AC reduction.
Finally, after AC reduction is applied, +damage bonuses from items or buffs is added. Even though these items/buffs say %add damage, they do not add a percent, they just add the fixed number. So a +20 damage ring, is +20 damage per hit. These buffs are the last things added on - they aren't reduced by AC, and they aren't multiplied by your attack rating. To express it in a mathlike pseduo-code:
Critical hit damage is calculated somewhat differently. When a critical hit is scored, no random number is involved. Instead the damage is equal to max damage plus crit bonus, multiplied by attack rating, minus armorclass. As above:
VII. Putting It Together: One Attack Cycle.
So, what happens during a single iteration of the attack cycle? Based on my interpretation, this is my model for what happens when you target something and press Q:
Attack Time. First, the game calculates your attack time.
In Range? The game checks to see if your target is within the range of your weapon.
Hit or Miss? After the attack time is met, if you are in range, the game calculates if you hit or miss your target.
Critical Hit? If you hit, the game rolls your critical hit chance.
Damage. If you hit, damage is calculated. If you crit, crit damage is used, else normal damage is.
Recharge Time. Hit or miss, the recharge time for your weapon is calculated and applied.
Then the cycle starts over again at Step 1 until you press Q to stop attacking, your target dies, or you die.