Access Armor Rating In Papyrus?

Post » Mon Jun 18, 2012 3:52 am

I'm trying to make a mod that makes the Fists of Steel perk apply to the full armor rating you get from gauntlets, rather than the base armor. Unfortunately, after lots of searching, I have found no way to directly access even the base values of a piece of armor let alone whatever they've been improved to (I know I can look them up but then this would behave exactly the same as the perk normally does). The wiki has no documentation that I can find on its armor script, http://www.creationkit.com/Armor_Script which makes this even more confusing.

Does anyone know how to access the variables of an item?
User avatar
Solène We
 
Posts: 3470
Joined: Tue Mar 27, 2007 7:04 am

Post » Mon Jun 18, 2012 1:36 am

I wish I could help you but to me it looks like we'll have to wait for SKSE to add these kinds of functions. I posted http://www.gamesas.com/topic/1344309-getting-the-weight-of-an-item yesterday, got no answer.

For comparison, in Oblivion they both got added by OBSE:
http://cs.elderscrolls.com/index.php/GetArmorAR
http://cs.elderscrolls.com/index.php/GetWeight

http://cs.elderscrolls.com/index.php/OBSE_Functions

Hopefully the SKSE team can implement the same functions for Skyrim.
User avatar
rae.x
 
Posts: 3326
Joined: Wed Jun 14, 2006 2:13 pm

Post » Mon Jun 18, 2012 6:45 am

There must be some way to access these variables... it just seems very odd to me that you can't easily check them at runtime :|
User avatar
Add Me
 
Posts: 3486
Joined: Thu Jul 05, 2007 8:21 am

Post » Mon Jun 18, 2012 2:22 am

I haven't figured out how to directly access it, but I think I found a way to make it work! Apparently, in the script, you can use GetItemHealthPercentage to determine its current level from smithing, then using this and the players skill level I can indirectly determine the armor rating :biggrin:

... nevermind, despite the wiki saying that this value reflects the quality of the item from smithing, it actually doesn't... unless there's some other way to access it
User avatar
jennie xhx
 
Posts: 3429
Joined: Wed Jun 21, 2006 10:28 am

Post » Sun Jun 17, 2012 9:02 pm

anyone have any ideas? GetItemHealthPercentage only seems to work half the time, and I can only get it to work with weapons and even then it's very buggy

edit: It only works correctly with some weapons >< Itll work fine with an elven sword i boosted to legendary, but wont for an iron dagger i made to flawless, just keeps reporting 0 like it was never tempered
User avatar
April
 
Posts: 3479
Joined: Tue Jun 20, 2006 1:33 am

Post » Sun Jun 17, 2012 5:55 pm

Is there really no way to do this? This seems very odd. One would think it was a rather common thing to want to do.
User avatar
m Gardner
 
Posts: 3510
Joined: Sun Jun 03, 2007 8:08 pm


Return to V - Skyrim