How would I turn off ALL the chance based "critical hits

Post » Wed Jun 20, 2012 5:30 pm

I would like to call my own critical hits via scripts, (rather than it be based on chance).

What do I need to do in the CK to turn off the existing critical hit system?
User avatar
Kim Kay
 
Posts: 3427
Joined: Fri Oct 13, 2006 10:45 am

Post » Wed Jun 20, 2012 12:13 pm

There's an actor value for 'CritChance'. You could try messing with that. You could also make a perk to modify critical chance.
User avatar
Scott
 
Posts: 3385
Joined: Fri Nov 30, 2007 2:59 am

Post » Wed Jun 20, 2012 1:07 pm

Yes that would be it you would think, (I have done that already) but there seems to be more to it then just that as I still get critical hits sometimes.

There are weapon stats, perks, and spells that all add to this. I had hoped there was a master game setting for this but I found none that worked to turn it off completely.

I only set the crit chance attribute once, maybe I just need to check the attribute periodicity and reset it as an on going process.


There's an actor value for 'CritChance'. You could try messing with that. You could also make a perk to modify critical chance.
User avatar
+++CAZZY
 
Posts: 3403
Joined: Wed Sep 13, 2006 1:04 pm

Post » Wed Jun 20, 2012 3:42 pm

Yes, I think there was at least one perk (maybe more) which were bugged, they SET the crit value to something instead of MODIFYING it. And seeing how perks seem to get reevaluated quite often, I guess that such perks keep resetting the value to a certain chance.
User avatar
Roanne Bardsley
 
Posts: 3414
Joined: Wed Nov 08, 2006 9:57 am

Post » Thu Jun 21, 2012 12:29 am

Now I just need to find some way to get the armor rating of each body part (head, body and legs). Until SKSE saves the day I think keywords are the ONLY way to get close to this.

I would need to build a series of IF AND THENs so IF keyword LeatherArmor I assume it is about XX armor rating.... wow that is so pitiful, wish the scripting language had a GetArmorRate type command right now.
User avatar
Nomee
 
Posts: 3382
Joined: Thu May 24, 2007 5:18 pm

Post » Wed Jun 20, 2012 6:20 pm

Now I just need to find some way to get the armor rating of each body part (head, body and legs). Until SKSE saves the day I think keywords are the ONLY way to get close to this.

I would need to build a series of IF AND THENs so IF keyword LeatherArmor I assume it is about XX armor rating.... wow that is so pitiful, wish the scripting language had a GetArmorRate type command right now.

Personally I wouldn't even bother doing that. If you have to reevaluate that regularly for every actor you're going to run into sooo much script lag it won't even be funny :P
User avatar
Siobhan Wallis-McRobert
 
Posts: 3449
Joined: Fri Dec 08, 2006 4:09 pm

Post » Wed Jun 20, 2012 11:36 am

:no: it has to be done, I will find some way....

Maybe even just light and heavy would work for now....MEH :unsure2: there must be some way.

Personally I wouldn't even bother doing that. If you have to reevaluate that regularly for every actor you're going to run into sooo much script lag it won't even be funny :tongue:
User avatar
asako
 
Posts: 3296
Joined: Wed Oct 04, 2006 7:16 am

Post » Wed Jun 20, 2012 9:25 pm

I'm sure you've thought of this, but just in case here's my thoughts:

When items are unequipped, you can get their baseformid...
Event OnObjectUnEquipped(Form akBaseObject, ObjectReference akReference)

So you could get all your actors to unequipall() then store all the data in variables using keywords to filter them into the right variable ... and then get them to re-equip each item.
So each actor would have variables for all the BaseFormIDs of each item they have equipped.
Now the tricky bit ... you'd have to
GetActorValue('DamageResist')
before and after each equip - then you know how much the current item has added.

I disagree that would need to be done often, only at OnCombatStateChanged.
This may still be a bit heavy on the CPU however so may not scale well across many actors.
User avatar
Lexy Corpsey
 
Posts: 3448
Joined: Tue Jun 27, 2006 12:39 am

Post » Wed Jun 20, 2012 5:58 pm

You had some good suggestions, it made me think of a KILLER way to get this all done with a sacrificial NPC in a hidden cell and ...well it was killer until I realized I would still need ONE command that is not available : GetEquippedArmor()

