Aller au contenu

Photo

Calling a scroll (or any item) user's caster level


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
manageri

manageri
  • Members
  • 394 messages
I'm trying to implement some of the PnP scroll use restrictions into NWN2 (details here http://www.d20srd.or...ems/scrolls.htm). That means I need to compare the caster level of the user to the caster level of the scroll. For example, a level 5 wizard trying to use a scroll of Meteor Swarm would be required to make a caster level check with DC 17 (the minimum level a wizard can cast a level 9 spell).

The problem is that I can't use the GetCasterLevel function in the spell script to figure out the wizard's caster level when using a scroll, as the function will return the scroll's caster level instead. Is there another function I can use or some trick to make that function do what I want, or do I have to manually check base class levels, PrC levels, feats and who knows what other bells and whistles for the character's caster level?

#2
I_Raps

I_Raps
  • Members
  • 1 262 messages
You should be able to get the PC's level which can serve as a standin.

I do this with a summoning item that summons increasingly powerful creatures.

You also might be able to poll all the characters and find the top caster level.

Neither are perfect, but could be starting points.

#3
manageri

manageri
  • Members
  • 394 messages
Thanks for the feedback. I have an idea that might work without a week's worth of scripting work. What if I check what class spells are cast as and store a class-specific local int with the caster level on the character every time they personally cast a spell (meaning whenever a spell they cast is not cast via an item)? The only problem I can see is that if you haven't cast a spell since your last level up, the number will be out of date (a minor issue). Does anyone see any major flaws with this plan?

#4
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages
Hi,

Have you tried using spell hooking? You can gain access to both the item level and the caster level that way.

Lance.

#5
manageri

manageri
  • Members
  • 394 messages
I figured it out. Thanks for the feedback.