ModActorValue: keep track of the value of your modification. And restore only that value when you need it restored. Give your user a way to restore your changes with an uninstall process. Usually, this is a Quest that they have to run separately via the console or a menu-sequence-control that you build.
Spoiler - If two mods affect/apply ModActorValue to the same ActorValue, and one or both do not keep track of their own values and instead uses (GetBaseActorValue () - GetActorValue ()) as an indication of the changes to the ActorValue, one or both mods have corrupted the player's Stat.
- Alternative: Use Abilities. You won't get the same incremental control of modifications but it is a lot safer. And it offers a way for the user to see the changes in their Magic Effects list.
This was a problem in the early days of Oblivion gameplay Script mods. I really don't want to see this here in Skyrim.They are the three most important factors that I apply in all my mods. Do you use any others? Replies from others. Click on them to view the actual posts for more info about them.
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 ^^'