-
Notifications
You must be signed in to change notification settings - Fork 7
Matching
Each rule has a match section that determines which objects should be manipulated by the rule.
SKSE provides many data fields which can be matched. They fit broadly into these types:
- Enumeration - A value from a predetermined set, specific to each field.
- FormID - The numerical ID assigned to each form. See the formId section below for details on how to match this type.
- String - A text value.
- Number - A numerical value.
- Boolean - A true or false value.
- Array - A list of multiple sub-values. For these properties, configurations can provide a single value or array of values that the array must contain. See the keywords section for an example.
Data can be matched in the following ways:
- Exact value - The field must match the exact value provided, or if it is an array, it must contain the value.
- Multiple values - The field can match any of multiple values, specified by an object with the "anyOf" property. (See formId for an example).
- Numerical range - For numerical fields, it can match a range of values, specified by an object with the "min" and/or "max" properties.
The following fields are available on every object type.
Specifies the type of form this rule applies to. It is recommended to always supply this value, as it can dictate how other data is handled, such as subType assignment.
Type: Enumeration
Values:
- Ammo
- Armor
- Book
- Enchantment
- Ingredient
- Key
- Light
- MiscItem
- Potion
- Scroll
- Spell
- SoulGem
- Weapon
Example:
"match": {
"formType": "MiscItem"
}The FormID of the object.
Type: FormID
FormIDs are specified by the filename of the plugin and the relative FormID, separated by a vertical bar (|).
Example:
"match": {
"formType": "MiscItem",
"formId": "Dragonborn.esm|247F9"
}You may also want to specify multiple FormIDs, in which case you can create an object with the "anyOf" property to specify them in an array.
Example:
"match": {
"formType": "Book",
"formId": {
"anyOf": [
"Skyrim.esm|DDEFB",
"Skyrim.esm|EF07A",
"Skyrim.esm|F33CD",
"Skyrim.esm|F33CE",
"Skyrim.esm|F33CF",
"Skyrim.esm|F33D0",
"Skyrim.esm|F33D1",
"Skyrim.esm|F33D2",
"Skyrim.esm|F33D3",
"Skyrim.esm|F33D4",
"Skyrim.esm|F33D5",
"Skyrim.esm|F33E0"
]
}
}Keywords assigned to an object.
Type: Array of String
Example:
"match": {
"formType": "Weapon",
"keywords": "WeapTypeSpear"
}The following fields are available for Armor forms.
All biped object slots used by the Armor.
Type: Array of Number
Example:
"match": {
"formType": "Armor",
"parts": [ 31, 32 ]
}The main biped object slot used by the Armor.
Type: Number
Each armor slot is a number between 30 and 61. When an armor has multiple slots, the main part is determined by earliest slot that it occupies from the following precedence list:
- 32 - Body
- 31 - Hair
- 33 - Hands
- 34 - Forearms
- 37 - Feet
- 38 - Calves
- 39 - Shield
- 35 - Amulet
- 36 - Ring
- 41 - Long Hair
- 43 - Ears
- 30 - Head
- 42 - Circlet
- 40 - Tail
- 44 - Unnamed
- 45 - Unnamed
- 46 - Unnamed
- 47 - Unnamed
- 48 - Unnamed
- 49 - Unnamed
- 50 - Decapitate Head
- 51 - Decapitate
- 52 - Unnamed
- 53 - Unnamed
- 54 - Unnamed
- 55 - Unnamed
- 56 - Unnamed
- 57 - Unnamed
- 58 - Unnamed
- 59 - Unnamed
- 60 - Unnamed
- 61 - FX01
Example:
"match": {
"formType": "Armor",
"mainPart": 46
}The weight class of the Armor. Non-armor items are classified as Clothing or Jewelry based on their keywords.
Type: Enumeration
Values:
- Light
- Heavy
- None
- Clothing (VendorItemClothing keyword)
- Jewelry (VendorItemJewelry keyword)
Example:
"match": {
"formType": "Armor",
"weightClass": "Heavy"
}Type: Number
Type: Boolean
The following fields are available for Ammo forms.
Type: Array of Enumeration
Values:
- IgnoresNormalWeaponResistance
- NonPlayable
- NonBolt
Type: Number
Type: Boolean
The following fields are available for Weapon forms.
The animation type of the Weapon.
Type: Enumeration
Values:
- HandToHandMelee
- OneHandSword
- OneHandDagger
- OneHandAxe
- OneHandMace
- TwoHandSword
- TwoHandAxe
- Bow
- Staff
- Crossbow
"match": {
"formType": "Weapon",
"weaponType": "TwoHandSword"
}Type: Number
Type: Number
Type: Number
Type: Number
Type: Number
Type: Number
Type: Number
Type: FormID
Type: Number
Type: Boolean
Type: Boolean
The following fields are available for Soul Gem forms.
The capacity of the Soul Gem.
Type: Enumeration
Values:
- None
- Petty
- Lesser
- Common
- Greater
- Grand
Example:
"match": {
"formType": "SoulGem",
"gemSize": "Greater"
}The size of the soul in the Soul Gem.
Type: Enumeration
Values:
- None
- Petty
- Lesser
- Common
- Greater
- Grand
Example:
"match": {
"formType": "SoulGem",
"soulSize": "Common"
}Indicates how full the Soul Gem is.
Type: Enumeration
Values:
- Empty
- Partial
- Full
Example:
"match": {
"formType": "SoulGem",
"status": "Partial"
}The following fields are available for Book forms.
Type: Array of Enumeration
Values:
- TeachesSpell
- TeachesSkill
- Read
"match": {
"formType": "Book",
"flags": "Read"
}Distinguishes between Books and Notes. This data is not normally available in Skyrim SE, but I4 automatically sets the type to Note for any Book that has "Note" in its 3D model filename.
Type: Enumeration
Values:
- Book
- Note
Example:
"match": {
"formType": "Book",
"bookType": "Note"
}Type: Enumeration
Values:
- OneHanded
- TwoHanded
- Marksman
- Block
- Smithing
- HeavyArmor
- LightArmor
- Pickpocket
- Lockpicking
- Sneak
- Alchemy
- Speechcraft
- Alteration
- Conjuration
- Destruction
- Illusion
- Restoration
- Enchanting
Type: FormID
The following fields are available for Spell, Scroll, Ingredient, Potion, and Enchantment forms.
Type: String
Type: Number
Type: Number
Type: Number
Type: String
Type: Array of Enumeration
Values:
- Hostile
- Recover
- Detrimental
- SnapToNavMesh
- NoHitEvent
- DispelWithKeywords
- NoDuration
- NoArea
- FXPersist
- GoryVisuals
- HideInUI
- NoRecast
- PowerAffectsMagnitude
- PowerAffectsDuration
- Painless
- NoHitEffect
- NoDeathDispel
Type: Enumeration
Values:
- Alteration
- Conjuration
- Destruction
- Illusion
- Restoration
Type: Number
Type: Enumeration
Values: Effect Archetypes (remove spaces)
Type: Enumeration
Values:
- Self
- Touch
- Aimed
- TargetActor
- TargetLocation
Type: Enumeration
Values:
- ConstantEffect
- FireAndForget
- Concentration
- Scroll
Type: Enumeration
Values: Actor Values
Type: Enumeration
Values:
- DamageResist
- PoisonResist
- FireResist
- ElectricResist
- FrostResist
- MagicResist
- DiseaseResist
The following fields are available for Spell and Scroll forms.
Type: Enumeration
Values:
- Spell
- Disease
- Power
- LesserPower
- Ability
- Poison
- Enchantment
- Potion
- WortCraft
- LeveledSpell
- Addiction
- VoicePower
- StaffEnchantment
- Scroll
Type: Number
Type: FormID
The following fields are available for Potion forms.
Type: Array of Enumeration
Values:
- ManualCalc
- Food
- Medicine
- Poison