Skip to content

Modifying spells & monster abilities?

I am wondering if it's possible to modify spells? (and where to begin looking for how to do that?)

Also for monster abilities : for example, there is a monster ability which is called Hurl Rocks (which is kind of weak) I'd like to increase the damage or maybe add a Hurl Boulder ability...

I'd also like to adjust some of the spell effects : IE, premonition for example, I don't think it needs a visual effect and I'd like to disable that (that sort of thing)

Tensors transformation as another example (super over-powered) I'd like to tweak that down a bit..

any hints would be great!

Comments

  • CalgacusCalgacus Member Posts: 273
    edited August 2019
    Hi,
    Some things will be more involved than others but yes you can. There are tons of resources out there to help you out. Here are a few to help you get started, the easiest place to start for a nwn newbie modder might be some videos:
    NWN Toolset Tutorial Videos
    NWN Scripting Tutorial Videos

    NWN University on the vault
    NWN Lexicon
    NWN wiki Scripting FAQ

  • ListenMirndtListenMirndt Member Posts: 24
    Yes, I was hoping for something a bit more specific.
  • CalgacusCalgacus Member Posts: 273
    The script for premonition is in nw_s0_premo, you might start by trying to removing the visual effect eVis like so:
    //::///////////////////////////////////////////////
    //:: Premonition
    //:: NW_S0_Premo
    //:: Copyright (c) 2001 Bioware Corp.
    //:://////////////////////////////////////////////
    /*
        Gives the gives the creature touched 30/+5
        damage reduction.  This lasts for 1 hour per
        caster level or until 10 * Caster Level
        is dealt to the person.
    */
    //:://////////////////////////////////////////////
    //:: Created By: Preston Watamaniuk
    //:: Created On: March 16 , 2001
    //:://////////////////////////////////////////////
    //:: Last Updated By: Preston Watamaniuk, On: April 11, 2001
    #include "nw_i0_spells"
    
    #include "x2_inc_spellhook"
    
    void main()
    {
    
        /*
          Spellcast Hook Code
          Added 2003-06-23 by GeorgZ
          If you want to make changes to all spells,
          check x2_inc_spellhook.nss to find out more
    
        */
    
        if (!X2PreSpellCastCode())
        {
        // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
            return;
        }
    
        // End of Spell Cast Hook
    
        object oTarget = GetSpellTargetObject();
    
        //Declare major variables
        int nDuration = GetCasterLevel(OBJECT_SELF);
        int nLimit = nDuration * 10;
        int nMetaMagic = GetMetaMagicFeat();
        effect eStone = EffectDamageReduction(30, DAMAGE_POWER_PLUS_FIVE, nLimit);
        //////////////  effect eVis = EffectVisualEffect(VFX_DUR_PROT_PREMONITION);
        //Link the visual and the damage reduction effect
        //////////////  effect eLink = EffectLinkEffects(eStone, eVis);
        //Enter Metamagic conditions
        //Fire cast spell at event for the specified target
        SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_PREMONITION, FALSE));
        if (nMetaMagic == METAMAGIC_EXTEND)
        {
            nDuration = nDuration *2; //Duration is +100%
        }
    
        RemoveEffectsFromSpell(oTarget, SPELL_PREMONITION);
        //Apply the linked effect
    
        /////////// ApplyEffectToObject(DURATION_TYPE_TEMPORARY,   eVis,  oTarget, HoursToSeconds(nDuration));
        ApplyEffectToObject(DURATION_TYPE_TEMPORARY,   eStone, oTarget, HoursToSeconds(nDuration));
    
    }
    
  • ListenMirndtListenMirndt Member Posts: 24
    Oh I see :):)
    Awesome!!! Thank you!! <3 So much appreciated!!
  • ListenMirndtListenMirndt Member Posts: 24
    If I alter source NWN scripts - is there anything that I also need to do so that in an online (multiplayer) game - everyone gets the same spell modifications?

    Or is it enough to modify the spell effect source code in nw_s0_premo while editing my module?
  • WilliamDracoWilliamDraco Member Posts: 175
    Or is it enough to modify the spell effect source code in nw_s0_premo while editing my module?
    It's enough - Scripts are all run by the server so as long as the module has the edited script, the players will receive the edited effect.

    If you make more impactful changes, your players may also appreciate if you change the spell description to match with their new effects. That would require your clients to receive custom files (.2da and .tlk) so they could see the updated description.
  • ListenMirndtListenMirndt Member Posts: 24
    Thank you!! Much appreciated William, and that's a great reference Proleric, thank you!
Sign In or Register to comment.