| FileExtension : |
SPL |
| Content : |
Spell Definitions |

|
Header: Size=114 Bytes |
|
Ext. Header: Size= 40 Bytes |
|
Feature Block: Size=48 Bytes |
Header:
Every spell file contains a header. It contains the basic properties
of the spell represented by the file.
Extended Header:
One Extended Header equals one ability of an Spell.
Feature Block:
A spells magical capabilities come from one or more feature blocks
Every Feature Block provides a specific effect.
Header:
FileType:
| Offset |
Size |
Data |
Type |
Default Data |
| 0000h |
0004h |
FileType |
Array[0..3] Of Char |
'SPL ' |
This field contains the type of data file. It should be the same as
the file extension.
FileRevision:
| Offset |
Size |
Data |
Type |
Default Data |
| 0004h |
0004h |
FileRevision |
Array[0..3] Of Char |
'V1 ' or 'V1.0' |
Revision of the data file. In BG I've only found 'V1.x' files, but this
may change with future expansions.
SpellNameReference:
| Offset |
Size |
Data |
Type |
Default Data |
| 0008h |
0004h |
SpellNameReference |
Longint |
FFFFh for none |
This is the reference to the name of the spell.
The reference is the index of the name string contained in Dialog.tlk
file.
School:
| Offset |
Size |
Data |
Type |
Default Data |
| 0022h |
0001h |
PaperdollItem |
Byte |
00h |
This field specifies the school the spell belongs to:
| Value(ASCII) |
Value(Hex) |
Description |
| " " |
00h |
<none>Unspecified/Schoolless |
| " " |
09h |
Necromancy |
| " " |
0Ah |
Alteration |
| " " |
0Bh |
Enchantment/Charm |
| " " |
0Ch |
Abjuration |
| " " |
0Dh |
Illusion/Phantasm |
| " " |
0Eh |
Cunjuratio/Summoning |
| " " |
0Fh |
Invocation |
| " " |
10h |
Divination |
| " " |
18h |
Evocation |
SpellLevel:
| Offset |
Size |
Data |
Type |
Default Data |
| 0034h |
0004h |
SpellLevel |
Longint |
|
Contains the casting level of spell.
SpellBookIcon:
| Offset |
Size |
Data |
Type |
Default Data |
| 003Ah |
0008h |
InventoryIcon |
Array[0..7] Of Char |
|
File name of the BAM file that contains the Spell Book Icon.
DescriptionReference:
| Offset |
Size |
Data |
Type |
Default Data |
| 0050h |
0004h |
DescriptionReference |
Longint |
FFFFh for none |
This is the reference to the spell description.
The reference is the index of the name string contained in Dialog.tlk
file.
ExtendedHeaderOffset:
| Offset |
Size |
Data |
Type |
Default Data |
| 0064h |
0004h |
ExtendedHeaderOffset |
Longint |
|
Offset of the start of the first extended header found in the Spell
file.
ExtendedHeaderCount:
| Offset |
Size |
Data |
Type |
Default Data |
| 0068h |
0002h |
ExtdendedHeaderCount |
Word |
|
Some spell files may actually contain more than one Extended Header..
FeatureTableOffset:
| Offset |
Size |
Data |
Type |
Default Data |
| 006Ah |
0004h |
FeatureTableOffset |
Longint |
|
Offset of the first Feature Block.
Extended Header:
SpellType:
| Offset |
Size |
Data |
Type |
Default Data |
| 0000h |
0004h |
SpellType |
Byte |
|
This field determines the type of Spell:
| Value |
Data |
| 0100 0400h |
Innate Ability |
| 0200 0200h |
Wizard Spell |
| 0100 0200h |
Priest Spell |
SpellBarIcon:
| Offset |
Size |
Data |
Type |
Default Data |
| 0004h |
0008h |
Target |
Array[0..7] Of Char |
|
File name of the BAM file that contains the Spell Bar Icon.
CasterLevel:
| Offset |
Size |
Data |
Type |
Default Data |
| 0010h |
0002h |
CasterLevel |
Word |
|
Level at which caster must be for this Extended Header to apply.
CastingTime:
| Offset |
Size |
Data |
Type |
Default Data |
| 0012h |
0004h |
CastingTime |
Longint |
|
This field specifies the time it takes the user to cast the spell.
EffectCount:
| Offset |
Size |
Data |
Type |
Default Data |
| 001Eh |
0002h |
EffectCount |
Word |
|
Number of structs used for this extended header.
SpecialGraphic:
| Offset |
Size |
Data |
Type |
Default Data |
| 001Eh |
0002h |
SpecialGraphic |
Byte |
|
Special Graphic if "missle weapon".
Feature Block:
Feature:
| Offset |
Size |
Data |
Type |
Default Data |
| 0000h |
0002h |
Feature/Effect |
Word |
|
TargetIdentifier:
| Offset |
Size |
Data |
Type |
Default Data |
| 0002h |
0002h |
TargetIdentifier |
Word |
|
TaregetIdentifier deetermines the target of this effect
Parameter 1:
| Offset |
Size |
Data |
Type |
Default Data |
| 0004h |
0004h |
Parameter 1 |
Longint |
|
Parameter 1 is a Parameter passed to the Feature/Effect function.
Most of the time it contains the modification value of a Feature/Effect.
Parameter 2:
| Offset |
Size |
Data |
Type |
Default Data |
| 0008h |
0004h |
Parameter 2 |
Longint/Bitfield |
|
Parameter 2 Is The Second Parameter passed to the Feature/Effect function.
Most of the time it contains the mode of Parameter 1(%, Absolute, Relative.....).
EffectTimeMode:
| Offset |
Size |
Data |
Type |
Default Data |
| 000Ch |
0001h |
EffectTimeMode |
Byte |
|
This field sets the timemode of the item and the EffectTimeField
| Value |
Start of Effect |
Duration |
| 0 |
Instantly |
For [EffecTime] Seconds |
| 1 |
Instantly |
Permanent |
| 2 |
Instantly |
While equiped |
| 4 |
After [EffecTime] Seconds |
Permanent |
EffectTime:
| Offset |
Size |
Data |
Type |
Default Data |
| 000Eh |
0004h |
EffectTime |
Longint |
|
EffectTime contains a time value for the Effect.
Game time in Rounds = EffectTime / 60
Probability:
| Offset |
Size |
Data |
Type |
Default Data |
| 0012h |
0002h |
Probability |
Word |
|
This field contains the probability of this Effect to happen. It's value
can go from 0 to 100.
0 The Effect never happens, 100 The Effect always happens. Values greater
than 100 are taken as 100.
FileName:
| Offset |
Size |
Data |
Type |
Default Data |
| 0014h |
0008h |
FileName |
Array[0..7] Of Char |
|
FileName is another Paremeter passed to the Effect/Feature function.
Some functions like make sound use it to specify the sound file played.
Throws:
| Offset |
Size |
Data |
Type |
Default Data |
| 0001Ch |
0004h |
Throws |
Longint |
|
This field only matters for dice based Effects.
DiceSides:
| Offset |
Size |
Data |
Type |
Default Data |
| 00020h |
0004h |
DiceSides |
Longint |
|
This field only matters for dice based Effects.
SavingThrowType:
| Offset |
Size |
Data |
Type |
Default Data |
| 00024h |
0004h |
SavingThrowType |
Longint |
|
This field determines the type of saving throw that must be made to
avoid Effect.
SavingThrowBonus:
| Offset |
Size |
Data |
Type |
Default Data |
| 00028h |
0004h |
SavingThrowBonus |
Longint |
|
This field determines the bonus to the saving throw that must be made
to avoid Effect.
|