Adding Gauntlet's Armor Rating to UnarmedDamage (SKSE)

Post » Thu Jun 21, 2012 11:14 am

So I wrote this script, but it doesn't seem to be doing anything. It is attached to the player and I am using a test daedric gauntlets with base armor of 100.

Scriptname Gauntlets2Unarmed extends Actorevent OnObjectEquipped(Form akBaseObject, ObjectReference akReference)if (akBaseObject as Armor).GetSlotMask()==8Armor HandArmor = Game.GetPlayer().GetWornForm(0x00000008) as Armor  self.ModAV("UnarmedDamage", (HandArmor.GetArmorRating())*0.50)endifendEventevent OnObjectUnEquipped(Form akBaseObject, ObjectReference akReference)if (akBaseObject as Armor).GetSlotMask()==8Armor HandArmor = Game.GetPlayer().GetWornForm(0x00000008) as Armor  self.ModAV("UnarmedDamage", (HandArmor.GetArmorRating())*-0.50)endifendEvent

Anyone know what's going on? Maybe get worn form should be 18 because it covers the forearms?
User avatar
Minako
 
Posts: 3379
Joined: Sun Mar 18, 2007 9:50 pm

Post » Thu Jun 21, 2012 5:22 pm

I get an error in my message log about GetArmorRating being an "unbound native function" whatever that means.
User avatar
Juanita Hernandez
 
Posts: 3269
Joined: Sat Jan 06, 2007 10:36 am

Post » Thu Jun 21, 2012 3:29 pm

The error you mention makes it sound like the cast from Form->Armor wasn't solid. Total WAG though since I haven't used SKSE yet. Is there another path you can take to look at what's equipped?

Or maybe in the CK... what does the Fists of Steel perk do?
User avatar
Sasha Brown
 
Posts: 3426
Joined: Sat Jan 20, 2007 4:46 pm

Post » Thu Jun 21, 2012 4:36 am

I had the script fine, and Fists of Steel is idiotically set up unfortunately. The problem was that I wasn't launching my Skyrim from the SKSE loader.
User avatar
Anthony Diaz
 
Posts: 3474
Joined: Thu Aug 09, 2007 11:24 pm

Post » Thu Jun 21, 2012 3:54 am

I use this now:


if SKSE.GetVersionRelease() < 22.0
debug.messagebox("Skyrim Script Extender Ver 22.0 or later is required to use this REV of Duke Patrick's Heavy Weapons Combat. Please remove this mod or update your SKSE.")


This has shown me several times that pressing my launch button on my desk top does not ALWAYS launch the SKSE loader...

I have a concern about how you are adding to the UnarmedDamage value. My understanding was that this value is used in the melee weapons damage formula as well as the weapons base damage. Not sure about that as the availableinformation I have read is not clear but If that is true you may want to add a check to be sure the actor is not fighting with a weapon.


I had the script fine, and Fists of Steel is idiotically set up unfortunately. The problem was that I wasn't launching my Skyrim from the SKSE loader.
User avatar
LADONA
 
Posts: 3290
Joined: Wed Aug 15, 2007 3:52 am


Return to V - Skyrim