Jump to content

Negating armour rating of worn item


KaptenN

Recommended Posts

I need the help of one of you script wizards out there for this.

 

What I want to do is find out the armour rating of a worn item, the helmet to be specific, via script. That includes all armour bonuses that may apply to it. The value should then be subtracted from the player's total armour rating.

 

In short: I want the player's armour rating to be what it would be if the helmet wasn't equipped, even though it is actually still equipped.

 

EDIT: It doesn't matter if SKSE is required for this. I'm probably going to need SKSE anyway.

 

EDIT 2: If you're curious about what this is for, I'm trying to help myself a little on this request: http://forums.nexusmods.com/index.php?/topic/1032121-helmet-removalhood-lowering-animation/

There's still a lot of help needed even if I get help with this script. Especially with meshes, skeletons and animations which I know next to nothing about.

 

EDIT 3: I found that I could use SKSE to set the helmet's armour rating to '0'. However, all the bonuses seems to still apply for some reason.

A helmet with a base armour rating of 18, but with tempering, heavy armour skill 100, Juggernaugt 5/5 perk and Well Fitted perk has an in-game armour rating of 205 (equiped, 164 unequiped), setting the armour rating to '0' via script makes the helmet have an in-game armour rating of 133 (note that it is still considered equipped). I don't get it. 205-133=72 and 72 is 4 times the base armour rating of the helmet (18). When getting the armour rating with SKSE script you get the base value, so only the base value of the helmet is affected.

 

EDIT4: I've found that there is a GetItemHealthPercentage() function in SKSE that will tell you the tempered level of an ObjectReference. Problem now is that the helmet is an Armor object in the script and not an ObjectReference object. Only Armor objects have the functions necessary to alter the armour rating, which by the way I just found out alters the armour rating of all other helmets of the same type. I only want to alter the armour rating of the equipped instance of the helmet.

 

EDIT5: I have a script with this event:

Event OnObjectEquipped(Form baseObj, ObjectReference objRef)

The event later calls a function in another script with objRef as parameter:

Function CheckHelmet(ObjectReference objRef)

But when I try to compile the script I get this error four times:

"argument objref is not specified and has no default value"

I don't know what I'm doing wrong.

 

EDIT6: Never mind. I placed a debug notification in the event and got the item health percent written out. It showed "0.000000" despite that it was supposed to be higher than 1 since the helmet was heavily tempered. So there has to be another way to get the ObjectReference of an equiped object.

Edited by KaptenN
Link to comment
Share on other sites

  • 3 months later...

It has been quite a while now, so I hope that no one minds that I bump this.

 

I'll also add a clarification of what I want to do:

http://img42.imageshack.us/img42/5382/z08m.jpg

I want to get the value that is circled in red in the image above. I intend to subtract if from the player's total Armour Rating.

Link to comment
Share on other sites

  • 4 weeks later...

I believe you better try this with a perk similar with Juggernaut / Agile Defender, and set the value to 0. The only difference is that the armor for the helmet will also be displayed at 0 in the "circled in red"...but won't that be even better?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...