Detectable Spells

Authors: Vulgar Zildrah, Kensai Ryu, Eric Kerr (aka Cirerrek). Repackaged by CamDawg.

Version 1.9 (Beta)

Overview

Detectable Spells was originally created by Vulgar Zildrah and Kensai Ryu.

It allows you to use a CheckStat, CheckstatGT or LT trigger to look for certain spells in effect on an object. The names used for checkstat match the Spell.ids names of the spells to SOME extent.

So to check if the last object seen has a protection from evil spell active and display the text 'Protected from evil' above the object running the script's head, use the following script:

IF CheckStatGT(LastSeenBy(Myself),0,PROTECTION_FROM_EVIL) THEN RESPONSE #100 DisplayStringHead(Myself,14769) //'Protected from evil' END

Obviously this gives us a lot more ability to script for spell defenses that are active on objects.

Known Issues

Occasionally it has been found that certain spells will trigger an incorrect state. For example:

If two spells are cast that are Stats in the same entry, only the lasts spell cast will be detectable, I site SCRIPTINGSTATE5 as a prime example.

To offset this potential conflict, an attempt was made to assign the more 'powerful' spells a higher value in its respective Stat entry.

Compatibility

Detectabl Spells is designed to work with Baldur's Gate II: Shadows of Amn with or without the Throne of Bhaal expansion pack.

Installation

Windows
Detectable 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 detectable_spells folder and setup-detectable_spells.exe in your BG2 folder. To install, simply double-click setup-detectable_spells.exe and follow the instructions on screen.

Mac OS X
If the mod was previously installed, uninstall it before extracting the new version. Detectable 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 detectable_spells folder, setup-detectable_spells, and setup-detectable_spells.command in your BG2 folder. To install, simply double-click setup-detectable_spells.command and follow the instructions on screen.

Contents

This mod contains a single component. Modders may include this code freely in their mods, as long as credit is given to the original authors.

