NWNX_FEAT_SHOW_EFFECT_ICON
- Helpful when debugging, this shows the effect's icon (the red and green squares). Some builders may even wish this permanently.NWNX_FEAT_CUSTOM_SPELL_ID
- A custom spell id given to all effects created by this plugin.Adding new feats is beyond the scope of this documentation. The builder should know how to add new feats by adding a new entry in the feat.2da
as well as adding the appropriate TLK reference identifiers for that new feat then adjusting the appropriate columns for that feat.
Once your feat has been added (or it's also fine to modify existing feats) builders run the NWNX_Feat_SetFeatModifier() as illustrated below. The builder can use as many modifiers as they wish for one feat including the same modifiers with different parameters.
The NWNX_Feat plugin does not provide modifications to skill ranks, use the NWNX_SkillRanks plugin for changing those.
To use the 2da method, the builder must create a new column at the end of the feat.2da
named FeatModsTable. This column should then be populated with a string value that references another 2da file in which we will define our feat modifiers. Once that is done the builder needs to include nwnx_feat_2da and make sure to run NWNX_Feat_LoadFeatModifiers()
in their OnModuleLoad script.
For example, we've inserted a new feat called Fireproof into feat.2da
at line 1200. In the FeatModsTable
column we enter FEATMOD_FIREPRF (Remember maximum 16 characters, case insensitive)
We will now create and define our featmod_fireprf.2da
file and enter appropriate lines for each modifier we want our feat to grant. The end result will look something like this:
These commands should be ran on_module_load
.
The AB
entry is used to modify an attack bonus. Note: this is not a change to the base attack bonus, it's added on top of that.
The ABILITY
entry is used to modify an ability bonus.
The ABVSRACE
entry is used to modify the attack bonus versus another race.
The AC
entry is used to modify the base AC.
The ACVSRACE
entry is used to modify the base AC versus another race.
The ARCANESPELLFAILURE
can modify the arcane spell failure for the creature.
The BONUSSPELL
entry is used to grant additional spell slots to a class at a level. Param1 is the Class constant ID, param2 is the level and param3 is the amount of spells gained.
The CONCEALMENT
entry is used to grant an innate concealment.
The DAMAGE
entry gives a damage increase or decrease, as per the EffectDamageIncrease(/Decrease) effect
The DMGREDUCTION
entry gives an innate damage reduction
The DMGRESIST
entry gives an innate resistance to damage types
The DMGIMMUNITY
entry gives an innate immunity to damage types
The HASTE
entry is used to grant haste.
The IMMUNITY
entry is used to grant a total immunity to a variety of effects.
The MOVEMENTSPEED
can modify the speed by default.
The REGENERATION
entry is used to grant innate regeneration.
The SAVE
entry is used to modify base save values.
The SAVEVSRACE
entry is used to modify base save values vs a specific race. Param1 is the Save constant ID and param2 is the target race constant ID and param3 is the modifier.
The SAVEVSTYPE
entry is used to modify base save values vs a specific type. Param1 is the Save constant ID and param2 is the Saving Throw Type constant ID and param3 is the modifier.
The SAVEVSTYPERACE
entry is used to modify base save values vs a specific type versus a specific race. Param1 is the Save constant ID and param2 is the Saving Throw Type constant ID and param3 is the Racial Type constant ID and param4 is the modifier.
The SEEINVISIBLE
entry is used to grant See Invisibility.
The SPELLIMMUNITY
entry is used to grant a total immunity to specific spells. Note: Only spells that can be resisted can have immunities.
The SRCHARGEN
entry is used to award a default spell resistance on character creation.
The SRINCLEVEL
entry is used to award a spell resistance racial bonus as the creature's level increases.
The SPELLSAVEDC
entry is used to modify a creature's spell DCs.
The SPELLSAVEDCFORSCHOOL
entry is used to modify a creature's spell DCs for a spell school.
The SPELLSAVEDCFORSPELL
entry is used to modify a creature's spell DCs for an individual spell.
The TRUESEEING
entry is used to grant True Seeing.
The ULTRAVISION
entry is used to grant Ultravision.
The VISUALEFFECT
entry is used to grant a Visual Effect to the feat holder.
Files | |
file | nwnx_feat.nss |
file | nwnx_feat_2da.nss |
Parse a column in the feat.2da to load the modifiers. | |
Functions | |
void | NWNX_Feat_SetFeatModifier (int iFeat, int iMod, int iParam1=0xDEADBEEF, int iParam2=0xDEADBEEF, int iParam3=0xDEADBEEF, int iParam4=0xDEADBEEF) |
Sets a feat modifier. More... | |
int | NWNX_Feat_GetModifierConstant (string featMod) |
Translate a modifier type from a string to its constant. More... | |
void | NWNX_Feat_LoadFeatModifiers (string sColumnName="FeatModsTable") |
Loops through feat.2da and checks for the column for feat modifications and sets them. More... | |
void NWNX_Feat_SetFeatModifier | ( | int | iFeat, |
int | iMod, | ||
int | iParam1 = 0xDEADBEEF , |
||
int | iParam2 = 0xDEADBEEF , |
||
int | iParam3 = 0xDEADBEEF , |
||
int | iParam4 = 0xDEADBEEF |
||
) |
Sets a feat modifier.
iFeat | The Feat constant or value in feat.2da. |
iMod | The feat modifier to set. |
iParam1,iParam2,iParam3,iParam4 | The parameters for this feat modifier. |
Definition at line 54 of file nwnx_feat.nss.
int NWNX_Feat_GetModifierConstant | ( | string | featMod | ) |
Translate a modifier type from a string to its constant.
featMod | The string representation of the constant. |
Definition at line 17 of file nwnx_feat_2da.nss.
void NWNX_Feat_LoadFeatModifiers | ( | string | sColumnName = "FeatModsTable" | ) |
Loops through feat.2da and checks for the column for feat modifications and sets them.
sColumnName | The column name in the feat.2da that defines the 2da for the feat mods. |
Definition at line 52 of file nwnx_feat_2da.nss.
const int NWNX_FEAT_MODIFIER_INVALID = 0 |
Definition at line 13 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_AB = 1 |
Definition at line 14 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_ABILITY = 2 |
Definition at line 15 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_ABVSRACE = 3 |
Definition at line 16 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_AC = 4 |
Definition at line 17 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_ACVSRACE = 5 |
Definition at line 18 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_ARCANESPELLFAILURE = 6 |
Definition at line 19 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_CONCEALMENT = 7 |
Definition at line 20 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_DMGIMMUNITY = 8 |
Definition at line 21 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_DMGREDUCTION = 9 |
Definition at line 22 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_DMGRESIST = 10 |
Definition at line 23 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_IMMUNITY = 11 |
Definition at line 24 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_MOVEMENTSPEED = 12 |
Definition at line 25 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_REGENERATION = 13 |
Definition at line 26 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_SAVE = 14 |
Definition at line 27 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_SAVEVSRACE = 15 |
Definition at line 28 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_SAVEVSTYPE = 16 |
Definition at line 29 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_SAVEVSTYPERACE = 17 |
Definition at line 30 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_SPELLIMMUNITY = 18 |
Definition at line 31 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_SRCHARGEN = 19 |
Definition at line 32 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_SRINCLEVEL = 20 |
Definition at line 33 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_SPELLSAVEDC = 21 |
Definition at line 34 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_BONUSSPELL = 22 |
Definition at line 35 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_TRUESEEING = 23 |
Definition at line 36 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_SEEINVISIBLE = 24 |
Definition at line 37 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_ULTRAVISION = 25 |
Definition at line 38 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_HASTE = 26 |
Definition at line 39 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_VISUALEFFECT = 27 |
Definition at line 40 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_SPELLSAVEDCFORSCHOOL = 28 |
Definition at line 41 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_SPELLSAVEDCFORSPELL = 29 |
Definition at line 42 of file nwnx_feat.nss.
const int NWNX_FEAT_MODIFIER_DAMAGE = 30 |
Definition at line 43 of file nwnx_feat.nss.