No .GetArmorRating() for Papyrus? ! ?

Post » Wed Jun 20, 2012 3:19 am

So there's [ActorID.]GetArmorRating for the console commands. I can't find anything like it in Papyrus. Does anyone know how to get this value. I am willing to add up all the armor myself, but I haven't seen a function to get the ArmorRating from and ObjectReference either.

Any help would be appreciated. Thanks!
User avatar
WYatt REed
 
Posts: 3409
Joined: Mon Jun 18, 2007 3:06 pm

Post » Wed Jun 20, 2012 6:12 am

There's no way to get the armor rating of the armor pieces. You can get total armor rating by using '[Actor].GetAV("DamageResist")'.
User avatar
Emma Pennington
 
Posts: 3346
Joined: Tue Oct 17, 2006 8:41 am

Post » Wed Jun 20, 2012 2:21 pm

If you wish, I can add this feature to my Inventory and weight ESM utility: http://www.gamesas.com/topic/1359925-players-inventory-listing-weight-etc-esm-utility/
User avatar
Soph
 
Posts: 3499
Joined: Fri Oct 13, 2006 8:24 am

Post » Wed Jun 20, 2012 3:46 pm

There's no way to get the armor rating of the armor pieces. You can get total armor rating by using '[Actor].GetAV("DamageResist")'.

Thank you. Though, I have tried this previously, and the result is always 0. Have you been able to use that ActorValue on an NPC?
User avatar
Nicholas C
 
Posts: 3489
Joined: Tue Aug 07, 2007 8:20 am

Post » Wed Jun 20, 2012 4:54 am

It will be in SKSE. It has been listed as the current functions.
User avatar
CHARLODDE
 
Posts: 3408
Joined: Mon Apr 23, 2007 5:33 pm

Post » Wed Jun 20, 2012 1:49 pm

Thank you. Though, I have tried this previously, and the result is always 0. Have you been able to use that ActorValue on an NPC?

Yes, just tested it.
User avatar
stacy hamilton
 
Posts: 3354
Joined: Fri Aug 25, 2006 10:03 am

Post » Wed Jun 20, 2012 5:46 am

ok. I musta screwed up something. I'll try again. thanks.
User avatar
Christie Mitchell
 
Posts: 3389
Joined: Mon Nov 27, 2006 10:44 pm

Post » Wed Jun 20, 2012 2:23 am

If you wish, I can add this feature to my Inventory and weight ESM utility: http://www.gamesas.com/topic/1359925-players-inventory-listing-weight-etc-esm-utility/

If you could add some way to get the armor rating of an armor object including smithing improvements I would be very grateful. It has become a problem for me.
User avatar
Nadia Nad
 
Posts: 3391
Joined: Thu Aug 31, 2006 3:17 pm

Post » Wed Jun 20, 2012 5:11 am

SKSE has papyrus functions now, and one of them is GetArmorRating(). However, I am not sure if it includes smithing improvements as I haven't used it yet.
User avatar
sexy zara
 
Posts: 3268
Joined: Wed Nov 01, 2006 7:53 am

Post » Wed Jun 20, 2012 7:02 am

I see, but doesn't that mean you can't use the skyrim workshop to distribute your mod?
User avatar
Hayley Bristow
 
Posts: 3467
Joined: Tue Oct 31, 2006 12:24 am

Post » Wed Jun 20, 2012 4:21 pm

Sorry, I don't use steam workshop. I don't see why not though.
User avatar
Chloe Yarnall
 
Posts: 3461
Joined: Sun Oct 08, 2006 3:26 am

Post » Wed Jun 20, 2012 4:43 am

Though SKSE used its own exe for example
User avatar
Chris Cross Cabaret Man
 
Posts: 3301
Joined: Tue Jun 19, 2007 11:33 pm

Post » Wed Jun 20, 2012 9:35 am

Yeah... but no one's telling you to upload SKSE onto Steam Workshop. Even if that was possible, I don't think the SKSE team would let you do that.

