jucoking Posted December 22, 2018 Share Posted December 22, 2018 (edited) I have created a curse on the player which is supposed to prevent normal skyrim leveling by updating every 2 minutes to reset the skilladvance property. It compiles successfully, but doesn't call in-game: Scriptname Curse extends activemagiceffect Actor Property PlayerRef Auto Event OnEffectStart(Actor akTarget, Actor akCaster) If akTarget == Game.GetPlayer() RegisterForUpdate(125.0) EndIf EndEvent Event OnUpdate() PlayerRef.SetActorValue(0x00000619, 0.0) PlayerRef.SetActorValue(0x00000619C, 0.0) PlayerRef.SetActorValue(0x00000619E, 0.0) PlayerRef.SetActorValue(0x00000619F, 0.0) PlayerRef.SetActorValue(0x00000622, 0.0) PlayerRef.SetActorValue(0x00000624, 0.0) PlayerRef.SetActorValue(0x00000627, 0.0) UnregisterForUpdate() RegisterForUpdate(125.0) EndEventEach of the "0x000006---" properties in parentheses are for skilladvance progressions and should be set back to zero onupdate, but this is not occurring in-game testing as I still level up. For instance, the first skilladvance "0x00000619" is onehandedskilladvance and should be reset to "0" every 125 seconds, but I end up gaining levels in the one handed skill line anyway. Edited December 22, 2018 by jucoking Link to comment Share on other sites More sharing options...
Evangela Posted December 22, 2018 Share Posted December 22, 2018 (edited) Because those actor values, thus their respective Form IDs have been made inactive by Bethesda. You'll need to use the SKSE functions for skill experience manipulation. Example: ActorValueInfo AlterationSkillAdv = ActorValueInfo.GetActorValueInfoByName("Alteration") AlterationSkillAdv.SetSkillExperience(0.0) Alternatively, if you don't want to use SKSE, you can instead revert skills back to a previous level, if a level up occurs, through the use of SetActorValue, using the same code in your post, but using the skill names instead.To make it even more accurate, you can use the story manager's OnStoryIncreaseSkill. It'll be kind of clunky, because you'll still get skill up notifications, while it magically(hehe) goes back to the previous level. Unfortunately, character levels cannot be reverted/prevented with this method and setting them back can only occur with SKSE. Edited December 22, 2018 by Rasikko Link to comment Share on other sites More sharing options...
jucoking Posted December 22, 2018 Author Share Posted December 22, 2018 Hmmm...I was afraid of that. After all I had read on it I still wanted to give it a shot anyway. I was hoping to get rid of the notifications and level up benefits altogether, so it looks like I'll be studying SKSE and how to use it until I nail this down. Much thanks yet again, Rasikko. Link to comment Share on other sites More sharing options...
jucoking Posted December 22, 2018 Author Share Posted December 22, 2018 (edited) Because those actor values, thus their respective Form IDs have been made inactive by Bethesda. You'll need to use the SKSE functions for skill experience manipulation. Example: ActorValueInfo AlterationSkillAdv = ActorValueInfo.GetActorValueInfoByName("Alteration") AlterationSkillAdv.SetSkillExperience(0.0) This compiled successfully for each skill that I wanted to prevent from leveling up, however it doesn't work in-game. Here is the script *fragment* in question: Event OnUpdate() ActorValueInfo OneHandedSkillAdv = ActorValueInfo.GetActorValueInfoByName("OneHanded") OneHandedSkillAdv.SetSkillExperience(0.0) ActorValueInfo BlockSkillAdv = ActorValueInfo.GetActorValueInfoByName("Block") BlockSkillAdv.SetSkillExperience(0.0) ActorValueInfo SneakSkillAdv = ActorValueInfo.GetActorValueInfoByName("Sneak") SneakSkillAdv.SetSkillExperience(0.0) ActorValueInfo DestructionSkillAdv = ActorValueInfo.GetActorValueInfoByName("Destruction") DestructionSkillAdv.SetSkillExperience(0.0) ActorValueInfo SpeechcraftSkillAdv = ActorValueInfo.GetActorValueInfoByName("Speechcraft") SpeechcraftSkillAdv.SetSkillExperience(0.0) ActorValueInfo HeavyArmorSkillAdv = ActorValueInfo.GetActorValueInfoByName("HeavyArmor") HeavyArmorSkillAdv.SetSkillExperience(0.0) ActorValueInfo LightArmorSkillAdv = ActorValueInfo.GetActorValueInfoByName("LightArmor") LightArmorSkillAdv.SetSkillExperience(0.0) UnregisterForUpdate() RegisterForUpdate(125.0) EndEventAlso, when I try to access the script properties after compiling this line, I get errors. The properties window still appears, but all properties are gone (even though they still work in-game). Is this normal, or did I install SKSE incorrectly? Edited December 22, 2018 by jucoking Link to comment Share on other sites More sharing options...
jucoking Posted December 25, 2018 Author Share Posted December 25, 2018 After some days of trying to manipulate the script I have come up short. If anyone has advice on a script (placed on a magiceffect) that PREVENTS skill xp gains please let me know. I have SKSE function, but for some scripts I cannot access the properties window after compiling. Thanks and Merry Christmas :) Link to comment Share on other sites More sharing options...
Evangela Posted December 26, 2018 Share Posted December 26, 2018 I don't know what to say, (hence why I didn't reply). I've personally used those in a mod(that I never finished) and the results were as expected. It could be that you don't have SKSE installed correctly. Link to comment Share on other sites More sharing options...
jucoking Posted December 26, 2018 Author Share Posted December 26, 2018 I understand and I thank you for taking the time to reply, I would like to ask you though...are you able to open the properties window (or even need to) when using that script? Link to comment Share on other sites More sharing options...
Evangela Posted December 27, 2018 Share Posted December 27, 2018 Yeah I can with the original script, and the modified one. Link to comment Share on other sites More sharing options...
jucoking Posted December 28, 2018 Author Share Posted December 28, 2018 I got it working now, not sure what the problem was exactly...but I moved a bunch of things around...magic effects, scripts, SKSE files...not sure what it was but everything is working and I can open property windows. Thanks again for this script, Rasikko. Link to comment Share on other sites More sharing options...
Recommended Posts