Jump to content

Recommended Posts

Posted

SPB Name-Based Keyword and Faction Injector

View File

SPB Name-Based Keyword and Faction Injector is an SKSE plugin built with CommonLibSSE-NG. It dynamically injects Keywords forms and Faction entries into Skyrim forms based on matching criteria in their EditorID or Display Name (FullName) at the start of the game

 

Configuration File Path & Schema

All configuration files must be .json files located in: Data/SKSE/Plugins/SPB Name-Based Keyword Injector/

Every JSON file must have a root array containing rule objects:

Example for an armor type:
 

[
	{
		"type": "TESObjectARMO",
		"match": ["Leather", "Cuirass"],
		"unmatch": ["Enchanted"],
		"assign": ["ArmorMaterialLeather"]
	}
]

where:

Property Type Description
type String | Array Target TESForm class (e.g., "TESObjectARMO", ["TESNPC", "NPC"]).
match Array Case-insensitive strings to match in EditorID or Name.
unmatch Array Case-insensitive strings to exclude. If any match, the rule is skipped.
assign Array EditorIDs or FormID~Plugin.esm identifiers of Keyword or Faction forms to inject.

Supported Injectors

1. Armors (TESObjectARMO)

Filters armor forms by weight class and body slot bitmasks.

Specific Fields:

clothing (bool): Enables/disables clothing items.

light (bool): Enables/disables light armor items.

heavy (bool): Enables/disables heavy armor items.

bodySlots (int): Body slot IDs (30–61) that the armor must contain.

excludeBodySlots (int): Body slot IDs that the armor must not contain.

Example:
 

[
	{
		"type": "TESObjectARMO",
		"match": ["cuirass", "chest"],
		"unmatch": ["robe"],
		"light": true,
		"heavy": false,
		"clothing": false,
		"bodySlots": [32],
		"excludeBodySlots": [33, 38],
		"assign": ["ArmorCuirass", "SOS_Revealing"]
	}
]

 

2. Weapons (TESObjectWEAP)

Filters weapon forms by internal engine weapon types (0 to 9).

Specific Fields:

weaponTypes (int): Required weapon type IDs.

excludeWeaponTypes (int): Prohibited weapon type IDs.

IDWeapon Type

  • 0 Hand-to-Hand / Bare Hands
  • 1 One-Hand Sword
  • 2 One-Hand Dagger
  • 3 One-Hand Axe
  • 4 One-Hand Mace
  • 5 Two-Hand Sword
  • 6 Two-Hand Axe / Mace
  • 7 Bow
  • 8 Staff
  • 9 Crossbow

Example:
 

[
	{
		"type": "TESObjectWEAP",
		"match": ["daedric"],
		"weaponTypes": [1, 2, 5],
		"excludeWeaponTypes": [7, 8],
		"assign": ["WeapMaterialDaedric"]
	}
]

 

3. Consumables (AlchemyItem)

Categorizes potions, food, and poisons.

Specific Fields:

food (bool): Applies to food and drinks.

medicine (bool): Applies to health, magicka, stamina, and buff potions.

poison (bool): Applies to poisons.

 

Example:
 

[
	{
		"type": "AlchemyItem",
		"match": ["elixir", "potion"],
		"food": false,
		"medicine": true,
		"poison": false,
		"assign": ["VendorItemPotion"]
	}
]

 

4. Ingredients (IngredientItem / Ingredient)

Direct keyword injection for alchemy ingredients.

 

Example:

[
	{
		"type": ["IngredientItem", "Ingredient"],
		"match": ["mushroom"],
		"assign": ["VendorItemIngredient"]
	}
]

 

5. Books & Spell Tomes (TESObjectBOOK / BOOK)

Direct keyword injection for books, scrolls, notes, and spell tomes.

 

Example:

[
	{
		"type": ["TESObjectBOOK", "BOOK"],
		"match": ["tome", "book"],
		"unmatch": ["note"],
		"assign": ["VendorItemBook"]
	}
]

 

6. Miscellaneous Items (TESObjectMISC)

Direct keyword injection for misc items (ingots, gems, clutter, etc.).

 

Example:

[
	{
		"type": "TESObjectMISC",
		"match": ["ingot"],
		"assign": ["VendorItemOreIngot"]
	}
]

 

7. NPCs (TESNPC / NPC)

Injects Keywords and/or Factions (with rank support), filtered by native base actor attributes.

Specific Fields:

  • assignFactions (Array<Object>): Array of objects containing faction (EditorID or FormID~Plugin.esm) and optional rank (integer, defaults to 0).
  • isFemale (bool): Filter by female gender.
  • isEssential (bool): Filter by essential state.
  • isUnique (bool): Filter by unique actor state.

 

Example:

[
	{
		"type": ["TESNPC", "NPC"],
		"match": ["Carriage"],
		"unmatch": ["Preset", "Template"],
		"isFemale": false,
		"isUnique": false,
		"isEssential": false,
		"assign": ["KW_CustomNPCMark"],
		"assignFactions": [
			{
				"faction": "BanditFaction",
				"rank": 0
			},
			{
				"faction": "0x0001B26D~Skyrim.esm",
				"rank": 1
			}
		]
	}
]

 

 

This is an early Plugin working for 1.7.104, and should work with older Skyrim Versions, the Source Code is Here:
SPB-Name-Based-Keyword-and-Faction-Injector Github

 

This mod will eventually be added to Nexusmods, but Still needs some feedback and some help with the JSON, because these can be make for other mods, like Sexlab Aroused or SOS AE-NG, this mod is similar to KID, but designed for match-case injection and is not aimed to replace it, is suggested to be used as a complement for KID

 

If you want to help with the mod, give me personalized JSONs so I can add it to the Jsons folder, if the KW or faction doesn't exist, it will just ignore it.

 

I'm open to suggestions too

 

Requeriments:

 

Just Address Libraries

 

It should be compatible with Everything


  • Submitter
  • Submitted
    09/07/26
  • Category
  • Requirements
    Address Libraries
  • Regular Edition Compatible
    Yes
  • Install Instructions

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...