Recent changes Random page
GAMING
Gaming
 
WoWWiki
Halopedia
FFXIclopedia
Age of Conan
Warhammer Online
Grand Theft Wiki
See more...

Spells.2da

From NWNWiki

Jump to: navigation, search

The spells.2da file controls the available spells that are included in the game. It specifies any restrictions the spell has, any scripts that are fired on use, and any other information governing the use of the spell. Refer to spells.2da (table) for a layout of the actual file.

Contents

[edit] Column descriptions

Column nameDescription
ID (no actual header}Sequentially numbered. This field identifies the item property to the game engine. The game engine actually ignores the value in this field and sequentially numbers the records as it reads them, so it is good practice to keep the entries in this field sequentially numbered to avoid confusion.
LabelThe name of the spell. Any spaces should be written as underscores ( _ ). This value is usually just for reference purposes, but can be displayed in game if the value in the Name column is ****.
NameA StringRef indicating a string that will be displayed in the game as the name of the spell.
IconResRefA text value (ResRef) specifying the filename of the icon displayed in game for this spell. By convention, all icon names start is_, for icon spell, followed by the spell name, abbreviated if necessary. The maximum length for the text/filename is 16 characters.
SchoolA letter value specifying the spell school for the spell. A = Abjuration, C = Conjuration, D = Divination, E = Enchantment, N = Necromancy, T = Transmutation, V = Evocation
RangeA letter value specifying the range at which targets may be selected. P = Personal, T = Touch, S = Short, M = Medium, L = Long
VSA combination value of letters specifying whether the spell has verbal or somatic components, or both. v = verbal only, s = somatic only, vs = both verbal and somatic
MetaMagicA hex number value which determines which metamagic feats may be used with this spell. See the column notes below for how to determine the value for this field.
TargetTypeA hex number value which determines the targets which may be selected for this spell. See the column notes below for how to determine the value for this field.
ImpactScriptThe name of the script file that is run when the spell is cast. The name has a maximum of 16 characters. See the script naming conventions section below for more information on script names.
BardThe spell level at which this spell is available to this class. A value of **** means it is normally unavailable to this class.
ClericSame as Bard. Spells unavailable in this file may be made available via a domain. This is specified in domains.2da.
DruidSame as Bard.
PaladinSame as Bard.
RangerSame as Bard.
Wiz_SorcSame as Bard. This column applies to both sorcerers and wizards.
InnateThe spell level of the spell if cast by a creature as a special ability.
ConjTimeThe amount of time in milliseconds the Conj visuals and sounds specified in the following columns will play. 1000 milliseconds is about equal to 1 second. The usual value for spells (not abilities) in this column is 1500.
ConjAnimSpecifies the location on the casting object where the visuals will be played. Value is either head or hand.
ConjHeadVisualResRef of the visual model to be used on the caster's head.
ConjHandVisualResRef of the visual model to be used on the caster's hands.
ConjGrndVisualResRef of the visual model to be used. This field is used for the higher level spells to make them look more "grand", especially if they have lower level counterparts.
ConjSoundVFXResRef of the sound the spell causes while it is being cast.
ConjSoundMaleResRef of the sound played for verbal components of male casters.
ConjSoundFemaleSame as ConjSoundMale, but for female casters.
CastAnimA text value specifying the animation the character makes when finishing the spell. Values are: self, touch, out, area, and up.
CastTimeAmount of time in milliseconds that the Cast columns play. These fire when the Conj section completes. The spell script triggers when this starts. Effects from the spell script should be applied as close as possible to when this time finishes.
CastHeadVisualResRef of visual model played on the caster's head when casting the spell.
CastHandVisualResRef of visual model played on the caster's hands when casting the spell.
CastGrndVisualResRef of grand visual model.
CastSoundResRef of sound played.
ProjValue 0 (false) or 1 (true). States whether this spell uses a projectile model used during the CastTime
ProjModelResRef of the model
ProjTypebehavior of the projectile. Values are: accelerating, homing, linked, ballistic, spiral, bounce
ProjSpwnPointspawn point on the caster that the projectile leaves from. Values are: hand (used for 99% of spells), and monster0, monster1, monster2, monster3, monster4 (used for Beholder rays from eyestalks).
ProjSoundResRef of the sound file for the projectile
ProjOrientationfor any spell that has a projectile, the value for this field is path.
ImmunityTypeSpecifies an immunity type for this spell. Values are: Acid, Cold, Death, Divine, Disease, Electricity, Fear, Fire, Mind_Affecting, Negative, Poison, Positive, Sonic
ItemImmunityValue 0 (false) or 1 (true).
SubRadSpell1If a spell has different possible variations, this field contains the ID value for the subspell. This subspell appears in the subradial menu that appears when attempting to select the main spell.
SubRadSpell2Same as SubRadSpell1.
SubRadSpell3Same as SubRadSpell1.
SubRadSpell4Same as SubRadSpell1.
SubRadSpell5Same as SubRadSpell1.
CategoryUsed for the AI, this column contains the ID value of the category specified in categories.2da.
MasterIf this spell is a subspell, this field contains the ID value for the spell it is a subspell for.
UserTypeSpecifies what type the "spell" is. Values are: 1 = spell, 2 = spell-like ability, 3 = feat, 4 = special
SpellDescA StringRef indicating a string that will be displayed in the game as the spell description.
UseConcentrationValue 0 (false) or 1 (true). If true, the spell can be interrupted by getting hit in combat, etc.
SpontaneouslyCastValue 0 (false) or 1 (true). If true, the spell may be cast without having been previously memorized.
AltMessageA StringRef.
HostileSettingValue 0 (false) or 1 (true). Determines whether a spell is considered hostile when being cast on other creatures.
FeatIDID value of the associated feat, if there is one.
Counter1Spell ID of the specific counter-spell, if the spell has one.
Counter2Same as Counter1.
HasProjectileValue 0 (false) or 1 (true). States whether or not the spell has a projectile.

