filterByNpcs/Excluded filterByRaces and filterByKeywords/Or/Excluded are not connected. They work Independent from each other.


Filter


filterByModNames allows you to filter by mods and can be combined with other filters. Multiple mods need to be separated by ,
Example: 
filterByModNames=SkyValor.esp:filterByXXX=MyMod.esp|123:setWhatEver=123

filterByNpcs allows you to patch different NPCs at once. They need to be separated by ,

filterByNpcsExcluded can be used to exclude one or multiple objects. (multiple separated by ,)

filterByRaces allows you to patch NPCs by race. You can add multiple races.

filterByKeywords allows you to filter by keywords. The keywords are connected by AND. Multiple keywords need to be separated by ,

filterByKeywordsOr keywords are connected with or. Multiple keywords need to be separated by ,

filterByKeywordsExcluded allows you to exclude keywords. Multiple keywords need to be separated by ,

filterByEditorIdContains allows you to filter by editorID(can also only contain a part of the editorID). The editorID filters are connected by AND. Multiple editorIDs need to be separated by ,

filterByEditorIdContainsOr editorIDs are connected with or. Multiple editorIDs need to be separated by ,

filterByEditorIdContainsExcluded allows you to exclude editorIDs. Multiple editorIDs need to be separated by ,

filterByFactions allows you to filter by factions. The factions are connected by AND. Multiple factions need to be separated by ,

filterByFactionsOr factions are connected with or. Multiple factions need to be separated by ,

filterByFactionsExcluded allows you to exclude factions. Multiple factions need to be separated by ,

filterByClass allows you to filter NPCs by class. You can add multiple classes. 


filterByPCLevelMult allows you to filter NPCs by PCLevelMult.
filterByAutoCalc allows you to filter NPCs by filterByAutoCalc. 
filterByEssential allows you to filter NPCs by filterByEssential. 
filterByProtected allows you to filter NPCs by filterByProtected. 
Example:
PCLevelMult=true


filterByGender can be used to filter NPCs by Gender.
Example:
filterByGender=female
filterByGender=male



Operations


fullName allows you to change the full name of the object. The new name has to be written between ~~
Example:
fullName=~Dragonslayer Sword~


setAutoCalcStats - disables/enables the flag kAutoCalcStats from NPCs. This flag forces NPCs to re-calculate their stats, when certain events happen.


setPcLevelMult - disables/enables the flag kPCLevelMult from NPCs. 
Example:
50 will be the level, when no level could be calculated and is a fail safe.
filterByRaces=Skyrim.esm|000131E8:setPcLevelMult=false=50


setEssential - disables/enables the flag from NPCs. 

setProtected - disables/enables the flag from NPCs. 

Example to disable a Flag:
autoCalcStats=no 
or
autoCalcStats=false

Example to enable a Flag:
autoCalcStats=yes
or
autoCalcStats=true

Example, ignoring it:
autoCalcStats=none
or
delete it from the string


levelRange - you can specify a level range and if the avif has also a range, the avif is calculated for the level of the NPC.
It calculates the proportional increase from avif and level of the NPC.

Example: (this is only a part of a patch string.)
levelRange=25~100 :changeStats=health=150~250

-> A level 1 NPC will have 150 health
-> A level 25 NPC will have 150 health
-> A level 50 NPC will have ~183 health
-> A level 100 NPC will have 250 health
-> A level 200 NPC will have 250 health


changeStats allows you to manipulate the attribute values of NPCs, like changing their health, stamina etc.

changeStats different options for you:
Direct change
health = 200
stamina = 100
magicka = 300

