Making an equipped weapon invisible

Post » Tue Oct 13, 2015 4:55 pm

Hey, so I'm working on a mod that tries to further fix dual sheathing and it works well with swords, however I'm currently trying to make it work with axes and maces while also fixing their animations. For this I create a dummy ARMOR model that takes on the model of the weapon while the weapon is sheathed so I can swap to a 2-hand weapon and have the 1handed weapon still show using bDisableGearedUp = 0. When wielding a sword and an axe/mace however, the animation will just be broken since a sword in the right hand is sheathed on the left side of the hip, but an axe in the right hand is sheathed on the right side and vice versa.

To fix this I try to also use my dummy model that assumes the axe model while it is sheathed but I need to make the original model invisible while sheathed and make my dummy take over the visuals. I created a second weapon dummy that has no model and a corresponding static that has no model either and I apply both to the weapon I have in the left hand with

Form DummyWeaponID = Game.GetFormFromFile(0x002DBA, "mymod.esp")Weapon DummyWeapon = DummyWeaponID as WeaponStatic DummyWeaponStatic = DummyWeapon.GetEquippedModel()String DummyWeaponModel = DummyWeapon.GetModelPath()Weapon OriginalWeapon = Game.GetPlayer().GetEquippedWeapon(true)OriginalWeapon.SetEquippedModel(DummyWeaponStatic)OriginalWeapon.SetModelPath(DummyWeaponModel)

Okay, so in theory my left hand weapon should now have the models of the dummy's models, or lack thereof, but ingame it just displays as if nothing happened. However a

Debug.MessageBox(OriginalWeapon.GetModelPath() + OriginalWeapon.GetEquippedModel())

Returns that those two values are now in fact empty. Even if I replace the model with an existing .nif file, the ingame weapon still displays as if nothing happened. And even if I unequip and re-equip it. Okay I thought, screw this, Maybe I can just replace the model with the "mirrored" version that ships with Dual Sheath Redux and forget all the noise with dummy items, but then I realized there is no apparent way to change the weapon's static model unless I reference another static and this is where I could use some help/ideas. Alternatively, I simply need a way to make an item invisible using Papyrus/SKSE without using UneuipItem/EquipItem as those just won't work for left hand weapons.

Appreciate any hints on this.

Edit: EquipItemEx actually lets me equip and unequip weapons in left hand. I'll go with that, yay.

User avatar
CArlos BArrera
 
Posts: 3470
Joined: Wed Nov 21, 2007 3:26 am

Return to V - Skyrim