SetBaseAttackBonus(int, object)

From NWN Lexicon
Jump to: navigation, search

Sets the number of base attacks for the specified creature

void SetBaseAttackBonus(
    int nBaseAttackBonus,
    object oCreature = OBJECT_SELF
);

Parameters

nBaseAttackBonus
Attack bonus to set
oCreature
Creature to set the bonus on (Default: OBJECT_SELF)


Description

Sets the number of base attacks for the specified creatures. The range of values accepted are from 1 to 6.


Remarks

Contrary to the in-toolset description, this function works on player character.

This function does not actually set the base attack bonus for the character. Rather, it sets the number of attacks he can make in a round. As is standard in NWN, each successive attack per round suffers a -5 penalty. If the character has levels in Monk and fights with Unarmed Strike, each successive attack per round suffers a -3 penalty. These values might be altered with ruleset.2da edits.

The additional attacks are not shown on the player's character sheet.

Bioware use this to limit the amount of attacks high end golems can make. It is probably the best use case for it, since increasing the attack amounts can easily put the to-hit modifiers into high negatives.

This can be used on PCs and with ruleset.2da alterations can provide some potentially interesting progressions for custom modules.

If you want to temporarily add some attacks EffectModifyAttacks may be a good option, although make sure to read the remarks on how it operates.


Version

1.61


See Also

functions:  RestoreBaseAttackBonus

EffectModifyAttacks



 author: Lilac Soul