Create an account

Spell Perk Item Distributor (SPID) v6.6.2  

Upload: 04 Nov 2023, 17:34
Created by: powerofthree-sasnikol [X]
Uploaded by: Aqxaro
Spell Perk Item Distributor (SPID) v6.6.2

Requirements 

SKSE64
Skyrim SE 1.5.39 onwards
meh's Address Library for SKSE Plugins
powerofthree's Tweaks

Description

SKSE utility plugin that allows modders to add spells/perks/items/shouts/packages/outfits/keywords to every NPC actorbase in the game, at startup.

How To Use

Note:  konkeranto has graciously made xEdit scripts that automate all of this, check it out here : 
Spell Perk Item Distributor xEdit Scripts

Distributed records should be written to an ini file containing the suffix "_DISTR", in the Data folder (for example, MyMod_DISTR.ini).
They should follow this general format:

RecordType = RecordID|StringFilters|FormFilters|LevelFilters|Traits|NONE|Chance
Items and packages have their own specialized format:

Item = RecordID|StringFilters|FormFilters|LevelFilters|Traits|ItemCount|Chance

Package = RecordID|StringFilters|FormFilters|LevelFilters|Traits|PackageIdx|Chance

RecordType

Spell
Perk
Item
Shout
LevSpell
Package
Outfit
Keyword
DeathItem
Faction
SleepOutfit
Skin

RecordID

  • RecordID is the unique identifier of the record you want to distribute. Two versions are supported:
  • FormID~esp

FormID is the formID of the distributable record with leading zero digits removed (eg. 0x12345)
esp is the name of the mod containing the record (MyMod.esp/esl/esm). This is not necessary for Skyrim and DLC records.

  • EditorID is the form editorID of the record displayed in CK or xEdit. This is generally preferred since formIDs can change when the mod is merged or converted into esl.

Filtering

Filters are for distributing to only specific groups of NPCs. Filters that you're not using can be marked as NONE or left blank.

NOTE: Combining multiple filters will progressively restrict the pool of NPCs that can be distributed to.
Distribute the same record multiple times to add it to different types of NPCs.

  • String Filters

Keyword editorIDs  (eg. ActorTypeNPC)
Actorbase names (eg. Balgruuf)
Actorbase editorIDs (eg. BalgruufTheGreater

Multiple strings should be separated using a comma.  All keyword strings, names and editorIDs (vanilla and modded) are supported.

  • Form Filters

FormIDs/EditorIDs of specific forms used by actors, like factions/race/class (eg. 0x12345 or MyRecordEditorID).

List of valid filter form types

Faction
Class
CombatStyle
Race
Outfit
NPC
Spell
VoiceType
FormList
Editor Location

Multiple entries should be separated using a comma.
Mod added filter formIDs are supported (0x101~MyFactionMod.esp,0x223~MyRaceMod.esl)
EditorIDs can now be used in place of formIDs.

Pattern Matching

Requirements [strings, formIDs] - require actor to have all keywords or filter forms, using + (eg. ActorTypeGhost+ActorTypeAnimal to get animal ghosts).

Exclusions [strings, formIDs] - exclude actors that have name/keyword/form, using - (eg. -Serana).

Wildcards [strings] - find all actors that have name, editorID or keyword containing wildcard, using * (eg. *Draugr to get Draugr/Draugr Death Lord/Draugr Mage).

Matches [strings, formIDs] - this is default setting. NPC has to match with any filter.

These are evaluated in the following order :

1.Requirements
2.Exclusions
3.Matches
3.Wildcards

Level Filters

  • Actor Level is minimum/maximum actor level. Records will be distributed to NPCs with levels within this range. 

This filter is skipped for NPCs that level up with the player.

  • Skill Level (OneHanded, Lockpicking, ect) range from 0 - 17, followed by the min and max Skill Level required. Supports pattern matching.

eg. for Destruction skill level 50 - 100 : 14(50/100)

List of Skills

OneHanded : 0
TwoHanded : 1
Marksman : 2
Block : 3
Smithing : 4
HeavyArmor : 5
LightArmor : 6
Pickpocket : 7
Lockpicking : 8
Sneak : 9
Alchemy : 10
Specchcraft : 11
Alteration : 12
Conjuration : 13
Destruction : 14
Illusion : 15
Restoration : 16
Enchanting : 17

Traits

  • Gender : M/F
  • Unique : U
  • Summonable : S
  • Child : C
  • Leveled : L
  • Player Teammate : T

Traits can be combined (eg. M/U/S to get all male unique summonable NPCs)
Traits can be negated (eg. -U to get all non-unique NPCs)

Chance

  • Percentage chance that records will be distributed to NPCs 

Value is from 0 -100, default chance is 100 if left blank or NONE.

Notes regarding distributable types

Items

  • All carryable items (that can be added to NPC inventory) or leveled items are accepted.
  • itemCount is the amount of items that should be added. Default is 1 if no count is specified

Packages

  • Supports distributing packages AND formlists (as package overrides)
  • If distributing packages :

index is actorbase package index. Default is 0 (top of actorbase package stack) if no index is specified.
(eg. a packageIdx of 1 will add the package after the 1st one)

  • If distributing formlists

0 - default packagelist
1 - spectator override
2 - observe corpse override
3 - guard warn override
4 - enter combat override

Skin

  • Record should be of Armor formtype.

Keywords

Keywords can either be distributed as normal, using formids from other mods, or you can assign your own custom keyword to NPCs

Keyword = ActorTypeRich|Nazeem,Maven Black Briar

These keywords should be checked in-game using SKSE's HasKeywordString function.

Keywords will be applied first, so you could distribute a keyword to NPCs, and then check if it exists when distributing other things

Keyword = ActorTypeGhost|*Ghost

Spell = 0x123~SpookyGhostSpell.esp|ActorTypeGhost

Examples

;this will add 3000 gold to everyone except Nazeem
Item = 0xF~Skyrim.esm|ActorTypeNPC,-Nazeem|NONE|NONE|NONE|3000 

;this has a 50% chance to add a perk from test.esp to all NPCs from Test faction
Perk = 0x9DE80~test.esp|NONE|0x1BCC0~test.esp|NONE|NONE|NONE|50

;this will add Flames to all female NPCs between actor levels 25 and 50
Spell = 0x12FCD~Skyrim.esm|NONE|NONE|25/50|F

;this will add Flames to all male unique NPCs who have a minimum Destruction skill of 10 
Spell = 0x12FCD~Skyrim.esm|NONE|NONE|14(10)|M/U

;this will add Unrelenting Force to all NPCs that are vampire ghosts
Shout = 0x13E07~Skyrim.esm|ActorTypeGhost+Vampire 

;this will add a custom keyword, ActorTypePoor to Brenuin
Keyword = ActorTypePoor|Brenuin

Notes

Check po3_SpellPerkItemDistributor.log file in My Games/Skyrim Special Edition/SKSE, for more information about the process.

Installation

  • Install as normal with a mod manager. 

Credits

  • Ryan (SniffleMan) for CommonLibSSE
  • sasnikol for their invaluable help in adding features and testing for SPID 6.0
Comments
The minimum comment length is 10 characters.