From NWN Lexicon
Jump to: navigation, search
Nwnee logo.jpg Note: This article documents Neverwinter Nights: Enhanced Edition new content or changes/updates/fixes to 1.69 functions. These are all listed under the category and patches pages.
Returns the caster level of the creature who created the effect.
int GetEffectCasterLevel(
    effect eEffect


The effect object to get the caster level from.


Returns the caster level set when the effect was created as part of a spell script.

Only works on valid spells and where GetCasterLevel returns a proper value.

If not created by a creature, returns 0. If created by a spell-like ability, returns 0.


There is currently no way to set the caster level on an effect.

This is used internally by EffectDispelMagicBest and EffectDispelMagicAll to remove magical effects using a dispel check on each one (removing a linked set if one is removed).

Known Bugs

If a PC logs out and logs back in all effects are "decoupled" causing many to lose the caster level attached to them. It also increases the amount of effects that would be affected by EffectDispelMagic functions.


This function was added in 1.74.8149 of NWN:EE.


Information icon.png This article is in need of examples. You can help the NWN Lexicon by showing how to use this code effectively.

See Also

functions: GetCasterLevel(), GetEffectCreator()