Back to Attributes.
The attack score is a combination of a character’s base attack, which varies by class, plus half of the character’s strength and dexterity modifiers. talents, spells, skills, status effects, high-quality equipment, and the difficulty setting can further alter this score.
The formula used to determine whether an attack hits is, simplified
Hit = Random(100) < (AttackRating - DefenseRating).
The exact details on Attack implementation can be found on the official toolset wiki
When striking from directly behind a target, an attacker gains a large bonus to attack as well as an increased chance to score a critical hit. These bonuses gradually diminish the further the attacker moves around the side of the target. The black segment of the red ring around an enemy’s feet shows the flanking area. Certain talents can fully or partially protect a character from being flanked. (For rogues, successful flanking attacks are backstabs).
To learn more about the effects of flanking, please check here.