Difference between ActiveMagicEffect and MagicEffect?

Post » Wed Apr 01, 2015 5:28 pm

What is the difference between ActiveMagicEffect and MagicEffect?

When should I have my effect scripts extend one versus the other?

I'd like to use a script to change the duration of a spell's effects based upon the caster's relevant skill level. But the wiki documentation has the necessary functions for getting the skill attached to the ActiveMagicEffect while the functions for manipulating duration are attached to MagicEffect.

User avatar
Courtney Foren
 
Posts: 3418
Joined: Sun Mar 11, 2007 6:49 am

Post » Wed Apr 01, 2015 3:03 pm

This is straight from the wiki, so you might have already read this :

Magic Effect - Magic Effect base objects

Active Magic Effect - Magic Effects currently attached to an Actor.

Magic Effects become Active Magic Effects when applied to an actor, at this point, i believe that the duration for the active magic effect can not be altered

In regards to extending the duration of the spell, the easiest method would be to use a perk, with the perk entry Mod Spell Duration. The functions can be set to use an actor value.

If you were intent on using a script to change the duration, the functions to change the spells duration are SKSE functions on the Spell Script - http://www.creationkit.com/SetNthEffectDuration_-_Spell(Int index, Int value)

User avatar
Andrea P
 
Posts: 3400
Joined: Mon Feb 12, 2007 7:45 am

Post » Wed Apr 01, 2015 8:53 pm

My intent is to have the mage-light spell's duration increase with the caster's alteration skill level.

I never considered using a perk - would a perk allow me to smoothly adjust the duration - or would I need a hundred different perks?

Since the SetNthEffectDuration is attached to the Spell, is there a way from the MagicEffect's attached scripts to get the spell which cast the effect? And will an attached script that extends ActiveMagicEffect enable me to get the Caster?

User avatar
Dan Endacott
 
Posts: 3419
Joined: Fri Jul 06, 2007 9:12 am

Post » Wed Apr 01, 2015 7:35 pm

You can do it with just one perk. Using the Entry Point option allows you to select Mod Spell Duration, then select the "Multiply by 1 + Actor value * (multiple)" option, then select the desired magic skill for the actor value and 0.01 for your multiple (which will make the spell duration increase by 1% for every one point in your magic skill). Then, use the perk conditions to make it only apply for the spells you want.

Most of the popular magic-scaling mods (my personal favorite is MIghty Magicka's stand-alone scaling module) do it this way, using Mod Spell Duration and Mod Spell Magnitude entry point perks.

User avatar
sara OMAR
 
Posts: 3451
Joined: Wed Jul 05, 2006 11:18 pm

Post » Thu Apr 02, 2015 2:18 am

As an addition to what has already been posted, with perk entries you can use multiple entries to the outcome.

Assuming you used Mod Spell Duration, in the Alteration tree, just one perk entry with Multiply 1+ActorValue, with a mult value 0.01

When the Alteration skill = 100, the spell duration is doubled

1+(100*0.01) = 2

ie if the normal duration was 10 sec, at skill level 100, the duration would be 20

if the Mult Value was changed to 0.02

1+(100*0.02) = 3

ie if the normal duration was 10 sec, at skill level 100, the duration would be 30

Now if you wanted a value somewhere to 2 or 3, the beauty of perks is that you can use additional perk entries to fine tune the result. Just remember to put a priorty on each perk so that order of entries doesn't change.

One other thing to note, the value that is applied to each perk entry, is the calculated value from the previous perk entry, this is not an issue with perk entries that just multiply the value, however, if you use perk entries which add values, then depending on where the perk entries are, the calculated value my be different. This one of the reasons why using priorities on perk entries is a good idea.

User avatar
Solène We
 
Posts: 3470
Joined: Tue Mar 27, 2007 7:04 am


Return to V - Skyrim