Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Quick Reply
Search this Thread
Scholar
Original Poster
#1 Old 16th Mar 2023 at 9:09 AM
Default Sims 3 Custom Outfit
I am having trouble changing my Sim's everyday outfit via scripting. I am looking at Magic Mirror, Face painting booth, Clothing Pedestal but still I am having a lot of trouble making the sim change outfit.

ResourceKey.CreateOutfitKey("amBodyTuxedo_everyday", 0u); <- Is this a good way to generate Outfit key? I feel like this is where I am going wrong.

This part of my code won't work
if (OutfitUtils.TryGenerateSimOutfit(TuxedoEverydayResourceKey, out outfit2))
{
StyledNotification.Show(new StyledNotification.Format(" Outfit CheckPoint 2 ",
StyledNotification.NotificationStyle.kGameMessagePositive));
//OutfitUtils.TryApplyUniformToOutfit(outfit2, outfit, simDescription, "MagicMirror.Outfit", out resultOutfit)

simDescription.RemoveOutfit(outfitCategories, 0, true);
simDescription.AddOutfit(outfit2, outfitCategories, 0);

}
The try generate Sim Outfit method must be failin cause the check point 2 notification won't appear.

If you like my mods. Consider supporting me on Patreon
Check out my website for updates on my mods and other work PuddingFace.wixsite.com
Check out my Youtube channel for tutorials(modding tutorials) and other content Youtube

Follow me on Twitter Instagram Pinterest Tumblr
Advertisement
Space Pony
#2 Old 16th Mar 2023 at 8:50 PM
Quote: Originally posted by PuddingFace
ResourceKey.CreateOutfitKey("amBodyTuxedo_everyday", 0u); <- Is this a good way to generate Outfit key? I feel like this is where I am going wrong.


From what I can tell, "amBodyTuxedo_everyday" is a CAS part, not an outfit, which is why it's failing the check. You'd probably need to create a custom outfit resource using the tuxedo CASP and reference that instead. There's a tutorial here on how to do that for custom career uniforms that might be applicable.

"The Internet is the first thing that humanity has built that humanity doesn't understand, the largest experiment in anarchy that we have ever had." - Eric Schmidt

If you enjoy the mods I put out, consider supporting me on patreon: www.patreon.com/Gamefreak130
Scholar
Original Poster
#3 Old 22nd Mar 2023 at 7:50 PM
Quote: Originally posted by gamefreak130
From what I can tell, "amBodyTuxedo_everyday" is a CAS part, not an outfit, which is why it's failing the check. You'd probably need to create a custom outfit resource using the tuxedo CASP and reference that instead. There's a tutorial here on how to do that for custom career uniforms that might be applicable.


Thank you I am looking at it. And the Gardening service mod.

If you like my mods. Consider supporting me on Patreon
Check out my website for updates on my mods and other work PuddingFace.wixsite.com
Check out my Youtube channel for tutorials(modding tutorials) and other content Youtube

Follow me on Twitter Instagram Pinterest Tumblr
Scholar
Original Poster
#4 Old 24th Mar 2023 at 9:34 PM
@gamefreak130 so I have finally managed to add the outfit but there's a problem. Only the outfit appears lol. Head is missing, feet are missing, and the hands are white instead of red. Do you know how I can avoid this?

if (OutfitUtils.TryGenerateSimOutfit(TuxedoEverydayResourceKey, out outfit))
{

simDescription.RemoveOutfit(outfitCategories, 0, true);
simDescription.AddOutfit(outfit, outfitCategories, 0);

}


public static ResourceKey ApplyUniformToOutfit(SimOutfit source, SimOutfit uniform, SimDescription simDesc, string uniformLogName) in this method what is uniformLogName? Is it the SIMO outfit name?
Screenshots

If you like my mods. Consider supporting me on Patreon
Check out my website for updates on my mods and other work PuddingFace.wixsite.com
Check out my Youtube channel for tutorials(modding tutorials) and other content Youtube

Follow me on Twitter Instagram Pinterest Tumblr
Space Pony
#5 Old 27th Mar 2023 at 4:08 AM
Quote: Originally posted by PuddingFace
@gamefreak130 so I have finally managed to add the outfit but there's a problem. Only the outfit appears lol. Head is missing, feet are missing, and the hands are white instead of red. Do you know how I can avoid this?


It looks like you're replacing the original everyday uniform with your custom one. What you might be able to do is apply the tuxedo outfit to the everyday outfit, then generate a new outfit from that to replace the original:

Code:
SimOutfit replacementOutfit = new SimOutfit(OutfitUtils.ApplyUniformToOutfit(simDescription.GetOutfit(outfitCategories, 0), outfit, simDescription, "[SomeUniformName]"));
simDescription.RemoveOutfit(outfitCategories, 0, true);
simDescription.AddOutfit(replacementOutfit, outfitCategories, 0);


Quote: Originally posted by PuddingFace
public static ResourceKey ApplyUniformToOutfit(SimOutfit source, SimOutfit uniform, SimDescription simDesc, string uniformLogName) in this method what is uniformLogName? Is it the SIMO outfit name?


I don't think it matters, as long as it's unique and you're consistent with it. It only seems to be used as a handle for caching the outfit.

"The Internet is the first thing that humanity has built that humanity doesn't understand, the largest experiment in anarchy that we have ever had." - Eric Schmidt

If you enjoy the mods I put out, consider supporting me on patreon: www.patreon.com/Gamefreak130
Scholar
Original Poster
#6 Old 31st Mar 2023 at 11:54 PM
@gamefreak130 thank you so much!
Screenshots

If you like my mods. Consider supporting me on Patreon
Check out my website for updates on my mods and other work PuddingFace.wixsite.com
Check out my Youtube channel for tutorials(modding tutorials) and other content Youtube

Follow me on Twitter Instagram Pinterest Tumblr
Back to top