I did some testing on how temporary active effects are evaluated on actors and figured I'd post my findings here. Here's what I found out :
- Active effects are processed when the actor's AI is processed
- Active effects are not nerfed( or removed ) on changing cells. Nor is their duration ( elapsed/remaining ) changed. They stop when the should. The time spent outside the parent cell is deducted from the remaining time on re-entering the cell.
- Script effects will have their variables reset and "destroyed" however; as in, the value of the variables can't be modified ( at least not with set ). The rest of the script will continue to process normally, with the above changes taken into consideration.
Tested on actors with low level-processing enabled and otherwise. Apparently, it holds true for both. Persistence through a cell reset :
- If the cell is unloaded from memory, the active effects are removed instantaneously. If the cell is loaded in memory and reset meanwhile ( forced from a script ), the active effects persist and the above results hold good.
- Any script effects will execute their Finish blocks in the same frame as the full cell reset's.
A quest script's timer was used for checking the durations, that was started with the spell effect. The scripted effect had it's own timer. The
scriptEffectFinish block printed both the results. The difference b'ween the two was negligible ( the script effect timer equals to the exact duration of the effect while the quest script timer is slightly off, with a error range of +/- 0.5, and that too only in extreme cases - Attributed to the difference of the values returned by
scriptEffectElapsedSeconds and
getSecondsPassed ). Tested using potions and spells - Yielded the same effect.
Comments are welcome.
Nice, thanks ShadeMe for the detailed report.
Few question here: how does an scripted ability acts on cell changing? I've read somewhere on the wiki that script's local variables are reset(and/or even the ability is 'recast') when an actor enters a cell 'occupied' by the player... Does that include changing exteriors cells also?
The wiki also mentioned that same thing can happen to the player when he switches cells(I've never experienced that, although I use abilities quite a lot, I haven't experienced anything like that...). Could you confirm that?
One more thing: when an ability is added to an actor, it is also added to all clones of that actor(all that are spawned after that, right?). If it is a short term ability, then there should be no problem, as the ability should remove itself(or be removed) after it does it's job. The thing that intrigues me is: what will happen if an actor dies before the ability is removed? Of course the scripteffectfinish block will run, but still the base actor will hold the ability...
(The last one is more a statement that a question, but I realised that dependancy when I was writing that sentence
)
cheers,
brucevayne