22 posts / 0 new
Last post
ponyrider0
ponyrider0's picture
Member
Offline
Last seen: 6 hours 45 min ago
Joined: 07/22/2016 - 05:01
Karma: 711
[REL] More Armor Slots v0.10

[REL] More Armor Slots v0.10 for Morroblivion v064  

When Updating Plugin (from version earlier than 0.7):
​Load your old saved game and wait for message box stating that More-Armor-Slots is re-initializing.  Then click okay and create a new Save file.

Description:
The goal for this mod is to recreate the many more armor and clothing slots that are available in Morrowind as compared to Oblivion.  In this version, it adds support for the player to wear simultaneous shirt-pants-cuirass-greaves-robes.  My original plan was to try to make an OBSE plugin which bypassed the Oblivion engine to use custom EquipItem functions that supported more an arbitrary number of armor and clothing slots for player and all NPCs.  However, I'm embarassed to say that I had to rage-quit after several unsuccessful attempts to configure Visual Studio 2015's linker to generate a plugin that dynamically links to the OBSE dll.  I hate computers.  Instead, I made an ESP which exploits the Oblivion engine behavior to allow an multiple items to be equipped through the "Tail" slot.  Additionally, I bypassed Oblivion's equipitem code by dynamically disabling the left-mouse button and implementing a my own Equip-Via-Tail hack.  In truth, there are several hacks upon hacks to get it to work.  The result is you get some visual glitches of armor and clothing drawing over each other but in return you get the benefit of higher armor class while wearing up to 3 more enchanted items.    

Known Issues / To Do:
- Currently, user-enchanted armor and clothing can not be equipped with on-top/underneath other items.  To equip them, unequip any other items that take up their slot, ex: for a user-enchanted cuirass, unequip any current cuirass or shirt you are wearing.  Then CTRL-click the user-enchanted item.
- When a savegame is loaded, the ArmorRating may not be calculated properly.  Just equip something (weapon/clothing/armor) and the ArmorRating will be recalculated appropriately.  **Hopefully, all occurences of this bug has been fixed, let me know if you still have miscalculated armorrating on game load.
- There is a lot of visual clipping where armor and clothing are trying to draw on top of each other.  
- Equipping multiple items will cause a brief pause ranging from <1 second up to 2 seconds about 100ms to 500ms -- depending on the number of items you have equipped.
- A lot of performance tuning and script optimization still neededThe current code is hopefully compatible with NPCs but I still need to implement script/AI logic for NPCs to choose armor/clothing to equip simultaneously.    

Requirements (for v0.10):
Morroblivion v064
Morroblivion Unofficial Patch 2017-Nov-22 or later

Versions Prior to v0.10 Require:
AddActorValues OBSE plugin (version 1.0): http://www.nexusmods.com/oblivion/mods/33248/?
Pluggy OBSE plugin (v125b or above): http://www.nexusmods.com/oblivion/mods/23979/?
Morroblivion Fixes v1.6e: https://tesrenewal.com/forums/morroblivion-mod-releases/rel-...

Installation/Load Order:
There is only one ESP file to install/uninstall.  I do not modify any existing records so Load Order is not important.  Add the following line to your "\Oblivion\Data\ini\Morroblivion.ini":

   set mwFixes.EnableMoreArmorSlots to 1

   set mwFixes.StrictMWEnchantmentSelection to 1

Alternatively, you can can skip editing the Morroblivion.ini and just run the game, open the console, and type this command:

   set mwMASquest.EnableMoreArmorSlots to 1    

Usage:
Start your game, unequip and re-equip whatever you are currently wearing.  Then equip additional items which cover chest or legs (includes: shirts-pants-skirts-robes-cuirass-greaves).  You can use this with either a new or existing character -- but BACKUP YOUR ORIGINAL SAVES!  Sorry, but there is a lot of hackery going on in the background that adds some risk for incompatibility with future versions of this mod.