They have getEquippedShield, and Weapon why not armor?

Anyway, I did come up this this instead:


Event OnEffectStart(Actor akTarget, Actor akCaster)Me = akTargetif me != game.getplayer()   Me.UnequipAll()OldARlog = ME.GetActorValue("DamageResist")endifEndEventEvent OnObjectUnEquipped(Form akBaseObject, ObjectReference akReference)	OldARlog = ME.GetActorValue("DamageResist")endeventEvent OnObjectEquipped(Form akBaseObject, ObjectReference akReference)IF akBaseObject.HasKeyword(ArmorHelmet)HelmetAR = ME.GetActorValue("DamageResist") - OldARLogOldARlog = ME.GetActorValue("DamageResist")  elseif akBaseObject.HasKeyword(ArmorCuirass)   CuirassAR = ME.GetActorValue("DamageResist") - OldARLog   OldARlog = ME.GetActorValue("DamageResist")	 elseif akBaseObject.HasKeyword(ArmorBoots)	BootsAR = ME.GetActorValue("DamageResist") - OldARLog  OldARlog = ME.GetActorValue("DamageResist")elseOldARlog = ME.GetActorValue("DamageResist")endif


This will not work if the player uses the instant gear change in the game but anyone using that in the game is not likely to want to use a realism mod anyway.
If I could I would have that feature turned off in my mod.


You guys have anything you can add to what I did so far?


I am too tired to think anymore (I only had 6 hours of sleep in 2 days...) See you all latter, bed time for this moder whether I like it or not.



I'm sure you've thought of this, but just in case here's my thoughts:

When items are unequipped, you can get their baseformid...
Event OnObjectUnEquipped(Form akBaseObject, ObjectReference akReference)

So you could get all your actors to unequipall() then store all the data in variables using keywords to filter them into the right variable ... and then get them to re-equip each item.
So each actor would have variables for all the BaseFormIDs of each item they have equipped.
Now the tricky bit ... you'd have to
GetActorValue('DamageResist')
before and after each equip - then you know how much the current item has added.

I disagree that would need to be done often, only at OnCombatStateChanged.
This may still be a bit heavy on the CPU however so may not scale well across many actors.
User avatar
Hayley O'Gara
 
Posts: 3465
Joined: Wed Nov 22, 2006 2:53 am

Post » Wed Jun 20, 2012 10:26 am

Okay, keep in mind I have no idea what the SKSE is capable of (I'm not really entirely sure what it is to be honest) but if it is capable of iterating through items in an esm, you could have IT retrieve the values of all the armor pieces, and then have it create and assign keywords for every number ( ie Armor17Key). Then you only have to do HasKeyword checks.
User avatar
jasminε
 
Posts: 3511
Joined: Mon Jan 29, 2007 4:12 am

Post » Wed Jun 20, 2012 11:13 pm

well it turns out that DamageResist is NOT increased by armor.

So all that work on my script for finding the armor AR was just a "learning experience".

ah Well... not the first time that has happen.
User avatar
Kanaoka
 
Posts: 3416
Joined: Fri Jun 16, 2006 2:24 pm

Post » Wed Jun 20, 2012 10:32 am

well it turns out that DamageResist is NOT increased by armor.

So all that work on my script for finding the armor AR was just a "learning experience".

ah Well... not the first time that has happen.

No, DamageResist is definitely increased by armor, look:
http://imgur.com/a/jKDqO#0
You must be doing something wrong.


I'm also wondering, if you have it working, how are you changing incoming/outgoing damage with a script at the time of the hit?
User avatar
ezra
 
Posts: 3510
Joined: Sun Aug 12, 2007 6:40 pm

Post » Wed Jun 20, 2012 11:30 am

Turns out it is not working. Because of the :swear: skyrim script lag I cannot do it as I did in Oblivion.

So now I turn the vanilla damage WAY down with the game settings and instead use my own damage script (add my script damage to the vanilla damage).




I'm also wondering, if you have it working, how are you changing incoming/outgoing damage with a script at the time of the hit?
User avatar
lisa nuttall
 
Posts: 3277
Joined: Tue Jun 20, 2006 1:33 pm


Return to V - Skyrim