I've just done a very interesting discovery about that (maybe someone else already noticed it, idk. Sry in advance if it's the case) !
It seems that only
abilities that change actor values (with a Value or a Peak Value modifier) are still affecting players values if a mod is disabled before an unstallation process !
If it's correct (and it seems to be), we should never use abilities to change actor values, but regular
spells.
-> In my mod project I was using
constant abilities to mod HealRateMult, MagickaRateMult, and StaminaRateMult. If I was disabling my mod before a scripted uninstallation process these modified values were still affecting the player.
I've just tried to replace these abilities by regular spells (wich have the exact same custom MagicEffects), and now if I disable my mod without any uninstallation process to dispel these MagicEffects ->
the modified values of my mod no longer affect the player
*Don't forget to check the "Recover" flag in your custom magic effect tab.*Note that even if you can select "constant" type for a regular spell (with constant ME), you must set a duration for each ME of the spell !
But just set a very long duration, for ex of 5000
days, and it's really like the spell was constant. You can even recast the spell by a conditioned script inside the magic effect or from another script to be sure that the spell will always be there if it's necessary.
*If you want to avoid the IG magic effects menu to display this very long duration : simply create a fake ability which will be cast with the real spell to display it in the menu, then simply hide all magic effects of the real spell by checking the "Hide in ui" flag in the magic effect tab.
I've just done some tests, and it seems to work, but please don't hesitate to test by yourself and to give feedback here ! Imo, this kind of game mechanism seems very important to understand for the modding community.
I've done some tests with these actor values : DestructionPowerMod, RestorationPowerMod, MarksManMod, OneHandedMod, TwoHandedMod, SpeedMult, HealRateMult, MagickaRateMult, and StaminaRateMult. It's working for all these values.
-> I've also tested with
constant diseases, and it's working as regular duration spells : actor values wont be anymore affected if a mod is disabled without an uninstallation process. But be careful cause diseases will be dispeled by altars or potions.
*I'm only working with custom magic effects, so idk if it's working the same way with vanilla magic effects.See you.
PS : sry for my none really fluent english, but I try to do my best ^^'