Jump to content

[LE] Question about SKSE's SetArmorRating


Recommended Posts

Specifically, which armor rating is it modifying? Is it the base armor rating of the item, or the adjusted armor rating after accounting for smithing improvements and player enchantments, skills and perks? Or something in between?

 

I was wanting to make a mod that would ignore the base armor value of all the armors in the game, but still care about smithing improvements etc., but I wasn't sure if simply using this function in an OnItemAdded event to set the armor ratings to zero would do that, or if I'd need to do something a bit more involved.

 

Also, is there an event (or whatever) that I could use to catch and modify any armor/shield item before the player sees its armor rating? Without individually modifying each of them in the CK that is. Perhaps a way to scan through any containers or barter menus when the player opens them? Or a way to intercept the information as it's about to be displayed to the player? Or maybe a hidden armor perk?

Link to comment
Share on other sites

I would suspect that it is the base armor value since GetArmorRating is pulling from the form while SetArmorRating is modifying the form. Any modifications done by perks and the like would be done on top of that. Only one way to really to know for sure and that would be to test it.

 

 

As for your last query, I do not know. Not all containers (especially those with CK defined items) can be polled for contents until the player actually interacts with them. You could possibly have one of the 'cloaking' quests which grabs nearby containers to put into aliases where you've got a script which will scan the contents when it is activated. But there is still the chance that the first item highlighted by default is an armor piece with the now incorrect value. I can't think of anything clean to achieve what you want.

Link to comment
Share on other sites

I would suspect that it is the base armor value since GetArmorRating is pulling from the form while SetArmorRating is modifying the form. Any modifications done by perks and the like would be done on top of that. Only one way to really to know for sure and that would be to test it.

 

 

As for your last query, I do not know. Not all containers (especially those with CK defined items) can be polled for contents until the player actually interacts with them. You could possibly have one of the 'cloaking' quests which grabs nearby containers to put into aliases where you've got a script which will scan the contents when it is activated. But there is still the chance that the first item highlighted by default is an armor piece with the now incorrect value. I can't think of anything clean to achieve what you want.

 

I suspected as much (and will be testing once I've done a bit more research into my options), but I was hoping someone already knew. Thanks :)

 

Would the cloaking method be a good idea in a dungeon or cluttered interior? Some of them, especially player homes, have a ton of containers. Would tagging them all be likely to result in a noticeable slowdown? I'd just test it, but my machine is quite weak and probably couldn't even run the more extreme mods.

 

Though, I'm not sure it matters since I can't seem to find a way to actually "see" what's in a container.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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