Attack rolledit

From NWNWiki

When an attack is made, the attacker rolls a d20, and adds his attack bonus to the roll. If this sum is equal to or greater than the defender's armor class, then a hit is scored and damage is rolled (unless the attack is negated by another condition such as epic dodge or concealment).

An unmodified die roll of 20 always hits, and an unmodified roll of 1 always misses, regardless of the defender's armor class.