***Tip***:
​This mod depends on equipping and re-equipping items in a very specific order (all done by the script).  This is incompatible with the Enchantment Selection OnEquip used by the original UCWUS mod.  I recommend using Morroblivion-Fixes-v1.6e which contains an update to allow you to select enchantments from the Magic Menu.  Be sure to enable mwFixes.StrictMWEnchantmentSelection as shown in the instructions above.

Change Log: 
Version 0.10:
- Disabled more-armor-slots processing for NPCs, no-npc's ESP file not required.
- Changed to scripted REF storage rather than AAV storage of slot information.  This now allows support for custom enchanted armor and equipment.

Version 0.9:
- Fixed bug causing all NPCs to become naked.
- Added support for beast race armor/clothing restrictions.

Version 0.8:

- Added support for NPCs.
- Overhauled code to more generally support items which take up multiple slots like robes, Indoril Boots, certain armors.
- Fixed some bugs related to dropping items and using consumables / alchemy equipment.
- Fixed bug related to bound armor / weapons expiring.

Version 0.7b:
- Fixed a bug preventing compatibility with some other armor mods.  When loading an old saved game, wait for message box about re-initalizing.  Then click OK and create a new Save file.

Version 0.7:
- Redesigned the script flow and conditionals to workaround need for new method of refreshing UI.  It's slightly slower than 0.6 but still much faster than original version.  Now ready for mass consumption.

UPDATE: (10/11/2017)
I'm posting a "patch" esp which should load after more-armor-slots.esp v0.9 to disable more-armor-slots for all NPCs.  EDIT: not needed for v0.10.

Edited by: ponyrider0 on 11/23/2017 - 19:10
ponyrider0
ponyrider0's picture
Member
Offline
Last seen: 6 hours 45 min ago
Joined: 07/22/2016 - 05:01
Karma: 711
Plain Steel Cuirass + Iron

Plain Steel Cuirass + Iron Greaves + Shockeater Robe:

superliuk
superliuk's picture
Member
Offline
Last seen: 2 hours 24 min ago
Joined: 03/14/2016 - 05:58
Karma: 189
Fantastic!!!!  

Fantastic!!!!

 

superliuk
superliuk's picture
Member
Offline
Last seen: 2 hours 24 min ago
Joined: 03/14/2016 - 05:58
Karma: 189
Doesn't work! 

Doesn't work! 

-When open ....

- Active Mod Files:

[spoiler][xml] 00  Oblivion.esm 01  Morrowind_ob.esm 02  Unofficial Oblivion Patch.esp  [Version 3.2.0] 03  DLCShiveringIsles.esp 04  Unofficial Shivering Isles Patch.esp  [Version 1.4.0] 05  ExPCB.esp 06  DLCHorseArmor.esp 07  DLCOrrery.esp 08  DLCVileLair.esp 09  DLCMehrunesRazor.esp 0A  DLCSpellTomes.esp 0B  DLCThievesDen.esp 0C  DLCBattlehornCastle.esp 0D  DLCFrostcrag.esp 0E  Knights.esp 0F  RefScope.esp  [Version 2.1.2] 10  Maskar's Oblivion Overhaul.esp  [Version 4.8.1] 11  Real Lava 1.3.esp 12  Jedi Powers.esp 13  regeneration_ita.esp  [Version 1.02] 14  ImpeREAL City Unique Districts - All the Districts - Merged.esp 15  ImpeREAL Empire - Unique Castles - All The Castles - Merged.esp 16  BettysGoldenTime.esp 17  ITA - FoT & Hexaae R3.esp  [Version e] 18  Morrowind_ob.esp 19  Morrowind_ob - Chargen and Transport Mod.esp  [Version e] 1A  Morrowind_ob - Conversation.esp 1B  Morrowind_ob - UCWUS.esp  [Version 1.1] 1C  MorroblivionPortaltoVvardenfell.esp 1D  Morroblivion - Clothing Galore.esp  [Version 1.2] 1E  BetterCharGen-v1_7b.esp 1F  morroblivion-fixes-v1_6.esp 20  more-armor-slots.esp 21  morroblivion-fixes-v1_6-fasttravel.esp 22  MorrowindStartingSpells-v1_4.esp 23  Morrowind_ob - MorroblivionTreeReplacer.esp 24  Morro-Start-Clothes.esp 25  MorroblivionLighthouseHome.esp 26  Better Creatures.esp 27  morroblivion-guar-mounts.esp 28  Little Riekling.esp 29  kuerteeCleanUp.esp 2A  mob_essential_mudcrab.esp 2B  new_solstheim_weather_ita.esp 2C  Morroblivion Xmas.esp 2D  DraugrArmor.esp 2E  BladeArmor.esp 2F  werewolffix.esp 30  Oblivion_Character_Overhaul.esp  [Version 2.0] 31  OblivionReloaded.esp 32  Short Grass V3.esp 33  MorroblivionNewMap.esp 34  morroblivion-magic-fixes -v1_4.esp [/xml][/spoiler]  

 

