Tracking Skill Usage

Post » Mon Nov 19, 2012 8:48 pm

So, I'm planning on making a leveling overhaul, but are there functions to track skill usage? I've had a quick look on the wiki, but I've only found events relating to skill level ups via Story Manager. Ideally I'd like to track when a player uses an axe, or a sword, how often he blocks etc. Will I need lots of OnHit() events and such?
User avatar
emily grieve
 
Posts: 3408
Joined: Thu Jun 22, 2006 11:55 pm

Post » Mon Nov 19, 2012 12:05 pm

For skills like speechcraft and alchemy you could use OnTrackedStatsEvent() but for combat the OnHit event seems to be the only way to go.
User avatar
BrEezy Baby
 
Posts: 3478
Joined: Sun Mar 11, 2007 4:22 am

Post » Mon Nov 19, 2012 10:08 am

Nothing in vanilla to track skill use experience, which is mostly what you want for a leveling mod.
That's gonna have wait for the SKSE team to expose and provide get/set capability.
User avatar
Kanaoka
 
Posts: 3416
Joined: Fri Jun 16, 2006 2:24 pm

Post » Mon Nov 19, 2012 6:52 pm

Well, I've actually done a lot of this, and I can think of some things you should be aware of:

1) There are two game settings that affect level progress, fXPLevelUpBase and fXPLevelUpMult. Search for them here: http://www.creationkit.com/Category:Settings and you can see my comment about how they work. Skill level progress can be adjusted in actor values window thing.

2) You can't either "get" or decrease the actual progress for a particular skill, but you can use AdvanceSkill to increase it. And if you understand the math, can design something that will advance them to whatever level you specify from their current levels. You can also change how much usage it takes to advance the skills.

3) You can't set the player's "real" level with a script, but you can force the player to level up by advancing skills. You must advance them this way, changing the actor values directly has no effect.

4) Since NPCs don't level up (maybe you want them to... if so, this won't work of course), you could use global variables to track custom skill and leveling progress for the player.

So... to conclude, if the available settings don't work for you, you could set the experience required for everything (leveling and skill progress) to ridiculously high values that the player will never reach, and then keep your own records of skill usage/level progress with global variables, and then forcibly level skills with a script to make the player level up and get skill increases. For example, if you made it require 2000 skill ups to level, it would be impossible for the player to level in the normal way... but you can still force them to get 2000 skillups (reset the skill to 0, advance it, reset, although it's a bit awkward) and within a few seconds make them level. Or, you can make it so normally they would take 100,000 uses of a skill for every skill level, and then keep track of it advance it with a script and global variables however you want.

This is sort of what happens in my mod: skills do not contribute to leveling, but killing enemies does. So I keep track of experience gained in this way as a global variable, and then would in theory level the player by forcing the necessary number of skill ups. But currently because of what I think is a bug (level 1 to 2 always uses a fXPLevelUpBase of 75, even if the game setting is different), it doesn't work correctly so I'm using a global variable to store a "fake" player's level as well. The only real reason to use the "real" level is because it will preserve leveled lists and enemy spawns. It's not a big deal for me because my mod will not use much or any level scaling and I can fake it with a script if I need to, but if the mod is to be used by itself in Skyrim or with most other Skyrim mods, that would be a concern.
User avatar
tannis
 
Posts: 3446
Joined: Sat Dec 09, 2006 11:21 pm


Return to V - Skyrim