How Skyrim's NPC skill leveling works

I was writing up my main post reverse-engineering Skyrim pickpocketing and found myself going a little too deep into how Non-Player Characters gain skills. Once again the wiki had the wrong formula, which was making it hard to answer my question: who has the lowest and highest pickpocketing skill?

This is wrong, it doesn't just round.

There are two main pieces that go into how Skyrim works. One is the TESV.exe file, which is the main game executable. This has all of the logic and code. The other is Skyrim.esm, which is an Elder Scrolls Master file, and handles extensive configuration.

TESV.exe, what boots when you start the game Skyrim.esm, a glorified XML file

While the check for their skill levels is called by the logic code (0x005635FC in TESV.exe), all NPCs are configured in Skyrim.esm. We can open that file with TES5Edit like the code would and look at their stats. NPCs fall into two categories: they have their skills fixed, or they're auto-calculated based on level (which we can see with the "Auto-calc stats" flag on the left).

Skill values <i>and</i> skill offsets (they're just added together)
Because the Level Mult is 1.0.
Lydia, who uses auto-calc, and has the same level as the player 1 , capped at 50 Jorgen has fixed skill levels (and pretty high ones at that)

To find the best and worst at every skill Ï scraped the full list, filtered down to unique NPCs, and aggregated it all here.

Fixed skill levels

In the case of fixed skill levels the lower bound is mostly set by the countless 2 Okay, there's 94 of them. You got me. NPCs with 5 levels in every skill (Imedhnain and Lisbet were the ones I referenced in my other post for pickpocketing). However, four skills have a lower bound of 0 because of two people: Geimund, the stableman for the capital city, 3 Unless you're a true believer in the Nord uprising. and Muiri, an apothecary. For some reason they both have 0 levels in Enchanting, Restoration, Illusion, and Destruction—something especially interesting for Muiri, who knows Flames (albeit poorly).

For the upper bounds there's more variety, though there's two that stand out. The aforementioned Jorgen has the highest fixed stats in 5 categories, including a whopping 74 Speech score, despite just being a normal lumberjack. 4 I think this is because of a quest where you need to convince him to give you a demonic artifact and they didn't want it to be too easy. The other NPC that tops 5 categories is Arniel's Shade, the spectral version of a sorcerer that you can learn to summon after he unravels the mystery of how a previous culture disappeared—and promptly disappears himself.

Skill Lowest Level Highest Level Best NPC
Enchant­ing 0 27 Jorgen
Resto­ration 0 81 (31 + 50) 5 For some reason the NPC configuration allows for skill levels and skill offsets, but just sums them together when calculating the level. Putting this in here for proof, but are you really going to understand this? Do I? I guess Ï do. Wisp­mother
Illusion 0 100 Arniel's Shade
Destruc­tion 0 100 Arniel's Shade
Conju­ration 5 81 (31 + 50) Wisp­mother
Alter­ation 5 115 6 This is the highest skill for anyone in the game, because everyone without a fixed score is capped at 100. He doesn't even know any Alteration spells! (15 + 100) Arniel's Shade
Speech 5 74 (24 + 50) Jorgen
Alchemy 5 27 Jorgen
Sneak 5 85 (15 + 70) Deer, Chickens, etc. 7 If you're excluding normal animals (and why would you be, they're sneaky!) then it's 82 for the Labyrin­thian Skeletal Dragon.
Lock­picking 5 20 Voice of Namira 8 The Voice of Namira is an NPC who lives in a hidden, unfindable offscreen box and says voice lines for a goddess of cannibalism—I love hacks like this. Ooh, scary!! Technically she's not even the NPC with the highest lockpicking score (it's 25 for TestWarehouse­TrapsReset) but she is the one with the highest score that's actually in the game. Well, she's kind of in the game. I'm counting it.
Pick­pocket 5 20 Voice of Namira
Light Armor 5 40 Angi
Heavy Armor 5 97 Arniel's Shade
Smith­ing 5 32 Jorgen
Block 5 56 Labyrin­thian Skeletal Dragon 9 This guy admittedly seems like he could block pretty well.
Archery 5 94 (34 + 60) Angi
Two-Handed 5 33 Jorgen
One-Handed 5 97 Arniel's Shade

Reverse engineering auto-calc