ponyrider0
ponyrider0's picture
Member
Offline
Last seen: 6 hours 45 min ago
Joined: 07/22/2016 - 05:01
Karma: 711
superliuk wrote:

superliuk wrote:

Doesn't work! 

-When open ....

Your Morroblivion.ini needs to be updated.  Refer to these instructions:
Add the following line to your "\Oblivion\Data\ini\Morroblivion.ini":

   set mwFixes.EnableMoreArmorSlots to 1

   set mwFixes.StrictMWEnchantmentSelection to 1

Alternatively, you can can skip editing the Morroblivion.ini and just run the game, open the console, and type this command:

   set mwMASquest.EnableMoreArmorSlots to 1    

Let me know if that helps!  (Also, make sure you are using morroblivion-fixes-v1.6e --> I forgot to update the version number in the console message, so you will have to make sure you are installing from the right file.)

superliuk
superliuk's picture
Member
Offline
Last seen: 2 hours 24 min ago
Joined: 03/14/2016 - 05:58
Karma: 189
here my morroblivion.ini

here my morroblivion.ini

AttachmentSize
Binary Data morroblivion.ini1.95 KB
ponyrider0
ponyrider0's picture
Member
Offline
Last seen: 6 hours 45 min ago
Joined: 07/22/2016 - 05:01
Karma: 711
Hmm, your INI file looks good

Hmm, your INI file looks good.  I just reposted Morroblivion Fixes v1.6e, try re-downloading that to see if it helps.  If that still doesn't work, try using these console commands:

show mwFixes.EnableMoreArmorSlots

show mwMASQuest.EnableMoreArmorSlots

show mwMASQuest.Initialized

They should all return 1.0000.  If they are all on but it's still not working, then you can try re-initializing the plug by typing this:

set mwMASquest.Initialized to 0

If you close the console and then wait 2-3 seconds and then open it again, you should see a new console message that says: "More Armor Slots v 0.5 is initialized."

superliuk
superliuk's picture
Member
Offline
Last seen: 2 hours 24 min ago
Joined: 03/14/2016 - 05:58
Karma: 189
I use your command on console

I use your command on console and appear "More Armor Slots v 0.5 is initialized." but i cann't equip robe with armor

 

ponyrider0
ponyrider0's picture
Member
Offline
Last seen: 6 hours 45 min ago
Joined: 07/22/2016 - 05:01
Karma: 711
@superliuk:  Thanks for the

@superliuk:  Thanks for the feedback and help debugging the mod!

Thanks to superliuk's help, I figured I that I am using a script command that requires the Pluggy OBSE plugin: http://www.nexusmods.com/oblivion/mods/23979/?

You need this in addition to the above plugins for this mod to work.  You only need the version without Hud support.

superliuk
superliuk's picture
Member
Offline
Last seen: 2 hours 24 min ago
Joined: 03/14/2016 - 05:58
Karma: 189
Active Mod Files:

Morrowind is here!

