#1
27th Nov 2023 at 6:39 PM
Last edited by Lycorisimpailer : 27th Jan 2024 at
12:47 AM.
Reason: Solved
[Solved] How do I make CC Accessory Masks be randomly chosen during Masquerade Parties?
I downloaded the VKG Bioshock accessory masks as custom content and put the package files in my Mods/ Packages folder. I want them to be a mask option when I use the Partius Maximus University Life statue to throw Masquerade parties. The cc masks show up in my game, but I have to use Nraas Mastercontroller in order to change the sims into the cc masks and I want to know if there is an easier way to do this than manually changing everyone's outfits.
I tried using
S3PE to open up the [Set] Party Pack.package. I looked at the CASP>Grid for the afAccessoryEP9MaskBeak and the cc mask package and I saw that the clothing categories were different, so I changed the cc clothing category to match that of the university life masks. This didn't work as the masks weren't randomly chosen.
I opened the S3SA file for StoreObjectsPartyStatue in the [Set] Party Pack.package in ILSpy. I saw the word outfit and masquerade close together, so I used SIMO to turn a mask into an outfit by clicking Add CAS parts and adding the cc mask caspart file I exported with s3pe. It looked different from the afAccessoryEP9MaskBeak SIMO when I click on full outfit data. I put the cc mask outfit and other files in the [Set] Party Pack.package and it still didn't work.
Code:
case AttireType.Masquerade:
{
string outfitName2 = GeneratePartyOutfitName(simDescription, CurrentAttire);
resourceKey = SetupSpecialOutfit(simDescription, outfitName2, OutfitCategories.Formalwear);
break;
}
Code:
private ResourceKey SetupSpecialOutfit(SimDescription desc, string outfitName, OutfitCategories outfitCategory)
{
SimOutfit outfit = desc.GetOutfit(outfitCategory, 0);
if (outfit != null)
{
SimOutfit outfit2 = null;
ResourceKey key = ResourceKey.CreateOutfitKey(outfitName, 0u);
if (OutfitUtils.TryGenerateSimOutfit(key, out outfit2) && OutfitUtils.TryApplyUniformToOutfit(outfit, outfit2, desc, "PartyStatue.Outfit", out var resultOutfit))
{
foreach (AttireType value in Enum.GetValues(typeof(AttireType)))
{
if (kOutfitCategories[(int)value] == OutfitCategories.Special)
{
desc.RemoveSpecialOutfit("PartyStatue" + value);
}
}
desc.AddSpecialOutfit(resultOutfit, "PartyStatue" + CurrentAttire);
return resultOutfit.Key;
}
}
return ResourceKey.kInvalidResourceKey;
}
Code:
private string GeneratePartyOutfitName(SimDescription desc, AttireType attire)
{
return attire switch
{
AttireType.Toga => (desc.AdultOrBelow ? "a" : "e") + (desc.IsFemale ? "f" : "m") + "PartyStatueToga" + RandomUtil.GetInt(1, 8),
AttireType.Masquerade => "a" + (desc.IsFemale ? "f" : "m") + "PartyStatueMasque" + RandomUtil.GetInt(1, 8),
_ => "",
};
}
Above are parts of the original S3SA that I think are related to the masquerade parties.