Boots of the Battle Rager

While adapting some Magic Item Compendium items to my mod I came across the Boots of the Battle Charger.

Even when that effect couldn’t be played in NWN, I decided it was a good chance to do something in that way.

So here’s the script for the Boots of the Battle Rager:

//::///////////////////////////////////////////////
//:: Boots of the Battle Rager
//:://////////////////////////////////////////////
//:: Created By:   Baireswolf
//:: Created On:   2023-11-02
//:://////////////////////////////////////////////

#include "x2_inc_switches"
#include "x2_i0_spells"

void main()
{
    object oItem = GetItemActivated();
    object oPC = GetItemActivator();
    int nEvent = GetUserDefinedItemEventNumber();
    if ( nEvent == X2_ITEM_EVENT_ACTIVATE )
    {
        int nIncrease = d4(1);
        int nSave = d4(1);
        //check nw_s1_barbrage
        PlayVoiceChat(VOICE_CHAT_BATTLECRY1);
        //Determine the duration by getting the con modifier after being modified
        int nCon = 3 + GetAbilityModifier(ABILITY_CONSTITUTION) + nIncrease;
        effect eCon = EffectAbilityIncrease(ABILITY_CONSTITUTION, nIncrease);
        effect eStr = EffectAbilityIncrease(ABILITY_STRENGTH, nIncrease);
        effect eSave = EffectSavingThrowIncrease(SAVING_THROW_WILL, nSave);
        effect eAC = EffectACDecrease(2, AC_DODGE_BONUS);
        effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);

        effect eLink = EffectLinkEffects(eCon, eStr);
        eLink = EffectLinkEffects(eLink, eSave);
        eLink = EffectLinkEffects(eLink, eAC);
        eLink = EffectLinkEffects(eLink, eDur);
        SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BARBARIAN_RAGE, FALSE));
        //Make effect extraordinary
        eLink = ExtraordinaryEffect(eLink);
        effect eVis = EffectVisualEffect(VFX_IMP_IMPROVE_ABILITY_SCORE); //Change to the Rage VFX

        if (nCon > 0)
        {
            //Apply the VFX impact and effects
            ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oPC, RoundsToSeconds(nCon));
            ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oPC) ;
        }
    }
}

It just mimics Barbarian Rage, with an 1d4 bonus to STR, CON and SAVES, -2 to AC.
The rage duration equal CON modifier (without the rage) + 3 rounds.

Remember to give the boots (or item) the Cast Spell: On Activation property.

Tagged based scripting has to be set in the module, and then save the script with the same tag as the boot model.

Enjoy, modify, whatever you like.
B.

1 Like

Neat idea, but there are some minor improvements which could be done. I.e. if the boots have multiple uses per day, how do I prevent that the boost is cast more than once? :slight_smile:

Good point.

I thougth this to be a One Use / Day property, but you can have more than one paor of boots in the inventory.

Even when changing the item and reapplying the effect isn’t optimal (Duration is 3 rounds + CON modifier, and you wil loose time changing equipment, and module should have some limits to prevent some equipment changes during combat), and the effect bonuses aren’t so great (only 1d4, and you will be loosing 2 AC each time you reapply the effect), I think you are right about the limits, so I decided to prevent the issue with a local int set on the user, and a delay command to set it back to 0.

I think this will do it, but I will have to wait to get back home to test it.

//::///////////////////////////////////////////////
//:: XP3 Portable Encampment Script
//:: Copyright (c) 2008 Bioware Corp.
//:://////////////////////////////////////////////
/*
    Spawns in an encampment that allows the PC to rest.

*/
//:://////////////////////////////////////////////
//:: Created By:   Peter Thomas
//:: Adapted for core game by: Craig Welburn
//:: Created On:   2008-01-07
//:://////////////////////////////////////////////

#include "x2_inc_switches"
#include "x2_i0_spells"

void main()
{
    object oItem = GetItemActivated();
    object oPC = GetItemActivator();
    int nEvent = GetUserDefinedItemEventNumber();
    if ( nEvent == X2_ITEM_EVENT_ACTIVATE)
    {
        int nIncrease = d4(1);
        int nSave = d4(1);
        //check nw_s1_barbrage
        PlayVoiceChat(VOICE_CHAT_BATTLECRY1);
        //Determine the duration by getting the con modifier after being modified
        int nCon = 3 + GetAbilityModifier(ABILITY_CONSTITUTION) + nIncrease;
        effect eCon = EffectAbilityIncrease(ABILITY_CONSTITUTION, nIncrease);
        effect eStr = EffectAbilityIncrease(ABILITY_STRENGTH, nIncrease);
        effect eSave = EffectSavingThrowIncrease(SAVING_THROW_WILL, nSave);
        effect eAC = EffectACDecrease(2, AC_DODGE_BONUS);
        effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);

        effect eLink = EffectLinkEffects(eCon, eStr);
        eLink = EffectLinkEffects(eLink, eSave);
        eLink = EffectLinkEffects(eLink, eAC);
        eLink = EffectLinkEffects(eLink, eDur);
        SignalEvent(oPC, EventSpellCastAt(oPC, SPELLABILITY_BARBARIAN_RAGE, FALSE));
        //Make effect extraordinary
        eLink = ExtraordinaryEffect(eLink);
        effect eVis = EffectVisualEffect(VFX_IMP_IMPROVE_ABILITY_SCORE); //Change to the Rage VFX

        if (nCon > 0 && GetLocalInt (oPC, "ItemRaging") == 0)
        {
            //Apply the VFX impact and effects
            SetLocalInt (oPC, "ItemRaging", 1);
            ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oPC, RoundsToSeconds(nCon));
            ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oPC) ;
            DelayCommand (RoundsToSeconds(nCon), SetLocalInt (oPC, "ItemRaging", 0));
        }
    }
}

I also changed this line so the Signal is set to the user and not the boots.

 SignalEvent(oPC, EventSpellCastAt(oPC, SPELLABILITY_BARBARIAN_RAGE, FALSE));

Thanks for the observation.

B.

I think an Item like this should be unique. It wouldn’t make much of a difference on a character at level 10+, but at low levels (<5) it’s a great asset.

Ah, btw. this line is wrong:

int nCon = 3 + GetAbilityModifier(ABILITY_CONSTITUTION) + nIncrease;