Help needed: Perk Conditions run on tab index 2

Post » Sat Dec 01, 2012 6:29 pm

This is in reference to my perks mod: http://skyrim.nexusmods.com/mods/26651/

Specifically I changed the Critical Shot perks to try and make them "scale" as I feel they should (rather than use only the base crit damage of a bow without taking into account skill, other perks, or temper of the weapon). To do this, I based my work off of another "Dragonslayer" perk mod.

What was done in the example I'm drawing from:

Perk effect: Mod Attack Damage / Multiple Value- Condition run on tab index 0: less than #n for a GetRandomPercent run on Subject- Condition run on tab index 1: equal to HasKeyword WeapTypeBow run on Subject- Condition run on tab index 2: equal to HasKeyword ActorTypeDragon run on Subject

Now what I tried to do to make a more generic (yet scaling to include skill and weapon temper) Critical Shot perk...

Perk effect: Mod Attack Damage / Multiply Value- Condition run on tab index 0: less than #n for a GetRandomPercent run on Subject- Condition run on tab index 1: equal to HasKeyword WeapTypeBow run on Subject

...but I don't have anything run on tab index 2, as I want this to apply to all targets. The problem now is that this introduces possible CTD's when looting or dropping arrows/bows -- what I suspect is happening is that the game is trying to display damage in the UI, ends up triggering this logic including the GetRandomPercent (which results in inconsistent CTD based on that outcome).

My thinking based on all of this is that I need to include SOMETHING to make this logic only be triggered at attack/damage time. The question is, what can I include? The sledgehammer approach would seem to be to run a series of "equal to / or" conditions on tab index 2 with HasKeyword against every different actortype keyword I can find... but I'd prefer something more elegant, if I can find it.

So what can I do (presumably with a condition on tab index 2, but I'm open to other possibilities) to assure that the ModAttackDamage is only being applied when shooting a target, rather than constantly trying to update the UI during non-combat?
User avatar
Riky Carrasco
 
Posts: 3429
Joined: Tue Nov 06, 2007 12:17 am

Return to V - Skyrim