PC and NPC base attribute calculations

Post » Mon Jun 18, 2012 9:28 pm

I'm working on my own re-balance mod, and one of the major overhauls I'm trying to put in place is consistency in stats between the PC and the NPCs which inhabit the world - i.e NPCs starting at the same health as the PC, and remaining largely consistent with what a player character of their type (mage, fighter, etc.) would up through more advanced levels.

Now, of course, under the "Race" entries in the Master file, all NPC species display a starting health/magicka/stamina stat of "50" - half that of the PC. This was, as I recalled, much the same in Oblivion, and simply meant going into the Game Settings, finding the variables which (apparently) referenced PC and NPC starting stats ("fPCBaseHealthMult", "fNPCAttributeHealthMult", "fNPCBaseMagickaMult", and "fLowLevelNPCBaseHealthMult"), and setting them to "1.0", along with setting "fNPCHealthLevelBonus" to "0". After this, I expected I could set individual races' starting stats to whatever I felt was appropriate, and both the PC and NPC would start off from the same baseline, and that their stats would progress about as closely together as the engine allows (NPCs, apparently, do not necessarily distribute points by multiples of 10, or whichever number you've set leveling bonuses to - hence they wind up with stat scores like "217", "133", etc.)

Well, the NPCs seemed to start out as I wanted, and level properly, but now any new player characters began with all three stats at 50 points (IIRC) over whatever values I had set in the Race entry - i.e. Dark Elves set up with a starting base of 90 health, 110 magicka, and 120 stamina would, as player characters, start out at 140/160/170.

Digging through the Game Settings again, I found entries "fDefaultHealth", "fDefaultMagicka", and "fDefaultStamina", all three of which were set to "50" - so I set them all to "0", guessing that vanilla Skyrim, rather than multiplying the stat values under the Race entries by 2 for the Player Character (as in "fPCBaseHealthMult"'s original value of "2"), but instead added 50 to them. Since every playable race has a vanilla setting of "50" for all three stats, it only appeared to be multiplying the vanilla Race settings by 2.

Alas, starting a new Dark Elf character got me this: 170 Health, 130 Magicka, 160 Stamina

I then decided to try starting with an Imperial character, since I had left them as the standard, middle-of-the-road race, with base values of 100 in all three stats. Again, in game the character began life with scores of 170/130/160 - the same values as the Dark Elf, despite the two races having different attribute values under their Race entries.

Edit: Resetting the Imperial race's attributes to their vanilla values of "50" still produced 170/130/160 in-game.

So, the obvious question is, what convoluted, un-intuitive formula is Bethesda using? What am I missing, here?

Does anyone know how PC and NPC stats are being translated from their values under the Race entries, into the actual gameworld? Changing what NPCs start out with seems simple enough, but for the Player Character, where are these numbers even coming from? I had wondered why the Altmer magicka bonus was implemented as a spell, rather than a simple change of the base value entry - now I suppose I see why.


As an aside, if anyone else has modified either Race stats, or perhaps the Firebolt spells themselves, only to find all the Legion mages in the opening scene running around empty-handed, eyes to the sky, apparently looking to engage Alduin in fisticuffs, I'd also like to know what I broke there, as well.
User avatar
Sian Ennis
 
Posts: 3362
Joined: Wed Nov 08, 2006 11:46 am

Post » Tue Jun 19, 2012 2:30 am

I'm having the same difficulty trying to modify starting attributes. There is a mod out there where this issue has been dealt with, but I've not been able to determine how this was done: http://skyrim.nexusmods.com/downloads/file.php?id=12140
User avatar
Elisha KIng
 
Posts: 3285
Joined: Sat Aug 18, 2007 12:18 am

Post » Mon Jun 18, 2012 3:33 pm

Necro'ing this because I'm wondering if anyone has been able to figure out how the game calculates the core attributes--Health, Magicka, Stamina--for NPCs?

There is an explanation posted on http://www.creationkit.com/Class, but it easily verified as incorrect.

From what I can tell, humanoid Actors begin at 50 for each of the three attributes and gain 15 points at each level-up. Those 15 points are distributed based on some formula having to do with their class, but I haven't yet been able to grasp that forumula.

Aela the Huntress for instance has a class of TrainerMarksmanExpert. That class gives her "attribute weights" of 4 on Stamina and 2 on Health. So you'd think her Stamina would be greater than her Health--but no. At level 2 she has 59 Health and 56 Stamina; at level 10 she has 125 Health and 110 Stamina; at level 12 she has 142 Health and 123 Stamina.

If I change her class weights to 4 Health and 2 Stamina, then at level 2 she has 61 Health and 54 Stamina; at level 10, 155 Health and 80 Stamina.

If I change her class weights to 5 Health and 1 Stamina, then at level 2 she has 63 Health and 52 Stamina; at level 10, 170 Health and 65 Stamina.

Can anybody see a way of deriving those numbers? Bethesda, could you please explain your math?
User avatar
Dan Wright
 
Posts: 3308
Joined: Mon Jul 16, 2007 8:40 am


Return to V - Skyrim