Hickory: No, it's based on your ability To Hit dice (via your weapon and your stats), and the enemy's stats (armour rating, dodge, speed, dexterity etc.), and darkness also factors in.
hercufles: Thanks so i need to higher up my dex?
Dexterity is usually only for book 2 for piercing weapons. If you are a bow/marksman, go with dexterity, if you are a fighter, go with either strength, endurance or speed as they affect your durability and your damage. A good combo is strength/endurance or strength/speed, speed/endurance. The way you get around not being able to hit enemies is by investing at least 2 points in a weapon skill per lvl for melee.
If you want to use dexterity and still do melee weapons go (2) dexterity per lvl with (1) into endurance each lvl as well. That way your not a glass cannon and still can take hits.