Lunalle Posted September 29, 2016 Share Posted September 29, 2016 TLDR: How to stop skill xp from being rewarded automatically, but still able to increase skill via game.advanceskill (or alternative). My mod is coming along nicely, with a big thank you to this community. There are a couple things I'm still trying to work out, but this one in particular has me stumped. I've condensed some of the perk trees, and added my own. For example, "Light Armor" and "Heavy Armor" are now two branches on the same tree. Now I want to use the "Light Armor" tree for whatever (I chose fitness, but can be anything), the point is... how do I block the advancement of the skill when getting hit while in light armor? I originally set the Skill Usage Multiplier to 0, which worked well enough, but then I couldn't manually give skill xp either with game.advanceskill. I'm not sure where to go from here. Any pointers would be greatly appreciated! Link to comment Share on other sites More sharing options...
Elias555 Posted September 30, 2016 Share Posted September 30, 2016 You could check how SRS mods work. Not sure if combining the armour skills was a good idea since they're so similar. Link to comment Share on other sites More sharing options...
lofgren Posted September 30, 2016 Share Posted September 30, 2016 Use a perk to make the advancement 0. You can check out one of the standing stone boons to see how it is done. Create a global variable. I'll call it LightArmorTrains for this example. Put a condition on the perk so it is only active when LightArmorTrains == 0. When you want to use Game.AdvanceSkill, your script should look like this: LightArmorTrains.SetValue(1.0) Game.AdvanceSkill("LightArmor", X) LightArmorTrains.SetValue(0.0) (Where X = how much to advance the skill, obviously.) This does mean that there will be a split second when light armor can be trained normally, so if you want to use advanceskill during combat there is a slight chance that the player will gain some small amount of experience if they happen to get hit at just the right time, but it is unlikely it would result in a noticeable amount of skill gain. Link to comment Share on other sites More sharing options...
Lunalle Posted October 1, 2016 Author Share Posted October 1, 2016 Right, didn't even realize that perks could access global variables. Thanks for that. :) Link to comment Share on other sites More sharing options...
Recommended Posts