Header:Size=114 Bytes | Ext. Header: Size= 40 Bytes | Feature Block: Size=48 Bytes |
Overall structure:
Offset | Size (datatype) | Description |
---|---|---|
0x0000 | 4 (char array) | Signature (‘SPL ’) |
0x0004 | 4 (char array) | Version (‘V1 ‘) |
0x0008 | 4 (dword) | Spell Name - Unidentified (strref) |
0x000c | 4 (dword) | Spell Name - Identified (strref) (usually -1) |
0x0010 | 8 (resref) | Completion Sound |
0x0018 | 4 (dword) | |
0x001c | 2 (word) | Spell type:
|
0x001e | 4 (dword) | |
0x0022 | 2 (word) | |
0x0024 | 1 (char) | Min Level (unused) |
0x0025 | 1 (byte) | Primary Type (Spell school) (IWD: school.2da, BG2:mschool.2da) |
0x0026 | 1 (byte) | Min Strength (unused) |
0x0027 | 1 (char) | Secondary Type (BG2:msectype.2da) |
0x0028 | 1 (byte) | Min Strength Bonus (unused) |
0x0029 | 1 (byte) | Usability 1 (unused) |
0x002a | 1 (byte) | Min Int (unused) |
0x002b | 1 (byte) | Usability 2 (unused) |
0x002c | 1 (byte) | Min Dex (unused) |
0x002d | 1 (byte) | Usability 3 (unused) |
0x002e | 1 (byte) | Min Wis (unused) |
0x002f | 1 (byte) | Usability 4 (unused) |
0x0030 | 2 (word) | Min Con (unused) |
0x0032 | 2 (word) | Min Cha (unused) |
0x0034 | 4 (dword) | Spell Level |
0x0038 | 2 (word) | Stack amount (unused) |
0x003a | 8 (resref) | Spellbook icon (BAM). The engine replaces the last character of this filename with a C. |
0x0042 | 2 (word) | Lore to ID (unused) |
0x0044 | 8 (resref) | Ground icon (unused) |
0x004c | 4 (dword) | Weight (unused) |
0x0050 | 4 (dword) | Spell Description - Unidentified (strref) |
0x0054 | 4 (dword) | Spell Description - Identified (strref) (usually -1) |
0x0058 | 8 (resref) | Description icon (unused) |
0x0060 | 4 (dword) | Enchantment (unused) |
0x0064 | 4 (dword) | Extended Header offset |
0x0068 | 2 (word) | Extended Header count |
0x006a | 4 (dword) | Feature Block Table offset |
0x006e | 2 (word) | Casting Feature Block offset (these feature blocks may not use target type 2) |
0x0070 | 2 (word) | Casting Feature Block count |
Offset | Size (datatype) | Description |
---|---|---|
0x0000 | 1 (char) | Spell form
|
0x0001 | 1 (char) |
|
0x0002 | 2 (word) | Location |
0x0004 | 8 (resref) | Memorised icon (BAM). The engine replaces the last character of this filename with a B. |
0x000c | 1 (char) | Target:
|
0x000d | 1 (char) | Target Number |
0x000e | 2 (word) | Range |
0x0010 | 2 (word) | Level Required |
0x0012 | 2 (word) | Casting Time |
0x0014 | 2 (word) | Times per day |
0x0016 | 2 (word) | Dice Sides (unused) |
0x0018 | 2 (word) | Dice Thrown (unused) |
0x001a | 2 (word) | Enchanted (unused) |
0x001c | 2 (word) | Damage Type (unused) |
0x001e | 2 (word) | Count of feature blocks |
0x0020 | 2 (word) | Offset to feature blocks |
0x0022 | 2 (word) | Charges (unused) |
0x0024 | 2 (word) | Charge depletion behaviour (unused) |
0x0026 | 2 (word) | Projectile (BG2: projectl.ids. Note: in BG2, this value is off-by-one from projectl.ids value. I.e. binary value of 2 corresponds to 0x1 - ARROW) |
Offset | Size (datatype) | Description |
---|---|---|
0x0000 | 2 (word) | Opcode Number |
0x0002 | 1 (char) | Target type
|
0x0003 | 1 (char) | Power |
0x0004 | 4 (dword) | Parameter 1 |
0x0008 | 4 (dword) | Parameter 2 |
0x000c | 1 (char) | Timing Mode
NB. all effects except those with Timing mode ‘9’ are removed by death. |
0x000d | 1 (char) | Resistance The default behaviour is that effects cannot be dispelled and ignore magic resistance.
The only difference between 0 and 2 is that 0 will automatically convert to 2 when targeting yourself. This can also be presented in the more traditional way:
|
0x000e | 4 (dword) | Duration |
0x0012 | 1 (char) | Probability 1 |
0x0013 | 1 (char) | Probability 2 Note: The BG1 engine treats probability as a single word, effects are applied in the range 0-probability. |
0x0014 | 8 (resref) | Resource |
0x001c | 4 (dword) | Dice Thrown |
0x0020 | 4 (dword) | Dice Sides |
0x0024 | 4 (dword) | Saving Throw Type
NB. If more than 1 saving throw type is specified, the target rolls against their best save. |
0x0028 | 4 (dword) | Saving Throw Bonus |
0x002c | 4 (dword) | TobEx: Stacking ID. Checked when bit 25 of the Saving Throw Type is set. If two effects of the same opcode are applied, both have Limit Effect Stacking bit set, and both have the same stacking ID, then the latter applied effect is suspended in application until the former effect expires. Regardless of whether it is applied, the latter effect will expire at the same time that it would expire if it was applied. In other words, the total duration of some non-stacking effect opcode is not extended because more than one copy of the effect was applied. Stacking IDs are unique to the opcode being applied. To maintain uniqueness of stacking IDs between different mods, one recommendation is to use the higher word of Special as the modder’s Infinity Engine Community Prefix, then use the lower word as an identifying ID. For example, 0x41360001 (‘A6’ 0x0001). |
Bit | Byte 1 | Byte 2 | Byte 3 | Byte 4 |
---|---|---|---|---|
0 | Unknown | Unknown | Not in combat | Can target invisible (BGEE, TobEx) |
1 | Unknown | Breaks Sanctuary (BGEE) | Unknown | Castable when silenced (BGEE, TobEx) |
2 | Unknown | Hostile/Breaks Invisibility | Unknown | Unknown |
3 | Unknown | No LOS required | Unknown | Unknown |
4 | Unknown | Allow spotting | Unknown | Unknown |
5 | Unknown | Outdoors only | Unknown | Unknown |
6 | Unknown | Ignore dead-magic and wild surge effect | Unknown | Unknown |
7 | Unknown | Ignore wild surge effect (i.e. trigger/contingency) | Unknown | Unknown |
bit 1: Exclude Evil priests. (BG2 & HoW)
bit 2: Exclude Good priests. (BG2 & HoW)
bit 3: Exclude GENeutral priests. (BG2 & HoW)
bit 4: Exclude Lawful priests. (BG2 & HoW)
bit 5: Exclude LCNeutral priests. (BG2 & HoW)
bit 6: Exclude Abjurers
bit 7: Exclude Conjurers
bit 8: Exclude Diviners
bit 9: Exclude Enchanters
bit 10: Exclude Illusionists
bit 11: Exclude Invokers
bit 12: Exclude Necromancers
bit 13: Exclude Transmuters
bit 14: Wild Magic (exclude Generalists) (BG2)
bit 15 - 29: Unused
bit 30: Exclude Cleric/Paladin
bit 31: Exclude Druid/Ranger
NB.Alignment and School exclusion bits cannot be combined.
BG1,BG2,IWD
...No animation
08
09 Necromancy
10 Alteration
11 Enchantment
12 Abjuration
13 Illusion
14 Conjuration
15 Invocation
16 Divination
17 White sparks
18 Black sparks
19 White sparks
20 White sparks
21 White sparks
22 White -> red sparks
23 White -> purple/red sparks
24 White -> red sparks
26 White sparks
32 White sparks
34 White sparks
56461 No animation
65535 No animation
NB. The 'spark' entries are related to sprklclr.2da (and probably opcode #41)
PST
36: Alteration
37: Conjuration
38: Enchantment
39: Divination
40: Illusion
41: Invocation
42: Necromancy
44: Special (Innate) Skill