Non Finessable Weapons

hi

Is it possible through feat.2da, or baseitems.2da to make a non finessable weapon finessable without using NWNX?

Also, i’m having trouble removing item properties on rest (darkfire, flame weapon, GMW ect…) How can I remove all temporary item property effects on rest?

Unfortunately, weapon finesse is hard-coded. Personally, I’d love to exclude the mace from that list, but I can’t.
With the release of 1.79 there is now a ruleset.2da which exposes some of the previously hard-coded features. Hopefully a future release will add the weapon finesse rules to that 2da.

Yeah I checked that .2da, it’s awesome. I hope so too 'cause I doubt I can get NWNXEE working unless they make it available for windows.

The Enhanced Edition offers a limited workaround via scripting thanks to some new functions.
Keep in mind that this won’t replicate the baseline weapon finesse mechanics 100%, what it will do is grant an attack bonus if you are wearing specific non finessable weapons that you want to be finessable instead.

To make it clear how this will work:

The bonus will applied when:

  1. You wield the custom finessable weapon in right hand and nothing in left hand.
  2. You wield the custom finessable weapon in right hand and shield or torch in left hand.
  3. You wield two custom finessable weapons.

Any other combination will prevent the bonus fire.

First you make an include script called “custom_finesse” save it, but do not compile or it will give a warning message. Instructions on how to add more weapons are in the comments inside, in this I simply added the Katana to the list of finessable weapons.

#include "nw_i0_spells"

int GetIsCustomFinessableWeapon(object oWEAPON)
{
    int nWEAPON = GetBaseItemType(oWEAPON);
    switch (nWEAPON)
    {
        case BASE_ITEM_SMALLSHIELD:
        case BASE_ITEM_LARGESHIELD:
        case BASE_ITEM_TOWERSHIELD:
        case BASE_ITEM_TORCH:
        // Add whatever non finessable weapon you want to convert here
        // Do not delete the shields and the torch above.
        // In this example I add the katana, but you can change it or add more.
        // Do not add weapons that are already finessable or they will get double bonus.
        case BASE_ITEM_KATANA:
            return TRUE;
    }
    return FALSE;
}

void RemoveCustomFinesse(object oPC)
{
    effect eFX = GetFirstEffect(oPC);
    while (GetIsEffectValid(eFX) == TRUE)
    {
        if (GetEffectTag(eFX) == "CUSTOM_FINESSE")
        {
            RemoveEffect(oPC, eFX);
        }
        eFX = GetNextEffect(oPC);
    }
}

void ApplyCustomFinesse(object oPC)
{
    if (GetHasFeat(FEAT_WEAPON_FINESSE, oPC) == FALSE) return;
    int nDEX = GetAbilityModifier(ABILITY_DEXTERITY, oPC);
    int nSTR = GetAbilityModifier(ABILITY_STRENGTH, oPC);
    if (nDEX <= nSTR ) return;
    object oRIGHT = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC);
    if (GetWeaponRanged(oRIGHT) == TRUE) return;
    if (GetIsCustomFinessableWeapon(oRIGHT) == FALSE) return;
    object oLEFT = GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oPC);
    if (oLEFT != OBJECT_INVALID)
    {
        if (GetIsCustomFinessableWeapon(oLEFT) == FALSE) return;
    }
    effect eFX = EffectAttackIncrease(nDEX - nSTR);
    eFX = SupernaturalEffect(eFX);
    eFX = TagEffect(eFX, "CUSTOM_FINESSE");
    ApplyEffectToObject(DURATION_TYPE_PERMANENT, eFX, oPC);
}

When you’ve done this, you must open the scripts used by module properties to handle the Equip and Unequip events and include the above scripts and call the two void functions properly, along with the increase to the maximum attack bonus limit allowed by the engine (if capped to 20, as default, this will become prolematic as the finesse will stop working).

This is how it was implemented in the “x2_mod_def_equ” stock script (some parts were excluded here)

....
#include "x2_inc_switches"
#include "x2_inc_intweapon"
#include "x3_inc_horse"
#include "custom_finesse"

