A spell in NWN, in essence, is a way to fire a script in-game that applies some effects.
Spell Types
"Spells" can be a variety of types. There are two important things that can be done with spells, their UserType value in spells.2da is the first one:
| UserType | Bioware Name | Toolset Availability | Description | Examples |
|---|---|---|---|---|
| 1 | Spell | Spells, Special Abilities tabs. | Spells generally are available to classes, but some are creature-only or item-only. | Magic Missile, |
| 2 | Special Ability / Monster Ability | Special Abilities tab. | These do not get counterspelled, have spell failure, or use concentration. They also don't have a caster level set, use spell resistance, or use save DC (although if they do a save they count as a spell for SAVING_THROW_TYPE_SPELL purposes which is sometimes odd! being more resistant to Dragon's Breath due to having a high Spellcraft is strange). They also count as spells for Immunity vs. Death Magic. Bioware added Epic spells to this, since they don't use any of the mechanics of normal spells (ie caster level) but then they can be added to creatures (instead of the feat), but otherwise would have been fine as Feat spells. | Dragon Breath Hellball |
| 3 | Feat | Not available | Best used for feat-abilities, like a Cleric's Turn Undead and similar. These don't apply any of the UserType 1 and 2 things such as acting like a spell for purposes of saving throws or whatever else. Also hidden in the toolset creature properties (although could be added by GFF). Many feats can be casting spells, and might go under the Spells category for this reason (to make it work better with ResistSpell, saving throws etc.) but they will appear in the toolset as well. | Turn Undead |
| 4 | Item | Not available | Might as well be "Other" - essentially "none of the above". Does not apply spell resistance. Caster level tied to item casting it. Can be nice to put some feat-abilities like Player Tool and things used for cheat casting only under this so it doesn't show up in the toolset. | Rod of Wonder |
Then you can have it applied from a creature (or in the case of cheat casting, a placeable) in a number of ways, each one having some interesting differences. Note there are more combinations than this available (such as adding a UserType 4 ability directly on a creatures spell-like ability list) but for brevity these hard to do versions are excluded:
| UserType plus Source casting type | Metamagic (+Automatic variants) | Automatic Metamagic (EG: Automatic Quicken) | Attacks of Opportunity (+Defensive Casting) | Concentration Checks | Spell Failure (+Deafness check) | Arcane Spell Failure | Can be Counterspelled | Spellcraft to Identify | ResistSpell Functionality | Caster Level | GetSpellSaveDC Calculation | Saving Throw Functionality | Notes |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Spell (1) cast from a Class Spellbook | Yes | Yes | Yes | If UseConcentration is 1 | Yes | Yes | Yes | ||||||
| Spell (1) cast as a spell-like ability | No | No | No | Yes | No | No | |||||||
Spell (1) cast via. cheat-casting (DM/script) | No | Yes | Yes | No | Cheat caster level (minimum of 10, or (2 * Innate spell level) - 1) | ||||||||
| Spell (1) cast from a Polymorph granted spell | Yes | No | |||||||||||
| Spell (1) used from an item | Special: Yes if potion | No | |||||||||||
| Spell (1) cast by using a feat | Yes | No | |||||||||||
| Special Ability (2) from a creatures spell-like ability list | No | No | Spell Absorption and Spell Immunity are checked Spell Resistance isn't (possibly a bug) | ||||||||||
| Special Ability (2) via. cheat-casting (DM/script) | No | No | Spell Absorption and Spell Immunity are checked Spell Resistance isn't (possibly a bug) | Cheat caster level (minimum of 10, or (2 * Innate spell level) - 1) | |||||||||
| Special Ability (2) from a Polymorph granted spell | No | No | |||||||||||
| Special Ability (2) used from an item | No | No | |||||||||||
| Feat (3) spell cast by using a feat from a class/levelup | No | No | No | Doesn't work - see notes | Feat classified spells technically could activate spell resistance but only if cheat-cast or is a normal spell or spell-like ability. If it's use as an actual feat this fails to get that far however. This might be a bug in the engine code since Special Abilities actually apply absorption and immunity checks properly just fail to apply spell resistance. | ||||||||
| Feat (3) spell cast by using a feat from a certain racial type | No | ||||||||||||
| Feat (3) spell cast by using a feat from a domain granted feat | No | ||||||||||||
| Feat (3) spell cast directly via. cheat-casting (script) | No | Works fully - see notes | Cheat caster level (minimum of 10, or (2 * Innate spell level) - 1) | Works with default cheat-caster levels. | |||||||||
| Feat (3) spell cast from a Polymorph granted spell | No | ||||||||||||
| Feat (3) spell used from an item | No | ||||||||||||
| Item (4) spell cast directly via. cheat-casting (script) | No | Cheat caster level (minimum of 10, or (2 * Innate spell level) - 1) | |||||||||||
| Item (4) spell cast from a Polymorph granted spell | No | ||||||||||||
| Item (4) spell used from an item | No |
For instance if you want an NPC only spell it would be recommended to just not add it to any class, and have it as UserType 1 to allow ResistSpell, GetSpellSaveDC, etc. to work correctly (although if not available in a spellbook it can't be counterspelled)
For info on Saving Throws (especially vs. Spells) see: Saving Throws
| Spell Type | Example | spells.2da User Type column | Usual Availability | Attack of Opportunity | Concentration Checks (if UseConcentration is 1) | Spell Failure | Counterspellable | Spellcraft to Identify | ResistSpell | GetCasterLevel Level calculation | Applied Effect GetEffectCasterLevel | Spell Save DC calculation | Counts as Spell for SAVING_THROW_TYPE_SPELLS? | Notes |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Standard Spell | Magic Missile | 1 (Spell) | Spell book | Yes | Yes | Yes | Yes | Yes (unless AltMessage) | Works as intended | Class level of spell caster | Class level of spell caster | 10 + Spell level + Casting ability modifier + spell focus feats | Yes | Learned from a spellbook by a PC, or on a creatures blueprint memorised spell list |
| Standard Spell (Item) | Magic Missile (3) | 1 (Spell) | Cast From Scroll | Yes (item use) | No | Yes | Yes | Yes (unless AltMessage) | Works as intended | Item Properties determine this | Buggy: Previous level of spell caster if any, or as cheat-cast (10-17) | 10 + Innate spell level + 3 | Yes | Setup in item properties Note the InnateLvl is ignored by the game in iprp_spells.2da |
| Standard Spell (Spell Ability on Monster only) | Magic Missile Aura of Hellfire Evil Blight Greater Bulls Strength | 1 (Spell) | Monster spell | Yes | Yes | Yes but no armor check (since not assign to a specific class) | No (acts like cheat-spell) | Yes (unless AltMessage) | Works as intended | 1-15 from toolset. Hardcoded limit as per notes below. | 1-15 from toolset. Hardcoded limit as per notes below. | 10 + Innate spell level + Charisma modifier | Yes | Setup on the monsters blueprints. This can include spells not available to an usual class. See example column for some names. These may be leftover spells deemed by Bioware to powerful, or for Boss Monsters. |
| Special Abilities or Monster Abilities | Domination Gaze Illithid Mind Blast | 2 (Creature Power) | Monster ability tab Polymorphs | No | No | No | No | No | Fails and always returns -1 | Shouldn't be used (but might be tied to HD? needs testing) | Shouldn't be used (but might be tied to HD? needs testing) | Shouldn't be used (but needs testing) | Yes | This can be a monster-only ability (a Gaze, Aura or other thing) 99% of the time this uses supernatural or extraordinary effects and no uses of ResistSpell so caster level doesn't matter |
| Class Feat Spell | Divine Protection (Cleric Domain Feat) Greater Ruin | 1, 2, 3 (usually just 2 - eg; Greater Ruin or 3, eg: Blackguard Inflict Critical Wounds) | Feat assignment to a class | No | Yes Testing Harper Feats does have concentration checks occur, while Epic spells have it set to 0 so won't for them. A bug: if UseConcentration is 0, Entangle still forced a concentration check. | No | No | No | Seems to always fail returning 0 | Class level of the class using the feat but needs testing to be sure (in the case of multiclass for instance). Note that ActionUseFeat() will bug out this number, resulting in 0 for some reason. NB: GetLastSpellCastClass returns 255 for feat-spells | Buggy: As cheat cast, so 10-17...however... As some actual feats (eg; Blackguards Bulls Strength) are set to no Innate level it applies those at caster level 509 | 10 + class level tied to feat + primary ability modifier (eg; Arcane Archer Imbue Arrow is 10 + Arcane Archer levels + Dexterity Modifier) Needs further testing however. | Yes if 1 or 2 (Spell/Monster ability) else not for 3 | This is when a feat.2da line link to a spells.2da line using the SPELLID column and given during a class level up. Note if two classes use the same feat ID not entirely sure what is used for the caster level. The UserType column doesn't seem to affect much of the ResistSpell or other functions. |
| Race Feat Spell | na | 3 | Feat assignment as a race | No | No | No | No | No | Unknown: likely as class feat | Unknown - probably something whacky. Maybe hit dice. Needs testing. | Unknown - needs testing. Likely however buggy. See bug report here. | Unknown - needs testing. | No | Feats given solely on level 1 at racial creation time. Not sure the numbers returned for it, needs testing. |
| Item-only spell | Rod of Wonder | 4 | Assigned Item Properties | Yes (item use) | No | No | No | No | Fails and always returns -1 | Item Properties determine this If not used on an item property it likely will bug out - see shifter polymorph abilities such as Illithid Mind Blast. | Buggy: Previous level of spell caster if any, or as cheat-cast (10-17) | 10 + Innate spell level + 3 | No | These are item-only as in "Use Item", "Rod of Wonder" etc. Noted here even if very similar to usual standard spells because they can't be countered Note the InnateLvl is ignored by the game in iprp_spells.2da |
| Cheat-cast only spell or DM cast spell | Goblin Ballista Fireball Basically cheat-casting anything with ActionCastSpell bCheat parameter | 4 | Scripting only | Yes (if UserType is 1) No (if UserType isn't 1) | Yes (if UserType is 1) No (if UserType isn't 1) | Yes but no armor check (if spell) No (if UserType isn't 1) | No | Yes (if UserType is 1 and no AltMessage) | As above depending on UserType. 1 works, 2 or 4 will fail, 3 will only use spell resistance | Always minimum of 10, or (2 * Innate spell level) - 1 (so 10 for 1-5, then level 6 is 11, 7 is 13, 8 is 15 and 9 is 17). If Innate is blank this goes barmy. | As left. | 10 + Innate spell level + 3 | Yes if User Type is 1 or 2 (normal spell/spell ability). No otherwise. | Referenced here since several spells are completely unobtainable except by using ActionCastSpell with the bCheat flag This can also cast all of the above, but defaults the caster level and spell save DC to specific values as shown. |
Monster Spells Caster Level Limit
There is a caster limit of 15 in the game - this is seemingly hardcoded and unable to be set higher - if set via. a GFF edit of a creatures UTC file the game still loads it at a maximum of 15.
This limit apparently is to do with network packet usage (ie; packets saying "I want to initiate a spellcasting action") bundle in this caster level as 4 bits which is 16 possible values (0 - 15).
Spontaneously Cast Spells
Spells can be spontaneously cast if marked in spells.2da, there are some limits however:
- You must have a prepared and readied (uncast) spell slot
- This spell slot must not be a domain spell (eg; Animal Domain gets Cats Grace at level 2, if all their other level 2spells other than Cats Grace are already cast, you cannot spontaneously cast Cure Moderate Wounds)
The second limitation is rarely seen in gameplay and is, more or less, true to the 3E rules - although really the limitations on spontaneous spells should be more stringent - a separate slot each level only allowing 1 domain spell (which again is exempt from being used as a spontaneously cast slot).
Spells.2da
See spells.2da for further info.