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?
Calling a scroll (or any item) user's caster level
Débuté par
manageri
, août 26 2013 07:19
#1
Posté 26 août 2013 - 07:19
#2
Posté 26 août 2013 - 07:52
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.
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
Posté 26 août 2013 - 08:46
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
Posté 27 août 2013 - 11:30
Hi,
Have you tried using spell hooking? You can gain access to both the item level and the caster level that way.
Lance.
Have you tried using spell hooking? You can gain access to both the item level and the caster level that way.
Lance.
#5
Posté 27 août 2013 - 06:39
I figured it out. Thanks for the feedback.





Retour en haut






