Jump to content

Handling Skill Advancement (with custom trees)


Lunalle

Recommended Posts

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...