Will this work on a horse that the is being ridden by the player too? It might be a viable stumble in that case.
yup.
it's also a bug in Vows and Covenants: http://www.gamesas.com/bgsforums/index.php?showtopic=968853&view=findpost&p=15162235
...The beauty of using abilities, spells or tokens is they keep their own state; the actor either has them, or doesn't. Also, when the mod that added them is deactivated, the abilities/spells/tokens that were added by that mod are removed. This nicely solves the uninstall problem....
i totally agree!
Cool... that's great. If I have the drain1, drain2, drain4, drain16 etc tokens and apply different mixes of them to get different magnitudes, will it make a mess of the players Active effects list?
not exactly. only the effects (e.g. Drain Agility) are presented in the list.
however, if you roll-over an effect, it'll show what applied it: e.g. (drain1_name, drain2_name).
In my case I did some quite extensive testing, and found cases where perfectly valid ability scripts for some actors will enter a mode where their variables are all reset to zero every frame. It will be doing this for one actor, and not another. It usually happened if an actor went far away and then returned. I believe there is some sort of strange memory optimisation in Oblivion where it treats ability variables as non-critical and stops keeping any state for some ability instances on some actors when there is memory pressure. The problem is it does a really bad job of deciding which instances are important enough to keep state for, and once an actor is considered unimportant based on distance, they are not promoted back to important when they come close again.
i find this as well.
and here's a more frustrating glitch (bg2408 has also mentioned this many times):
for no apparent reason, a scripted token on an inactive (e.g. very far away - and so unloaded) actor will run causing the game to crash.
my experience with this is from a previous version of NPCs yield.
an pirate i killed months ago in an unloaded cell will run its script (it'll show in the console) and crash the game.
the occurence was very intermittent (e.g. it took months for it to happen). but it was usually in a cell-change.
but once i knew where it happened, i can trigger the script to run by opening the load/save menu.
it was weird.
(my new unreleased NPCs yield uses StringMaps to track actor's properties.
when an actor is > 5000 units away, i simply remove them from the list.)
...What are you putting in the StringMaps? References to Actors? I think you may find problems accessing those references if the actor gets unloaded.
i use the actor's reference hex number as string with: actorRef.GetFormIdString
then i add the actual reference to a "ref" key.
if the ref key returns 00000000, its very likely that the actor has been unloaded.
i simply delete the actor's properties from the list.
note, however, that even if the actor's ref returns as 00000000 in the console,
they are still valid actors (e.g.: IsActor == true),
and some getAV's work on them (e.g. getAV health),
but some functions will crash the game.
i discussed this a few months ago with others (especially bg2408) in the CS forum.
you may still be able to search for it.
this is what the StringMap looks like in my NPCs yield:
Let formIdString := actorRef.GetFormIdString Let arIndex := ar_Find formIdString actorKeys If arIndex == -99999 Let actors [$formIdString] := ar_Construct StringMap Let actors [$formIdString]["r"] := actorRef Let actors [$formIdString]["s"] := 0 If ignore Let actors [$formIdString]["s"] := 4 EndIf Let actors [$formIdString]["h"] := actorRef.GetAV Health Let actors [$formIdString]["a"] := actorRef.GetAV Aggression Let actors [$formIdString]["c"] := actorRef.GetAV Confidence Let actors [$formIdString]["modA"] := 0 Let actors [$formIdString]["modC"] := 0 Let actors [$formIdString]["t"] := 0 Let actors [$formIdString]["y"] := 0 Let actors [$formIdString]["ct"] := 0 Let actors [$formIdString]["f"] := ar_Construct Array Let actors [$formIdString]["lhl"] := 0
I'm guessing this involves a quest script that runs every frame that iterates through all nearby actors using FindFirst/GetNext and applies effects to them, storing state information for each actor in Arrays. I'd be curious to hear how that works. It was never clear to me how efficient FindFirst/GetNext really is, and I thought that maybe doing this excessively will be a bit costly.
i use GetFirstRef/GetNextRef in 90% of my mods: NPCs yield, Battle fatigue and injuries, Crime has witnesses, Horse commands, Wandering encounters, etc...
all those mods continually look for actors to apply the mod's effects to.
its quite fast. (i recently tested my game without my mods. and it ran at the same FPS (between 17 and 20) as when they were active.)
...I'm also a bit worried about spell-shaders... will any/all of these apply drain-spell-shaders to the actor? I think using spells will require casting from a persistent marker, which might be a bit of a pain. All of these are making me lean more towards tokens....
those shaders were a pain to remove from "bashed" patches and with mods that actually change the shaders used.
thanks to psymon's patience, i managed to get the shaders to only play when the effects are applied.
the actual steps i took to remove the persistent shaders are:
1. ensure that effects uses their original shaders.
a LAME option changes the shaders used by the drain effects.
i had to release "kuertee bgMagicEVShader default drain effects.esp" with my mods to simply revert them back to "effectDrain".
2. in the effectDrain property, i had to set the persistent data to 0. (initial glow-all mod doesn't actually remove ALL the persistent effects.)
3. in-game effect: the purplish/redish cloud puffs around the player when the effects are applied.
i use this in several of my mods: Battle fatigue and injuries, Eat and sleep, Magicka-based jewelery limits, etc...
BUT...i think there is still a problem when mods are based and wrye-base organises the new shaders.
psymon managed to get my desired effect (i.e. default but non-persistent effectDrain) in his game.
but he might have had to do some BASH-magic.
Thanks for your advice... it's much appreciated.
no probs. abo!
i'm looking forward to the next iteration of your mods.
cheers!