Skyrim Special Edition

Class Identification & Keywords

Requiem - Auto NPC Patcher relies on identifying the classes of NPCs in order to determine how to balance them and as well as what perks to distribute to them.

Classes are generalized and grouped into three categories based on their skill weights and receive a keyword via SPID for use in the distribution of balancing spells as well as perks:

A class is considered a Warrior if it has no skill weights in any of the magic schools.
Keyoword: reqClassIsWarrior

A class is considered a Pure Mage if it has no skill weights in any of the weapon and armor skills but has skill weights in any of the magic schools.
Keyoword: reqClassIsPureMage

A class is considered a Battle Mage if it has skill weights in both weapon and armor skills and any of the magic schools.
Keyoword: reqClassIsBattleMage

Additionally, failsafes are in place to catch if an NPC is actually mage but is erroneously identified as a warrior via its class and vice versa.

If an NPC has spells from any magic school yet has a class initially identified as a warrior, then a copy of that NPC's original class will be created and assigned to that NPC. The new class will then be identified as a Battle Mage and receives the Keyword reqClassIsBattleMage.

Conversely, if NPC has a shield or a weapon other than a dagger in its inventory yet has a class initially identified as a Pure Mage, then a copy of that NPC's original class will be created and assigned to that NPC. The new class will then be identified as a Battle Mage and receives the Keyword reqClassIsBattleMage.


Race Identification & Keywords

Requiem - Auto NPC Patcher also relies on identifying the races of NPCs for balancing and distributing.

When the Patcher detects a custom race, it, first, looks at its Behavior Data file to figure out what race it is based on. For instance, if it has "GiantProject.hkx" it will assume the race is copy of the vanilla Giant Race or another race in vanilla that uses "GiantProject.hkx". The original race of a custom race is decided upon by comparing the custom race's Starting Health, Magicka, and Stamina to all other vanilla races using  "GiantProject.hkx" . Then amongst the races, the one with greatest similarity is determined to be the original race

The custom race is then assigned a Keyword "reqRaceIs[OriginalRace]".
So, for instance, if a new race is copy of a giant then it receives the Keyword: reqRaceIsGiantRace.


SPID Distribution
All actors from a selected mod are given the Keyword: ActorRebalancedForRequiem.
This is used to narrow down the distribution of spells and perks to only NPCs from the selected mod.

NPCs from "Scaling" races are given balancing spells to adjust their health, magicka, and stamina per level.

Balancing Spells Distribution
More information on how attributes are balanced is available in the article "Health Calculation Documentation" .

If an NPC is from a playable race, is not a vampire, and has the keyword ActorRebalancedForRequiem, then it receives balancing spells based on its class keyword:

If they have the Keyword reqClassIsWarrior or reqClassIsBattleMage, then they receive the spell "Fortify Health per Level - Warrior"  which adds 5.5 health per level by default. (The amount added can be adjusted in the patcher itself)
If they have the Keyword reqClassIsPureMage, then they receive the spell "Fortify Health per Level - Mage"  which adds 3 health per level by default.

If they have the Keyword reqClassIsWarrior or reqClassIsBattleMage, then they receive the spell "Fortify Stamina per Level"  which adds 8.5 stamina per level by default.

If they have the Keyword reqClassIsPureMage or reqClassIsBattleMage, then they receive the spell "Fortify Magicka per Level"  which adds a flat 50 magicka as well as 8.5 magicka per level by default.

Then, if an NPC has either the Flag "PC Level Mult" or "AutoCalcStats", per the amount of health that NPC gets per level according to AutoCalcStats, they are given  a spell "Fortify Health per Level Negative[ClassHealthGain]", that reduces their health per level by that exact amount. This allows the prior mentioned spells, those distributed via the keywords  reqClassIs[ClassGrouping], to have full control over attribute scaling.


Racial Spells and Perks

Specific spells and perks are then distributed to NPCs based on the keyword reqRaceIs[OriginalRace].
A full table containing different spells and perks for NPCs is in the article "Perks for Different Races" .

Draugr, Falmer, and Vampires also receive their own  health, magicka, and stamina per level spells similarly to how playable races receive them.


Template NPCs
If a new NPC from a mod uses the template of NPC that base Requiem has already modified then, depending on its template flags, it won't need to have its stats rebalanced.

If a NPC has the template flag "Use Stats" and its template is of an NPC that base Requiem has already balanced, then that NPC receives the Keyword: reqRebalanceIgnoreHealth. This NPC will then not receive and of the balancing spells.

If a NPC has the template flag "Use Spell List" and its template is of an NPC that base Requiem has already balanced, then that NPC receives the Keyword: reqRebalanceIgnorePerks. This NPC will then not receive any of the of spells or perks associated with its race as it should already have them.

Article information

Added on

Edited on

Written by

MadAborModding

0 comments