The auto-calculation skills are where the complexity really ramps up. All skills initially start at 15. 10 Hence why all of the lowest leveled NPC's have fixed scores instead of auto-calc. From there, there are a couple of factors that go into it—the NPC's race, their level, and their class. Race is the easiest part of it, as each race gets +10 to one skill, and +5 to five other skills. 11 Mostly. There are a lot of races that don't have bonuses, like AlduinRace for Alduin, or Elder for any old NPC, and a bunch of other specific races that have smaller bonus sets (like AtronachFlameRace which just gives +10 to Destruction). In the case of the Pickpocket skill, the relevant races are Khajiit (cat race), Argonian (lizard race), or Bosmer (sneaky wood elf race) who all get an extra 5 levels.

For the NPC level, it's either fixed, or scales as a factor of the PC's level (configured by Level Mult) ranging from \(\frac{1}{10}\)th your level (Dorian 12 Ironically his minimum level is set to 25, so he only starts scaling when you reach level 260. ) to 2x your level (Safia 13 And what are the odds, this is Dorian's boss! She caps at level 35 though, so she's only a real challenge early. ). This rounds down, and is optionally bounded by a minimum and/or maximum level.

Now we get into classes. There are a lot of classes (the full list has 138 of them) and each has skills they're proficient in, with each proficient skill having a weight 1 through 6. 14 Though the only classes with weights of 5 and 6 are EncClassDragonPriest and EncClassDragon. Rather than the rounding equation that the wiki referenced, skill levels are assigned by a three-part process using these weights. The easiest way I found to understand this was with some examples, so let's jump in.

Example: Silda

We'll start with Silda, an NPC with the TrainerPickpocketExpert class 15 Silda is a beggar in the oldest city in Skyrim, and she's the perfect example because she's the only NPC with this class. Whoops! which has proficiency in 6 skills, with total weights summing to 14 (and a weight of 3 in Pickpocket).

Skill Weight
Sneak 3
Pickpocket 3
Light Armor 3
Archery 2
One-Handed 2
Block 1

NPCs start with a total number of skill points that they can assign equal to \(8 \times (\text{level} - 1)\). Silda has a fixed NPC level of 4, or \(8 \times 3 = 24\) points. They're distributed according to these weights, giving \(\lfloor \frac{points}{\sum{weights}} \rfloor = \lfloor \frac{24}{14} \rfloor = \lfloor 1.71... \rfloor = 1\) level for each proficiency, so she gets 3 Pickpocket levels. This only assigns 14 points, so there's another 10 to assign.

None of these skills are hitting the level cap of 100 so we skip the second part 16 We'll come back to this in the second example. and proceed to the third part, allocating the points by iterating over the skills one-by-one 17 Ordered from highest to lowest weights, with ties going to the skill that comes first in the ordering I used for the fixed extremes table above. Or ERIDCASASLPLHSBATO for short. giving a point to each until the remainder is empty (up to a max of whatever that skill's weight is). So for the first six points every skill gets one level, and then for the final four points only Sneak, Pickpocket, Light Armor, and Archery get a level (and if there had been two more remainder points they would have gone to One-Handed and then Sneak again, because Block can only earn one). So Silda's Pickpocket skill level had 15 starting points, +3 from the initial distribution, and +2 from the remainder, for a total of 20. And it works!

Starring the quite seen Silda.
Select an NPC and run getav pickpocket to see their level

Example: Tonilia

To explain what happens as we start maxing out skills we'll use Tonilia, the main fence for the Thieves Guild. She has the VendorPawnbroker class, but more importantly she has a 1.5x Level Mult with no level cap. Let's look at what happens when you're level 30, making her level 45.

Skill Weight
Speech 3
Sneak 3
Lockpicking 2
Pickpocket 2
One-Handed 1

At level 45 she has \(8 \times 44 = 352\) skill points to distribute. The weights total 11, leaving exactly 32 per proficiency with 0 remainder. This gives 96 levels to Speech and Sneak, 64 levels to Lockpicking and Pickpocket, and 32 to One-Handed. But she already had 15 levels in Speech and Sneak to start with, meaning we're 11 levels over. This is the second part, where the excess skill points are summed up (11 + 11 = 22), and then divided by the total number of uncapped skills (in this case *16*). This is a little weird because we're only ever going to assign to 5 of the skills (really the 3 uncapped), but the code uses the full denominator: 18 This often results in NPCs with unused skill points even though some skills are under 100. The one who most wastes their potential is MG07LabyrinthianThrall02, who at player level 58 ends up discarding 24 points instead of putting them into Alteration.

