- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- shower towels (hear me out)
- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- shower towels (hear me out)
Replies: 6 (Who?), Viewed: 1730 times.
#1
30th Jan 2022 at 3:14 AM
Posts: 4
id say im quite the connoisseur at sniffing mods out, especially ones that are really (like really) specific, but i don't think this exists elsewhere. within the depths that is the cursed mod of kw there is an interaction that has sims change into a towel (the towel from late night im pretty sure) after showering instead of the outfit they were wearing previously. this was life changing. absolutely ground breaking. the piece to my puzzle that i needed in my game to fully immerse myself. unfortunately kw is a fairly heavy mod and conflicted with a good handful of mods i already had in my game so i booted it, the towel shower interaction gone with it. i have been empty since.
code and mods scare me. i truly think that if i tackled this by just reading the modding tuts on this site id mess up my game and who wants that? so here i ask the community nicely: if i were, hypothetically, to go about making a mod that makes it so a sim changes into a towel instead of any other outfit after they shower, AND STAY IN THE TOWEL UNTIL I SAY SO, how would i do that? i know its possible i just am not the brightest in that field. i dont need a super in depth explanation, just a few pointers in the right direction and ill probably be able to figure it out.
- i also want to mention, ya i used consorts dresscode mod and it didn't achieve what i wanted. great mod tho use it for school uniforms 10/10 highly reccomend.
Test Subject
#2
30th Jan 2022 at 4:02 AM
Posts: 14
i unfortunately know nothing about modding, but i second this!! i would love to have this feature in my game ☺️
#3
30th Jan 2022 at 10:51 AM
Posts: 619
Thanks: 5028 in 28 Posts
There is actually a mod that somewhat works like this on Simlogical (public showers mod http://www.simlogical.com/ContentUp...e/uploads/1129/)
But I do remember hearing people having some issues with it, like sims resetting or something.
To make a mod that does this, I don't think it would be too difficult, as it would involve making a Shower interaction, almost identical to the existing one, but just instead of changing back into regular clothes, they'd wear the towel outfit. However, script mods do require some knowledge of coding in C#, or at least be able to follow what's going on in the EA code and change accordingly. Though again for this project, I don't think you'll need to write very much code at all - more just copy/pasting the necessary parts from the EA interaction.
You could also approach this a couple different ways:
-You could make a new shower object like the public showers mod, and have your interaction only on that. You'd need to follow the Object modding tutorial https://modthesims.info/wiki.php?ti..._Object_Modding
The benefits of this would be it's sliightly easier to get object mods to work than pure mods. And the existing EA showers would be untouched, which may be considered a con, if you want all showers to have the same functionality :p
-Pure modding is the other option (tut: http://www.simlogical.com/ContentUp..._script_mod.pdf) where you add the interaction to all existing showers in a save, and check when a new shower is added, so you can add the interaction then too. It's a little more tricky to do but then all showers will have your interaction.
-Instead of adding the interaction, you could replace the old shower one with your custom one, which is also Pure modding, but instead of looping through all showers in the world, you just replace the interaction definition. So a bit easier actually :p
I don't think you could do anything that would actually mess up your game! Of course it's best to test mods in a new save, or if you want to be extra careful you can do your mod testing in a new sims 3 folder. But generally the worst thing that can happen is your mod doesn't work, sim resets, game crashes, game won't even load... and to fix your game, just take out the mod! And try to work out where it went wrong :p
But when you get further into it, feel free to post here with questions/issues and I'm sure someone can help
Pudding Face also has some video tutorials which you might prefer to the written ones: https://www.youtube.com/watch?v=nUy...E-AqfmgT9uAPjs_
But I do remember hearing people having some issues with it, like sims resetting or something.
To make a mod that does this, I don't think it would be too difficult, as it would involve making a Shower interaction, almost identical to the existing one, but just instead of changing back into regular clothes, they'd wear the towel outfit. However, script mods do require some knowledge of coding in C#, or at least be able to follow what's going on in the EA code and change accordingly. Though again for this project, I don't think you'll need to write very much code at all - more just copy/pasting the necessary parts from the EA interaction.
You could also approach this a couple different ways:
-You could make a new shower object like the public showers mod, and have your interaction only on that. You'd need to follow the Object modding tutorial https://modthesims.info/wiki.php?ti..._Object_Modding
The benefits of this would be it's sliightly easier to get object mods to work than pure mods. And the existing EA showers would be untouched, which may be considered a con, if you want all showers to have the same functionality :p
-Pure modding is the other option (tut: http://www.simlogical.com/ContentUp..._script_mod.pdf) where you add the interaction to all existing showers in a save, and check when a new shower is added, so you can add the interaction then too. It's a little more tricky to do but then all showers will have your interaction.
-Instead of adding the interaction, you could replace the old shower one with your custom one, which is also Pure modding, but instead of looping through all showers in the world, you just replace the interaction definition. So a bit easier actually :p
I don't think you could do anything that would actually mess up your game! Of course it's best to test mods in a new save, or if you want to be extra careful you can do your mod testing in a new sims 3 folder. But generally the worst thing that can happen is your mod doesn't work, sim resets, game crashes, game won't even load... and to fix your game, just take out the mod! And try to work out where it went wrong :p
But when you get further into it, feel free to post here with questions/issues and I'm sure someone can help

Pudding Face also has some video tutorials which you might prefer to the written ones: https://www.youtube.com/watch?v=nUy...E-AqfmgT9uAPjs_
#4
30th Jan 2022 at 4:04 PM
Posts: 4
Quote: Originally posted by zoe22
|
There is actually a mod that somewhat works like this on Simlogical (public showers mod http://www.simlogical.com/ContentUp...e/uploads/1129/) But I do remember hearing people having some issues with it, like sims resetting or something. To make a mod that does this, I don't think it would be too difficult, as it would involve making a Shower interaction, almost identical to the existing one, but just instead of changing back into regular clothes, they'd wear the towel outfit. However, script mods do require some knowledge of coding in C#, or at least be able to follow what's going on in the EA code and change accordingly. Though again for this project, I don't think you'll need to write very much code at all - more just copy/pasting the necessary parts from the EA interaction. You could also approach this a couple different ways: -You could make a new shower object like the public showers mod, and have your interaction only on that. You'd need to follow the Object modding tutorial https://modthesims.info/wiki.php?ti..._Object_Modding The benefits of this would be it's sliightly easier to get object mods to work than pure mods. And the existing EA showers would be untouched, which may be considered a con, if you want all showers to have the same functionality :p -Pure modding is the other option (tut: http://www.simlogical.com/ContentUp..._script_mod.pdf) where you add the interaction to all existing showers in a save, and check when a new shower is added, so you can add the interaction then too. It's a little more tricky to do but then all showers will have your interaction. -Instead of adding the interaction, you could replace the old shower one with your custom one, which is also Pure modding, but instead of looping through all showers in the world, you just replace the interaction definition. So a bit easier actually :p I don't think you could do anything that would actually mess up your game! Of course it's best to test mods in a new save, or if you want to be extra careful you can do your mod testing in a new sims 3 folder. But generally the worst thing that can happen is your mod doesn't work, sim resets, game crashes, game won't even load... and to fix your game, just take out the mod! And try to work out where it went wrong :p But when you get further into it, feel free to post here with questions/issues and I'm sure someone can help ![]() Pudding Face also has some video tutorials which you might prefer to the written ones: https://www.youtube.com/watch?v=nUy...E-AqfmgT9uAPjs_ |
hello hello thank u so much for responding! my end game goal is to make it so this works for any shower, cc or base game. thanks so much for the tuts and the explanation lol it makes it a biiiit easier for me. i hope i can figure this out !!!
#5
30th Jan 2022 at 9:20 PM
Posts: 769
Thanks: 8444 in 14 Posts
The decision what outfit to put on after a shower seems to be in // Sims3.Gameplay.Actors.Sim.GetOutfitForClothingChange(ClothesChangeReason reason, out OutfitCategories category). Thats in the Sim class and notoriously difficult to override. Clothes change reason will most likely be submitted by the shower or tub object interaction. Also not trivial to get a hook into all of those objects.
I would suggest you pop by at Nraas and ask if it's super difficult to incorporate your idea into the Shoeless mod. They have a global option for naked toilet use, which should be very similar in nature. The mod's source code also should be on GitHub, perhaps someone can find out how Nraas pulls of that trick.
I would suggest you pop by at Nraas and ask if it's super difficult to incorporate your idea into the Shoeless mod. They have a global option for naked toilet use, which should be very similar in nature. The mod's source code also should be on GitHub, perhaps someone can find out how Nraas pulls of that trick.
Test Subject
#6
31st Jan 2022 at 6:53 PM
Posts: 3
Like @Consort says you need to change the bit where the game decides during the TakeShower interaction what outfit a Sim wears after a shower. Luckily you can do this quite easily by passing the outfit category and index to the method instead of these being determined automatically, so going from:
to e.g.
The main issue with using the SkinnyDippingTowel category that I can think of is that it brings with it other hardcoded functionality, i.e. your Sims will probably act like someone has stolen their clothes every time they get out of the shower (could be fun I guess
). Instead I'd maybe recommend using a similar approach to Kinky World by creating and storing a Special outfit that you can then pass to SwitchOutfitHelper.
Here's a quick and messy go at this - I've mentioned some potential issues (e.g. missing morphs) but there will be others to consider:
Code:
// default functionality, outfit decided based on time of day etc mSwitchOutfitHelper = new Sim.SwitchOutfitHelper(Actor, Sim.ClothesChangeReason.GettingOutOfBath);
to e.g.
Code:
// force Sim to change into SkinnyDippingTowel outfit instead mSwitchOutfitHelper = new Sim.SwitchOutfitHelper(Actor, OutfitCategories.SkinnyDippingTowel, 0);
The main issue with using the SkinnyDippingTowel category that I can think of is that it brings with it other hardcoded functionality, i.e. your Sims will probably act like someone has stolen their clothes every time they get out of the shower (could be fun I guess
). Instead I'd maybe recommend using a similar approach to Kinky World by creating and storing a Special outfit that you can then pass to SwitchOutfitHelper.Here's a quick and messy go at this - I've mentioned some potential issues (e.g. missing morphs) but there will be others to consider:
Code:
using Sims3.Gameplay.Abstracts;
using Sims3.Gameplay.Actors;
using Sims3.Gameplay.ActorSystems;
using Sims3.Gameplay.Autonomy;
using Sims3.Gameplay.CAS;
using Sims3.Gameplay.Controllers;
using Sims3.Gameplay.Core;
using Sims3.Gameplay.Interactions;
using Sims3.Gameplay.Objects.Plumbing;
using Sims3.Gameplay.Skills;
using Sims3.Gameplay.TuningValues;
using Sims3.SimIFace;
using Sims3.SimIFace.CAS;
namespace Zutroy.TowelAfterShower
{
public class TakeShowerEx : Shower.TakeShower
{
public override bool Run() // changes to original interaction are commented, everything else is identical
{
if (!Target.SimLine.WaitForTurn(this, SimQueue.WaitBehavior.DefaultEvict, ExitReason.Default, Shower.kTimeToWaitToEvict))
{
return false;
}
// validate towel outfit - see below
CheckTowelOutfit(Actor.SimDescription);
mSwitchOutfitHelper = new Sim.SwitchOutfitHelper(Actor, Sim.ClothesChangeReason.GoingToBathe);
mSwitchOutfitHelper.Start();
if (Actor.HasTrait(TraitNames.Hydrophobic))
{
Actor.PlayReaction(ReactionTypes.WhyMe, Target as GameObject, ReactionSpeed.ImmediateWithoutOverlay);
}
if (Actor.HasTrait(TraitNames.Daredevil))
{
TraitTipsManager.ShowTraitTip(13271263770231521888uL, Actor, TraitTipsManager.TraitTipCounterIndex.Daredevil, TraitTipsManager.kDaredevilCountOfShowersTaken);
}
if (!Actor.RouteToSlotAndCheckInUse(Target, Slot.RoutingSlot_0))
{
return false;
}
mSituation = new Shower.ShowerPrivacySituation(this);
if (!mSituation.Start())
{
return false;
}
StandardEntry();
if (!Actor.RouteToSlot(Target, Slot.RoutingSlot_0))
{
mSituation.Exit();
StandardExit();
return false;
}
if (Autonomous)
{
mPriority = new InteractionPriority(InteractionPriorityLevel.UserDirected);
}
mSwitchOutfitHelper.Wait(true);
bool daredevilPerforming = Actor.DaredevilPerforming;
bool flag = Actor.GetCurrentOutfitCategoryFromOutfitInGameObject() == OutfitCategories.Singed;
EnterStateMachine("Shower", "Enter", "x");
SetActor("Shower", Target);
mSituation.StateMachine = mCurrentStateMachine;
SetParameter("IsShowerTub", Target.IsShowerTub);
SetParameter("SimShouldCloseDoor", true);
SetParameter("SimShouldClothesChange", !daredevilPerforming && !flag && !Actor.OccultManager.DisallowClothesChange() && !Actor.BuffManager.DisallowClothesChange());
bool flag2 = false;
if (Target.BoobyTrapComponent != null && Target.BoobyTrapComponent.CanTriggerTrap(Actor.SimDescription))
{
flag2 = !Actor.OccultManager.DisallowClothesChange() && !Actor.BuffManager.DisallowClothesChange();
}
SimDescription simDescription = (Target.BoobyTrapComponent != null && Target.BoobyTrapComponent.TrapSetter != 0) ? SimDescription.Find(Target.BoobyTrapComponent.TrapSetter) : null;
if (simDescription != null && simDescription.IsFairy && Actor.BuffManager.HasElement(BuffNames.TrickedByAFairy))
{
flag2 = false;
}
SetParameter("isBoobyTrapped", flag2);
mSwitchOutfitHelper.AddScriptEventHandler(this);
AddOneShotScriptEventHandler(1001u, EventCallbackStartShoweringSound);
if (Actor.HasTrait(TraitNames.Virtuoso) || RandomUtil.RandomChance(Target.TuningShower.ChanceOfSinging))
{
AddOneShotScriptEventHandler(200u, EventCallbackStartSinging);
}
PetStartleBehavior.CheckForStartle(Target as GameObject, StartleType.ShowerOn);
AnimateSim("Loop Shower");
Actor.BuffManager.AddElement(BuffNames.SavingWater, Origin.FromShower, ProductVersion.EP2, TraitNames.EnvironmentallyConscious);
mShowerStage.ResetCompletionTime(GetShowerTime());
StartStages();
if (Actor.HasTrait(TraitNames.EnvironmentallyConscious))
{
BeginCommodityUpdate(CommodityKind.Hygiene, Shower.kEnvironmentallyConsciousShowerSpeedMultiplier);
}
if (Actor.SimDescription.IsPlantSim)
{
ModifyCommodityUpdate(CommodityKind.Hygiene, Shower.kPlantSimHygieneModifier);
}
BeginCommodityUpdates();
if (flag2)
{
ApplyBoobyTrapOutfit();
if (simDescription != null && simDescription.IsFairy)
{
Actor.BuffManager.AddElement(BuffNames.TrickedByAFairy, Origin.FromFairy);
}
}
bool flag3 = false;
try
{
Target.SimInShower = Actor;
flag3 = DoLoop(ExitReason.Default, DuringShower, null);
if (HavingWooHoo && Actor.HasExitReason(ExitReason.StageComplete))
{
flag3 = DoLoop(~(ExitReason.StageComplete | ExitReason.MaxSkillPointsReached | ExitReason.PlayIdle | ExitReason.ObjectStateChanged | ExitReason.MidRoutePushRequested | ExitReason.Replan), DuringShower, null);
}
}
finally
{
Target.SimInShower = null;
}
while (HavingWooHoo)
{
Simulator.Sleep(10u);
}
EndCommodityUpdates(flag3);
Shower.WaitToLeaveShower(Actor, Target);
if (flag3)
{
Shower.ApplyPostShowerEffects(Actor, Target);
}
if (flag2)
{
SetParameter("isBoobyTrapped", false);
AddOneShotScriptEventHandler(201u, EventCallbackStopSinging);
AddOneShotScriptEventHandler(1002u, EventCallbackStopShoweringSound);
if (simDescription != null && simDescription.IsFairy)
{
AnimateSim("TriggerFairyTrap");
}
else
{
AnimateSim("Booby Trap Reaction");
}
AddOneShotScriptEventHandler(1001u, EventCallbackStartShoweringSound);
AnimateSim("Loop Shower");
RemoveBoobyTrapOutfit();
Simulator.Sleep(60u);
}
if (flag && flag3)
{
mSwitchOutfitHelper.Dispose();
mSwitchOutfitHelper = new Sim.SwitchOutfitHelper(Actor, Sim.ClothesChangeReason.GoingToBathe);
mSwitchOutfitHelper.Start();
mSwitchOutfitHelper.Wait(false);
mSwitchOutfitHelper.ChangeOutfit();
}
bool flag4 = false;
if ((flag && flag3) || (!flag && !daredevilPerforming))
{
SetParameter("SimShouldClothesChange", !Actor.OccultManager.DisallowClothesChange() && !Actor.BuffManager.DisallowClothesChange());
mSwitchOutfitHelper.Dispose();
// post-shower outfit change depends on whether Sim has a valid towel outfit
if (HasTowelOutfit(Actor.SimDescription))
{
// if they do then change into the towel outfit
mSwitchOutfitHelper = new Sim.SwitchOutfitHelper(Actor, OutfitCategories.Special, Actor.SimDescription.GetSpecialOutfitIndexFromKey(ResourceUtils.HashString32("towel")));
}
else
{
// else revert to default code
mSwitchOutfitHelper = new Sim.SwitchOutfitHelper(Actor, Sim.ClothesChangeReason.GettingOutOfBath);
}
mSwitchOutfitHelper.Start();
mSwitchOutfitHelper.AddScriptEventHandler(this);
mSwitchOutfitHelper.Wait(false);
flag4 = true;
}
Target.Cleanable.DirtyInc(Actor);
AddOneShotScriptEventHandler(201u, EventCallbackStopSinging);
AddOneShotScriptEventHandler(1002u, EventCallbackStopShoweringSound);
if (flag4 && InventingSkill.IsBeingDetonated(Target as GameObject))
{
SetParameter("SimShouldClothesChange", false);
mSwitchOutfitHelper.Abort();
mSwitchOutfitHelper.Dispose();
}
if (Target.Repairable.UpdateBreakage(Actor))
{
Target.StartBrokenFXInAnim(mCurrentStateMachine);
AnimateSim("Exit Broken");
}
else
{
AnimateSim("Exit Working");
}
if (Actor.SimDescription.IsMummy || Actor.DaredevilPerforming || (Actor.TraitManager.HasElement(TraitNames.Slob) && RandomUtil.RandomChance01(TraitTuning.SlobTraitChanceToLeavePuddle)))
{
PuddleManager.AddPuddle(Actor.Position);
}
if (flag3)
{
Actor.BuffManager.RemoveElement(BuffNames.GotFleasHuman);
}
StandardExit();
return flag3;
}
public static void CheckTowelOutfit(SimDescription sd)
{
// don't do anything different if Late Night isn't installed
if (!GameUtils.IsInstalled(ProductVersion.EP3))
{
return;
}
// add towel outfit if Sim doesn't already have one and is allowed to wear one
if (!HasTowelOutfit(sd) && CanWearTowel(sd))
{
string name = string.Format("{0}{1}{2}", OutfitUtils.GetGenderPrefix(sd.Gender), OutfitUtils.GetAgePrefix(sd.Age, true), "_towel");
SimOutfit simOutfit = OutfitUtils.CreateOutfitForSim(sd, ResourceKey.CreateOutfitKeyFromProductVersion(name, ProductVersion.EP3), OutfitCategories.None, OutfitCategories.Naked, false);
if (simOutfit != null && simOutfit.IsValid)
{
// add to Special category instead of SkinnyDippingTowel - "towel" is used to determine the outfit in the main interaction
sd.AddSpecialOutfit(simOutfit, "towel");
}
}
}
public static bool HasTowelOutfit(SimDescription sd)
{
return sd.GetSpecialOutfit("towel") != null;
}
public static bool CanWearTowel(SimDescription sd)
{
// the game only has morphs for adults and elders - can potentially add support for custom content (e.g. ATS3 Spa towels) to get around this if needed
if (sd.TeenOrBelow)
{
return false;
}
// towels don't have pregnancy morphs
if (sd.IsVisuallyPregnant)
{
return false;
}
// other checks go here
return true;
}
}
}
#7
31st Jan 2022 at 7:48 PM
Posts: 4
@Zutroy HI! thanks for this honestly i've been a little lost trying to get this to work. what exactly did kinky world do to achieve this? also what's a special outfit? i think i might've overestimated my ability with this a bit too much.
Who Posted
|
|
Sign in to Mod The Sims