IP CONST DAMAGEBONUS *

The IP_CONST_DAMAGEBONUS_* constants are used in NWScript to indicate an amount of damage inflicted by an item property. The main motivation for these constants is to allow the specification of variable damage, as when a weapon inflicts an extra die of damage. The exact values correspond to rows in, although the higher rows in this .2da (for damage bonuses +11 through +20) do not have symbolic constants defined by default.

For the smaller fixed bonuses (specifically +1 to +5), the amount of the bonus can be used instead of the constant (although this is poor style), but not so for the higher fixed bonuses (for example, 16, not 6, is the value of the constant that indicates a +6 bonus). Thus, it is important to use these symbolic constants when they are called for. (They can be used interchangeably with the DAMAGE_BONUS_* constants, though, provided no custom content is used, but doing so is not the best practice for writing robust scripts. In particular, the DAMAGE_BONUS_* constants correspond to hardcoded values, not .2da rows. BioWare did define  to match the hardcoded constants, but this correspondence is not guaranteed if the .2da is modified.) For the higher fixed bonuses and any custom content, it is advisable to define custom symbolic constants to keep scripts human-readable.