Allows modifying which feats count as which for the weapon feats. Can be used to add feats like WEAPON_FOCUS_* to custom weapons. All you have to do is:
For example, if you added the FEAT_WEAPON_FOCUS_KATAR
on line 3000 of your feat.2da and you added the new BASE_ITEM_KATAR
on line 310 of your baseitems.2da, in the OnModuleLoad script just add (don't forget to include the nwnx_weapon script) :
Script function | Description |
---|---|
NWNX_Weapon_SetWeaponFocusFeat() | Associate a weapon focus feat to a weapon. You may set multiple feats for each weapon and all will function. |
NWNX_Weapon_SetWeaponFinesseSize() | Define the required creature size for a weapon in order to be finessable |
NWNX_Weapon_SetWeaponUnarmed() | Set the weapon to be considered unarmed regarding the finesse feat |
NWNX_Weapon_SetWeaponImprovedCriticalFeat() | Associate a weapon improved critical feat to a weapon You may set multiple feats for each weapon and all will function. |
NWNX_Weapon_SetWeaponSpecializationFeat() | Associate a weapon specialization feat to a weapon You may set multiple feats for each weapon and all will function. |
NWNX_Weapon_SetEpicWeaponFocusFeat() | Associate an epic weapon focus feat to a weapon You may set multiple feats for each weapon and all will function. |
NWNX_Weapon_SetEpicWeaponSpecializationFeat() | Associate an epic weapon specialization feat to a weapon You may set multiple feats for each weapon and all will function. |
NWNX_Weapon_SetEpicWeaponOverwhelmingCriticalFeat() | Associate an epic weapon overwhelming critical feat to a weapon You may set multiple feats for each weapon and all will function. |
NWNX_Weapon_SetEpicWeaponDevastatingCriticalFeat() | Associate an epic weapon devastating critical feat to a weapon You may set multiple feats for each weapon and all will function. |
NWNX_Weapon_SetWeaponOfChoiceFeat() | Associate a weapon of choice feat to a weapon You may set multiple feats for each weapon and all will function. |
NWNX_Weapon_SetGreaterWeaponFocusFeat() | Associate a greater weapon focus feat (default: +1 attack bonus) to a weapon You may set multiple feats for each weapon and all will function. |
NWNX_Weapon_SetGreaterWeaponSpecializationFeat() | Associate a greater weapon specialization feat (default: +2 damage bonus) to a weapon You may set multiple feats for each weapon and all will function. |
NWNX_Weapon_SetWeaponIsMonkWeapon() | Set the weapon to be considered a monk weapon (requires activation of CombatModes plugin for Flurry of Blows) |
NWNX_Weapon_SetOption() | Set different options of the plugin |
NWNX_Weapon_SetDevastatingCriticalEventScript() | Set a script to be called when a devastating critical event occurs |
NWNX_Weapon_GetDevastatingCriticalEventData() | Must be called inside the devastating critical event script. Returns a structure with the data of the devastating critical event (weapon, target and damage) |
NWNX_Weapon_BypassDevastatingCritical() | Must be called inside the devastating critical event script. If called, no devastating critical will occur. |
NWNX_Weapon_SetOneHalfStrength() | Gives a melee weapon extra damage equal to one-half strength modifier. |
NWNX_Weapon_GetOneHalfStrength() | Retrieves if a melee weapon is receiving extra strength |
The NWNX_Weapon_SetOption() function can be used to define the attack and damage bonusses of the Greater Weapon Focus Feats and Greater Weapon Specialization Feats respectively.
This script just prints some info to the log and then bypasses the devastating critical 50% of the time. You have to set your script with NWNX_Weapon_SetDevastatingCriticalEventScript() (in the OnModuleLoad script for example)
oWeapon
in NWNX_Weapon_DevastatingCriticalEvent_Data
will be OBJECT_INVALID
for Gloves/Unarmed Strike Devastating Critical Events.Files | |
file | nwnx_weapon.nss |
Classes | |
struct | NWNX_Weapon_DevastatingCriticalEvent_Data |
Devastating critical event data. More... | |
Functions | |
void | NWNX_Weapon_SetWeaponFocusFeat (int nBaseItem, int nFeat) |
Set nFeat as weapon focus feat for a base item. More... | |
void | NWNX_Weapon_SetWeaponFinesseSize (int nBaseItem, int nSize) |
Set required creature size for a weapon base item to be finessable. More... | |
int | NWNX_Weapon_GetWeaponFinesseSize (int nBaseItem) |
Get required creature size for a weapon base item to be finessable. More... | |
void | NWNX_Weapon_SetWeaponUnarmed (int nBaseItem) |
Set weapon base item to be considered as unarmed for weapon finesse feat. More... | |
void | NWNX_Weapon_SetWeaponImprovedCriticalFeat (int nBaseItem, int nFeat) |
Set a feat as weapon improved critical for a base item. More... | |
void | NWNX_Weapon_SetWeaponSpecializationFeat (int nBaseItem, int nFeat) |
Set a feat as weapon specialization for a base item. More... | |
void | NWNX_Weapon_SetEpicWeaponFocusFeat (int nBaseItem, int nFeat) |
Set a feat as epic weapon focus for a base item. More... | |
void | NWNX_Weapon_SetEpicWeaponSpecializationFeat (int nBaseItem, int nFeat) |
Set a feat as epic weapon specialization for a base item. More... | |
void | NWNX_Weapon_SetEpicWeaponOverwhelmingCriticalFeat (int nBaseItem, int nFeat) |
Set a feat as epic weapon overwhelming critical for a base item. More... | |
void | NWNX_Weapon_SetEpicWeaponDevastatingCriticalFeat (int nBaseItem, int nFeat) |
Set a feat as epic weapon devastating critical for a base item. More... | |
void | NWNX_Weapon_SetWeaponOfChoiceFeat (int nBaseItem, int nFeat) |
Set a feat as weapon of choice for a base item. More... | |
void | NWNX_Weapon_SetGreaterWeaponSpecializationFeat (int nBaseItem, int nFeat) |
Set a feat as greater weapon specialization for a base item. More... | |
void | NWNX_Weapon_SetGreaterWeaponFocusFeat (int nBaseItem, int nFeat) |
Set a feat as greater weapon focus for a base item. More... | |
void | NWNX_Weapon_SetWeaponIsMonkWeapon (int nBaseItem) |
Set base item as monk weapon. More... | |
void | NWNX_Weapon_SetOption (int nOption, int nVal) |
Set plugin options. More... | |
void | NWNX_Weapon_SetDevastatingCriticalEventScript (string sScript) |
Set Devastating Critical Event Script. More... | |
struct NWNX_Weapon_DevastatingCriticalEvent_Data | NWNX_Weapon_GetDevastatingCriticalEventData () |
Get Devastating Critical Event Data. More... | |
void | NWNX_Weapon_BypassDevastatingCritical () |
Bypass Devastating Critical. More... | |
void | NWNX_Weapon_SetOneHalfStrength (object oWeapon, int nEnable, int bPersist=FALSE) |
Sets weapon to gain .5 strength bonus. More... | |
int | NWNX_Weapon_GetOneHalfStrength (object oWeapon) |
Gets if the weapon is set to gain addition .5 strength bonus. More... | |
void | NWNX_Weapon_SetMaxRangedAttackDistanceOverride (int nBaseItem, float fMax, float fMaxPassive, float fPreferred) |
Override the max attack distance of ranged weapons. More... | |
Variables | |
const int | NWNX_WEAPON_GETDATA_DC = 0 |
Get Devastating Critical Data. More... | |
const int | NWNX_WEAPON_SETDATA_DC_BYPASS = 0 |
Set Devastating Critical Bypass. More... | |
void NWNX_Weapon_SetWeaponFocusFeat | ( | int | nBaseItem, |
int | nFeat | ||
) |
Set nFeat as weapon focus feat for a base item.
nBaseItem | The base item id. |
nFeat | The feat to set. |
Definition at line 139 of file nwnx_weapon.nss.
void NWNX_Weapon_SetWeaponFinesseSize | ( | int | nBaseItem, |
int | nSize | ||
) |
Set required creature size for a weapon base item to be finessable.
nBaseItem | The base item id. |
nSize | The creature size minimum to consider this weapon finessable. |
Definition at line 169 of file nwnx_weapon.nss.
int NWNX_Weapon_GetWeaponFinesseSize | ( | int | nBaseItem | ) |
Get required creature size for a weapon base item to be finessable.
nBaseItem | The base item id. |
Definition at line 179 of file nwnx_weapon.nss.
void NWNX_Weapon_SetWeaponUnarmed | ( | int | nBaseItem | ) |
Set weapon base item to be considered as unarmed for weapon finesse feat.
nBaseItem | The base item id. |
Definition at line 190 of file nwnx_weapon.nss.
void NWNX_Weapon_SetWeaponImprovedCriticalFeat | ( | int | nBaseItem, |
int | nFeat | ||
) |
Set a feat as weapon improved critical for a base item.
nBaseItem | The base item id. |
nFeat | The feat to set. |
Definition at line 210 of file nwnx_weapon.nss.
void NWNX_Weapon_SetWeaponSpecializationFeat | ( | int | nBaseItem, |
int | nFeat | ||
) |
Set a feat as weapon specialization for a base item.
nBaseItem | The base item id. |
nFeat | The feat to set. |
Definition at line 220 of file nwnx_weapon.nss.
void NWNX_Weapon_SetEpicWeaponFocusFeat | ( | int | nBaseItem, |
int | nFeat | ||
) |
Set a feat as epic weapon focus for a base item.
nBaseItem | The base item id. |
nFeat | The feat to set. |
Definition at line 149 of file nwnx_weapon.nss.
void NWNX_Weapon_SetEpicWeaponSpecializationFeat | ( | int | nBaseItem, |
int | nFeat | ||
) |
Set a feat as epic weapon specialization for a base item.
nBaseItem | The base item id. |
nFeat | The feat to set. |
Definition at line 240 of file nwnx_weapon.nss.
void NWNX_Weapon_SetEpicWeaponOverwhelmingCriticalFeat | ( | int | nBaseItem, |
int | nFeat | ||
) |
Set a feat as epic weapon overwhelming critical for a base item.
nBaseItem | The base item id. |
nFeat | The feat to set. |
Definition at line 250 of file nwnx_weapon.nss.
void NWNX_Weapon_SetEpicWeaponDevastatingCriticalFeat | ( | int | nBaseItem, |
int | nFeat | ||
) |
Set a feat as epic weapon devastating critical for a base item.
nBaseItem | The base item id. |
nFeat | The feat to set. |
Definition at line 260 of file nwnx_weapon.nss.
void NWNX_Weapon_SetWeaponOfChoiceFeat | ( | int | nBaseItem, |
int | nFeat | ||
) |
Set a feat as weapon of choice for a base item.
nBaseItem | The base item id. |
nFeat | The feat to set. |
Definition at line 270 of file nwnx_weapon.nss.
void NWNX_Weapon_SetGreaterWeaponSpecializationFeat | ( | int | nBaseItem, |
int | nFeat | ||
) |
Set a feat as greater weapon specialization for a base item.
nBaseItem | The base item id. |
nFeat | The feat to set. |
Definition at line 230 of file nwnx_weapon.nss.
void NWNX_Weapon_SetGreaterWeaponFocusFeat | ( | int | nBaseItem, |
int | nFeat | ||
) |
Set a feat as greater weapon focus for a base item.
nBaseItem | The base item id. |
nFeat | The feat to set. |
Definition at line 159 of file nwnx_weapon.nss.
void NWNX_Weapon_SetWeaponIsMonkWeapon | ( | int | nBaseItem | ) |
Set base item as monk weapon.
nBaseItem | The base item id. |
Definition at line 199 of file nwnx_weapon.nss.
void NWNX_Weapon_SetOption | ( | int | nOption, |
int | nVal | ||
) |
Set plugin options.
nOption | The option to change from Weapon Options. |
nVal | The new value of the option. |
Definition at line 280 of file nwnx_weapon.nss.
void NWNX_Weapon_SetDevastatingCriticalEventScript | ( | string | sScript | ) |
Set Devastating Critical Event Script.
sScript | The script to call when a Devastating Critical occurs. |
Definition at line 290 of file nwnx_weapon.nss.
struct NWNX_Weapon_DevastatingCriticalEvent_Data NWNX_Weapon_GetDevastatingCriticalEventData | ( | ) |
Get Devastating Critical Event Data.
Definition at line 309 of file nwnx_weapon.nss.
void NWNX_Weapon_BypassDevastatingCritical | ( | ) |
Bypass Devastating Critical.
Definition at line 299 of file nwnx_weapon.nss.
void NWNX_Weapon_SetOneHalfStrength | ( | object | oWeapon, |
int | nEnable, | ||
int | bPersist = FALSE |
||
) |
Sets weapon to gain .5 strength bonus.
oWeapon | Should be a melee weapon. |
nEnable | TRUE for bonus. FALSE to turn off bonus. |
bPersist | whether the two hand state should persist to the gff file. |
Definition at line 324 of file nwnx_weapon.nss.
int NWNX_Weapon_GetOneHalfStrength | ( | object | oWeapon | ) |
Gets if the weapon is set to gain addition .5 strength bonus.
oWeapon | the weapon |
Definition at line 333 of file nwnx_weapon.nss.
void NWNX_Weapon_SetMaxRangedAttackDistanceOverride | ( | int | nBaseItem, |
float | fMax, | ||
float | fMaxPassive, | ||
float | fPreferred | ||
) |
Override the max attack distance of ranged weapons.
nBaseItem | The baseitem id. |
fMax | The maximum attack distance. Default is 40.0f. |
fMaxPassive | The maximum passive attack distance. Default is 20.0f. Seems to be used by the engine to determine a new nearby target when needed. |
fPreferred | The preferred attack distance. See the PrefAttackDist column in baseitems.2da, default seems to be 30.0f for ranged weapons. |
Definition at line 342 of file nwnx_weapon.nss.
const int NWNX_WEAPON_OPT_GRTFOCUS_AB_BONUS = 0 |
Greater Focus Attack Bonus.
Definition at line 14 of file nwnx_weapon.nss.
const int NWNX_WEAPON_OPT_GRTSPEC_DAM_BONUS = 1 |
Greater Specialization Damage Bonus.
Definition at line 15 of file nwnx_weapon.nss.
const int NWNX_WEAPON_GETDATA_DC = 0 |
Get Devastating Critical Data.
Definition at line 19 of file nwnx_weapon.nss.
const int NWNX_WEAPON_SETDATA_DC_BYPASS = 0 |
Set Devastating Critical Bypass.
Definition at line 22 of file nwnx_weapon.nss.