http://skyrim.nexusmods.com/mods/22672
Short Description:
A spell to spawn random enemies anywhere you want to fight. A "portable arena".
For anyone interested, the source scripts are included, and I encourage comments. In making this mod (my first skyrim release), among many other things, I learned:
- That addperk() does nothing on NPCs, but one can make an ability (as good as a perk and really a type of spell) with a scripted magic effect and apply that ability to an NPC by using DoCombatSpellApply(). The function does not seem to care what kind of spell it is, or even if is applied to the caster or target.
- One can dynamically add a quazi "OnDeath" event script to an NPC by giving them a 'permanent' constant ability with a scripted magic effect. The magic effect ends when the NPC dies, so any death scripts can be placed in the OnEffectFinish event. No need to edit actor bases. Yay!