void main()
{
    object oItem = GetPCItemLastEquipped();
    object oPC   = GetPCItemLastEquippedBy();
    SetAttackBonusLimit(255);
    RemoveCustomFinesse(oPC);
    DelayCommand(0.0f, ApplyCustomFinesse(oPC));
....

The same has to be done for the script that handles the Unequip Event (the opposite in this case would be “x2_mod_def_unequ”.

Keep in mind that the original campaigns do not use those scripts to handle the equipment events, these are mostly for the new player made custom modules, to change the event script in-game you will need to make another specific script and run it via a console command. (if you need more info on this I can provide it later)

It’s a long road to get there, but hopefully this helped a bit.

hey Clangeddin, i think i have it working, but just to make sure…

I place all 3 functions in both onequip and unequip event and include “custom_finesse”?

My mod uses +20 attack bonus cap, will I have to increase the cap for this to work? Might make it unbalanced…

This will work with two-handed weapons also?

tyvm for the help, going to go test this right now.

No, you just call the last two functions (the voids) in the equip and unequip events, and include the custom finesse script. Do it in the same way I did it in the example. The DelayCommand (0.0f) for the ApplyFinesse is important to avoid funny behaviour, without it, the effect might be applied and removed immediately.

If you don’t like 255, you can raise to 45 instead (+20 mod from dex is max, and -5 mod from str is minimum, the difference is 25, so the new cap could be 20+25=45) but increasing the cap is kind of mandatory for this workaround to work, otherwise those custom finesseable character might hit the 20 cap and this workaround won’t work properly for them. That said, I don’t see it truly unbalancing, unless the conditions for stacking all possible buffs are allowed by the mod itself (and bring AB bonus to super values). You could try customizing some spell buffs to remove similar attack bonus buffs if you are concerned about the stacking of certain attack buffs.

Yes.

ok, everything compiles but for w/e reason the dex mod isn’t getting applied. I created a character with 8 str/18 dex, and got weapon finesse feat. I added base items quarterstaff and scimitar to the include script just to test… maybe i am doing something wrong.

onequip script

#include “custom_finesse”
void main()
{
object oPC = GetPCItemLastEquippedBy();
object oItem = GetPCItemLastEquipped();

SetAttackBonusLimit(45);
RemoveCustomFinesse(oPC);
DelayCommand(0.0f, ApplyCustomFinesse(oPC));
}

onunequip script

#include “custom_finesse”
void main()
{
object oPC = GetPCItemLastUnequippedBy();
object oItem = GetPCItemLastUnequipped();

SetAttackBonusLimit(45);
RemoveCustomFinesse(oPC);
DelayCommand(0.0f, ApplyCustomFinesse(oPC));
}

A blunder on my part, inside the custom_finesse script I forgot to set the second argument to oPC on two functions, find the lines

int nDEX = GetAbilityModifier(ABILITY_DEXTERITY);
int nSTR = GetAbilityModifier(ABILITY_STRENGTH);

and change them to

int nDEX = GetAbilityModifier(ABILITY_DEXTERITY, oPC);
int nSTR = GetAbilityModifier(ABILITY_STRENGTH, oPC);

Save the script and recompile the Equip and Unequip event scripts.

Tested and it works, don’t be alarmed if you don’t notice an AB change by unequipping the quarterstaff, unarmed is finessable by default NWN, so it means it’s working as intended.

Another thing, if a dexterity or strength buff (like Cat’s Grace or Bull Strength) is applied when the custom finessable weapon is equipped, the calculation will not be updated on the fly, you will need to unequip and re-equip any item to properly recalculate the AB.

Works great! This is perfect, thank ya!

1 Like

yes you can. try this.

Please correct me if I’m wrong, but by creating a new weapon doesn’t that preclude all the weapon specialization feats (weapon focus, weapon specialization, improved weapon critical, epic weapon focus, etc.)? If I recall correctly, that is the problem with all the new weapons in CEP.

An alternative approach could be to swap the name, model, and stats with the club. In that way the club would be a finesseable weapon and the mace would not but both could still get their weapon specialization feats. The builder would just have to remember that the internal names (for scripting purposes) haven’t changed.

hmph, so demanding !   ;p

no, you’re absolutely right. you can add in the new focus/crit feats w/nwnx, but not in a vanilla implementation.

as to swapping mace & club, yes, it would allow you to make the mace non-finessable and the club finessable. you’d still have to do a little tinkering w/feat.2da [e.g. changing the tlk table indexes for the feat names], because otherwise the player would end up choosing to focus on club instead of the mace s/he wanted.

Which I just might do. I think arming thugs with clubs feels more rogueish than giving them maces.:crazy_face:

1 Like