[RELZ] Stackable armor

A place to download and discuss my mods. No adult content please.

[RELZ] Stackable armor

Postby Jac » Thu Aug 23, 2012 6:12 pm

Just a simple mod that allows Imperial and Ordinator armor to be stacked.

*********************************
The Elder Scrolls III
MORROWIND: Armor stacking

*********************************

Index:
1. Summary
2. Features
3. Requirements
4. Installation
5. Using the mod
6. Known Issues
7. Use in other mods
8. Unistallation
9. Credits
10. Contact info
11. Version history

=======================================
1. SUMMARY
=======================================
This is a simple mod that removes the scripts from the Legion cuirass and Ordinator (and Her Hands expect for the ones worn by named NPCs) helmet and cuirass so that these armor pieces can be stacked.

=======================================
2. FEATURES
=======================================
Allows stacking of certain armor pieces while still keeping track of if those pieces are worn. NPCs will still respond based on whether or not you're wearing the stacking armor.

=======================================
3. REQUIREMENTS
=======================================
Morrowind and Tribunal due to a script command and the inclusion of Her Hand armor.

=======================================
4. INSTALLATION
=======================================
Extract the file jac_noarmorstacking.esp into your main Data Files folder and select it via the launcher, Wrye Mash, or other mod manager.

You can read more information on how to install mods here: http://forums.bethsoft.com/index.php?/t ... -mods-faq/

=======================================
5. Using the mod
=======================================
Nothing special needed, just be careful wearing Ordinator armor when talking to Ordinators or Her Hands because they will attack as usual.

=======================================
6. KNOWN ISSUES
=======================================
This mod will conflict with any other mod that makes changes to Imperial or Ordinator armor if done via the CS. Pluginless mesh/texture replacers will be unaffected. Note that enchanting an armor piece will change its id and prevent it from being stackable.

=======================================
7. USE IN OTHER MODS
=======================================
No permissions needed to use in another mod.

=======================================
8. UNINSTALLATION
=======================================
Uncheck jac_noarmorstacking.esp and click past any errors.

=======================================
9. CREDITS & THANKS
=======================================
Elaura for the idea and testing.
Bethesda for making the game.

=======================================
10. CONTACT
=======================================
You may contact me either via email at jac@fliggerty.com or via GHF, Wolfore, or the official forums under the username "Jac". If you email me, please put "Armor stacking" somewhere in the message title or I may delete it as spam.

=======================================
11. VERSION HISTORY
=======================================

1.0
Initial release.


Stackable armor.7z
(2.35 KiB) Downloaded 134 times
Last edited by Jac on Thu Aug 23, 2012 11:58 pm, edited 1 time in total.
Reason: Add topic title.
User avatar
Jac
The Boss
 
Posts: 5985
Joined: Sat Feb 12, 2011 8:36 pm
Location: Somewhere on the left side of insanity, the right side was taken.
Title: Elder Wolf

Re: [RELZ] Stackable armor

Postby Erol Flow » Sun Aug 25, 2013 8:43 am

I have noticed two problems with the script:

Code: Select all
Begin Jac_CheckArmor

if ( MenuMode == 1 )
   return
endif

if ( WearingLegionUni == 0 )
   if ( Player->HasItemEquipped "imperial cuirass_armor" == 1 )
      set WearingLegionUni to 1
   elseif ( Player->HasItemEquipped "imperial_chain_cuirass" == 1 )
      set WearingLegionUni to 1
   elseif ( Player->HasItemEquipped "silver_dukesguard_cuirass" == 1 )
      set WearingLegionUni to 1
   elseif ( Player->HasItemEquipped "templar_cuirass" == 1 )
      set WearingLegionUni to 1
   endif
elseif( WearingLegionUni == 1 )
   if ( Player->HasItemEquipped "imperial cuirass_armor" == 0 )
      set WearingLegionUni to 0
   elseif ( Player->HasItemEquipped "imperial_chain_cuirass" == 0 )
      set WearingLegionUni to 0
   elseif ( Player->HasItemEquipped "silver_dukesguard_cuirass" == 1 )
      set WearingLegionUni to 0
   elseif ( Player->HasItemEquipped "templar_cuirass" == 1 )
      set WearingLegionUni to 0
   endif
