Actor.isSneaking(), but what about isDetected()?

Post » Sun May 26, 2013 11:47 pm

I'm trying to make a mod that allows the user to edit their character's sneak damage multiplier per weapon type through MCM. I'd give them an MCM Slider Option for each weapon type, so they could set 1x - 100x sneak damage. I plan on tying this to a perk in the place of Backstab.

I've gone through about four different implementations and I've hit a brick wall each time. My current attempt was to have the perk give the player an ability with the isSneaking conditional that ran an ActiveMagicEffect script. The script would check the type of weapon that the player had currently equipped and change the attackDamageMult Actor Value according to the MCM settings, because I couldn't find a way to use the sneak damage mult value outside of Perk Entries (which wouldn't work, because then I'd need to make a perk for every single combination, which is not feasible)

The problem I have now is that "is sneaking" really means "is crouched," because the function couldn't care less whether or not you're actually detected. This would mean that, after the initial sneak attack, the player would retain the damage multiplier as long as they remained crouching, which is obviously not what I intend. I've tried to add another conditional for GetDetection(), but that requires a target; I need to know if the player is detected by anything, not just a specific actor.

Does anyone have a fix for this implementation, or an idea for a better one?

User avatar
N Only WhiTe girl
 
Posts: 3353
Joined: Mon Oct 30, 2006 2:30 pm

Post » Sun May 26, 2013 12:20 pm

you can use issneaking and getdetected for stuff like magic related sneak mults, but its unnecessary for physical weapons.

http://skyrim.nexusmods.com/mods/33395
feel free to reverse engineer skytweak's perks.

i have both types of implementations there.
one with the sneak mult entry point and another with the issneaking and getdetected conditions.
User avatar
xemmybx
 
Posts: 3372
Joined: Thu Jun 22, 2006 2:01 pm

Post » Sun May 26, 2013 3:48 pm

I notice you're checking a GlobalValue in your Perks. Is that just a GlobalVariable you've created in one of your scripts? If I'm able to check a GlobalVariable in conditionals, then that changes everything.

I also notice you have different values for spells if the target is searching for the player versus if the player is undetected. Is this your own idea, or does this already happen for weapons so you need to simulate it yourself?

User avatar
Devin Sluis
 
Posts: 3389
Joined: Wed Oct 24, 2007 4:22 am


Return to V - Skyrim