llde
llde's picture
Member
Offline
Last seen: 3 months 1 week ago
Joined: 09/17/2013 - 07:04
Karma: 361
ponyrider0 wrote:

ponyrider0 wrote:

My original plan was to try to make an OBSE plugin which bypassed the Oblivion engine to use custom EquipItem functions that supported more an arbitrary number of armor and clothing slots for player and all NPCs.  However, I'm embarassed to say that I had to rage-quit after several unsuccessful attempts to configure Visual Studio 2015's linker to generate a plugin that dynamically links to the OBSE dll.

There are several reasons for this:

First the original OBSE v21 source code is bugged. Compiling a plugin make the compiler and the linker search for symbols that do not exist in a plugin project (ShowRuntimeError and similia).

You will need to use my fork: https://github.com/llde/Oblivion-Script-Extender  (Target Release only. Debug Target is not buildable)

The other errors are caused by MSVC2015  or above compiler.

1) The use of reference in va_start is illegal in C++ standard. It was silently allowed on  previous MSVC version. From VS2015 you need to define _CRT_NO_VA_START_VALIDATION in the project. Note that this piece of code probably never worked completly as intended

2)A struct use the hashmap type, but in VS2015 it was deprecated. However has I don't know ATM if this type is an abstraction on a game implementend object, it may not be safe to blindly replace it with a different, albeit similar in scope, type as unordered_map. You need to define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS in preprocessor defines to allow this.

However what you wanted to do may be really difficult on the native side.

The game doesn't seem to export function in the VTBLs  to manage equipment and slot in a raw fashion. (However many functions are still to be decoded) So all this code should be hand written (you may also need to do an assembly hook)

However... Alenet in the new version of OR equipment mode /combat mode is working (or the work is already done) to extend the actual number of slots adding a new weapon slot. You may extend his work when the source is published (He may accept a pull request), or it may be persuaded to add a "robe" specific slot.

ponyrider0
ponyrider0's picture
Member
Offline
Last seen: 6 hours 45 min ago
Joined: 07/22/2016 - 05:01
Karma: 711
llde wrote:

llde wrote:

First the original OBSE v21 source code is bugged. Compiling a plugin make the compiler and the linker search for symbols that do not exist in a plugin project (ShowRuntimeError and similia).

You will need to use my fork: https://github.com/llde/Oblivion-Script-Extender  (Target Release only. Debug Target is not buildable)

The other errors are caused by MSVC2015  or above compiler.

Oh man, thanks for the tips!  That could have saved days of crying...  I'll re-download your fork and give it another try.  In my last attempts, I was able to suppress the compiler errors and produce .OBJ files and even generate an OBSE.dll but was not getting the OBSE functions to export for re-linking by the plugins -- ending up with a huge monolithic plugin.dll containing all OBSE code instead of dynamically linking to it.  Hopefully, I'll make more progress this time.

llde wrote:

The game doesn't seem to export function in the VTBLs  to manage equipment and slot in a raw fashion. (However many functions are still to be decoded) So all this code should be hand written (you may also need to do an assembly hook)

However... Alenet in the new version of OR equipment mode /combat mode is working (or the work is already done) to extend the actual number of slots adding a new weapon slot. You may extend his work when the source is published (He may accept a pull request), or it may be persuaded to add a "robe" specific slot.

I was able to find source code to a fairly recent version (Dec 2016) here: https://github.com/Alenett/TES-Reloaded-Source.  The most recent version at that repository seems to have the dual weapon functions commented out, but I will take a look again if I can get plugins to link correctly.

I'll start a new thread with my progress!

llde
llde's picture
Member
Offline
Last seen: 3 months 1 week ago
Joined: 09/17/2013 - 07:04
Karma: 361
The source code of the

The source code of the version with equipment mode redone is still not uploaded. That source has the old equipment mode version.

ponyrider0
ponyrider0's picture
Member
Offline
Last seen: 6 hours 45 min ago
Joined: 07/22/2016 - 05:01
Karma: 711
**Known Issue**: When a

