Sorry for the necro, but this is one of the first links in the Google search. I did a bunch of testing and number crunching on Enhanced Edition and I think this is the formula:

Chance to Hit = Offence Rating * (1 - Defense Rating/200) + 10

The number that is displayed on the UI is then the floor of that number (e.g. 33.8% => 33%). I'm not sure if internally, the decimal is kept during combat calculations or if the floor is used.

Example:
Given an offence rating of 130 and a defense rating of 96, the chance to hit will be:
Code
CtH = OR   * (1 - DR/200) + 10
    = 130  * (1 - 96/200) + 10
    = 130  * (1 - .48   ) + 10
    = 130  * .52          + 10
    = 67.6                + 10
    = 77.6%
    (UI will display 77%)


An interesting conclusion about this formula is that at 200 defense rating, any offence rating is completely nullified, and chance to hit will be 10%. Above 200 defense rating, higher offence rating actually starts to hurt your chance to hit. The good thing is, short of hacking the game, I don't think 200 defense rating is possible. You would need 65 dex to achieve that.




Research notes:
I derived the formula using numbers from one-handed strength weapons, but I checked it on other weapon configurations and it still applied in the following cases:
Code
 One-handed    | STR       | Swords, axes
 Two-handed    | STR       | Swords, axes
 1H + Shield   | STR       |
 Dual-wielding | STR + STR |
 One-handed    | DEX       | Daggers, knives
 Two-handed    | DEX       | Bows (pre-range penalty)
 1H + Shield   | DEX       |
 Dual-wielding | DEX + DEX |
 Two-handed    | INT       | Staves
 Dual-wielding | STR + DEX | Takes the lower offence rating between STR/DEX
 Dual-wielding | DEX + STR | Same as STR + DEX
 Dual-wielding | STR + INT | Takes the lower offence rating between STR/INT, but only the STR weapon is used to attack
 Dual-wielding | DEX + INT | Same as STR + INT (but with DEX instead of STR)


Exceptions:
Code
 One-handed    | INT       | Wands always have 100% chance to hit
 Two-handed    | INT + INT | Same as 1H INT
 Dual-wielding | INT + STR | Only the wand is used to attack (100% chance to hit)
 Dual-wielding | INT + DEX | Only the wand is used to attack (100% chance to hit)


Anomaly:
  • I experienced some inconsistent behavior with Jahan and Wolgraff where they had a flat 5% increase to chance to hit. After playing around with a few configurations on each of them, this 5% increase sometimes disappeared and reappeared, and I was unable to figure out what the cause was. I did not test with Bairdotr or Madora or any other companion.

Last edited by Raze; 03/10/20 12:14 AM. Reason: enable UBBCode