Hexadecimal, so even though it looks like 12 it's 1 count of 16 + 2 counts of 1.
We pass in a constant 0x12 = 18 for param_2 to DistributeAutoCalcPoints 19
We just divide by 18 - cappedCount

This comes out to \(\lfloor \frac{22}{16} \rfloor = \lfloor 1.375 \rfloor = 1\) point. It then loops over all of the skills with non-zero weight that haven't hit the cap and tries to assign that many points. After it's done a full loop over all the eligible skills it recalculates the number of points to allocate. The first time it gives 1 level to Lockpicking, Pickpocket, and One-Handed. It recalculates \(\lfloor \frac{19}{16} \rfloor = \lfloor 1.1875 \rfloor = 1\), and gives another level to each of them. It recalculates a third time, \(\lfloor \frac{16}{16} \rfloor = \lfloor 1 \rfloor = 1\), and gives one final level to each. By this point it calculates that it needs to give out \(\lfloor \frac{13}{16} \rfloor = \lfloor 0.8125 \rfloor = 0\) points and stops.

There are 13 points leftover though, so it goes through the same third part as Silda, the remainder process, giving 2 to Lockpicking, 2 to Pickpocket, and 1 to One-Handed, leaving 8 unused. In the end, her Pickpocket score is 15 + 64 (original distribution) + 3 (excess distribution) + 2 (remainder distribution) = 84.

I should have gotten better at taking screenshots in Skyrim. Magelight or bust!
Right again!

Pulling it all into a UI

Hopefully at this point the process is followable, but it's annoying to calculate. So Ï built a UI based on the reverse engineering! Here you can choose any unique NPC in the game that uses auto-calc skills and see how their skills are allocated based on the player level. 20 Thanks to the Game UI Database and the Skyrim PNG resources that Arby dumped from the game's SWF files for making it easier to make this pretty.

Class
Race
Level
Player level
Skill point pool0
Base 15 Race bonus Points (bulk share) Excess over 100 level cap Remainder pass Unused

Fact checking the wiki

This tool also allows us to answer some specific questions. For instance, the wiki that cited the wrong formula in the beginning goes on to double down with a specific example:

"...the formula above always holds true - past a certain point, which depends on the NPC's class, they will cease to gain any skill points per level, and will only gain attributes. An excellent example of this is Arngeir, who is level 150, 21 The highest fixed level character in the game! but stopped gaining skill points at level 139 (which is when he reached 100 ranks in Enchanting)." - UESP

But if we look at Arngeir's level 138 stats he's already hit level 100 in Enchanting because of the excess spillover. Instead of stopping to gain skill points at level 139, he stopped gaining skill points at level 68 (at level 67 Enchanting is only level 99).

We can also use it to finally figure out the highest level NPCs in each skill!

Best auto-calc NPCs for every skill

For a lot of these skills there are high fixed-level NPCs which will already carry them over the cap of 100 when the player is level 1. There are a few fixed groups: the Greybeards are fixed level (90 for Einarth, 100 for Borri and Wulfgar, and 150 for Arngeir) which is enough to level all of the Priest skills to 100, and the Dragon Priests are all at fixed level 50, which is enough to level the EncClassDragonPriest skills to 100 too. There are also two NPCs that cap a lot of these but aren't really interactable with: "AncientAlduin" which is the version that you see fight in the past in a cutscene (topping Sneak, Block, Archery, and One-Handed) and Malacath, a Daedric prince who only appears as an offscreen voice 22 Citation needed, given that you can summon him with player.placeatme 00019E16 and he appears as a spectral (incredibly hostile) ghost. Maybe he's visible during the quest? — I excluded both from the table.

Skill Player Level when 100 reached Best NPC
Enchant­ing 1 Greybeards
Resto­ration 1 Greybeards, Dragon Priests, Sam Guevenne 23 Sam is a mage who invites you to a casual drinking game (and spoilers is actually a Daedric lord in disguise).
Illusion 31 Drevis Neloren
Destruc­tion 1 Dragon Priests, Sam Guevenne
Conju­ration 1 Greybeards
Alter­ation 1 Dragon Priests, Sam Guevenne
Speech 1 Greybeards
Alchemy 1 Greybeards
Sneak 1 Cicero, Vulthuryol 24 A hidden dragon you can find in Blackreach.
Lock­picking 34 Tonilia
Pick­pocket 34 Tonilia
Light Armor 31 Tsun
Heavy Armor 32 Mjoll the Lioness
Smith­ing 1 Greybeards
Block 1 Vulthuryol
Archery 1 Vulthuryol
Two-Handed 29 Mjoll the Lioness
One-Handed 1 Cicero, Vulthuryol