**Known Issue**: When a savegame is first loaded, the ArmorRating may not be calculated properly.  Just equip something (weapon/clothing/armor) and the ArmorRating will be recalculated appropriately.  Hopefully, I've fixed all the other scenarios where AR can be miscalculated -- let me know if you catch any other times.

ponyrider0
ponyrider0's picture
Member
Offline
Last seen: 6 hours 45 min ago
Joined: 07/22/2016 - 05:01
Karma: 711
I posted a new WIP version of

I posted a new WIP version of the mod (v0.6).  There is a huge improvement in performance and UI responsiveness at the cost of the game engine not updating the UI inventory menu.  I'm trying to figure out the best way to solve this -- either trying to get the game engine to trigger a refresh or manually updating the UI elements myself, i.e. painting the appropriate boxes around equipped/unequipped items.  For now, if you want to manually update the menu, just toggle the inventory menu off and on again.

I've tried triggering refreshes by closing the menu and re-opening and also switching to a different menu and switching back... while both ways can work, the lag/delay caused by doing the menu switching outweighs any benefit.  Currently, I'm looking through OBSE and MenuQue XML API functions to see if I can toggle the UI boxes / equipped markers around a selected item... if anyone is familiar with how to do this, your help would be much appreciated!

 

ponyrider0
ponyrider0's picture
Member
Offline
Last seen: 6 hours 45 min ago
Joined: 07/22/2016 - 05:01
Karma: 711
I posted version 0.7b which

I posted version 0.7b which is ready for everyone to use.  It should be stable and upgrade-safe to new versions if they come out.  I redesigned some portions to workaround the issue with UI not updating in v0.6.  The UI is now very responsive, much faster than the original release.  When loading saved games from older versions, a message box will pop up to notify you that More-Armor-Slots is re-initializing.  Create a new save file and then re-equip your extra armor slots.

ponyrider0
ponyrider0's picture
Member
Offline
Last seen: 6 hours 45 min ago
Joined: 07/22/2016 - 05:01
Karma: 711
I've finally gotten around to

I've finally gotten around to implementing the NPC scripts to use more-armor-slots, but the Equip-By-Tail doesn't seem to be working the same on NPCs. 

Although the NPCs are equipping the extra slots, it doesn't show up visually like with the player and ArmorRating does not get calculated appropriately.  I'm trying to figure out exactly what the game engine does differently with EquipItems for NPCs than with PCs...

ponyrider0
ponyrider0's picture
Member
Offline
Last seen: 6 hours 45 min ago
Joined: 07/22/2016 - 05:01
Karma: 711
Good news -- after stepping

Good news -- after stepping away from the code for a little bit, I came up with some new ideas to try:  NPCs are now equipping the extra slots and still preserving their ArmorRating.  Yay!  I still need to work out some bugs...

ponyrider0
ponyrider0's picture
Member
Offline
Last seen: 6 hours 45 min ago
Joined: 07/22/2016 - 05:01
Karma: 711
I finally uploaded version 0

I finally uploaded version 0.8.  It has full NPC and companion support for the extra slots and also several bug fixes and performance optimizations for player character too.  There is only one bug which I've only seen once over the last 50 hours of testing: one of the script steps stops working and all NPCs are left naked.  If you save game->quit->reload, then the script will work normally again.  Any naked NPCs will put clothes back on when the cell reloads.

