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. This outlines the main differences of how each spells.2da line type can be used. The main difference between them is the UserType column. This dictates a lot engine stuff.
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.
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 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 | 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 | 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 | 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 | Not sure | 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.