Ranged combat system

Introduction
Shooting a wild boar in a thick wood is harder than shooting it in an open field yet the vanilla version of Neverwinter Nights 2 does not account for such matters such as trees or rocks and considers all ranged weapons equally good even for long distance shooting. The ranged combat system developed by Rasael adresses those two issues.

Player characters as well as monsters use it.

Objects on the path
The system looks for obstacles that are near the target (near meaning situated in a 4 feet cube centered on the target) and that are between the shooter and the target. Each obstacle adds some penalty :

The penalty caps at 12

Distance and weapons used
There is a penalty applied if the distance to the target is great, that distance depends on the weapon used.

This penalty also caps at 12, both penalties are applied to the attack bonus.

To put things in perspective keep in mind that a fireball spell has a 20 feet radius.