A SKSE plugin that lets you add custom effects to items when they are activated, grabbed, released, thrown, or hit. You can make things happen like spawning items, impact data sets, actors, casting spells, creating explosions, playing sounds, and swapping objects - all controlled with JSON files.
Other user's assetsAll the assets in this file belong to the author, or are from free-to-use modder's resources
Upload permissionYou can upload this file to other sites but you must credit me as the creator of the file
Modification permissionYou are allowed to modify my files and release bug fixes or improve on the features so long as you credit me as the original creator
Conversion permissionYou can convert this file to work with other games as long as you credit me as the creator of the file
Asset use permissionYou are allowed to use the assets in this file without permission or crediting me
Asset use permission in mods/files that are being soldYou are allowed to use the assets in this file in mods/files that are being sold, for money, on Steam Workshop or other platforms
Asset use permission in mods/files that earn donation pointsYou are allowed to earn Donation Points for your mods if they use my assets
Author notes
Do what you want, but ask permission if you want to do something with the code
File credits
Seb263 for the inspiration Solus200 for ideas, assistance and testing (practically the second developer). If it weren't for you, the OIF's quality just wouldn't be the same! kwamagg and kuroishitam for ideas and testing doodlum & Quantumyilmaz - I learned how to write plugins by digging into their code
Donation Points system
Please log in to find out whether this mod is receiving Donation Points
Changelogs
Version 1.6.3
Disabling items is now handled through a workaround to prevent the kInitiallyDisabled flag from being set so the isInitiallyDisabled filter can be used correctly. WARNING: It is highly recommended first go through the locations and make sure that all the necessary items are respawned before updating (credits to Solus200 for assistance and testing)
Cleaned up code, removed an unused placeholder for attacksTypes that could potentially cause some spells to be filtered out
New effect: "ActivateItem" - activates activators, picks up pickable items, automatically opens containers. Does not work with the "Activate" event to avoid collisions (credits to Solus200 for the idea)
New effects: "AddContainerItem" and "AddActorItem" - adds specified items to containers or sources' inventories
New effects: "RemoveContainerItem" and "RemoveActorItem" - removes specified items from containers or sources' inventories
Version 1.6.2
Global performance optimization
Fixed Throw event not working when ReadyWeapon button was remapped or when using Xbox controller
Fixed multiple identifier selection bug - rules now use ALL logic instead of ANY when multiple identifiers are specified (formTypes, formLists, editorIDs, formIDs, keywords)
Fixed the behavior of isPluginInstalled and isDllInstalled and their inverses. Now, if a plugin is missing, the log won't be spammed with reports about it, the rules won't be skipped
Fixed keywordsNot and weaponsKeywordsNot skipping objects that don't support keywords instead of passing (credits to Solus200 for pointing out and testing)
Fixed weapons and weaponsNot accepting nothing but weapons and spells, you can now specify explosions as well
Fixed shouts and projectiles registering. Note: all shouts don't work with statics. Those shouts that are pure projectiles (e.g., Unrelenting Force) will work only with furniture, flora, doors, containers, and activators (credits to Solus200 for assistance & testing and kuroishitam for pointing out & testing)
Full support for explosions and chain reactions. You can filter them using weaponTypes, weapons, and weaponsFormLists. Those explosions that have a radius or a damage of 0 are automatically filtered out (credits to Solus200 for assistance & testing and kuroishitam for testing)
Full support for editorIDs. For filters it is "editorIDs", for the items of any effect it is "editorID". Those filters that accepted forms in the format "Mod.esp:00123456" now also accept "EditorIDName" (credits to Solus200 for testing)
New filter: "formTypesNot"
New filter: "isInitiallyDisabled" - 0 for no, 1 for yes, 2 (default) for all/undefined. Note, when you re-enter a location, an item you freshly disabled may acquire this flag (credits to Solus200 for the idea and testing)
New filters: "allowProjectiles" (0 for no, 1 (default) yes), "projectilesFormLists", "projectilesFormListsNot"
New filters: "deliveryTypes" and "deliveryTypesNot" - contain "self", "aimed", "targetactor", "targetlocation", "touch", and "total"
Changed filter: "attacks" - now you can optionally write it as "attacksTypes". Removed "projectiles" entry. Fixed "continuous" not working with concentrating spells. New possible entries: "fireandforget", "constant", "ignoreweapon", "overridedata"
Changed filter: "weaponsTypes". New possible entries: "scroll", "explosion"
Changed function: "SpawnImpact". Was renamed to "SpawnImpactDataSet" for clarity. Now the spawn position for an impact is calculated differently, the point is bound strictly to the position of the object in space, now works on small movable objects without displacement
New event: "WeatherChange" - applies an effect on weather change. Recommended to use with "weathers" and "weathersNot" filters to manage. Works outside only
New effects: "UnlockItem" and "LockItem" - works with objects like doors or containers
New effect: "ToggleNode" - toggles node "on" and "off". Accepts "mode" (0 for disable, 1 for enable) and "nodeNames". Example: "items": [{"mode": 0, "nodeNames": ["addon"]}]
New supported form type: "light" (e.g., torches, lanterns from "Havoc and Non Havoc Lanterns" by giamel) (credits to Solus200 for testing)
Version 1.6.1
Removed the ObjectLoaded event and added a huge number of missing checks for event receivers and effects to prevent crashes
Once again changed memory management, which should remove lags and freezes
Added potential recursive links handle for locations filter
Those effects that use console-based functionality now correctly unselect previously selected references
Fixed the bug which caused Throw and Release events make effects double, when used in one rule
Fixed some weapons filters being ignored
Fixed perks and perksNot being ignored when used with something else than Hit event
ApplyIngestible now has "items" field so you can set radius and chance there
New value for QuestItemStatus: 3 for all objects allowed. The default value stays 0 for non-quest only
New special index for formlists: -3, allows you to select one random object from the list. Available ONLY in the effects' "items" (credits to Solus200 for the idea)
New "scale" field for "items" (spawn/swap functions only) - allows you to select the scale of the spawned item. By default, it is copied from the target object
New "fade" field for "items" (spawn/swap functions only) - determines whether the object will have a fade effect or not upon creation. 0 - without fade effect, 1 (default) - with fade effect (credits to Quantumyilmaz for the direction)
New "spawnType" field for "items" (spawn/swap functions only) - allows you to select the type of how the object should be spawned. A total of 8 options are available: 0 - normal PlaceAtMe, 1 - PlaceAtMe spawning the object at the middle of the original, 2 - PlaceAtMe spawning at the top of the original, 3 - PlaceAtMe spawning at the bottom of the original, 4 - (default) normal with buggy engine physics bypassing (when used with Throw/Grab/Release, the object will be spawned exactly to the landing point), 5 - bypass with centering, 6 - bypass with spawning at the top, 7 - bypass with spawning at the bottom, 8 - pin to the ground regardless of the landing location (credits to Solus200 for assistance and testing)
New filters: actorValues and actorValuesNot - ["Health >= 10", "Aggression = 0"]; level and levelNot - [">= 10", "= 20"]; hasItem and hasItemNot - ["Skyrim.esm:000123456"]
Version 1.6
Fixed "interactions" working only for hits by reworking the serialization and keys structure. Now both "interactions" and "limit" are rule-dependent, event dependency is removed to make it work when several types are listed per event
Fixed "SpawnImpact". Previously it didn't fire under any circumstances because of a wrong condition
Improved memory cleanup. Now there are different containers for interactions and limits. For interactions, half of old records are cleared, and for limits, all records with infinite limit are cleared - there is no more chance that an object will become interactable again after some time
In event receivers, all important pieces of code are now moved to separate tasks, preventing objects from being ignored when too many are processed at once
Completely redesigned the throw event receiver. Previously it memorized the object during its releasing and counted the time until the first hit, which could potentially mark a normal hit as a throw, now everything works through the properties of the object itself, its position in space, and the hold of the R button (Grab and Throw works with it) (credits to Solus200 for testing)
New events: "ObjectLoaded", "CellAttach", and "CellDetach" - can be used for items respawning
New filters: several inverses - "FormIDsNot", "FormListsNot", "WeaponsNot", "ProjectilesNot", "AttacksNot". Completely new ones - "QuestItemStatus" - 0 for no, 1 for alias only, 2 for full-fledged quest item, works only with ACTIVE player quests (can't be done differenty) (credits to Solus200 for testing); "Locations", "LocationsNot" - take formIDs of formlists of cells, locations, and worldspaces or just cells', locations', and worldspaces' ones; "Weathers", "WeathersNot" - take formIDs of formlists of weathers or just weathers' ones; "perks", "perksNot" - take perks' formIDs, check whether the actor, who was the event source, has the perk
New effects: "EnableItem", "DisableItem" - can be used for respawning. "PlayIdle" - plays an animation on an actor who interacted with the object, it was implemented using the console version of SendAnimationEvent, so some idles may not work, looks like - "items": [{"string": "AnimationName", "duration": 0.5}], default duration is 1.0 (the less - the faster is the animation). "SpawnEffectShader", "SpawnEffectsShaderOnItem" - spawn effect shaders either on actors, or the object itself, take formIDs or formLists and duration fields, as well as the base ones, such as count or chance
Added "nonDeletable" field with default value 0 to "items" in all functions with "swap" prefix - can be used for respawning
Added "radius" field to "SpawnSpell", "ApplyIngestible", "ApplyOtherIngestible", and "SpawnEffectShader" (credits to Solus200 for testing)
Now you can copy formIDs form SSEEdit for ESL and ESPFE as well, the code will process FE prefix: "Mod.esp:FE000800"
Version 1.5.2
Fixed a potential bug that would cause the hit-caused effects to apply to every item when only keywords are set in the filter to define the object
New event: "telekinesis" (should work even on modded spells, if the magic effect archetype is "Telekinesis" or "Grab Actor" (just in case)
Version 1.5.1
Fixed all filters with the "weapons" prefix to surely work on both weapons and spells
Now during object processing, their references are explicitly memorized. This should fix possible bugs with impact and explosion positioning when an object is deleted or modified by a previous effect before it is spawned
Added exception handlers for chance, interactions, and limit, which now simply report JSON syntax violations instead of аn instant crash
Added a new type of index for formlists: -2 (credits to kwamagg for assistance and testing). Specifying it both in a filter formlist and in an effect's items formlist, the code will treat them as mirrored. They must have the same number of entries, otherwise there will be problems in your game. Example use case: you have two mirrored formlists, one has the meat, the other has the roasted equivalents of that meat in the same order. When you hit any meat from a formlist in the filter with a fire spell, the meat changes to it's roasted equivalent from items' formlist
The functionality of SwapItem and SwapLeveledItem effects has been slightly changed. Before dissapearance, they no longer spawn a new object in the middle of the previous one to avoid inconsistencies in positions, for example, with activators. They also now take into account the scale of the previous object to avoid inconsistencies when changing object states
Version 1.5
Fixed "PlaySound" effect - it's now bound to an object and won't be silenced when it moves
Full support for formlists. It is now possible to add "formLists" instead of/along with "formIDs" array to filters, from where values will be taken and processed. You can specify "index" in "formLists": [{"formID": "Skyrim.esm:0x123456", "index": 3}]. Also, formLists can be passed to items instead of "formIDs" in a similar way - if you specify an index, only this item will be passed to the effect, if you don't specify an index, the entire contents of the formlist will be processed and spawned/played/applied
New filters: "keywordsNot", "weaponsKeywordsNot" - keywords that should be ignored. "isPluginInstalled", "isDllInstalled" - plugins that must be present for the event to trigger. "isPluginNotInstalled", "isDllNotInstalled" - plugins that must not be present for the event to trigger
New effects: "SpawnLight" - spawns a specified light, "RemoveLight" - deletes lights within a certain radius, "DisableLight" - disables lights within a certain radius, "EnableLight" - enables the disabled lights within a certain radius. Note: the last three functions don't take "count" as an argument, they take "radius" - an integer, the default value is 100 units
Slightly extended the range of "ApplyIngestible" and "ApplyOtherIngestible" from 100 to 150 units
Version 1.4.7
Added a "limit" parameter to filter, allowing an event to trigger only a specified number of times
Interaction and limit counters are now saved directly into the Skyrim save file via SKSE serialization, ensuring correct restoration of counters after loading or reverting a save
Once again tweaked "SpawnSpell" and "SpawnLeveledSpell" effects - the radius is expanded to 350 units. Now if targets are not found, the spells aren't applied to the player by the default, they simply won't fire. Just thought it would be weird to have a mandatory target when, e.g., creating traps
Version 1.4.6
New effects: "ApplyIngestible" - applies the target object's effects on nearby actors, if it's an ingredient or ingestible. "ApplyOtherIngestible" - applies the effects of ingredients or ingestibles passed in "items" to nearby actors. The range is 100 units (pretty close)
Improved "SpawnSpell" and "SpawnLeveledSpell" effects - now they don't choose the player as a target by default, but the nearest npcs, if they are not found, the spells are applied to the player (this refers to those spells that must have a target). The range is 300 units (enough to make the bread shoot an icicle at multiple people in the room at once)
Version 1.4.5
Fixed a problem where swap/remove effects caused subsequent effects to be ignored for the processed object
Improved the spawn position for spawn/swap items, actors and spillinventory. Now the items appear exactly from the middle, as the bounds are being counted
New effects: "SpawnLeveledItem", "SwapLeveledItem", "SpawnLeveledSpell", "SpawnLeveledSpellOnItem", "SpawnLeveledActor", "SwapLeveledActor" - accept leveled lists and take into account player's level
Version 1.4.4
New events: "Grab", "Release", and "Throw". The last one works only with Grab and Throw by powerofthree
Version 1.4.3
Fixed item spawn logic to evaluate chance individually for each item
Fixed effect-level chance to roll inside the async task instead of main thread
Version 1.4.2
Fixed main involved objects handling in filters, now it is impossible not to select one of three - formID, formTypes, or keywords. This fixes the problem of inadequate behavior when configs are missing a specified esp, e.g. in patches
Added even more checks and verifications for objects presence during processing to prevent even the most impossible causes of crashes (it just works)
Version 1.4.1
Added more verifications to avoid possible CTDs
Version 1.4
Added explicit validation on passed form types to avoid potential affecting things other than supported types
Fixed interaction counters clearing after effect application to prevent unbounded memory growth and strange behavior
Fixed ownership, now new spawned items will adopt the owner from the original one
Now everything is non-case sensitive
New weapons types: "shout", "lesserpower", "power", "ability"
Version 1.3.1
Fixed old names in function logs to avoid confusion
Improved "SpawnActor" effect - now actors are spawned exactly to the point where the object is located
New effect: "SwapActor" - replaces the object with actors
Version 1.3
Fixed keywords filtering logic to properly handle cases where only target objects' keywords are specified
Now keywords can be written in the standard form ["Mod.esp:0x123456"] and as ["KeywordName"] (non-case sensivite)
Added ability to filter weapons by keywords using "weaponsKeywords" in the filter
Removed unnecessary spamming message about SpillInventory in logs
Version 1.2.1
Fixed multiple effects applying to one item
New effect: "SpillInventory" for containers
Version 1.2
Fixed recognition of spells and weapons in the left hand
New supported form types: "note", "door", "key"
New filter: "interactions" - determines how many interactions it will take for the event to fire
New weapons types: "total", "other"
New attack types: "charge", "rotating", "continuous"
New effect: "SpawnSpellOnItem" - instead of having the target object cast on you, you can cast on it
Removed SpawnMultipleItems and SwapWithMultipleItems functions, now all functions support multiple arguments by default (except for RemoveItem)
Removed redundant and unnecessary log info, only error information is left
The chance parameter has been moved from effects to filters, now JSON structure is more logical and tidy. Now every form passed into an effect supports it's own chance parameter
The effects structure has changed, I advise mod authors to check the documentation and examples again
Version 1.1
New effect: "PlaySound" - plays a provided sound descriptor
Object Impact Framework (OIF) is a SKSE plugin that lets you add custom effects to items when they are activated, grabbed, released, thrown,or hit. You can make things happen like spawning items, impact data sets, actors, casting spells, creating explosions, playing sounds, and swapping objects - all controlled with JSON files. Compatible with everything.
There is also a ready-made config for cutting cheeses and the bread, available right below the main file.
The more detailed documentation for mod authors with examples: GitHub.
Place your JSON files in:Data/SKSE/Plugins/ObjectImpactFramework/
Troubleshooting: If something doesn’t work, look at the mod's log file for error messages. The log can be found in Documents/My Games/Skyrim Special Edition/SKSE/ObjectImpactFramework.log
Mod Authors Info
Filter Note: An object must be defined by at least one of the four parameters - formIDs, editorIDs, formLists, formTypes, keywords - for the event to work.
FormIDs Note: If you are not using the standard 0x prefix and are copying from CK or SSEEdit, make sure you put 00 instead of the load order digits.
Identifiers Must Match: Make sure the formID or editorID fits the effect (e.g., a spell ID for "SpawnSpell", an item ID for "SpawnItem").
Priority Note: Place effects with "Remove" and "Swap" (unless used with "nonDeletable": 1)prefixes at the very end of the event, otherwise the removed object may not have time to call other effects on itself before gets deleted.
You can modify existing JSON files without quitting the game, just edit the file and reload the save.
Complete Quick Reference
Events
"Activate" - Activating / opening objects
"Hit" - Hits with weapons / spells
"Grab" - Grabbing items
"Release" - Releasing grabbed items
"Telekinesis" - Telekinesis spell
"Throw" - Throwing objects (requires Grab And Throw mod)
"CellAttach" - Object is attached to a cell
"CellDetach" - Object is detached from a cell
"WeatherChange" - Weather has changed
Allowed Object Types
"activator"
"talkingactivator"
"weapon"
"armor"
"ammo"
"ingredient"
"misc"
"key"
"book"
"note"
"scroll"
"soulgem"
"potion" (includes food/drinks)
"furniture"
"door"
"flora"
"container"
"static"
"moveablestatic"
"tree"
"light"
Filter Options
Object Identification (need at least one):
formIDs / formIDsNot - Specific object form IDs ("Skyrim.esm:0x123456")
editorIDs / editorIDsNot - Specific object editor IDs ("VendorItemClutter")
FormTypes - Object categories (see list above)
formLists / formListsNot - Formlist references with index support (-1 for all items, -2 for parallel relationship for mirrored formlists, 0+ for specific index)
Seb263 and for the inspiration Solus200 for ideas, assistance and testing (practically the second developer). If it weren't for you, the OIF's quality just wouldn't be the same! kwamagg and kuroishitam for ideas and testing doodlum & Quantumyilmaz - I learned how to write plugins by digging into their code