Getting An Actors Armor Rating

Post » Wed Aug 26, 2009 12:10 pm

Has anyone tried to get the Armor rating of an NPC? OBSE doesn't have a function that can get it that I can find, although FO3 has a vanilla AV function that returns it. There are so many variables involved and in some cases if a piece of armor the NPC is wearing isn't supported by the OBSE function GetEquippedObject (like the Daedric Helm and Elven Helm which use hair and head slots) then getting the current health is not possible, which would throw off the calculation.

I'm just curious as someone asked me about it, and before I start writing a script in vein I was wondering if anyone else had tried it yet.
User avatar
Jason Wolf
 
Posts: 3390
Joined: Sun Jun 17, 2007 7:30 am

Post » Tue Aug 25, 2009 9:25 pm

Has anyone tried to get the Armor rating of an NPC? OBSE doesn't have a function that can get it that I can find, although FO3 has a vanilla AV function that returns it. There are so many variables involved and in some cases if a piece of armor the NPC is wearing isn't supported by the OBSE function GetEquippedObject (like the Daedric Helm and Elven Helm which use hair and head slots) then getting the current health is not possible, which would throw off the calculation.

I'm just curious as someone asked me about it, and before I start writing a script in vein I was wondering if anyone else had tried it yet.

Tried Getav defendbonus
http://cs.elderscrolls.com/constwiki/index.php/DefendBonus
or
http://cs.elderscrolls.com/constwiki/index.php/GetArmorRating

It won't get the rating of individual pieces, and might be adjusted by the skill of the actor, but it's about as close as you're going to get short of detecting each piece of armor individually and doing all the math.
User avatar
Katey Meyer
 
Posts: 3464
Joined: Sat Dec 30, 2006 10:14 pm

Post » Wed Aug 26, 2009 5:33 am

Tried Getav defendbonus
http://cs.elderscrolls.com/constwiki/index.php/DefendBonus
or
http://cs.elderscrolls.com/constwiki/index.php/GetArmorRating

It won't get the rating of individual pieces, and might be adjusted by the skill of the actor, but it's about as close as you're going to get short of detecting each piece of armor individually and doing all the math.


Nice, thanks. Didn't even think to look at non OBSE functions for some reason.
User avatar
J.P loves
 
Posts: 3487
Joined: Thu Jun 21, 2007 9:03 am


Return to IV - Oblivion