ModActorValue
Jump to navigation
Jump to search
Description[edit | edit source]
Syntax:
ModActorValue StatName value ModAV StatName value
ModActorValue modifies the stat by the specified value, without affecting the base value of the stat.
Example:
ModActorValue Strength -10
Notes[edit | edit source]
- A modification by ModActorValue can exceed the maximum of 100 when modifying skills and attributes, and the changed stat is red or green to show a temporary modification. The main use for Modactorvalue are curses or blessings that can't be dispelled and spells or magic items that can modify a skill/attribute beyond 100.
- If you want to make a permanent change to an actor value in a script, do not use ModActorValue. You must either use SetActorValue or apply a magic spell that modifies the actor value you're interested in. A good way to do this is to create an Ability and use AddSpell to add it to your reference's spell list.
- If you use ModActorValue in a script, the Script Modifier is adjusted, and ONLY a script can adjust it back. In other words, if you have a script do "player.modav health 100" you are also responsible for doing "player.modav health -100" or that 100 points will *always* be in the script modifier.
- For temporary changes that can be restored with a spell use the OBSE-Function ModActorValue2.
- Console
- ModActorValue behaves differently when you use it in the console. In the console, a negative value modifies the Magic Modifier and thus can be "corrected" with a Restore-Spell, while a positive value will only bring the Game Modifier up to a maximum of zero.
- The reason for the difference is that ModActorValue in the console was used for testing purposes, while its use in scripts is for temporary effects that cannot be adjusted by using magic spells or internal game systems.
See Also[edit | edit source]