ModActorValue or SetActorValue for "permanent" chang

Post » Wed Jan 29, 2014 4:00 pm

I want to make a feature in my mod so that skills you do not use for along time start to get "rusty".

Not using a skill would slowly decrease a skill such as Block. The mod would NOT be responsible for increasing the skill again.

That would be done by the player using the vanilla mechanics such as training or just plane using the skill normally again.

So If I want to reduce the skill in a way that it could still be increased via normal game play would I use SetActorValue?

I am also do not want this to show in the stats as a "damaged" actor value in the menus.

Like this:

PlayerRef.SetActorValue("OneHanded", ((PlayerRef.GetBaseActorValue("OneHanded") * 0.9) as int))
This should make it impossible to go to zero and make it slower to reduce the skill each time it does go down.
User avatar
NAkeshIa BENNETT
 
Posts: 3519
Joined: Fri Jun 16, 2006 12:23 pm

Post » Wed Jan 29, 2014 7:05 pm

And why not check both and see what's changed? Mod will raise the value past the base(or maximum value). You're probably better off with Set/Restore, or even use DamageActorValue. I used that in my HP convert tests, and got no red numbers.

Reading your code, if One handed was 50 points, there would be a 5 point increase if my math is right. Buffs could be a problem. I don't know how to calculate around those. SetActorValue will keep them intact too.

User avatar
oliver klosoff
 
Posts: 3436
Joined: Sun Nov 25, 2007 1:02 am


Return to V - Skyrim