Difference between revisions of "AddEffectItem"

777 bytes added ,  11:44, 27 May 2008
note on hostility
imported>Haama
(Notes on breaking display limitations, magic items)
imported>DragoonWraith
(note on hostility)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
AddEffectItem - adds a basic, empty EffectItem of the specified MagicEffect to the magic item. Uses the 4 letter codes for the magic effects listed in the CS.
<!-- Begin Search Terms
        (index:short) AddEffectItem nuEffect:chars magicItem:ref
Add
Effect
Item
End Search Terms -->
A command for [[:Category:Oblivion Script Extender|Oblivion Script Extender]]
 
'''Syntax:'''
(index:short) AddEffectItem nuEffect:chars magicItem:ref
 
Adds a basic, empty EffectItem of the specified MagicEffect to the magic item.
 
'''Example'''
short EffectIndex
set EffectIndex to (AddEffectItem DSPL DrinkAle)
Adds a Dispel effect of 0 Magnitude and 0 Duration to the item DrinkAle (Ale), and sets EffectIndex to 3. Ale has 3 effects already, making this the 4th effect. The effects index starts from 0, such that 0 is the 1st effect, 1 the 2nd, 2 the 3rd, and 3 the 4th.


==Notes==
==Notes==
* Uses the 4 letter codes for the [[Magic Effects List|magic effects]] listed in the CS.
* Magic items include Potions, Ingredients, Spells and Enchantments. They do not include Sigil Stones or Soulgems. Also note that the Enchantment refers to the base enchantment. If the enchantment is on two items changing it on one item will change it on the other.
* Magic items include Potions, Ingredients, Spells and Enchantments. They do not include Sigil Stones or Soulgems. Also note that the Enchantment refers to the base enchantment. If the enchantment is on two items changing it on one item will change it on the other.
* Potions will only show up to 8 effects, but all of the effects will still apply when used, and can be accessed with any '''GetNthEffectItem...''' function.
* Potions will only show up to 8 effects, but all of the effects will still apply when used, and can be accessed with any '''GetNthEffectItem...''' function.
** Untested for other magic items
** Untested for other magic items.
* Effects index starts from 0, such that 0 is the 1st effect, 1 the 2nd...
* Adding a hostile effect to a Spell which previously had none will not make the Spell hostile. Use [[SetSpellHostile]] to update the hostility.


==See Also==
==See Also==
Line 17: Line 34:
[[Category:Magic Functions]]
[[Category:Magic Functions]]
[[Category:Magic Functions (OBSE)]]
[[Category:Magic Functions (OBSE)]]
[[Category:Magic Functions - Effect Item (OBSE)]]