All you have to do is say that SKSE is required in your mod description and provide a link to the SKSE website.
User avatar
Lance Vannortwick
 
Posts: 3479
Joined: Thu Sep 27, 2007 5:30 pm

Post » Wed Jun 20, 2012 5:59 am

SKSE has papyrus functions now, and one of them is GetArmorRating(). However, I am not sure if it includes smithing improvements as I haven't used it yet.
You can get smithing improvements value by using GetHealth. a base item is at 100% health, improved has more than that
The problem is you can't set the improvement value

This is without SKSE by the way
User avatar
Toby Green
 
Posts: 3365
Joined: Sun May 27, 2007 5:27 pm

Post » Wed Jun 20, 2012 4:04 pm

Sweet, this will be very useful. Thank you
User avatar
Shannon Marie Jones
 
Posts: 3391
Joined: Sun Nov 12, 2006 3:19 pm

Post » Wed Jun 20, 2012 2:55 am

You can get smithing improvements value by using GetHealth. a base item is at 100% health, improved has more than that
The problem is you can't set the improvement value

This is without SKSE by the way

Um where can I find the getHealth function?

As far as I can find it doesn't belong to either the armor or form type
User avatar
Darlene Delk
 
Posts: 3413
Joined: Mon Aug 27, 2007 3:48 am

Post » Wed Jun 20, 2012 9:06 am

Um where can I find the getHealth function?

As far as I can find it doesn't belong to either the armor or form type
It's http://www.creationkit.com/GetItemHealthPercent_-_ObjectReference, belonging to ObjectReference type. Sorry, I kinda forgot the name, but you get the general idea

However, I don't know how many percent tempering an item will yield. It doesn't really matter for now, though, as there is no SetItemHealthPercent. At least it's not exposed
User avatar
Chris Cross Cabaret Man
 
Posts: 3301
Joined: Tue Jun 19, 2007 11:33 pm

Post » Wed Jun 20, 2012 12:53 pm

Thanks for your help, this is quite likely to end in a very good solution. However I still have an issue using it.

Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference)debug.messagebox("akReference equipped:"+akReference)debug.messagebox("health percentage on equipped:"+akReference.GetItemHealthPercent())endEvent

This is my testcode, when I equip a pair of improved gauntlets however I get that ObjectReference akReference is none. Giving GetItemHealthPercent as 0.

Is there a way around that hurdle that you know of?
User avatar
kasia
 
Posts: 3427
Joined: Sun Jun 18, 2006 10:46 pm

Post » Wed Jun 20, 2012 1:38 am

I've never personally tested the function, so I don't know. Does the first Debug.MessageBox show the correct reference? The wiki says this about akReference:

akReference: The reference that the actor just equipped - if the reference is persistent. Otherwise, None
User avatar
Sophh
 
Posts: 3381
Joined: Tue Aug 08, 2006 11:58 pm

Post » Wed Jun 20, 2012 7:02 am

No it shows "none". So the reference is probably not persistent.

Is there some way to make it persistent before the event triggers?

Or would I have to make a script that references all gloves in the inventory to make them persistent (unsure if that works but it is a dirty fix to)
User avatar
electro_fantics
 
Posts: 3448
Joined: Fri Mar 30, 2007 11:50 pm

Post » Wed Jun 20, 2012 11:45 am

The wiki has this to say about http://www.creationkit.com/Persistence_(Papyrus). You may want to have a look at it.

I personally don't have that much experience with objects myself. Usually I deal with objects explicitly made in CK, so the reference is always known.
User avatar
adame
 
Posts: 3454
Joined: Wed Aug 29, 2007 2:57 am

Post » Wed Jun 20, 2012 6:41 am

Thanks for the help. Now I have a new way to approach the problem
User avatar
Lily Evans
 
Posts: 3401
Joined: Thu Aug 31, 2006 11:10 am


Return to V - Skyrim