Difference between revisions of "ModActorValue"
Jump to navigation
Jump to search
rewrote incorporating smeister's notes, so its less of a forum "thread"
imported>Smeister |
imported>Ashileedo (rewrote incorporating smeister's notes, so its less of a forum "thread") |
||
|
ModActorValue modifies the stat by the specified value, without affecting the base value of the stat.
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.
ModActorValue behaves differently if you're using it in a Script vs using it in the Console. When you (or the game) uses GetActorValue, you are getting a sum of the base actor value plus three modifiers: the Game Modifier, the Magic Modifier and the Script Modifier. 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
The Game Modifier is used for "permanent" effects such as Damage and Restore, while the Magic Modifier is used for "temporary" effects such as Drain and Fortify. The Game Modifier will also not allow actor values to go above their base, while the Magic Modifier will. So if you use ModActorValue in the console, a negative value can be "corrected" with a Restore, 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 consoles 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==▼
▲==See Also==
[[Stats List]]
| |||