endif

if ( WearingOrdinatorUni == 0 )
   if ( Player->HasItemEquipped "indoril cuirass" == 1 )
      Set WearingOrdinatorUni to 1
   elseif ( Player->HasItemEquipped "indoril helmet" == 1 )
      Set WearingOrdinatorUni to 1
   elseif ( Player->HasItemEquipped "Indoril_MH_Guard_Cuirass" == 1 )
      Set WearingOrdinatorUni to 1
   elseif ( Player->HasItemEquipped "Indoril_MH_Guard_helmet" == 1 )
      Set WearingOrdinatorUni to 1
   endif
elseif ( WearingOrdinatorUni == 1 )
   if ( Player->HasItemEquipped "indoril cuirass" == 0 )
      Set WearingOrdinatorUni to 0
   elseif ( Player->HasItemEquipped "indoril helmet" == 0 )
      Set WearingOrdinatorUni to 0
   elseif ( Player->HasItemEquipped "Indoril_MH_Guard_Cuirass" == 0 )
      Set WearingOrdinatorUni to 0
   elseif ( Player->HasItemEquipped "Indoril_MH_Guard_helmet" == 0 )
      Set WearingOrdinatorUni to 0
   endif
endif

End


Problem the first: the test for unequipped Duke's Guard and Templar checks if the cuirasses are equipped. Oops.

Problem the second: the test for unequipped goes on an elseif cascade, and sets the variable to be unequipped if at least any one of the various armor pieces is not equipped. Since you cannot wear two different cuirasses at once, it's always going to be true.

So, how could it be fixed? Personally, I changed the script in this way (my personal changes also include adding imperial dragonscale and imperial studded leather as valid IL uniform, and the Necrom Indoril stuff from TR as valid ordinator armor, which you can of course disregard):
Code: Select all
Begin Jac_CheckArmor

if ( MenuMode == 1 )
   return
endif

if ( WearingLegionUni == 0 )
   if ( Player->HasItemEquipped "imperial cuirass_armor" == 1 )
      set WearingLegionUni to 1
   elseif ( Player->HasItemEquipped "imperial_chain_cuirass" == 1 )
      set WearingLegionUni to 1
   elseif ( Player->HasItemEquipped "silver_dukesguard_cuirass" == 1 )
      set WearingLegionUni to 1
   elseif ( Player->HasItemEquipped "templar_cuirass" == 1 )
      set WearingLegionUni to 1
   elseif ( Player->HasItemEquipped "lords_cuirass_unique" == 1 )
      set WearingLegionUni to 1
   elseif ( Player->HasItemEquipped "dragonscale_cuirass" == 1 )
      set WearingLegionUni to 1
   elseif ( Player->HasItemEquipped "imperial_studded_cuirass" == 1 )
      set WearingLegionUni to 1
   endif
elseif( WearingLegionUni == 1 )
   if ( Player->HasItemEquipped "imperial cuirass_armor" == 0 )
   if ( Player->HasItemEquipped "imperial_chain_cuirass" == 0 )
   if ( Player->HasItemEquipped "silver_dukesguard_cuirass" == 0 )
   if ( Player->HasItemEquipped "templar_cuirass" == 0 )
   if ( Player->HasItemEquipped "lords_cuirass_unique" == 0 )
   if ( Player->HasItemEquipped "dragonscale_cuirass" == 0 )
   if ( Player->HasItemEquipped "imperial_studded_cuirass" == 0 )
      set WearingLegionUni to 0
   endif
   endif
   endif
   endif
   endif
   endif
   endif
endif

