Value Modifier archetype vs scripted ModAV ?

Post » Wed Jun 20, 2012 8:05 pm

I have a script attached to a self magic effect released by a spell that modifies the player maximum magicka. It has "Caster.ModAV("Magicka",-xx)" at OnEffectStart and "Caster.ModAV("Magicka",xx)" at OnEffectFinish.

This works great, but I'm really afraid of any possible nasty consequences such as the player's magicka not being restored for some reason when the effect is gone, being it by removing the mod or simply a bug during the OnEffectFinish event. I really don't know what can happen, for example, if the effect is on and the player decides to save the game, quit Skyrim, disable the mod, and then come back.

My question is:

Is there any difference if I remove this script from the effect and instead add another magic effect to the spell that decreases (set to Detrimental + Recover) magicka using the Value Modifier archetype? In other words: Is in any way the Value Modifier archetype more realiable than using ModAV from a script? Also, should I create another effect or should I try using some existing effect that decreases magicka (abDamageMagicka.. or something like that)?

(goal here is to make sure players will never get stuck with permanent stat modifiers)
User avatar
Travis
 
Posts: 3456
Joined: Wed Oct 24, 2007 1:57 am

Post » Wed Jun 20, 2012 8:53 am

I don't know what would happen when a user removed a mod altering some AV.
It depends on how this data is stored, if the AV is re-calculated from scratch then no problem, if not, same issue as with scripts.

That is, AV changes made through scripts are permanent and can only be undone by scripts.
User avatar
Nicole Coucopoulos
 
Posts: 3484
Joined: Fri Feb 23, 2007 4:09 am

Post » Wed Jun 20, 2012 11:53 am

Is there any difference if I remove this script from the effect and instead add another magic effect to the spell that decreases (set to Detrimental + Recover) magicka using the Value Modifier archetype? In other words: Is in any way the Value Modifier archetype more realiable than using ModAV from a script? Also, should I create another effect or should I try using some existing effect that decreases magicka (abDamageMagicka.. or something like that)?

(goal here is to make sure players will never get stuck with permanent stat modifiers)

Create a new effect that drains the magicka however much you want without scripting (as an ability?), and add that to the player in the script. When someone removes the mod, that magic effect won't exist anymore, so the effects will be gone.

I think I'm understanding this correctly at least...
User avatar
R.I.P
 
Posts: 3370
Joined: Sat Dec 01, 2007 8:11 pm


Return to V - Skyrim