Lisselli Posted April 21, 2017 Share Posted April 21, 2017 (edited) That can't be a copy since it matches the biped objects in Fallout's CK for Armor and ArmoAddons. Go see it(in the CK and then compare) for yourself.I believe there is a difference between the two but just don't know where this list of item slots are. Judging from your last post, there seems to be a mistake with the wiki page - biped slots may not be acceptable values for that function anymore. The Skyrim version accepts biped slot values. Edited April 21, 2017 by Lisselli Link to comment Share on other sites More sharing options...
kitcat81 Posted April 21, 2017 Share Posted April 21, 2017 (edited) I just wonder why do you count from 30 to 61 ? For example clothes slot (i.e. army fatigues) is slot 3 and some armor parts are 11 and 13 slots. It works with console commands and I looked once at the undress script from some working mod. It unequips slots from zero to 29. Slot 30 = pipboy. If you unequip slots from 0 to 29 it will leave the player naked but with the pipboy. Maybe I`m missing something and you are trying to unequip some invisible items that I don`t know about, sorry then.Where did you find those slot numbers? In the CK, the biped objects are much different than what you're saying. 60 = pipboy. 30 = hairtop Some time ago I was curious how people dress/undress the player when entering/exitting the water. I looked at the script from "Build your pool" mod and it unequipped slots from 0 to 29 and slot 30 if the player chose to uequip the pipboy. But you can also test it with console command : unequipitemslot . For me it works this way : Hat is 0, surgical mask 18, slots 11-15 - armor parts, slot 3 - clothes like army fatigues. Slot 30 is pipboy. It`s interesting to know the difference but if you want to undress the player and uequip all his stuff, it seems that any number above 30 does nothing. Maybe those numbers above 30 can be used in some other situations. Edited April 21, 2017 by kitcat81 Link to comment Share on other sites More sharing options...
Magicockerel Posted April 21, 2017 Author Share Posted April 21, 2017 (edited) Ok, this has been helpful guys, thanks (even if it tells me that the function's just borked). I have been using this page to determine biped slots, which is linked to from UnequipItemSlot() and GetWornItem(). I wasn't wanting to unequip everything from the player, just headgear. I expanded to try and unequip everything because I wasn't having any luck with just those slots. I too was trying to get GetWornItem() to work, but it was only returning None (at least, for the Item, it appeared to return data on the ModelName). I'll let you guys know if I have any luck. Haven't had any so far haha. Edit 1Ok, for some reason if I unequip biped slots -999 to 29, everything is unequipped (beside the Pipboy, which is unequipped with biped slot 30). For some reason the Militia Hat and Sunglasses is unequipped with a negative biped slot number, not sure why. Everything else is unequipped through slots 0 to 29. I have no idea why this is the case. The CK shows which biped slots an item uses (ranging from 30 to 61, as the CK wiki suggests), and they don't align with what actually works with the UnequipItemSlot() function. Edit 2So, the Militia Hat and Sunglasses are unequipped if I run UnequipItemSlot() between -200 and 29, but not if I run it between -100 and 29. This implies that these headgear items have biped slots between -200 and -101. Again, not sure why. Edit 3GetWornItem() doesn't appear to be working for the CK defined slots either. You can see in the spoiler Debug.Trace() log output from the script I directly copied from the CK wiki page: Actor Player = Game.GetPlayer() int index = 30 int endSlot = 61 const while (index < endSlot) Actor:WornItem wornItem = Player.GetWornItem(index) Debug.Trace("Slot: " + index + ", " + wornItem) index += 1 EndWhile [04/22/2017 - 05:02:12AM] Slot: 30, [item = [Form < (00021B3B)>], model = [Form < (0001ED3D)>], modelName = "Pipboy\CharacterAssets\PipboyLowPlayer.nif", materialSwap = None, texture = None][04/22/2017 - 05:02:12AM] Slot: 31, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:02:12AM] Slot: 32, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:02:12AM] Slot: 33, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:02:12AM] Slot: 34, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:02:12AM] Slot: 35, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:02:12AM] Slot: 36, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:02:12AM] Slot: 37, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:02:12AM] Slot: 38, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:02:12AM] Slot: 39, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:02:12AM] Slot: 40, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:02:12AM] Slot: 41, [item = [Form < (0014831B)>], model = None, modelName = "Weapons\HandMade\Recievers\DummyReciever.nif", materialSwap = None, texture = None][04/22/2017 - 05:02:12AM] Slot: 42, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:02:12AM] Slot: 43, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:02:12AM] Slot: 44, None[04/22/2017 - 05:02:12AM] Slot: 45, None[04/22/2017 - 05:02:12AM] Slot: 46, None[04/22/2017 - 05:02:12AM] Slot: 47, None[04/22/2017 - 05:02:12AM] Slot: 48, None[04/22/2017 - 05:02:12AM] Slot: 49, None[04/22/2017 - 05:02:12AM] Slot: 50, None[04/22/2017 - 05:02:12AM] Slot: 51, None[04/22/2017 - 05:02:12AM] Slot: 52, None[04/22/2017 - 05:02:12AM] Slot: 53, None[04/22/2017 - 05:02:12AM] Slot: 54, None[04/22/2017 - 05:02:12AM] Slot: 55, None[04/22/2017 - 05:02:12AM] Slot: 56, None[04/22/2017 - 05:02:12AM] Slot: 57, None[04/22/2017 - 05:02:12AM] Slot: 58, None[04/22/2017 - 05:02:12AM] Slot: 59, None[04/22/2017 - 05:02:12AM] Slot: 60, None[04/22/2017 - 05:02:12AM] error: Cannot access an element of a None array Edit 4Instead starting to check biped slots from 0... [04/22/2017 - 05:07:34AM] Slot: 0, [item = [Form < (001C2216)>], model = [Form < (001C2215)>], modelName = "Armor\Minuteman\MHat.nif", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 1, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 2, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 3, [item = [Form < (001C2214)>], model = [Form < (001C2213)>], modelName = "Armor\Minuteman\MOutfit.nif", materialSwap = None, texture = [TextureSet < (0003EDE8)>]][04/22/2017 - 05:07:34AM] Slot: 4, [item = [Form < (001C2214)>], model = [Form < (000316C7)>], modelName = "Armor\Preston_Garvey\PrestonGarveyGloves.nif", materialSwap = None, texture = [TextureSet < (0003EDEA)>]][04/22/2017 - 05:07:34AM] Slot: 5, [item = [Form < (000316C7)>], model = [Form < (000316C7)>], modelName = "Armor\Preston_Garvey\PrestonGarveyGloves.nif", materialSwap = None, texture = [TextureSet < (0003EDEA)>]][04/22/2017 - 05:07:34AM] Slot: 6, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 7, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 8, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 9, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 10, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 11, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 12, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 13, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 14, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 15, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 16, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 17, [item = [Form < (001738AA)>], model = [Form < (001738A9)>], modelName = "Clothes\PoliceGlasses\MGlasses.nif", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 18, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 19, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 20, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 21, [item = [Form < (000316C7)>], model = [Form < (000316C7)>], modelName = "Armor\Preston_Garvey\PrestonGarveyGloves.nif", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 22, [item = None, model = None, modelName = "", materialSwap = None, texture = [TextureSet < (0003EDE8)>]][04/22/2017 - 05:07:34AM] Slot: 23, [item = None, model = None, modelName = "", materialSwap = None, texture = [TextureSet < (0003EDE8)>]][04/22/2017 - 05:07:34AM] Slot: 24, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 25, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 26, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 27, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 28, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 29, [item = [Form < (000EEBED)>], model = None, modelName = "Weapons\Grenade\GrenadeFrag.nif", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 30, [item = [Form < (00021B3B)>], model = [Form < (0001ED3D)>], modelName = "Pipboy\CharacterAssets\PipboyLowPlayer.nif", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 31, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 32, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 33, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 34, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 35, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 36, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 37, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 38, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 39, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 40, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 41, [item = [Form < (0014831B)>], model = None, modelName = "Weapons\HandMade\Recievers\DummyReciever.nif", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 42, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 43, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:07:34AM] Slot: 44, None[04/22/2017 - 05:07:34AM] Slot: 45, None[04/22/2017 - 05:07:34AM] Slot: 46, None[04/22/2017 - 05:07:34AM] Slot: 47, None[04/22/2017 - 05:07:34AM] Slot: 48, None[04/22/2017 - 05:07:34AM] Slot: 49, None[04/22/2017 - 05:07:34AM] Slot: 50, None[04/22/2017 - 05:07:34AM] Slot: 51, None[04/22/2017 - 05:07:34AM] Slot: 52, None[04/22/2017 - 05:07:34AM] Slot: 53, None[04/22/2017 - 05:07:34AM] Slot: 54, None[04/22/2017 - 05:07:34AM] Slot: 55, None[04/22/2017 - 05:07:34AM] Slot: 56, None[04/22/2017 - 05:07:34AM] Slot: 57, None[04/22/2017 - 05:07:34AM] Slot: 58, None[04/22/2017 - 05:07:34AM] Slot: 59, None[04/22/2017 - 05:07:34AM] Slot: 60, None[04/22/2017 - 05:07:34AM] error: Cannot access an element of a None array This suggests that GetWornItem() also doesn't use the CK defined biped slots (30 -> 61), but instead uses biped slots 0 -> 29 for armour. Again, no idea why this is the case. This makes it a pain to determine which slots are used for which. It at least appears that the main hat slot is 0 instead of 30, and the Pipboy is 30 instead of 60, so maybe they're in the same order, but just start at 0 instead of 30. Edit 5It looks like there are no negative biped slot numbers (at least, according to GetWornItem()). This of course makes sense, and I was hoping that this was the case. I'm clarifying this because UnequipItemSlot() fails to unequip the headgear the player has equipped in the save file that I am using for testing unless I start from -200. They won't be unequipped if I instead start at -100. [04/22/2017 - 05:13:39AM] Slot: -200, None[04/22/2017 - 05:13:39AM] Slot: -199, None[04/22/2017 - 05:13:39AM] Slot: -198, None[04/22/2017 - 05:13:39AM] Slot: -197, None[04/22/2017 - 05:13:39AM] Slot: -196, None[04/22/2017 - 05:13:39AM] Slot: -195, None[04/22/2017 - 05:13:39AM] Slot: -194, None[04/22/2017 - 05:13:39AM] Slot: -193, None[04/22/2017 - 05:13:39AM] Slot: -192, None[04/22/2017 - 05:13:39AM] Slot: -191, None[04/22/2017 - 05:13:39AM] Slot: -190, None[04/22/2017 - 05:13:39AM] Slot: -189, None[04/22/2017 - 05:13:39AM] Slot: -188, None[04/22/2017 - 05:13:39AM] Slot: -187, None[04/22/2017 - 05:13:39AM] Slot: -186, None[04/22/2017 - 05:13:39AM] Slot: -185, None[04/22/2017 - 05:13:39AM] Slot: -184, None[04/22/2017 - 05:13:39AM] Slot: -183, None[04/22/2017 - 05:13:39AM] Slot: -182, None[04/22/2017 - 05:13:39AM] Slot: -181, None[04/22/2017 - 05:13:39AM] Slot: -180, None[04/22/2017 - 05:13:39AM] Slot: -179, None[04/22/2017 - 05:13:39AM] Slot: -178, None[04/22/2017 - 05:13:39AM] Slot: -177, None[04/22/2017 - 05:13:39AM] Slot: -176, None[04/22/2017 - 05:13:39AM] Slot: -175, None[04/22/2017 - 05:13:39AM] Slot: -174, None[04/22/2017 - 05:13:39AM] Slot: -173, None[04/22/2017 - 05:13:39AM] Slot: -172, None[04/22/2017 - 05:13:39AM] Slot: -171, None[04/22/2017 - 05:13:39AM] Slot: -170, None[04/22/2017 - 05:13:39AM] Slot: -169, None[04/22/2017 - 05:13:39AM] Slot: -168, None[04/22/2017 - 05:13:39AM] Slot: -167, None[04/22/2017 - 05:13:39AM] Slot: -166, None[04/22/2017 - 05:13:39AM] Slot: -165, None[04/22/2017 - 05:13:39AM] Slot: -164, None[04/22/2017 - 05:13:39AM] Slot: -163, None[04/22/2017 - 05:13:39AM] Slot: -162, None[04/22/2017 - 05:13:39AM] Slot: -161, None[04/22/2017 - 05:13:39AM] Slot: -160, None[04/22/2017 - 05:13:39AM] Slot: -159, None[04/22/2017 - 05:13:39AM] Slot: -158, None[04/22/2017 - 05:13:39AM] Slot: -157, None[04/22/2017 - 05:13:39AM] Slot: -156, None[04/22/2017 - 05:13:39AM] Slot: -155, None[04/22/2017 - 05:13:39AM] Slot: -154, None[04/22/2017 - 05:13:39AM] Slot: -153, None[04/22/2017 - 05:13:39AM] Slot: -152, None[04/22/2017 - 05:13:39AM] Slot: -151, None[04/22/2017 - 05:13:39AM] Slot: -150, None[04/22/2017 - 05:13:39AM] Slot: -149, None[04/22/2017 - 05:13:39AM] Slot: -148, None[04/22/2017 - 05:13:39AM] Slot: -147, None[04/22/2017 - 05:13:39AM] Slot: -146, None[04/22/2017 - 05:13:39AM] Slot: -145, None[04/22/2017 - 05:13:39AM] Slot: -144, None[04/22/2017 - 05:13:39AM] Slot: -143, None[04/22/2017 - 05:13:39AM] Slot: -142, None[04/22/2017 - 05:13:39AM] Slot: -141, None[04/22/2017 - 05:13:39AM] Slot: -140, None[04/22/2017 - 05:13:39AM] Slot: -139, None[04/22/2017 - 05:13:39AM] Slot: -138, None[04/22/2017 - 05:13:39AM] Slot: -137, None[04/22/2017 - 05:13:39AM] Slot: -136, None[04/22/2017 - 05:13:39AM] Slot: -135, None[04/22/2017 - 05:13:39AM] Slot: -134, None[04/22/2017 - 05:13:39AM] Slot: -133, None[04/22/2017 - 05:13:39AM] Slot: -132, None[04/22/2017 - 05:13:39AM] Slot: -131, None[04/22/2017 - 05:13:39AM] Slot: -130, None[04/22/2017 - 05:13:39AM] Slot: -129, None[04/22/2017 - 05:13:39AM] Slot: -128, None[04/22/2017 - 05:13:39AM] Slot: -127, None[04/22/2017 - 05:13:39AM] Slot: -126, None[04/22/2017 - 05:13:39AM] Slot: -125, None[04/22/2017 - 05:13:39AM] Slot: -124, None[04/22/2017 - 05:13:39AM] Slot: -123, None[04/22/2017 - 05:13:39AM] Slot: -122, None[04/22/2017 - 05:13:39AM] Slot: -121, None[04/22/2017 - 05:13:39AM] Slot: -120, None[04/22/2017 - 05:13:39AM] Slot: -119, None[04/22/2017 - 05:13:39AM] Slot: -118, None[04/22/2017 - 05:13:39AM] Slot: -117, None[04/22/2017 - 05:13:39AM] Slot: -116, None[04/22/2017 - 05:13:39AM] Slot: -115, None[04/22/2017 - 05:13:39AM] Slot: -114, None[04/22/2017 - 05:13:39AM] Slot: -113, None[04/22/2017 - 05:13:39AM] Slot: -112, None[04/22/2017 - 05:13:39AM] Slot: -111, None[04/22/2017 - 05:13:39AM] Slot: -110, None[04/22/2017 - 05:13:39AM] Slot: -109, None[04/22/2017 - 05:13:39AM] Slot: -108, None[04/22/2017 - 05:13:39AM] Slot: -107, None[04/22/2017 - 05:13:39AM] Slot: -106, None[04/22/2017 - 05:13:39AM] Slot: -105, None[04/22/2017 - 05:13:39AM] Slot: -104, None[04/22/2017 - 05:13:39AM] Slot: -103, None[04/22/2017 - 05:13:39AM] Slot: -102, None[04/22/2017 - 05:13:39AM] Slot: -101, None[04/22/2017 - 05:13:39AM] Slot: -100, None[04/22/2017 - 05:13:39AM] Slot: -99, None[04/22/2017 - 05:13:39AM] Slot: -98, None[04/22/2017 - 05:13:39AM] Slot: -97, None[04/22/2017 - 05:13:39AM] Slot: -96, None[04/22/2017 - 05:13:39AM] Slot: -95, None[04/22/2017 - 05:13:39AM] Slot: -94, None[04/22/2017 - 05:13:39AM] Slot: -93, None[04/22/2017 - 05:13:39AM] Slot: -92, None[04/22/2017 - 05:13:39AM] Slot: -91, None[04/22/2017 - 05:13:39AM] Slot: -90, None[04/22/2017 - 05:13:39AM] Slot: -89, None[04/22/2017 - 05:13:39AM] Slot: -88, None[04/22/2017 - 05:13:39AM] Slot: -87, None[04/22/2017 - 05:13:39AM] Slot: -86, None[04/22/2017 - 05:13:39AM] Slot: -85, None[04/22/2017 - 05:13:39AM] Slot: -84, None[04/22/2017 - 05:13:39AM] Slot: -83, None[04/22/2017 - 05:13:39AM] Slot: -82, None[04/22/2017 - 05:13:39AM] Slot: -81, None[04/22/2017 - 05:13:39AM] Slot: -80, None[04/22/2017 - 05:13:39AM] Slot: -79, None[04/22/2017 - 05:13:39AM] Slot: -78, None[04/22/2017 - 05:13:39AM] Slot: -77, None[04/22/2017 - 05:13:39AM] Slot: -76, None[04/22/2017 - 05:13:39AM] Slot: -75, None[04/22/2017 - 05:13:39AM] Slot: -74, None[04/22/2017 - 05:13:39AM] Slot: -73, None[04/22/2017 - 05:13:39AM] Slot: -72, None[04/22/2017 - 05:13:39AM] Slot: -71, None[04/22/2017 - 05:13:39AM] Slot: -70, None[04/22/2017 - 05:13:39AM] Slot: -69, None[04/22/2017 - 05:13:39AM] Slot: -68, None[04/22/2017 - 05:13:39AM] Slot: -67, None[04/22/2017 - 05:13:39AM] Slot: -66, None[04/22/2017 - 05:13:39AM] Slot: -65, None[04/22/2017 - 05:13:39AM] Slot: -64, None[04/22/2017 - 05:13:39AM] Slot: -63, None[04/22/2017 - 05:13:39AM] Slot: -62, None[04/22/2017 - 05:13:39AM] Slot: -61, None[04/22/2017 - 05:13:39AM] Slot: -60, None[04/22/2017 - 05:13:39AM] Slot: -59, None[04/22/2017 - 05:13:39AM] Slot: -58, None[04/22/2017 - 05:13:39AM] Slot: -57, None[04/22/2017 - 05:13:39AM] Slot: -56, None[04/22/2017 - 05:13:39AM] Slot: -55, None[04/22/2017 - 05:13:39AM] Slot: -54, None[04/22/2017 - 05:13:39AM] Slot: -53, None[04/22/2017 - 05:13:39AM] Slot: -52, None[04/22/2017 - 05:13:39AM] Slot: -51, None[04/22/2017 - 05:13:39AM] Slot: -50, None[04/22/2017 - 05:13:39AM] Slot: -49, None[04/22/2017 - 05:13:39AM] Slot: -48, None[04/22/2017 - 05:13:39AM] Slot: -47, None[04/22/2017 - 05:13:39AM] Slot: -46, None[04/22/2017 - 05:13:39AM] Slot: -45, None[04/22/2017 - 05:13:39AM] Slot: -44, None[04/22/2017 - 05:13:39AM] Slot: -43, None[04/22/2017 - 05:13:39AM] Slot: -42, None[04/22/2017 - 05:13:39AM] Slot: -41, None[04/22/2017 - 05:13:39AM] Slot: -40, None[04/22/2017 - 05:13:39AM] Slot: -39, None[04/22/2017 - 05:13:39AM] Slot: -38, None[04/22/2017 - 05:13:39AM] Slot: -37, None[04/22/2017 - 05:13:39AM] Slot: -36, None[04/22/2017 - 05:13:39AM] Slot: -35, None[04/22/2017 - 05:13:39AM] Slot: -34, None[04/22/2017 - 05:13:39AM] Slot: -33, None[04/22/2017 - 05:13:39AM] Slot: -32, None[04/22/2017 - 05:13:39AM] Slot: -31, None[04/22/2017 - 05:13:39AM] Slot: -30, None[04/22/2017 - 05:13:39AM] Slot: -29, None[04/22/2017 - 05:13:39AM] Slot: -28, None[04/22/2017 - 05:13:39AM] Slot: -27, None[04/22/2017 - 05:13:39AM] Slot: -26, None[04/22/2017 - 05:13:39AM] Slot: -25, None[04/22/2017 - 05:13:39AM] Slot: -24, None[04/22/2017 - 05:13:39AM] Slot: -23, None[04/22/2017 - 05:13:39AM] Slot: -22, None[04/22/2017 - 05:13:39AM] Slot: -21, None[04/22/2017 - 05:13:39AM] Slot: -20, None[04/22/2017 - 05:13:39AM] Slot: -19, None[04/22/2017 - 05:13:39AM] Slot: -18, None[04/22/2017 - 05:13:39AM] Slot: -17, None[04/22/2017 - 05:13:39AM] Slot: -16, None[04/22/2017 - 05:13:39AM] Slot: -15, None[04/22/2017 - 05:13:39AM] Slot: -14, None[04/22/2017 - 05:13:39AM] Slot: -13, None[04/22/2017 - 05:13:39AM] Slot: -12, None[04/22/2017 - 05:13:39AM] Slot: -11, None[04/22/2017 - 05:13:39AM] Slot: -10, None[04/22/2017 - 05:13:39AM] Slot: -9, None[04/22/2017 - 05:13:39AM] Slot: -8, None[04/22/2017 - 05:13:39AM] Slot: -7, None[04/22/2017 - 05:13:39AM] Slot: -6, None[04/22/2017 - 05:13:39AM] Slot: -5, None[04/22/2017 - 05:13:39AM] Slot: -4, None[04/22/2017 - 05:13:39AM] Slot: -3, None[04/22/2017 - 05:13:39AM] Slot: -2, None[04/22/2017 - 05:13:39AM] Slot: -1, None[04/22/2017 - 05:13:39AM] Slot: 0, [item = [Form < (001C2216)>], model = [Form < (001C2215)>], modelName = "Armor\Minuteman\MHat.nif", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 1, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 2, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 3, [item = [Form < (001C2214)>], model = [Form < (001C2213)>], modelName = "Armor\Minuteman\MOutfit.nif", materialSwap = None, texture = [TextureSet < (0003EDE8)>]][04/22/2017 - 05:13:39AM] Slot: 4, [item = [Form < (001C2214)>], model = [Form < (000316C7)>], modelName = "Armor\Preston_Garvey\PrestonGarveyGloves.nif", materialSwap = None, texture = [TextureSet < (0003EDEA)>]][04/22/2017 - 05:13:39AM] Slot: 5, [item = [Form < (000316C7)>], model = [Form < (000316C7)>], modelName = "Armor\Preston_Garvey\PrestonGarveyGloves.nif", materialSwap = None, texture = [TextureSet < (0003EDEA)>]][04/22/2017 - 05:13:39AM] Slot: 6, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 7, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 8, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 9, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 10, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 11, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 12, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 13, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 14, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 15, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 16, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 17, [item = [Form < (001738AA)>], model = [Form < (001738A9)>], modelName = "Clothes\PoliceGlasses\MGlasses.nif", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 18, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 19, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 20, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 21, [item = [Form < (000316C7)>], model = [Form < (000316C7)>], modelName = "Armor\Preston_Garvey\PrestonGarveyGloves.nif", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 22, [item = None, model = None, modelName = "", materialSwap = None, texture = [TextureSet < (0003EDE8)>]][04/22/2017 - 05:13:39AM] Slot: 23, [item = None, model = None, modelName = "", materialSwap = None, texture = [TextureSet < (0003EDE8)>]][04/22/2017 - 05:13:39AM] Slot: 24, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 25, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 26, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 27, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 28, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 29, [item = [Form < (000EEBED)>], model = None, modelName = "Weapons\Grenade\GrenadeFrag.nif", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 30, [item = [Form < (00021B3B)>], model = [Form < (0001ED3D)>], modelName = "Pipboy\CharacterAssets\PipboyLowPlayer.nif", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 31, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 32, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 33, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 34, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 35, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 36, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 37, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 38, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 39, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 40, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 41, [item = [Form < (0014831B)>], model = None, modelName = "Weapons\HandMade\Recievers\DummyReciever.nif", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 42, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 43, [item = None, model = None, modelName = "", materialSwap = None, texture = None][04/22/2017 - 05:13:39AM] Slot: 44, None[04/22/2017 - 05:13:39AM] Slot: 45, None[04/22/2017 - 05:13:39AM] Slot: 46, None[04/22/2017 - 05:13:39AM] Slot: 47, None[04/22/2017 - 05:13:39AM] Slot: 48, None[04/22/2017 - 05:13:39AM] Slot: 49, None[04/22/2017 - 05:13:39AM] Slot: 50, None[04/22/2017 - 05:13:39AM] Slot: 51, None[04/22/2017 - 05:13:39AM] Slot: 52, None[04/22/2017 - 05:13:39AM] Slot: 53, None[04/22/2017 - 05:13:39AM] Slot: 54, None[04/22/2017 - 05:13:39AM] Slot: 55, None[04/22/2017 - 05:13:39AM] Slot: 56, None[04/22/2017 - 05:13:39AM] Slot: 57, None[04/22/2017 - 05:13:39AM] Slot: 58, None[04/22/2017 - 05:13:39AM] Slot: 59, None[04/22/2017 - 05:13:39AM] Slot: 60, None[04/22/2017 - 05:13:39AM] error: Cannot access an element of a None array Edited April 21, 2017 by KernalsEgg Link to comment Share on other sites More sharing options...
kitcat81 Posted April 21, 2017 Share Posted April 21, 2017 (edited) Great job with the research. I looked at the page once more and I think you are right. Looks like they go in the same order. If you need to unequip only a few head slots wich seem to be slightly bugged(?), you can force equip some item like raiders sack (something that takes all these slots) and then remove the sack. Edited April 21, 2017 by kitcat81 Link to comment Share on other sites More sharing options...
Magicockerel Posted April 21, 2017 Author Share Posted April 21, 2017 (edited) There's some funny business going on (or I'm an idiot and have missed something fundamental in my testing). Calling the following functions appears to unequip headgear*: *Please note that I'm subtracting 30 from the actual biped slot numbers shown in the CK. Biped slot descriptions have been taken from this page. Int[] Function GetHeadgearSlots() ; --------- ; Variables ; --------- Int HeadgearSlotCount Int IterationCount Int[] HeadgearSlots ; ---------- ; Operations ; ---------- HeadgearSlotCount = 6 HeadgearSlots = New Int[HeadgearSlotCount] HeadgearSlots[0] = 30 ; Hair on top of head / most hats HeadgearSlots[1] = 31 ; Long hair / flight cap linings / under helmet / hat hoods HeadgearSlots[2] = 46 ; Earrings / masks that cover face / headbands / (hats / helmets / hoods meant to show all hair) HeadgearSlots[3] = 47 ; Eyes (glasses / eyepatchs) HeadgearSlots[4] = 48 ; Beard (surgical mask / lower face masks) HeadgearSlots[5] = 49 ; Mouth (surgical mask / lower face masks) (toothpick / cigarette / joint / cigar / blunt / lip rings) IterationCount = 0 While (IterationCount <= HeadgearSlotCount-1) HeadgearSlots[IterationCount] -= 30 IterationCount += 1 EndWhile Return HeadgearSlots EndFunction Function UnequipHeadgear() ; --------- ; Variables ; --------- Int HeadgearSlotCount Int IterationCount Int[] HeadgearSlots ; ---------- ; Operations ; ---------- IterationCount = 0 HeadgearSlots = GetHeadgearSlots() HeadgearSlotCount = HeadgearSlots.Length While (IterationCount <= HeadgearSlotCount) PlayerRef.UnequipItemSlot(aiSlot = HeadgearSlots[IterationCount]) IterationCount += 1 EndWhile EndFunction However, my earlier attempts to unequip all slots (0 -> 29) failed to unequip headgear. So, yeah, not really sure why this works if that didn't. Again, this is testing done with a single set of headgear, I'll do more testing later. I've been busy with a couple other things, so I haven't done much more testing than this. However, I'll get it done and report back later today. Edit 1 Ok guys, I've finished the body of the mod that I've been working on relating to this post. I'll post the script below in spoilers. I've just attached the script to a quest, the only other form in the mod is a global variable (HH_GLOB_Hotkey), which allows you to define the DirectX Scan Code of the hotkey that you want to use. All the mod does is unequip your headgear when you press the hotkey and re-equip the same headgear when you press the hotkey again. All I really have left to add is a holotape to allow the user to define their desired hotkey. I don't have any experience with creating holotapes, so this might take a little while to work out. Beyond that there's just testing for bugs. The only shortcomings that I can think of are:-For some reason GetWornItem() only works in third person. It's not doing anything for me in first person, despite setting the parameter "firstPerson = True". I suppose this is ok, because I can't think why you'd want to toggle your headgear if you weren't able to see it anyway. Ideally I'd fix this, but I can't see a way around it.-Of course, as with equipping any item, you're only able to equip an item with the same base form ID. This means that if you have multiple of the same armour, but you've attached certain mods to one of them, the mod may not equip the armour with the desired modifications. The only way around this is if the item is persistent, which is rarely the case. ScriptName HH_QUST_Housekeeping_Script Extends Quest ; ========== ; Properties ; ========== ; -------------------- ; Auto Const Mandatory ; -------------------- Actor Property PlayerRef Auto Const Mandatory GlobalVariable Property HH_GLOB_Hotkey Auto Const Mandatory ; ----------- ; Auto Hidden ; ----------- Form[] Property Headgear Auto Hidden Int Property Hotkey Auto Hidden ; ====== ; Events ; ====== Auto State Equipped Event OnKeyDown(Int KeyCode) If (KeyCode == Hotkey) GetWornHeadgear() UnequipHeadgear() Self.GoToState("Unequipped") ElseIf (KeyCode != Hotkey) ErrorWarning() EndIf EndEvent EndState Event Actor.OnPlayerLoadGame(Actor akSender) EndEvent Event OnInit() Self.RegisterForRemoteEvent(akEventSource = PlayerRef, asEventName = "OnPlayerLoadGame") Hotkey = HH_GLOB_Hotkey.GetValue() As Int Self.RegisterForKey(Hotkey) EndEvent State Unequipped Event OnKeyDown(Int KeyCode) If (KeyCode == Hotkey) EquipHeadgear() Self.GoToState("Equipped") ElseIf (KeyCode != Hotkey) ErrorWarning() EndIf EndEvent EndState ; ========= ; Functions ; ========= Function ErrorWarning() Debug.Notification(asNotificationText = "Error: The incorrect hotkey has been registered") EndFunction Function EquipHeadgear() ; --------- ; Variables ; --------- Int HeadgearCount Int IterationCount ; ---------- ; Operations ; ---------- IterationCount = 0 HeadgearCount = Headgear.Length While (IterationCount <= HeadgearCount-1) PlayerRef.EquipItem(akItem = Headgear[IterationCount], abPreventRemoval = False, abSilent = True) IterationCount += 1 EndWhile EndFunction Form[] Function GetWornHeadgear() ; --------- ; Variables ; --------- Int DuplicateHeadgearCount Int HeadgearCount Int HeadgearSlotCount Int IterationCount Int SecondIterationCount Int[] HeadgearSlots ; ---------- ; Operations ; ---------- IterationCount = 0 HeadgearSlots = GetHeadgearSlots() HeadgearSlotCount = HeadgearSlots.Length Headgear = New Form[HeadgearSlotCount] HeadgearCount = Headgear.Length DuplicateHeadgearCount = 0 While (IterationCount <= HeadgearSlotCount-1) SecondIterationCount = 0 Actor:WornItem WornItem = PlayerRef.GetWornItem(SlotIndex = HeadgearSlots[IterationCount], FirstPerson = False) Headgear[IterationCount-DuplicateHeadgearCount] = WornItem.Item While (SecondIterationCount < (IterationCount-DuplicateHeadgearCount)) If (Headgear[IterationCount-DuplicateHeadgearCount] == Headgear[SecondIterationCount] || Headgear[IterationCount-DuplicateHeadgearCount] == None) Headgear.Remove(aiLocation = (IterationCount-DuplicateHeadgearCount), aiCount = 1) DuplicateHeadgearCount += 1 EndIf SecondIterationCount += 1 EndWhile IterationCount += 1 EndWhile Return Headgear EndFunction Function UnequipHeadgear() ; --------- ; Variables ; --------- Int HeadgearSlotCount Int IterationCount Int[] HeadgearSlots ; ---------- ; Operations ; ---------- IterationCount = 0 HeadgearSlots = GetHeadgearSlots() HeadgearSlotCount = HeadgearSlots.Length While (IterationCount <= HeadgearSlotCount-1) PlayerRef.UnequipItemSlot(aiSlot = HeadgearSlots[IterationCount]) IterationCount += 1 EndWhile EndFunction Int[] Function GetHeadgearSlots() ; --------- ; Variables ; --------- Int HeadgearSlotCount Int IterationCount Int[] HeadgearSlots ; ---------- ; Operations ; ---------- HeadgearSlotCount = 6 HeadgearSlots = New Int[HeadgearSlotCount] HeadgearSlots[0] = 30 ; Hair on top of head / most hats HeadgearSlots[1] = 31 ; Long hair / flight cap linings / under helmet / hat hoods HeadgearSlots[2] = 46 ; Earrings / masks that cover face / headbands / (hats / helmets / hoods meant to show all hair) HeadgearSlots[3] = 47 ; Eyes (glasses / eyepatchs) HeadgearSlots[4] = 48 ; Beard (surgical mask / lower face masks) HeadgearSlots[5] = 49 ; Mouth (surgical mask / lower face masks) (toothpick / cigarette / joint / cigar / blunt / lip rings) IterationCount = 0 While (IterationCount <= HeadgearSlotCount-1) HeadgearSlots[IterationCount] -= 30 IterationCount += 1 EndWhile Return HeadgearSlots EndFunction Edit 2 So I've got the mod working. I'll be uploading it once I record and upload a short video, and create a page for the file. Edited April 22, 2017 by KernalsEgg Link to comment Share on other sites More sharing options...
Magicockerel Posted April 22, 2017 Author Share Posted April 22, 2017 For anyone interested, I've published the mod. You can find it here on the Nexus. I've included the source code on the file page, so you guys should be able to figure out how everything works if you want. I'm pretty happy with how I've got everything set up. The biggest thing that isn't shown in any iteration on this page is how I've set up selecting the hotkey. I have the user select a menu option in a Pipboy holotape, prompt them to exit the Pipboy and then to select a hotkey. The hotkey becomes the first working hotkey that they press after leaving the inventory menu. Link to comment Share on other sites More sharing options...
scrivener07 Posted April 22, 2017 Share Posted April 22, 2017 Thanks for sharing your research KernalsEgg. Shavkacagarikia and I are the ones who wrote up the biped slot and related function pages. These pages should be changed if they are not accurate. I asked the F4SE team this same question on their reddit. https://www.reddit.com/r/f4se/comments/65yawp/f4se_031_beta_taking_requests/dgjv6bo/ Link to comment Share on other sites More sharing options...
Magicockerel Posted April 22, 2017 Author Share Posted April 22, 2017 As I said to Shavkacagarikia, thanks for your contributions to the CK wiki :) Link to comment Share on other sites More sharing options...
Lisselli Posted April 23, 2017 Share Posted April 23, 2017 (edited) Amazing find. But very err... unnecessary on Bethesda's part to make a change like that. But whatever, that's how those guys roll. Edited April 23, 2017 by Lisselli Link to comment Share on other sites More sharing options...
Magicockerel Posted April 23, 2017 Author Share Posted April 23, 2017 I have no experience with armour/weapon mods, I stick to scripting. So, to me the puzzling thing is why they start biped slots at 30 in the CK. Is there some sort of legacy reason for this? It at least appears to be the same in Skyrim, that's about as far back as I go with modding. Link to comment Share on other sites More sharing options...
Recommended Posts