Scriptable Spells

A Gibberlings Three Mod
Author: Eric Kerr (aka Cirerrek)

Version 1.5 - Check for the most recent version

Overview

Scriptable Spells fixes several SPCLxxx and SPINxxx spells that had their spell level incorrectly defined. The incorrect level definition would cause the game to crash when the spells were cast using the trigger HaveSpell(). The spells modified by this package are able to be scripted without causing the game to crash.

Compatibility

This mod is designed to work with BG2: Shadows of Amn with or without the expansion pack Throne of Bhaal. At present there are no known incompatibilities.

Installation

Windows
Scriptable Spells is packaged and installed with WeiDU and is distributed as a self-extracting archive. To install, simply double-click the archive and follow the instructions on screen.

Alternatively the files can be extracted from the archive using WinRAR. If properly extracted, you should have a scriptablespells folder, Setup-Scriptable_Spells.tp2, and Setup-Scriptable_Spells.exe in your BG2 folder. To install, simply double-click Setup-Scriptable_Spells.exe and follow the instructions on screen.

Please run Setup-scriptable_spells.exe in your BG2 folder to reinstall, uninstall or otherwise change components.

Mac OS X
If the mod was previously installed, uninstall it before extracting the new version. Scriptable Spells is packaged and installed with WeiDU. To install, simply extract the contents of the mod into your BG2 folder.  If properly extracted, you should have a scriptablespells folder, Setup-Scriptable_Spells.tp2, Setup-Scriptable_Spells, and Setup-Scriptable_Spells.command in your BG2 folder. To install, simply double-click Setup-Scriptable_Spells.command and follow the instructions on screen.

Contents

Somewhere along the way it was discovered that many of the kit class spells, such as Boon of Lathander and Helm Seeking Sword, would cause Baldur's Gate II to crash when scripted with the trigger 0x4031 HaveSpell(I:Spell Spell). This latter also proved true with several of the spells added by the expansion Throne of Bhaal. A work around for casting the spells was developed by one or more of the talented scripters, so scripting life continued unabated.

I am not 100% certain, but I believe it was Dave Gaider and Mark ?, employees of Bioware, who discovered how to fix this problem. The problem was that the level of the spells was incorrectly defined in their .spl files. Instead of being set to 1, they were set to the equivalent values of their mage or cleric counterpart spells. In short, probably a copy/paste error.

At some point it was, I believe, Vulgar Zildrah who compiled the fixed .spl files into a single package, Repaired_Innate_BG2_Spell_Files. Then sometime later, I came along and fixed some of the TOB spells and compiled them into another package, More_Modified_Innate_ToB_Spell_Files.

Scriptable Spells combines the two packs into one and uses WeiDU to install and modify the level of the spells.

Spell Code Spell Name Spell.IDS Reference
SPCL232 Inquisitor True Sight INQUIS_TRUE_SIGHT
SPCL412 Set Trap (Thief) SET_SNARE_TRAP
SPCL414 Set Trap (Bounty Hunter) SET_SPECIAL_SNARE_TRAP
SPCL621 Summon Animal Spirit TOTEMICDRUID_SUMMON_ANIMAL_SPIRIT
SPCL721 Talos Storm Shield TALOS_STORM_SHIELD
SPCL722 Talos Lightning Bolt TALOS_LIGHTNING_BOLT
SPCL731 Helm Seeking Sword HELM_SEEING_SWORD
SPCL732 Helm True Sight HELM_TRUE_SIGHT
SPCL741 Boon of Lathander LATHANDER_BOON
SPCL742 Lathander Hold Undead LATHANDER_HOLDUNDEAD
SPCL910 Set Spike Trap ROGUE_SET_SPIKE_TRAP *TOB
SPCL911 Set Exploding Trap ROGUE_SET_EXPLODING TRAP *TOB
SPCL912 Set Time Trap ROGUE_SET_TIME_TRAP *TOB
SPCL923 Paladin Summon Deva PALADIN_SUMMON_DEVA *TOB
SPIN683 Web Tangle FIGURINE_SPIDER_WEB
SPIN696 Moon Dog Sight MOONDOG_SIGHT
SPIN697 Moon Dog Mirror Image MOONDOG_MIRROR_IMAGE
SPIN698 Moon Dog Improved Invisibility MOONDOG_IMPROVED_INVISIBILITY
SPIN891 Moon Dog Howl MOONDOG_HOWL

Please note that the Spell Codes are correct for the individual spells, but the Spell Names may or not be correct and should be considered my interpretation of what the name of the spell should be. Many of the Spell.IDS References listed in the table above are CUSTOM, meaning I or others have manually altered the Spell.IDS file to change the name of existing spells or to add names of spells that did not have Spell.IDS references as shipped with the game. When attempting to script the spells, you should reference you own Spell.IDS file to determine the correct method to script the spells.

These spells will now work properly with the triggers, 0x4031 HaveSpell(I:Spell Spell) and 0x4031 HaveSpellRES(S:Spell*).

Contact Information

Eric Kerr (aka Cirerrek) maintains Scriptable Spells. You can visit The Gibberlings Three for information on this and any other mods on which we may be working.

Thanks and Acknowledgements

Black Isle Studios - For producing such an excellent RPG
Bioware - For the Infinity Engine and making such an outstanding RPG
Sarkyn (Greg Hodgson) - gSeries and gMinion
Xyx (Jochem van't Hull) - General Insight and Helpfulness
GBlucher (Gebhard Blucher) - GB-Scripts
Rich Martel - uScript
TeamBG - Editors, Tutorials, Forums
BWScripts - Defunct but not forgotten
BGScripts - Where player AI scripting really came to life
Jon Hauglid - Near Infinity and eSeries Debugging
SimDing0 - A little of this, a little of that, and all very helpful
Max (aka Potencius) - a font of information about everything Infinity Engine
Ivann Alvarado - XpertAi (IWD)
Grog - Smart Scripts
Jessica Kerr - seriously reducing my risk of developing carpal tunnel syndrome
Sir Alexander - French translation
King Diamond - BP Detectable Spells
CamDawg - hosting, installation package, G3'ifying documentation

Tools Used in Creation
WeiDU by Wes Weimer
Near Infinity by Jon Olav Hauglid
IESDP maintained by igi
DLTCEP by Avenger
BAM Workshop II by Andrew Bridges

Credits and Copyright Information

This mod may not be sold, published, compiled or redistributed in any form without the consent of its author.

Version History

Version 1.5

Version 1.4

Version 1.3

Version 1.2

Version 1.1

Version 1.0