How Do ? Use This Simple Script

Post » Wed Jan 18, 2017 2:40 am








Hi guys i am trying to edit the Ring of Namira to make its boost to health +1 and instead of lasting for 5 minutes i wanna make it last

permanently. My friend gave me a hint on how to start;



playerRef = Game.GetPlayer()

playerRef.SetActorValue("health", ((playerRef.GetBaseActorValue("health"))+1))




My friend dont help me any further to ''let me learn by myself'' but i cant because CK tutorial pages are giving 502 error...


?s this script enough and where should use the script on? Should i use it on the Magic Effect that is currently used by Ring of Namira


or should i just paste this script on the perk's script that is used by Ring of Namira?


Veteran modders please help!


User avatar
Matt Bee
 
Posts: 3441
Joined: Tue Jul 10, 2007 5:32 am

Post » Wed Jan 18, 2017 2:58 am

first i wouldn't use that script at all,



i think there's some issues with the game recognizing your skill level for certain things when you use setAV, setAV actually changes the base value of your player.


http://www.creationkit.com/index.php?title=Actor.SetAV_(Papyrus)



if anything you'd want to use ModAV, but making a permenant effect might be better through a perk than through a script.



I would just add whatever you wanted to the cannibal perk, if you can't add anything to it, then just add



akActor.ModAV("Health", 1.0)



to the OnEquipped Event



and



akActor.ModAV("Health", -1.0)



on the OnUnEquipped Event



both within the if endif blocks.



i would assume that if you don't set your health back down the same amount on UnEquip it will just keep piling on 1 health everytime you equip the ring.



http://www.creationkit.com/index.php?title=ModActorValue_-_Actor

User avatar
Romy Welsch
 
Posts: 3329
Joined: Wed Apr 25, 2007 10:36 pm


Return to V - Skyrim