Talk:Effect Item
Condition functions in enchantments vs. condition functions in the magic effect:
In Enchantments, there is a magic effect list where more than one magic effect can exist for one enchantment. If one opens the magic effect or creates a new one, there is a conditions list, for whether the magic effect is used.
Also, in the magic effect itself there is a conditions list for determining whether the magic effect triggers or not.
I wondered what the difference was. It turns out, the conditions in the magic effect apply at the start of the magic effect, whereas conditions in the enchantment apply for the whole duration of the magic effect.
So, say you have a staff that summons a flame atronach or a frost atronach based on a global variable “Atronach_Index,” which if set to 1 summons a flame atronach, or 2, a frost. If it is 1 when the spell is cast, either way, whether the condition "GetGlobalValue" is in the enchantment or in the magic effect, a flame atronach is called.
Now, if the condition is in the enchantment, and Atronach_Index changes value to 2 while the flame atronach is still present, say 20 seconds after it is cast, then the flame atronach is unsummoned and replaced with a frost atronach. The frost atronach replaces the flame, at the same location. Even if you have Twin Souls and could have both, the flame is still replaced by the frost.
If the condition check is in the magic effect itself, if Atronach_Index is set to 2 while the flame atronach is still present, the flame atronach will persist for its assigned duration, and the next time the enchantment is used, a frost atronach will be summoned.
In this example, putting the conditions in the magic effect is the better choice, but putting such conditions in enchantments might create interesting opportunities.