Spell sequencers are items that can absorb defensive spells, and then cast those spells back again later. Sequencers may contain between one and three spells of any level, with the number of spells indicated in the item's list of powers (after its description). The standard sequencers can recast their spells once per day, but custom items can have their number of uses set as any other item property.

These items (and item properties) were added with the Hordes of the Underdark expansion.


Spell sequencers are prepared for use by casting a non-hostile spell (or spells, up to the item's limit) on the sequencer (that is, targeting the item). This spell must be cast from memory or from a scroll; it cannot be cast from any other item. Once this is done, the "sequencer (x spells)" item property can be used to cast those spells on the item's activator. Using a sequencer (as opposed to preparing it) does not consume spell slots. In fact, once prepared, a sequencer can be used by a character that is incapable of casting spells (unless precluded by restrictions explicitly given on the item). Furthermore, using a sequencer does not clear its memory of the spells with which it was prepared.

The spells stored in the sequencer can be changed by first erasing the old spells with the "clear sequencer" item property. Stored spells are also cleared when starting a new module in either single-player or local vault multiplayer; they are preserved across module changes and resets in server vault multiplayer.

A spell is considered "non-hostile" if it is not flagged as hostile in spells.2da. Generally, this is the case for spells that do not bring harm to their targets. They might serve no purpose other than (indirectly) bringing harm to creatures not targeted by the spell (e.g. flame weapon), but they do not harm what is directly targeted (the weapon, or a creature wielding the weapon, that receives the flame, in the case of flame weapon).

The caster level for spells cast using a sequencer is the larger of 10 and the "minimal" caster level for that spell (2 × innate level − 1). This means that lower level casters can have spells improved by sequencing them, while higher level casters can have spells weakened by sequencing them. The DC (if applicable, e.g. war cry) is 13 + innate level.

Builder notes[]

Sequencers are created in the Toolset by giving an item exactly one of the "Cast Spell: Sequencer" properties. There are three such properties, corresponding to being able to store one, two, or three spells. Giving an item more than one of these properties will not increase the number of spells that can be stored, and it could cause behavior confusing to a player. The "Cast Spell: Clear Sequencer" property should probably also be given to the item, likely with unlimited uses per day, but this is not strictly required.

The storing of spells on the sequencer is handled in the standard spellhook script, x2_inc_spellhook. As changes to this script do not take full effect unless every spell script is recompiled, it is usually impractical to change it. However, the module-specific spellhook is invoked before the sequencer handling, so the module spellhook could intercept spells targeting sequencers and prevent the standard behavior. Tag-based scripting cannot be used to change the storing of spells as that occurs later in the standard spellhook. In fact, a sequencer item will never fire its tag-based OnSpellCastAt event.

The casting and clearing of spells from a sequencer is handled by the script x2_s3_sequencer.