Scripts can return absolute or relative values. We record an absolute value and a relative value for the hit bonus. We proceed as follows:
The relative value is set to zero and the absolute value is set to the previously calculated value for the Hit Bonus.
If any script returns a value that begins with a plus sign or a minus sign then that value replaces the relative value.
If any script returns a number without any sign then that value replaces the absolute value.
The final value for the Hit Bonus is the absolute value plus the relative value.
Example: You might define a special ability named 'IsSleeping'. The GetItemTargetHitBonus script for 'IsSleeping' will probably return a large number such as “10000” to ensure the target's death.
Example: A drunken Priest might have a Special Ability named 'Tipsy'. The GetItemTargetHitBonus script might return a value of “+12” to cause the hitpoint damage to be 12 greater than normal.
Character (the attacker)
Character (the target)
Item