Calc based on class and attribute weight (don't use that on Leveled NPCs, you have to disable PCLevelMult and set a level wit it.)
calcHealth = 10
calcStamina = 12
calcMagicka = 15

Multiply existing values
healthMult = 1.5
staminaMult = 2.5
magickaMult = 4

Examples:
changeStats=health=250
changeStats=health=250, magicka=150, stamina=50
changeStats=health=250, calcStamina=10, calcMagicka=10
changeStats=healthMult=2.5calcStamina=10calcMagicka=10

calcStamina will calculate the stamina based on the attribute weights by the class and the level of the NPC.
calcMagicka will calculate the magicka based on the attribute weights by the class and the level of the NPC. 
More information about attribute weights and classes can be found here

changeSkills allows you to manipulate the skill values of NPCs 
Example:
changeSkills=twohanded=45,onehanded=50

Skills
alchemy
alteration
block
conjuration
destruction
enchanting
heavyarmor
illusion
lightarmor
lockpicking
marksman
onehanded
pickpocket
restoration
smithing
sneak
speechcraft
twohanded


healthBonus adds a bonus to the health of the NPC, when using calcHealth
Example:
healthBonus=50:changeStats=calcHealth=10calcStamina=10

magickaBonus adds a bonus to the magicka of the NPC, when using calcMagicka
Example:
magickaBonus=120:changeStats=health=90calcMagicka=10

staminaBonus adds a bonus to the stamina of the NPC, when using calcStamina
Example:
staminaBonus=80:changeStats=health=250, calcStamina=10

setFlags sets flag of the NPC. Multiple flags needs to be separated by ,
removeFlags removes flags of the NPC. Multiple flags needs to be separated by ,
Example:
setFlags=female, essential, unique 

Flags
  • female
  • essential
  • ischargenfacepreset
  • respawn
  • autocalcstats
  • unique
  • doesntaffectstealthmeter
  • pclevelmult
  • usestemplate
  • calcforalltemplates
  • protected
  • norumors
  • summonable
  • doesntbleed
  • bleedoutoverride
  • oppositegenderanims
  • simpleactor
  • loopedscript
  • noactivation
  • loopedaudio
  • isghost
  • invulnerable

setTemplateFlags sets flag of the NPC. Multiple flags needs to be separated by ,
removeTemplateFlags removes flags of the NPC. Multiple flags needs to be separated by ,   

Flags
  • traits
  • stats
  • factions
  • spells
  • aidata
  • aipackages
  • unused
  • basedata
  • inventory
  • script
  • aidefpacklist
  • attackdata
  • keywords
  • copiedtemplate

keywordsToAdd adds keywords to NPCs. You can add multiple and they have to be separated by ,

keywordsToRemove allows you to remove keywords. You can add multiple and they have to be separated by , 

factionsToAdd adds factions to NPCs. You can add multiple and they have to be separated by ,
Example:  factionsToAdd=Skyrim.esm|0001CBED=
You need to specify the faction and after = the rank. If in doubt, 0. It's the starting rank.

factionsToRemove allows you to remove factions. You can add multiple and they have to be separated by , 

perksToAdd adds perks to NPCs. You can add multiple and they have to be separated by ,

spellsToAdd adds spells to NPCs. You can add multiple and they have to be separated by ,

spellsToRemove remove spells from NPCs. You can remove multiple and they have to be separated by ,

levSpellsToAdd adds leveled spells to NPCs. You can add multiple and they have to be separated by ,

levSpellsToRemove remove leveled spells from NPCs. You can remove multiple and they have to be separated by ,

shoutsToAdd adds spells to NPCs. You can add multiple and they have to be separated by ,

shoutsToRemove remove spells from NPCs. You can remove multiple and they have to be separated by ,

deathItem allows you to change the deathItem of a NPC. Passing the string null will disable it 

race allows you to change the race of a NPC. 

voiceType allows you to change the voice of a NPC. 

outfitDefault allows you to change the outfit of a NPC. 
Example:
filterByFactions=Skyrim.esm|0001A692:outfitDefault=Skyrim.esm|D3E05

outfitSleep allows you to change the sleep outfit of a NPC. 

class allows you to change the class of a NPC. 

skin allows you to change the skin of a NPC. Passing the string null will disable it 

level sets the level of the NPC

calcLevelMin - used with kPCLevelMult to set a minimum level

calcLevelMax - used with kPCLevelMult to set a maximum level

objectsToAdd adds objects(items or LLs) to NPCs. You can add multiple and they have to be separated by ,
Example:  filterByNpcs=Skyrim.esm|13BBF:objectsToAdd=Skyrim.esm|73F34=5,  Skyrim.esm|398F3=5
Adds 5 Deadly Poison to Nazeem
;Nazeem "Nazeem" [NPC_:00013BBF] | DamageHealth05 "Deadly Poison" [ALCH:00073F34] | FortifySkillDestruction04 "Elixir of Destruction" [ALCH:000398F3]

addOnceToInventory adds the object only once to NPCs. You can add multiple and they have to be separated by ,
ExamplefilterByNpcs=Skyrim.esm|13BBF:addOnceToInventory=Skyrim.esm|73F34~5,  Skyrim.esm|398F3~3
Will only add the item with the amount, if he doesn't have the item

objectsToRemove removes objects(items or LLs) from NPCs. You can add multiple and they have to be separated by ,
Example:  objectsToRemove=Skyrim.esm|211CC

removeInventoryObjectsByKeywords removes objects(items) from NPCs, which have matching keywords. You can add multiple and they have to be separated by ,
Example:  removeInventoryObjectsByKeywords=Skyrim.esm|211CC, Skyrim.esm|211CD

removeInventoryObjectsByCount removes objects(items) from NPCs, which have a matching count of the item.
Example:  removeInventoryObjectsByCountsSkyrim.esm|211CC~2

clearInventory removes all objects from NPCs. 
Example:  clearInventory=true

restrictToMaleModelContains allows you to restrict to a skeleton path. If the path does not contain werewolf, the operation will fail. 
Example:  restrictToMaleModelContains=werewolf

restrictToSkill will restrict to all NPCs with the skill in the specified range. 
Example:  restrictToSkill=marksman~0~50

  • onehandedtwohanded
  • marksman
  • block
  • smithing
  • heavyarmor
  • lightarmor
  • pickpocket
  • lockpicking
  • sneak
  • alchemy
  • speechcraft
  • alteration
  • conjuration
  • destruction
  • illusion
  • restoration
  • enchanting


NPC Patcher Example Strings:
;Adds two perks from SkyValor to all NPCs, except the player. When no filter is used, it only affects NPCs. If you have to filter for the player, if you want to patch the player.
perksToAdd=SkyValor.esp|1D8A,SkyValor.esp|3DE9

;Filters for the player changes his health
filterByNpcs=Skyrim.esm|7:changeStats=health=250

;filter by race for bear and modifies health and recalculates stamina and magicka based on the bears class. Disable the PCLevelMult and sets the level for those NPCs to 50.(Otherwise they have a level of 1000). Disables auto calc stats for all bear NPCs
filterByRaces=Skyrim.esm|000131E8:levelRange=1~30:changeStats=health=625~900,calcStamina=10,calcMagicka=10:setPcLevelMult=false=50:setAutoCalcStats=false

Article information

Added on

Edited on

Written by

Zzyxzz

17 comments

  1. Lord4rgon
    Lord4rgon
    • premium
    • 29 kudos
    Does anyone know whether it is possible to change the template an actor uses? If so how?
    It is not clear to me from reading the article.

    EDIT: It is not possible.
  2. justrush808
    justrush808
    • premium
    • 14 kudos
    I can't seem to get filterByEssential and Protected to work. Going by the nearest example, (PCLevelMult=true), I tried filterByEssential=true and filterByProtected=true, then a few other ways just in case it didn't work like that (filterByEssential=essential, filterByEssential:, etc), but it just distributed the keywords to all NPCs every time. Incorrect syntax/strings usually CTD, so getting into the game no matter what I tried makes me feel like it's not working at all. Please let me know if it works for you, thanks!
  3. huhwhat23921
    huhwhat23921
    • member
    • 36 kudos
    nvm fixed
  4. Aardvark1998
    Aardvark1998
    • member
    • 8 kudos
    Is there a way to set the actual multiplier for the PC level mult? If I wanted to have a character be at 80% of the player's level, say, that would be an 0.8 multiplier.
  5. ItsAlways710
    ItsAlways710
    • premium
    • 29 kudos
    Is there a way to modify/add a magic effect to an enchantment based upon the player (or NPC's) level? I feel like it should be possible, but am having trouble putting it together...
  6. AdmiralAlbia
    AdmiralAlbia
    • premium
    • 20 kudos
    Any way to run two filters simultaneously, for example to identify all female Bosmer or all male Nords?

    ETA: Never mind, found it
  7. CML99
    CML99
    • member
    • 18 kudos
    Is it possible to affect all unique NPCs that aren't essential?
    eg. filterByUnique, exclude essential
  8. djarb
    djarb
    • supporter
    • 39 kudos
    Does changeStats allow altering actor values other than health, stamina, and magicka?  I've had no success with the below but I don't know whether that's because it's not supported (in which case a warning in the log file would be nice) or I'm doing something wrong (again, a warning would be nice)

    filterByNpcs=Skyrim.esm|7:changeStats=unarmedDamageMult=3
    1. fatmanyt
      fatmanyt
      • supporter
      • 0 kudos
      +1
  9. nobld
    nobld
    • member
    • 0 kudos
    怎么让不同的条件并列运行?
    比方说filterByFactions和filterByGender
  10. ElderOGCS
    ElderOGCS
    • member
    • 8 kudos
    Is it possible to remove objects contained within an outfit? I tried filterByGender=female:objectsToRemove=Skyrim.esm|1394F as a test but it doesn't seem to work.
    1. justrush808
      justrush808
      • premium
      • 14 kudos
      There's an outfit patcher, but I'd imagine it won't be as simple to make sweeping changes to genders like that.
  翻译: