Carabosse Posted February 18, 2018 Posted February 18, 2018 In my upcoming F4 mod, I've added custom undress/redress functions for client interactions, including having a stored favourite outfit which can be used as an alternative to undressing. It works via use of the wornitem struct detailed on the ck wiki and getwornitem function. Identifying armour pieces by biped slot and their item form from the wornitem struct. Outfit sets are held in arrays. It works perfectly, undress/redress - undress/alternative/redress etc, as long as I don't use vanilla armour/clothing items. Whenever a vanilla form is used it appears to return no value whereas mod added items never fail to. Is this an unavoidable property of vanilla items? Is there a work around? Ta.
Carabosse Posted February 18, 2018 Author Posted February 18, 2018 I'm starting to think that the issue is the way I'm stepping through biped slots. It just happens to be that a lot of vanilla outfits use multiple biped slots, whereas many mod added outfits use 1, or at least the ones I've been testing with. Christ on a bike, this would be a lot easier to fix without wine.
Carabosse Posted February 18, 2018 Author Posted February 18, 2018 Spotted this older topic: https://www.loverslab.com/topic/90998-redress-failing-bug/ Putting a check for and negating addition of SkinNaked and SkinNakedDirty armor to the arrays, allows it to work with vanilla items as well now. Thanks to Flashy (JoeR) for pointing that out.
Carabosse Posted February 18, 2018 Author Posted February 18, 2018 So it turned out that checking for SkinNaked etc was a bit of a red herring. During my tests something coincidental was allowing it to work. In the end what made it bullet proof (for me at least) was temporarily forcing the wearing of a dummy invisible over armour piece if the player only had a body biped armour piece equipped when doing the wearables check. Just had to make sure to clean the use of it up after and during clothing set switches.
Carreau Posted March 8, 2018 Posted March 8, 2018 Good info. I'm running into a slight bit of the reverse scenario. So, I have a script I'm attaching to certain armors, and have it attached to the SkinNaked as well. I'm adding/removing keywords right now, and the keywords aren't added when the player strips down. I'm thinking I'm getting into a race when the player strips the armor off. I don't know if the SkinNaked's OnEquip happens before the armor's OnUnequip event. If it does happen first, then my code will strip the keyword since I remove the specific keyword during the OnUnequip event.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.