# Hit Chance

Chance to hit your target is calculated differently for Unarmed/Melee and Small Guns/Big Guns/Energy Weapons/Throwing.

## Contents

## Unarmed/Melee attack Hit Chance

Chance to hit your target with an Unarmed or Melee attack.

The formula is the following:

- Take your Unarmed/Melee skill.
- Deduct AC of the target.
- Deduct 20% for each point of ST missing to use the weapon properly.
- Accurate weapons get a 20% bonus.
- Aimed Attack gives you a penalty to hit chance depending on the limb you're aiming for.
- Darkness should give a malus, but this isn't implemented yet.
- After all the above modifiers your chance to hit is as low as 5%, but never above 95%.

Also note, that there are other variables (ex. perks, traits, injuries, obstacles, crafted weapons) affecting your current chance to hit.

## Ranged attack Hit Chance

Chance to hit your target with a ranged attack.

The formula is the following:

- Start with weapon skill.
- Add (PE-2)x16% for all Long Range weapons(i.e. with a range of 26+) that were already implemented in FO1, or are upgrades of these weapons, (PE-2)x8% for the rest.
- The scoped hunting rifle gets (PE-2)x20% instead of the x16% if you shoot at a target that is at least 5 hexes away, or no PE-bonus at all for closer enemies.
- It seems the other newly implemented Long Range weapons in FO2 are bugged, they only get the (PE-2)x8% while all long range weapons from FO1 had the (PE-2)x16%. (most weapons were implemented in FO1, but if in doubt, google your weapon of interest)
- Deduct 4% per hex between you and your target.
- Deduct 20% for each point of ST missing to use the weapon properly.
- Accurate weapons get a 20% bonus.
- Deduct the AC of your target after modifying it with the used ammo type (each ammo has AC modifier) - the resulting number cannot go below zero
- Darkness should give a minus, but this isn't implemented yet.
- Obstructions in the line of fire (creatures between you and your target) gives you a certain minus.
- Aimed Attack gives you a penalty to hit chance depending on the limb you're aiming for.
- Sharpshooter, despite its description gives you 8% to Hit chance.
- After all the above modifiers your chance to hit is as low as 5%, but never above 95%.
- Weapons with perk Scoped are affecting your chance to hit according to range.

Also note, that there are other variables (ex. perks, traits, injuries, obstacles, crafted weapons) affecting your current chance to hit.

## Formula (Ranged Hit Chance)

`SKILL + ?Scoped(TARGET_HEX_DISTANCE>4 ? (PE-2)*20:-Infinity) or ?Long Range((PE-2)*16) or `

(PE-2)*8 + ?Sharpshooter(8) + ?Accurate(20) -4*TARGET_HEX_DISTANCE

-20*NaturalNumber((WEAPON_REQ_ST - ?Weapon Handling(2)) - ST)
-NaturalNumber(TARGET_AC - AC_MOD)

-?Aimed Attack(X)

*Now just subtract the target's armor or helmet's crafting bonus, and add your weapons crafting bonus*