if ( WearingOrdinatorUni == 0 )
   if ( Player->HasItemEquipped "indoril cuirass" == 1 )
      Set WearingOrdinatorUni to 1
   elseif ( Player->HasItemEquipped "indoril helmet" == 1 )
      Set WearingOrdinatorUni to 1
   elseif ( Player->HasItemEquipped "Indoril_MH_Guard_Cuirass" == 1 )
      Set WearingOrdinatorUni to 1
   elseif ( Player->HasItemEquipped "Indoril_MH_Guard_helmet" == 1 )
      Set WearingOrdinatorUni to 1
   elseif ( Player->HasItemEquipped "Indoril_MH_Guard_Cuirass" == 1 )
      Set WearingOrdinatorUni to 1
   elseif ( Player->HasItemEquipped "Indoril_MH_Guard_helmet" == 1 )
      Set WearingOrdinatorUni to 1
   elseif ( Player->HasItemEquipped "TR_a_Necrom_Cuirass" == 1 )
      Set WearingOrdinatorUni to 1
   elseif ( Player->HasItemEquipped "TR_a_Necrom_Cuirass_Cloak" == 1 )
      Set WearingOrdinatorUni to 1
   elseif ( Player->HasItemEquipped "TR_a_Necrom_Helmet" == 1 )
      Set WearingOrdinatorUni to 1
   endif
elseif ( WearingOrdinatorUni == 1 )
   if ( Player->HasItemEquipped "indoril cuirass" == 0 )
   if ( Player->HasItemEquipped "indoril helmet" == 0 )
   if ( Player->HasItemEquipped "Indoril_MH_Guard_Cuirass" == 0 )
   if ( Player->HasItemEquipped "Indoril_MH_Guard_helmet" == 0 )
   if ( Player->HasItemEquipped "Indoril_Almalexia_Cuirass" == 0 )
   if ( Player->HasItemEquipped "Indoril_Almalexia_helmet" == 0 )
   if ( Player->HasItemEquipped "TR_a_Necrom_Cuirass" == 0 )
   if ( Player->HasItemEquipped "TR_a_Necrom_Cuirass_Cloak" == 0 )
   if ( Player->HasItemEquipped "TR_a_Necrom_Helmet" == 0 )
      Set WearingOrdinatorUni to 0
   endif
   endif
   endif
   endif
   endif
   endif
   endif
   endif
   endif
endif

End


So in this way, it the "if unequipped" tests are nested and the variable is only changed if none of the tested armors are equipped. The one thing to watch out is to have as many endifs as you have ifs, since I felt an indent pyramid would be silly.
Erol Flow
Associate
 
Posts: 5
Joined: Fri Jul 26, 2013 5:43 pm
Gender: Not disclosed

Re: [RELZ] Stackable armor

Postby Elaura » Sun Aug 25, 2013 4:20 pm

Jac may decide to change it, but since he made this mod for me and I always use The Imperial Legion Badge mod by Rodrigo Ortiz, that is undoubtedly why the issues with the script weren't caught.

It's great that you figured out a fix, Jac was just reading over my shoulder and said you can certainly release it. It would be nice if you gave him credit in the readme for the original, but you definitely deserve the credit for the fix. I especially like the added dragonscale and studded leather. I will probably add those to the imperial badge script if they aren't already there, for my own use. We'll make sure your fix is linked to from any d/l page for the original.

Great job! :goodjob:
Available for weddings, funerals, hand fasting, and baptisms.
Image
User avatar
Elaura
Chaplain
 
Posts: 2477
Joined: Sun Feb 13, 2011 12:52 am
Location: About ten feet to Jac's left.
Title: Mrs.
Gender: Female

Re: [RELZ] Stackable armor

Postby Red Herring » Mon Jan 13, 2014 4:06 am

Wonderful release, Jac. Image

A simple little mod that offers some functionality one wishes were in the game already.
Image Image Image
User avatar
Red Herring
Associate
 
Posts: 7
Joined: Fri Jul 26, 2013 10:07 pm
Gender: Not disclosed

Re: [RELZ] Stackable armor

Postby Jac » Mon Jan 13, 2014 11:58 am

Thanks Red. :biggrin:
User avatar
Jac
The Boss
 
Posts: 5985
Joined: Sat Feb 12, 2011 8:36 pm
Location: Somewhere on the left side of insanity, the right side was taken.
Title: Elder Wolf


Return to Jac's Mods

Who is online

Users browsing this forum: No registered users and 1 guest

  • Advertisement