Jump to content

Need help with the "SetEquipmentSlot" command


XJDHDR

Recommended Posts

Hello everyone

 

I recently decided to create a mod that stops another mod's items from making an argonian or khajiit character's tail disappear. I do this by turning the offending mods into masters using Wrye Bash. I then attach this script onto the mod item:

 

Begin OnEquip player

If XJAaKLTnMControlQ.EquippedItemStatus == 0
SetEquipmentSlot 255
SetEquipmentSlot 8
Set XJAaKLTnMControlQ.EquippedItemStatus to (XJAaKLTnMControlQ.EquippedItemStatus + 1)
ElseIf XJAaKLTnMControlQ.EquippedItemStatus == 1
SetEquipmentSlot 255
SetEquipmentSlot 6
Set XJAaKLTnMControlQ.EquippedItemStatus to (XJAaKLTnMControlQ.EquippedItemStatus + 1)
ElseIf XJAaKLTnMControlQ.EquippedItemStatus == 2
SetEquipmentSlot 255
SetEquipmentSlot 7
Set XJAaKLTnMControlQ.EquippedItemStatus to (XJAaKLTnMControlQ.EquippedItemStatus + 1)
ElseIf player.GetRace != Argonian || Khajiit
If GetEquippedObject 15 == 0
	SetEquipmentSlot 255
	SetEquipmentSlot 15
	Set XJAaKLTnMControlQ.EquippedItemStatus to (XJAaKLTnMControlQ.EquippedItemStatus + 1)
Else
	SetEquipmentSlot 255
EndIf
Else
SetEquipmentSlot 255
EndIf

End

Begin OnUnEquip player

SetEquipmentSlot 255
SetEquipmentSlot 15
Set XJAaKLTnMControlQ.EquippedItemStatus to (XJAaKLTnMControlQ.EquippedItemStatus - 1)

End

 

The scripts intention is to set the equipment slot of the item concerned to an unused amulet or ring slot instead of the tail slot (if not one of the beast folk, tail slot is used too). If there is no slot available, the item is told to use no slot instead. When the item is unequipped, it reverts back to using the tail slot.

 

This is what it's supposed to do. However, when I use this mod with my (argonian) character, equipping the item still removes my character's tail and places the item on his body. When I then unequip the item, the menu shows that the item is unequipped but my character still has the item attached to his body and his tail is still missing. It is only when I equip another (patched) item requiring the tail slot that the first item is removed but now the second item becomes glued on.

 

I tried modifying the items so that they initially don't use an equipment slot but that only makes the first equip not use any slots then subsequent equips have the same problem as above.

 

The esp file I have created is designed to be mergable with the Bashed Patch. The reason for this is the same as that for CoBl's "CoBl Late Filter Merge Only.esp", so that mods required by my patch which aren't present on the mod user's PC are removed when merged into the Bashed Patch.

 

I have tried contacting BeHippo and Scruggs (two of the creators of OBSE) about this problem but they did not respond to my email or PM. If someone knows what is wrong with my mod, can you please help me? Am I using the "SetEquipmentSlot" command correctly? Your help wll be greatly appreciated.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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