Add a perk to all actors in the game.

Post » Tue Nov 05, 2013 8:28 am

Greetings!

I would like to add a perk to all applicable actors in the game, including the player. However , adding the perk manually to every actor seems too far fetched. Not to mention completely incompatible with any mods that add new NPCs or modifies vanilla ones.

Since the perk is combat related, I was considering using an OnHit event on the player to get attackers references, filtering out creatures and other invalid opponents. If the target meets the required criteria, I simply add the perk to it.

There are a few issues with this approach however.First it only works on actors attacking the player, not on actors attacking other actors, unless they attacked the player first. Second, I will be checking every single hit, if the reference is an actor, if it has the perk, etc, which seems to me a little computationally expensive.

What would be the best way to approach this? Is there a simpler way, what do you guys think?

Thank you.

User avatar
Dominic Vaughan
 
Posts: 3531
Joined: Mon May 14, 2007 1:47 pm

Return to V - Skyrim