- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- Sims 3 Custom Outfit
- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- Sims 3 Custom Outfit
Replies: 5 (Who?), Viewed: 499 times.
#1
16th Mar 2023 at 9:09 AM
Posts: 1,497
Thanks: 4279 in 41 Posts
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.
Advertisement
#2
16th Mar 2023 at 8:50 PM
Posts: 437
Thanks: 5331 in 22 Posts
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
If you enjoy the mods I put out, consider supporting me on patreon: www.patreon.com/Gamefreak130
#3
22nd Mar 2023 at 7:50 PM
Posts: 1,497
Thanks: 4279 in 41 Posts
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.
#4
24th Mar 2023 at 9:34 PM
Posts: 1,497
Thanks: 4279 in 41 Posts
@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?
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?
#5
27th Mar 2023 at 4:08 AM
Posts: 437
Thanks: 5331 in 22 Posts
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
If you enjoy the mods I put out, consider supporting me on patreon: www.patreon.com/Gamefreak130
#6
31st Mar 2023 at 11:54 PM
Posts: 1,497
Thanks: 4279 in 41 Posts
@gamefreak130 thank you so much!
Who Posted
|