---
title: "SPL file format"
regenerate: true
---
{% include relurl.html %}
SPL file format
BG1, BG1: TotS, BG2, BG2: ToB, PST, IWD, IWD:HoW, IWD:TotL, BGEE
This file format describes a "spell". Spells include mage spells, priest spells, innate abilities, special abilities and effects used for game advancement (e.g. animation effects, custom spells). SPL files have a similar structure to
ITM files.
|
Header:Size=114 Bytes |
|
Ext. Header: Size= 40 Bytes |
|
Feature Block: Size=48 Bytes |
SPL files consist of a main header, zero or more extended headers (each containing zero or more feature blocks) and zero or more casting feature blocks. All the feature blocks are stored as a continuous data segment, with each extended header containing an offset into this data, and the main header containing an offset into this data for the casting feature blocks.
Overall structure:
{% assign offset_header_name = "splv1_Header" %}
{% assign offset_header_display_name = "Header" %}
{% assign offsets = site.data.file_formats.spl_v1.header %}
{% include offset_table.html %}
{% assign offset_header_name = "splv1_Extended_Header" %}
{% assign offset_header_display_name = "Extended Header" %}
{% assign offset_header_desc = "Extended headers represent the effects of a spell on the target. Multiple extended headers can be set in a spell, to allow the spell to use effects based on the level of the caster. Extended headers should be in the file in order of increasing level" %}
{% assign offsets = site.data.file_formats.spl_v1.extended_header %}
{% include offset_table.html %}
{% assign offset_header_name = "splv1_Feature_Block" %}
{% assign offset_header_display_name = "Feature Block" %}
{% assign offset_header_desc = "Any action carried out by a spell is done by feature blocks, each of which holds an effect number as well as targetting and timing information. The engine appears to roll a probability for each valid target type, rather than one probability per attack." %}
{% assign offsets = site.data.file_formats.spl_v1.feature_block %}
{% include offset_table.html %}
bit 0: Exclude Chaotic priests. (BG2 & HoW)
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.