Skip to content

Limiting the level casters can cast without 2da

Gooday all,

As the title states, I want to limit the spell level that casters can either learn or, not ideally, cast without 2da modifications or limiting the casters general level.

i.e. 20th level wizard that can only cast 6th level spells or lower.

I see that I could decrement a spells useage , or maybe limit or zero out a casters spell use per level. If this is possible could you give me a quick example.

Thank you for your time,

DJ-WoW




Comments

  • ForSeriousForSerious Member Posts: 466
    Looking up DecrementRemainingSpellUses… You would have to call it on every possible spell of the levels you want to limit for a wizard. You'd probably do that in the on rest complete script slot.

    I don't know of any way to block them from learning them.
  • DJ_WoWDJ_WoW Member Posts: 51
    Gooday to ya,

    Thank you for your response. I was thinking that would be the way I would need to do it. I have not worked with spell hooks, Could I make a clause, as a hook, the would exit the spell script if the spell level is 7 or more? Thus no having to eliminate the spell but the spell just failing to function?

    Again thank you all for your time.

    DJ-WoW
  • ForSeriousForSerious Member Posts: 466
    Oh sure. There is that spell hook script: 'x2_inc_spellhook'.
    Line 274 starts the X2PreSpellCastCode() function.
    You should be able to limit it right there.
    Something like:
    if(GetLastSpellLevel() > 6)
    {
        return FALSE;
    }
    
  • meaglynmeaglyn Member Posts: 151
    You can do in there but the PC will still go through the motions and waste time casting the spell before it fizzles. And be able to memorize them, waste learning opportunities on them, etc. Seems a bit user-unfriendly but I suppose they'd learn quickly enough if you give some appropriate feedback when you fizzle the spell.
Sign In or Register to comment.