File Spell Name Scripting State SS# Value Opcode
balshld Fire Shield (Red) WIZARD_FIRE_SHIELD 125 1 233
bhaal1b Regeneration CLERIC_REGENERATION 124 1 233
bhaal2a Draw Upon Holy Might SCRIPTINGSTATE6 161 4 182
dgarchon Shield of the Archons CLERIC_SHIELD_OF_THE_ARCHONS 123 1 233
dgfaith Armor of Faith CLERIC_ARMOR_OF_FAITH 110 1 233
dgright Righteous Magic SCRIPTINGSTATE6 161 6 182
marw401 Daer'Ragh's Aura Cleansing WIZARD_IMPROVED_ALACRITY 165 1 182
melis02 Blade Barrier CLERIC_BLADE_BARRIER 121 2 233
spcl144 Kai SCRIPTINGSTATE4 159 2 182
spcl152 Barbarian Rage SCRIPTINGSTATE3 158 2 182
spcl152 Barbarian Rage SCRIPTINGSTATE4 159 1 182
spcl213 Protection from Evil PROTECTION_FROM_EVIL 117 1 233
spcl222 Remove Fear WIZARD_RESIST_FEAR 178 2 182
spcl232 True Sight TRUE_SIGHT 118 1 233
spcl233 Protection from Evil 10' Radius PROTECTION_FROM_EVIL 117 1 233
spcl321 Enrage SCRIPTINGSTATE4 159 1 182
spcl423 Poison Weapon SCRIPTINGSTATE4 159 4 182
spcl521 Offensive Spin SCRIPTINGSTATE4 159 2 182
spcl522 Defensive Spin SCRIPTINGSTATE4 159 2 182
spcl732 True Sight TRUE_SIGHT 118 1 233
spcl741 Boon of Lathander SCRIPTINGSTATE3 158 2 182
spcl741 Boon of Lathander SCRIPTINGSTATE4 159 1 182
spcl811 Stunning Blow SCRIPTINGSTATE4 159 2 182
spcl820 Quivering Palm SCRIPTINGSTATE4 159 5 182
spcl900 Whirlwind Attack SCRIPTINGSTATE4 159 4 182
spcl901 Greater Whirlwind Attack SCRIPTINGSTATE4 159 5 182
spcl902 Deathblow SCRIPTINGSTATE4 159 2 182
spcl903 Greater Deathblow SCRIPTINGSTATE4 159 3 182
spcl905 Critical Strike SCRIPTINGSTATE4 159 3 182
spcl906 Power Attack SCRIPTINGSTATE4 159 2 182
spcl909 Smite SCRIPTINGSTATE4 159 5 182
spcl916 Assassination SCRIPTINGSTATE4 159 4 182
spin103 Draw Upon Holy Might SCRIPTINGSTATE6 161 4 182
spin117 Berserk SCRIPTINGSTATE4 159 1 182
spin121 Protection from Evil PROTECTION_FROM_EVIL 117 1 233
spin571 Energy Drain LEVELDRAIN 134 1 233
spin666 Level Drain LEVELDRAIN 134 1 233
spin676 Invoke Courage SCRIPTINGSTATE4 159 3 182
spin684 True Sight TRUE_SIGHT 118 1 233
spin686 Protection from Magical Weapons WIZARD_PROTECTION_FROM_MAGIC_WEAPONS 128 4 233
spin696 Moon Dog Sight TRUE_SIGHT 118 1 233
spin710 Spell Deflection WIZARD_SPELL_DEFLECTION 116 2 233
spin878 Level Drain LEVELDRAIN 134 1 233
spin920 Minor Spell Turning WIZARD_SPELL_TURNING 129 1 233
sppr107 Protection from Evil PROTECTION_FROM_EVIL 117 1 233
sppr108 Remove Fear WIZARD_RESIST_FEAR 178 2 182
sppr111 Armor of Faith CLERIC_ARMOR_OF_FAITH 110 1 233
sppr202 Barkskin SCRIPTINGSTATE5 160 1 182
sppr214 Draw Upon Holy Might SCRIPTINGSTATE6 161 4 182
sppr312 Strength of One SCRIPTINGSTATE6 161 2 182
sppr319 Summon Insects CLERIC_INSECT_PLAGUE 120 1 233
sppr403 Free Action CLERIC_FREE_ACTION 131 1 233
sppr406 Defensive Harmony CLERIC_DEFENSIVE_HARMONY 133 1 233
sppr408 Protection from Evil 10' Radius PROTECTION_FROM_EVIL 117 1 233
sppr409 Deathward SCRIPTINGSTATE2 157 1 182
sppr412 Holy Power SCRIPTINGSTATE6 161 3 182
sppr413 Negative Plane Protection SCRIPTINGSTATE3 158 1 182
sppr417 Lesser Restoration LEVELDRAIN 134 0 233
sppr504 Raise Dead LEVELDRAIN 134 0 233
sppr505 True Seeing TRUE_SIGHT 118 1 233
sppr507 Champion's Strength SCRIPTINGSTATE4 159 1 182
sppr507 Champion's Strength SCRIPTINGSTATE6 161 3 182
sppr508 Chaotic Commands CLERIC_CHAOTIC_COMMANDS 119 1 233
sppr513 Righteous Magic SCRIPTINGSTATE6 161 6 182
sppr517 Insect Plague CLERIC_INSECT_PLAGUE 120 2 233
sppr603 Blade Barrier CLERIC_BLADE_BARRIER 121 2 233
sppr613 Physical Mirror CLERIC_PHYSICAL_MIRROR 122 1 233
sppr698 Blade Barrier CLERIC_BLADE_BARRIER 121 1 233
sppr701 Shield of the Archons CLERIC_SHIELD_OF_THE_ARCHONS 123 1 233
sppr711 Regeneration CLERIC_REGENERATION 124 1 233
sppr712 Resurrection LEVELDRAIN 134 0 233
sppr713 Greator Restoration LEVELDRAIN 134 0 233
sppr717 Creeping Doom CLERIC_INSECT_PLAGUE 120 3 233
sppr725 Globe of Blades CLERIC_BLADE_BARRIER 121 3 233
sppr730 Aura of Flaming Death WIZARD_FIRE_SHIELD 125 3 233
sppr950 True Sight TRUE_SIGHT 118 1 233
spra302 Minor Spell Deflection WIZARD_SPELL_DEFLECTION 116 1 233
spra303 Protection from Normal Missiles WIZARD_PROTECTION_FROM_NORMAL_MISSILES 179 1 182
spwi102 Armor SCRIPTINGSTATE5 160 3 182
spwi108 Protection from Petrification WIZARD_PROTECTION_FROM_PETRIFICATION 176 1 182
spwi113 Protection from Evil PROTECTION_FROM_EVIL 117 1 233
spwi114 Shield SCRIPTINGSTATE5 160 2 182
spwi210 Resist Fear WIZARD_RESIST_FEAR 178 1 182
spwi214 Strength SCRIPTINGSTATE6 161 2 182
spwi311 Protection from Normal Missiles WIZARD_PROTECTION_FROM_NORMAL_MISSILES 179 1 182
spwi317 Ghost Armor SCRIPTINGSTATE5 160 4 182
spwi318 Minor Spell Deflection WIZARD_SPELL_DEFLECTION 116 1 233
spwi321 Spell Thrust WIZARD_SPELL_IMMUNITY 162 0 182
spwi321 Spell Thrust WIZARD_SPELL_DEFLECTION 116 0 233
spwi403 Fire Shield (Blue) WIZARD_FIRE_SHIELD 125 2 233
spwi412 Greater Malison WIZARD_GREATER_MALISON 180 1 182
spwi414 Spirit Armor SCRIPTINGSTATE5 160 5 182
spwi418 Fire Shield (Red) WIZARD_FIRE_SHIELD 125 1 233
spwi419 Secret Word WIZARD_SPELL_DEFLECTION 116 0 233
spwi419 Secret Word WIZARD_SPELL_IMMUNITY 162 0 182
spwi419 Secret Word WIZARD_SPELL_TURNING 129 0 233
spwi419 Secret Word WIZARD_SPELL_SHIELD 177 0 182
spwi419 Secret Word WIZARD_PROTECTION_FROM_ENERGY 163 0 182
spwi511 Protection from Normal Weapons WIZARD_PROTECTION_FROM_NORMAL_WEAPONS 181 1 182
spwi513 Breach WIZARD_PROTECTION_FROM_MAGIC_WEAPONS 128 0 233
spwi513 Breach WIZARD_SPELL_SHIELD 177 0 182
spwi513 Breach WIZARD_PROTECTION_FROM_NORMAL_MISSILES 179 0 182
spwi513 Breach WIZARD_PROTECTION_FROM_THE_ELEMENTS 130 0 233
spwi513 Breach WIZARD_PROTECTION_FROM_NORMAL_WEAPONS 181 0 182
spwi513 Breach SCRIPTINGSTATE5 160 0 182
spwi513 Breach WIZARD_FIRE_SHIELD 125 0 233
spwi513 Breach WIZARD_PROTECTION_FROM_ENERGY 163 0 182
spwi513 Breach WIZARD_PROTECTION_FROM_MAGIC_ENERGY 126 0 233
spwi519 Spell Shield WIZARD_SPELL_SHIELD 177 1 182
spwi522 Minor Spell Turning WIZARD_SPELL_TURNING 129 1 233
spwi590 Immunity: Abjuration WIZARD_SPELL_IMMUNITY 162 1 182
spwi591 Immunity: Conjuration WIZARD_SPELL_IMMUNITY 162 2 182
spwi592 Immunity: Divination WIZARD_SPELL_IMMUNITY 162 3 182
spwi593 Immunity: Enchantment WIZARD_SPELL_IMMUNITY 162 4 182
spwi594 Immunity: Illusion WIZARD_SPELL_IMMUNITY 162 5 182
spwi595 Immunity: Evocation WIZARD_SPELL_IMMUNITY 162 6 182
spwi596 Immunity: Necromancy WIZARD_SPELL_IMMUNITY 162 7 182
spwi597 Immunity: Alteration WIZARD_SPELL_IMMUNITY 162 8 182
spwi603 Tenser's Transformation SCRIPTINGSTATE4 159 1 182
spwi603 Tenser's Transformation WIZARD_TENSERS_TRANSFORMATION 182 1 182
spwi606 Protection from Magic Energy WIZARD_PROTECTION_FROM_MAGIC_ENERGY 126 1 233
spwi607 Mislead WIZARD_MISLEAD 127 1 233
spwi608 Pierce Magic WIZARD_KHELBENS_WARDING_WHIP 132 0 233
spwi608 Pierce Magic WIZARD_SPELL_TURNING 129 0 233
spwi608 Pierce Magic WIZARD_SPELL_IMMUNITY 162 0 182
spwi608 Pierce Magic WIZARD_SPELL_DEFLECTION 116 0 233
spwi609 True Sight TRUE_SIGHT 118 1 233
spwi611 Protection from Magical Weapons WIZARD_PROTECTION_FROM_MAGIC_WEAPONS 128 4 233
spwi618 Spell Deflection WIZARD_SPELL_DEFLECTION 116 2 233
spwi701 Spell Turning WIZARD_SPELL_TURNING 129 2 233
spwi702 Protection from the Elements WIZARD_PROTECTION_FROM_THE_ELEMENTS 130 1 233
spwi703 Project Image WIZARD_MISLEAD 127 2 233
spwi704 Ruby Ray of Reversal WIZARD_SPELL_SHIELD 177 0 182
spwi704 Ruby Ray of Reversal WIZARD_KHELBENS_WARDING_WHIP 132 0 233
spwi704 Ruby Ray of Reversal WIZARD_SPELL_TURNING 129 0 233
spwi704 Ruby Ray of Reversal WIZARD_SPELL_DEFLECTION 116 0 233
spwi704 Ruby Ray of Reversal WIZARD_SPELL_TRAP 164 0 182
spwi704 Ruby Ray of Reversal WIZARD_SPELL_IMMUNITY 162 0 182
spwi705 Khelben's Warding Whip WIZARD_SPELL_SHIELD 177 0 182
spwi705 Khelben's Warding Whip WIZARD_KHELBENS_WARDING_WHIP 132 1 233
spwi705 Khelben's Warding Whip WIZARD_SPELL_DEFLECTION 116 0 233
spwi705 Khelben's Warding Whip WIZARD_SPELL_TURNING 129 0 233
spwi705 Khelben's Warding Whip WIZARD_PROTECTION_FROM_ENERGY 163 0 182
spwi708 Mantle WIZARD_PROTECTION_FROM_MAGIC_WEAPONS 128 1 233
spwi802 Spell Deflection WIZARD_SPELL_DEFLECTION 116 2 233
spwi803 Protection from Energy WIZARD_PROTECTION_FROM_ENERGY 163 1 182
spwi804 Simulacrum WIZARD_MISLEAD 127 3 233
spwi805 Pierce Shield WIZARD_SPELL_TRAP 164 0 182
spwi805 Pierce Shield WIZARD_SPELL_SHIELD 177 0 182
spwi805 Pierce Shield WIZARD_KHELBENS_WARDING_WHIP 132 0 233
spwi805 Pierce Shield WIZARD_SPELL_TURNING 129 0 233
spwi805 Pierce Shield WIZARD_SPELL_DEFLECTION 116 0 233
spwi805 Pierce Shield WIZARD_SPELL_IMMUNITY 162 0 182
spwi808 Improved Mantle WIZARD_PROTECTION_FROM_MAGIC_WEAPONS 128 2 233
spwi902 Spell Trap WIZARD_SPELL_TRAP 164 1 182
spwi903 Spell Strike WIZARD_SPELL_IMMUNITY 162 0 182
spwi903 Spell Strike WIZARD_SPELL_SHIELD 177 0 182
spwi903 Spell Strike WIZARD_SPELL_TRAP 164 0 182
spwi903 Spell Strike WIZARD_SPELL_TURNING 129 0 233
spwi903 Spell Strike WIZARD_KHELBENS_WARDING_WHIP 132 0 233
spwi903 Spell Strike WIZARD_SPELL_DEFLECTION 116 0 233
spwi907 Absolute Immunity WIZARD_PROTECTION_FROM_MAGIC_WEAPONS 128 3 233
spwi914 Energy Drain LEVELDRAIN 134 1 233
spwi921 Improved Alacrity WIZARD_IMPROVED_ALACRITY 165 1 182
spwish07 Greater Restoration LEVELDRAIN 134 0 233

 

Contact Information

Vulgar Zildrah and Kensai Ryu created Detectavble Spells, and Eric Kerr (aka Cirerrek) has been maintaining it. This release was made by CamDawg, and completely recodes the package to not overwrite any files.

Version History

Version 1.9 (Beta) - September 12, 2005

Version 1.8 (Beta) - September 4, 2005

Version 1.2.4

Version 1.2.3