Spells and spell hooks

Thanks to DedoITA for pointing me in the direction of Lilac Soul's tutorial on spell hooks. Here's the introduction:

Since version 1.59, it has become exceedingly easy to hook spellcasting. Rather than having to edit each individual spell script, all you now how to do is create a single spell script of your own, and then have that script perform whatever you want the spell to do. In that script, you also get to set whether the original spell script should continue or not.

If you only want to edit a single spell, it may still be easier to just edit its spell script, but I still recommend using the spellhook system. Why? Because, if the spell script is updated in a future patch, your edits will still be valid, but so will the ones BioWare made.

However, the new spell-hook system is very useful for editing a number of spells (even all spells), for instance to make it so that they only work under certain conditions, or that, perhaps, the caster automatically takes a certain amount of damage whenever casting a spell. Thus, you can also use the spellhoook system to make certain creatures react to certain spells in different ways, etc. etc. The sky is the limit really.

Some of the menu options have changed for NWN2, but most of this is still valid.

Check out the full tutorial:
http://www.nwnlexicon.com/compiled/tutorial.lilacsoul-spell-hooking.html