Also, the game engine draws NPCs differently from the PC -- you won't get the clipping effect seen with PCs, the first item equipped takes precedence and further items equipped on top will be invisible.  I used console commands and other tricks to query the NPCs to make sure they are really equipping multiple slots, and they are... mostly... when you first load from a saved game, the game engine doesn't restore the extra equipped items, so they will only get refreshed the next time the cell is reset or the actor equips/unequips something (which will trigger more-armor-slots to scan the actor's inventory to equip more items).

LotsofSpace
LotsofSpace's picture
Offline
Last seen: 1 month 3 weeks ago
Joined: 10/10/2017 - 20:30
Karma: 1
When I got this mod finally

When I got this mod finally working, I found my companion constantly unequiping their robes when I fast-traveled to a new location or loaded a save where they had their robe on. When they didn't have their robes on, they would equip it if I saved then and loaded the save. The constant unequiping and the odd case of many NPCs, like Imperial guards, wearing pants over their greaves, caused me to turn off this mod. I wanted to know if there's any way to only open up more armor slots for my player or at the very least any reason why my companion would keep unequiping their robes. The companion was an NPC from the "Tears of the Fiend" mod, but I saw many imperial guards who weren't wearing their cuirasses as well (only after I fixed the morroblivion.ini, I had been playing on this save with more armor slots not working but every Npcs' clothing was working before this). I tried moving the esp from its position in the middle of the load order (after all the other morroblivion things) to the end, but the same result occurred. I'll post my load order if it helps, but I wanted to know first if there's any reason why this would be. Thanks.

ponyrider0
ponyrider0's picture
Member
Offline
Last seen: 6 hours 45 min ago
Joined: 07/22/2016 - 05:01
Karma: 711
No need to post your load

No need to post your load order: load order does not matter.  Most of what you are describing are known issues.

If you did not enable the setting in the Morroblivion.ini, then the armor slots mod will be disabled even if you activate the ESP.  I designed it this way to require users to read the installation instructions and known issues, so they would better understand what works and doesn't work.

Clothing over Armor: this appears to be a game graphics code limitation: certain combinations of clothes (usually shirt+pants) will always be drawn instead of equipped armor, you can verify they are actually wearing armor underneath the clothes by checking the NPC's armor-rating.  One work-around is to prevent NPCs from wearing both shirt+pants and only allow one of these items at a time...  The ideal solution is to try to find and patch the executable code controlling drawing of clothing, but it's unlikely I'll be able to do that.  Of course, since most NPCs don't have enchanted clothing, there's not much benefit to enabling more armor slots for them.  I'll make a separate option to enable/disable NPCs in a future version.

Regarding NPCs constantly unequipping robes, there are a few reasons.  Unfortunately, when you fast-travel, any companion NPCs get reset and any clothing in extra slots get cleared from memory.  In a future version, I will look into customizing companion scripts to detect fast-travel and automatically restore their extra clothing slots.  Another common reason is that they may be wearing a robe type which takes up feet and/or hand slots in addition to leg and chest slots.

Until I can find time to work on a new version, I'll try to make a patch to hardcode disabling NPC support.... I'll upload it to the first posting when it's down (1-2 days). more-armor-slots-no-npc.esp patch is uploaded to the first post.  This will disable extra slots for all NPCs.

ponyrider0
ponyrider0's picture
Member
Offline
Last seen: 6 hours 45 min ago
Joined: 07/22/2016 - 05:01
Karma: 711
I went back to make sure that

I went back to make sure that More Armor Slots works with the new Morroblivion Unofficial Patch, and it works well without any issues (v0.9 and v0.10 tested).  The new version 0.10 has the No NPC hack permanently on and storage re-implemented as script REFs rather than AAV token storage.  The benefit of these changes is that more-armor-slots is now compatible with custom enchanted clothing and armor.  The downside is that NPCs are not currently supported since I'm storing all Slot information in the main quest script rather than as tokens in each Actor's inventory.

TIPS:
- To transfer an inventory item into your hand rather than dropping it, hold-down Shift and hold-down Left Mouse Button until the inventory menu disappears and the item is displayed in your hand.  If the item is not dropped when you release the mouse button, tap the "grab" button.
- If you enchant an item with Shield, but equipping it does not change ArmorRating to appropriate level, just exit inventory to game mode and wait for Enchantment effect animation to be shown on player, then re-enter the inventory screen to double-check that the ArmorRating is correct.
- If you click an item and it unequips but then immediately re-equips, you may be clicking (button down/button up action) too fast for the script to register.  Try holding the left-mouse button down over the item for half a second (500ms) then releasing.