Yinkle Posted August 6, 2020 Posted August 6, 2020 Hi all, maybe someone can shed some light on this. I'm using skse function GetSlotMask() to detect which slots certain items occupy before my script decides whether to act or not. I set up a debug trace to spit out the slot integer for each item and was presented with this: [08/06/2020 - 07:57:33AM] ABBA info: GetSlotMask for Studded Armor is: 4194308 [08/06/2020 - 07:57:41AM] ABBA info: GetSlotMask for Tavern Clothes is: 4194308 [08/06/2020 - 07:58:09AM] ABBA info: GetSlotMask for Daedric Armor is: 4194308 [08/06/2020 - 07:58:26AM] ABBA info: GetSlotMask for Fur Bracers is: 8 [08/06/2020 - 07:58:31AM] ABBA info: GetSlotMask for Fur Shoes is: 128 [08/06/2020 - 07:57:57AM] ABBA info: GetSlotMask for Pure Tavern Clothes is: 4 While the shoes, bracers and mod added "pure tavern clothes" show the expected numbers: 8,128 and 4 respectively, I'd like to know why vanilla armor items show 4194308 instead of 4? Seems very odd to me and it concerns me that this value might vary depending on load order or other factors. If they will always be 4194308 then that's fine and workable but it doesn't explain why mod added armor items show 4 (what you'd expect for slot 32 items) and they don't whilst still using slot 32.
Monoman1 Posted August 6, 2020 Posted August 6, 2020 https://www.creationkit.com/index.php?title=Slot_Masks_-_Armor It's decimal. Convert to hex = 0x00400004 Which is: = 0x00400000 + 0x00000004 Which is slot 32 + 52. 52 is likely added by SoS. If you want to check is an item in the body slot do: If Math.LogicalAnd(akArmor.GetSlotMask(), 0x00000004) == 0x00000004 ; Item does occupy body slot EndIf Watch out for devious devices device hider.
Yinkle Posted August 6, 2020 Author Posted August 6, 2020 3 minutes ago, Monoman1 said: https://www.creationkit.com/index.php?title=Slot_Masks_-_Armor It's decimal. Convert to hex = 400004 = 0x00400000 + 0x00000004 Which is slot 32 + 52. 52 is likely added by SoS. If you want to check is an item in the body slot do: If Math.LogicalAnd(akArmor.GetSlotMask(), 0x00000004) == 0x00000004 ; Item does occupy body slot EndIf Watch out for devious devices device hider. That makes sense, I guess SOS only adds slot 52 to vanilla armors hence the discrepancy. Thanks, this was a bit of a "head scratcher" for me!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.