Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.


Dark Dreams of Furiae - a new module for NWN:EE! Buy now
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

Tag Based Scripting - Add Bonus Feat to player?

Able to add effects just fine, but how can we add a feat, FEAT_WEAPON_PROFICIENCY_MARTIAL for example to the OnAquire aspect of a Tag Based Script? Or does it have to be gear based only (or player skin?


  • TerrorbleTerrorble Member Posts: 108
    Pretty sure you can add it to the player skin this way when they acquire the item in the OnAcquire script:
    itemproperty ipWPM = ItemPropertyBonusFeat(IP_CONST_FEAT_WEAPON_PROF_MARTIAL);
    //Get the skin object... however you get the skin object.
    object oSkin = SKIN_SupportGetSkin(GetModuleItemAcquiredBy());

  • BuddywarriorBuddywarrior Member Posts: 14
    Ok, I think I have it, In case anyone else needs this.
    #include "x2_inc_itemprop"
    void OnAcquire(object oEventItem, object oAcquiredBy, object oTakenFrom, int nStackSize)
        object oItem;
        itemproperty ipAdd;
        object oPC = oAcquiredBy;
        // Only fire for PCs.
        if ( !GetIsPC(oPC) )
        // Alter the skin item equipped by the PC.
        oItem = GetItemInSlot(INVENTORY_SLOT_CARMOUR, oPC);
        ipAdd = ItemPropertyBonusFeat(IP_CONST_FEAT_WEAPON_PROF_MARTIAL);
        IPSafeAddItemProperty(oItem, ipAdd);

Sign In or Register to comment.