Apply script on NPCs as they're loaded?

Post » Thu Dec 27, 2012 9:20 pm

I want to create a system where everytime an NPC (animals, dragons are not counted) is loaded, its inventory is scanned and then every supported item gets switched out with duplicates.

Now, the problem:
  • How do I go about this? I remember in Oblivion I create a huge AoE spell with OnTarget script effect, this spell is cast every few seconds. Is there an equivalent in Skyrim?
  • The above method taxes CPU, and I haven't talked about the script that will run itself. Is there any event to detect when an NPC is loaded without attaching a script to said NPC? I want to captured dynamically generated actors as well (like the Thalmor agents)
  • Is there any way to determine if an object is being worn? Especially if there are 2 of them in the inventory? Like, say, a bandit has two iron shields but only wear one. Best if it's native (doesn't require SKSE but I don't mind)
User avatar
Kat Ives
 
Posts: 3408
Joined: Tue Aug 28, 2007 2:11 pm

Return to V - Skyrim