Difference between revisions of "SetBaseAttackBonus"

From NWN Lexicon
Jump to: navigation, search
 
Line 1: Line 1:
 +
{{DISPLAYTITLE:SetBaseAttackBonus(int, object)}}__NOTOC__
 
Sets the number of base attacks for the specified creature
 
Sets the number of base attacks for the specified creature
  
Line 7: Line 8:
 
);
 
);
 
</nwscript>
 
</nwscript>
{{DISPLAYTITLE:SetBaseAttackBonus(int, object)}}
+
 
 
===Parameters===
 
===Parameters===
 
; nBaseAttackBonus
 
; nBaseAttackBonus
 
: Attack bonus to set
 
: Attack bonus to set
 
 
; oCreature
 
; oCreature
 
: Creature to set the bonus on (Default: OBJECT_SELF)
 
: Creature to set the bonus on (Default: OBJECT_SELF)
 +
  
 
===Description===
 
===Description===
 +
 
Sets the number of base attacks for the specified creatures. The range of values accepted are from 1 to 6.
 
Sets the number of base attacks for the specified creatures. The range of values accepted are from 1 to 6.
 +
  
 
===Remarks===
 
===Remarks===
 +
 
Contrary to the in-toolset description, this function works on player character.
 
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 [http://nwn.wikia.com/wiki/Attacks_per_round 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.
+
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 [http://nwn.wikia.com/wiki/Attacks_per_round 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.
 
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.
 
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===
 
===Version===
 +
 
1.61
 
1.61
 +
  
 
===See Also===
 
===See Also===
Line 34: Line 45:
 
| width="1px" align="right" valign="top" | <font color="gray">functions: </font>
 
| width="1px" align="right" valign="top" | <font color="gray">functions: </font>
 
|[[RestoreBaseAttackBonus]]
 
|[[RestoreBaseAttackBonus]]
 +
 +
[[EffectModifyAttacks]]
 
|} <br />
 
|} <br />
 
----
 
----

Latest revision as of 11:35, 16 April 2021

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