Spoofing GetArmorType

Post » Fri May 27, 2011 3:00 am

Does anyone know of a way to trick GetArmorType into returning a -1 (in the case I'm interested in for 0.0 weight armor, such as Bound armor pieces)?
User avatar
NAkeshIa BENNETT
 
Posts: 3519
Joined: Fri Jun 16, 2006 12:23 pm

Post » Fri May 27, 2011 2:00 am

You could test for GetArmorType and check for GetSpellEffect, "bound_whatever". If both were true for a particular piece of armour, then that means the player has a bound piece of that armour type, but isn't necessarily wearing it.
User avatar
Kat Lehmann
 
Posts: 3409
Joined: Tue Jun 27, 2006 6:24 am

Post » Fri May 27, 2011 8:23 am

Some background on why I asked: I'm trying to trick the Dodge Mod (Enhanced) 1.2-WD into thinking that zero-weight armor should qualify for the Sanctuary bonuses that plugin calculates.
User avatar
Invasion's
 
Posts: 3546
Joined: Fri Aug 18, 2006 6:09 pm

Post » Thu May 26, 2011 9:32 pm

I am not certain there is any way to do what is it you are attempting, but know that you have provided a context there may be a workaround. Modify the Dodge Mod script to check for spell effects associated with each piece of bound armor (this will catch custom bound spells). As the spell effect is detected have the script subtract the heavy armor penalty from the variable that stores the total armor liability. Then it should apply the appropriate sanctuary bonus as if the player is not encumbered with heavy armor.

I love the Dodge Mod, but I consider bound items (particularly bound weapons) to be one of the most unbalancing aspects to the game. Still your idea makes some sense (I am not certain I would dismiss the effect that the armor's bulk have on the player's ability to dodge an attack), and I would use such a mod if I ever soften my attitude toward bound items.
User avatar
Robert Garcia
 
Posts: 3323
Joined: Thu Oct 11, 2007 5:26 pm

Post » Fri May 27, 2011 4:34 am

I had thought of that, but wouldn't want to release such an altered plugin to the public without the blessing of the current plugin's deed holder(s), and yes, it should be completely optional for the reasons you stated. I'm interested in the zero weight angle because I'm also working on a plugin that turns the Shield of the Undaunted quest gift (not the copy in the regular lists) into a genuine (zero weight) artifact worthy of Mournhold's Museum of Artifacts. For that one, I'm trying to work out a modular approach to adding items to the Museum's quest list that minimizes potential for conflicts, but I'll likely expand on that on a different thread. That's pre-alpha at this point.

Hmmm, I just reread the readme for the plugin, and it says "Feel free to do with this mod, in whole or in part, whatever you see fit, provided that credit is given where credit is due" so it appears to be more unfettered than I thought.
User avatar
~Sylvia~
 
Posts: 3474
Joined: Thu Dec 28, 2006 5:19 am


Return to III - Morrowind