Talk:AddSpell

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

AddSpell AbWeaknessNormalWeapons Is misleading....

This still uses the HEX codes

Player.AddSpell C30A Etc :)

--Mrflippy 00:13, 13 April 2006 (EDT): The hex codes (Form ID) should only be necessary if you are using this command in the console.

Added a note about usage with leveled spells. Unlike leveled items, leveled spells can't be added through a script. Scruggs 16:44, 29 May 2006 (EDT)

Added another note about this function affecting the base object. RemoveSpell works the same way, so it's generally okay to add temporary abilities to references as long as you call removeSpell to get rid of them within a reasonable period of time. Scruggs 16:42, 6 June 2006 (EDT)

GuidoBot 22:31, 13 October 2006 (EDT) I seem to be having trouble with AddSpell/RemoveSpell on generic actors. Never mind. Seems to be working now. Phew!

Diseases and Resurrection[edit source]

A actor has a disease, and the disease is edited to have a script effect. Now once the actor dies the script effect ends - but if the actor is then resurrected, will the disease ( more importantly, it's effects ) be removed ? If not, then will the script effect restart, as if "cast" anew ? OK, the script effect is not re-initializing ! Any ideas how to do it, besides removing and then re-adding the disease .. ? -- shademe 05:20, 13 September 2008 (EDT)

oh ... and If I add a disease through a script (using addSpell), Porphyric Hemophilia specifically, will it progress as usual ? Will the infected turn a vampire after 3 days ? -- shademe 05:46, 13 September 2008 (EDT)
On Porphyric Hemophilia, you would have to check the Vampirism scripts - but I suspect they're designed to only work on the player. As for your original question, I have no idea, I think you may have to test that for yourself.
Dragoon Wraith TALK 09:38, 13 September 2008 (EDT)
I found the answer to my 1st question, the script effect doesn't re-initialize even after re-adding the disease. -- shademe 00:57, 15 September 2008 (EDT)
Will adding a disease with this method be affected by Resist Disease? Blue Riddle 00:08, 20 October 2010 (EDT)

AddSpell to Faction[edit source]

Is there any way to use AddSpell (Or something similar) for every NPC/Creature in a faction?

I am working on an update for my mod, Creature Diversity, where I am going to randomize the scale of creatures through an ability (as that is what seems to be the best solution), and need this to make it work with mods that adds new creatures and so I won't have to edit vanilla creatures, and possible break compatibility with another mod. Zaldir 10:03, 20 June 2011 (EDT)

The only way to do so would be to run a script on every actor (the usual method is a "token", a weightless, unplayable item added to each actor's inventory by an invisible spell or through OBSE's reference-walking functions), and then have that script check the actor's list of Factions for the one you have, and calling AddSpell if it's there.
Dragoon Wraith TALK 09:03, 21 June 2011 (EDT)