[edit] Column notes

Both the MetaMagic field and TargetType fields are bitmask fields. Since bits are binary and can only be 0 or 1, the bits in a bitmask field can be used to represent true/on (1) or false/off (0). Bits are set/unset by adding or subtracting the values necessary to affect only each individual bit. The individual tables below represent which values to add together to get the necessary values for each field. To add these values, use the Calculator built into Windows, or equivalent program on other platforms. The Windows Calculator program will need to be changed to Scientific mode and have the Hex radio button selected. Only the values following the 0x beginning need to be entered into the calculator.

[edit] MetaMagic table

ValueCorresponding metamagic feat
0x01Empower spell
0x02Extend spell
0x04Maximize spell
0x08Quicken spell
0x10Silent spell
0x20Still spell

[edit] TargetType table

ValueTarget
0x01Self
0x02Creature
0x04Area/ground
0x08Items
0x10Doors
0x20Placeables

A value of 0x40 can be used for trap triggers which have been discovered, and area transition triggers, but they do not work very well.

  • Hordes of the Underdark specific changes:
    • All player castable spells need to have bit 0x08 set to allow them to work with the crafting system.
    • Feats connected to a spell using FeatID now will correctly work with this field.

[edit] General notes

  • It appears there is a limit of 255 to the number of spells which can be put into class spell book. Attempting to log in with a character with more spells than this will crash the server (or crash the game in single player). This limit applies only to the actual spells known by a character, not the spells available on level up. Since radial spells — such as protection from good and protection from evil — count as one spell in the spell book — protection from alignment, for this example — adding spells as radial options is one way around this limitation.
  • BioWare followed a naming convention for their spell scripts, as detailed in the following table.
Character positionsValue(s)Description
1 & 2nw, x0, x1, x2The first two letters designate which game/expansion the script came from: nw for NWN, x0 or x1 for Shadows of Undrentide, and x2 for Hordes of the Underdark. For custom scripts, many authors will use their initials here.
3 _ Underscore
4 & 5s0, s1, s2, s3s0 is used for player castable spells, s1 for monster spell-like abilities, s2 for special ablities/feats, and s3 for items/item properties.
6 _ Underscore
7-16<spell name>The remainder of the script name is the spell name, abbreviated if necessary to fit within the 16 character limit.
Rate this article:
Share this article: