NWNWiki
Advertisement
NWNWiki
3,718
pages

The DAMAGE_BONUS_* constants are used in NWScript to indicate an amount of damage for certain effects. The main motivation for these constants is to allow the specification of variable damage, as when giving someone the ability to inflict an extra die of damage.

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 IP_CONST_DAMAGEBONUS_* constants, though, provided no custom content is used, but doing so is not the best practice for writing robust scripts.)

Damage bonus constants
constant bonus amount
DAMAGE_BONUS_1 +1
DAMAGE_BONUS_2 +2
DAMAGE_BONUS_3 +3
DAMAGE_BONUS_4 +4
DAMAGE_BONUS_5 +5
DAMAGE_BONUS_6 +6
DAMAGE_BONUS_7 +7
DAMAGE_BONUS_8 +8
DAMAGE_BONUS_9 +9
DAMAGE_BONUS_10 +10
DAMAGE_BONUS_11 +11
DAMAGE_BONUS_12 +12
DAMAGE_BONUS_13 +13
DAMAGE_BONUS_14 +14
DAMAGE_BONUS_15 +15
DAMAGE_BONUS_16 +16
DAMAGE_BONUS_17 +17
DAMAGE_BONUS_18 +18
DAMAGE_BONUS_19 +19
DAMAGE_BONUS_20 +20
DAMAGE_BONUS_1d4 +d4
DAMAGE_BONUS_1d6 +d6
DAMAGE_BONUS_1d8 +d8
DAMAGE_BONUS_1d10 +d10
DAMAGE_BONUS_1d12 +d12
DAMAGE_BONUS_2d4 +2d4
DAMAGE_BONUS_2d6 +2d6
DAMAGE_BONUS_2d8 +2d8
DAMAGE_BONUS_2d10 +2d10
DAMAGE_BONUS_2d12 +2d12

See also[]

Advertisement