The interesting skills are Illusion, Lockpicking, Pickpocket, Light Armor, Heavy Armor, and Two-Handed which don't immediately cap out. When the player is under those levels the character with the highest score can instead be someone with a high fixed NPC level.

Skill Skill Level NPC Best until Player Level...
Illusion 89 Elenwen 25 Though Arniel's Shade has a fixed skill level of 100. 27
Lock­picking 35 Madesi 10
Pickpocket 46 Dirge 16
Light Armor 73 Cicero 22
Heavy Armor 79 Sovngarde group 26 Though Arniel's Shade has a fixed skill level of 97. 31
Two-Handed 83 Grok 27 Not that Grok. 23

And this (finally) lets us answer who has the lowest and highest pickpocketing skill: Imedhnain and Lisbet are the lowest (among others), where Dirge, the bouncer of the Thieves Guild, is best until level 16 — then it's Tonilia all the way!


  1. Because the Level Mult is 1.0. ↩︎

  2. Okay, there's 94 of them. You got me.  ↩︎

  3. Unless you're a true believer in the Nord uprising. ↩︎

  4. I think this is because of a quest where you need to convince him to give you a demonic artifact and they didn't want it to be too easy. ↩︎

  5. For some reason the NPC configuration allows for skill levels and skill offsets, but just sums them together when calculating the level. Putting this in here for proof, but are you really going to understand this? Do I? I guess Ï do. ↩︎

  6. This is the highest skill for anyone in the game, because everyone without a fixed score is capped at 100. He doesn't even know any Alteration spells!  ↩︎

  7. If you're excluding normal animals (and why would you be, they're sneaky!) then it's 82 for the Labyrin­thian Skeletal Dragon. ↩︎

  8. The Voice of Namira is an NPC who lives in a hidden, unfindable offscreen box and says voice lines for a goddess of cannibalism—I love hacks like this. Ooh, scary!! Technically she's not even the NPC with the highest lockpicking score (it's 25 for TestWarehouse­TrapsReset) but she is the one with the highest score that's actually in the game. Well, she's kind of in the game. I'm counting it. ↩︎

  9. This guy admittedly seems like he could block pretty well.  ↩︎

  10. Hence why all of the lowest leveled NPC's have fixed scores instead of auto-calc. ↩︎

  11. Mostly. There are a lot of races that don't have bonuses, like AlduinRace for Alduin, or Elder for any old NPC, and a bunch of other specific races that have smaller bonus sets (like AtronachFlameRace which just gives +10 to Destruction). ↩︎

  12. Ironically his minimum level is set to 25, so he only starts scaling when you reach level 260. ↩︎

  13. And what are the odds, this is Dorian's boss! She caps at level 35 though, so she's only a real challenge early. ↩︎

  14. Though the only classes with weights of 5 and 6 are EncClassDragonPriest and EncClassDragon. ↩︎

  15. Silda is a beggar in the oldest city in Skyrim, and she's the perfect example because she's the only NPC with this class. Whoops! ↩︎

  16. We'll come back to this in the second example. ↩︎

  17. Ordered from highest to lowest weights, with ties going to the skill that comes first in the ordering I used for the fixed extremes table above. Or ERIDCASASLPLHSBATO for short. ↩︎

  18. This often results in NPCs with unused skill points even though some skills are under 100. The one who most wastes their potential is MG07LabyrinthianThrall02, who at player level 58 ends up discarding 24 points instead of putting them into Alteration. ↩︎

  19. Hexadecimal, so even though it looks like 12 it's 1 count of 16 + 2 counts of 1. ↩︎

  20. Thanks to the Game UI Database and the Skyrim PNG resources that Arby dumped from the game's SWF files for making it easier to make this pretty. ↩︎

  21. The highest fixed level character in the game! ↩︎

  22. Citation needed, given that you can summon him with player.placeatme 00019E16 and he appears as a spectral (incredibly hostile) ghost. Maybe he's visible during the quest?  ↩︎

  23. Sam is a mage who invites you to a casual drinking game (and spoilers is actually a Daedric lord in disguise). ↩︎

  24. A hidden dragon you can find in Blackreach.  ↩︎

  25. Though Arniel's Shade has a fixed skill level of 100. ↩︎

  26. Though Arniel's Shade has a fixed skill level of 97. ↩︎

  27. Not that Grok. ↩︎