- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- Help - Potty Train Self Mod
- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- Help - Potty Train Self Mod
Replies: 11 (Who?), Viewed: 1039 times.
#1
25th Feb 2021 at 12:54 PM
Posts: 845
Thanks: 368 in 3 Posts
Help - Potty Train Self Mod
My mod's main idea is that toddlers have busy parents / caretakers and shouldn't have to wait on them to learn such an essential skill in life, that is potty training! Also, I want to give a higher chance to townie toddlers to autonomously learn to use the potty chair and I think that it will happen more successfully if caretakers' involvement is not a requirement.My tuning: Inside of the gameplaydata, I found the file "UsePottyChair_PottyChair" and tuned the "SkillThresholdValue" from "1" to "0", making the "use potty chair" interaction available even to toddlers who have not gained the "potty training" skill.
After testing, it turns out that the toddler is only able to unlock the "use the potty chair" interaction on the game's object *at the strict pre-condition* that a caretaker has, AT LEAST ONCE, sat them on the potty chair for the first time. Why? Because that's when the game considers that the skill has started to register.
What I want is:
* to get rid of that "skill being registered by the caretaker action" condition. How can I bypass this requirement?
* to start seeing a skill progress bar above the toddler's head when they use the potty chair. How can I make that happen?
@nitzims has kindly provided feedback and reviewed + contributed code for the project, to lift the restriction to involve the parent. When I use the code in Visual Studio, I get the following error message: "No overload for method 'UnRegisterForSkillLevelUpEvent' takes 1 arguments".
I'm attaching my VisualStudio source code - I can't seem to be able to upload my tuning package file (MTS won't take the zip file). If needed I can create a link to the file on Dropbox.
Can anyone help me get unstuck? I'm not sure what to do next to get this going, or even if it's possible to achieve at all...?
Attached files:
MissPatTS3.PottyTrainSelf_VS.zip (27.3 KB, 38 downloads) |
Advertisement
Field Researcher
#2
25th Feb 2021 at 1:37 PM
When I was looking at this for my auto-potty-training addon to TheSweetToddler's mod, I think I saw that the level this skill - and every other not-even-started skill? - is initially set to is -1, not 0. So maybe setting it to 0 instead of -1 is what happens that first time to register the skill? You could check if that's true that with MasterController, and if it is, do something like what my auto-potty-training mod does for the older life stages, to set every toddler with level -1 potty training skill to 0 instead when a world loads/they age up to toddler/they're created as a toddler.
Not sure about the progress bar question though!
Not sure about the progress bar question though!
#3
25th Feb 2021 at 2:27 PM
Posts: 845
Thanks: 368 in 3 Posts
Oh, that is super insightful! Thank you so much liz, going to try this tonight and publish an update.
#4
25th Feb 2021 at 2:40 PM
Posts: 3,856
Thanks: 8483 in 67 Posts
Quote: Originally posted by lizcandor
When I was looking at this for my auto-potty-training addon to TheSweetToddler's mod, I think I saw that the level this skill - and every other not-even-started skill? - is initially set to is -1, not 0. So maybe setting it to 0 instead of -1 is what happens that first time to register the skill? You could check if that's true that with MasterController, and if it is, do something like what my auto-potty-training mod does for the older life stages, to set every toddler with level -1 potty training skill to 0 instead when a world loads/they age up to toddler/they're created as a toddler. Not sure about the progress bar question though! |
Basically, -1 is a way for the UI to know "Oh this isn't the correct integer as it's a negative number, therefore we should never show the skill" (Because all sims do have all skills set for them, just that you can't see them in the UI)
Quote:
* to start seeing a skill progress bar above the toddler's head when they use the potty chair. How can I make that happen? |
Actually quite easy! In your run function do:
Code:
Skill skill = base.Target.SkillManager.AddElement(SkillNames.PottyTrain); skill.StartSkillGain(num / 60f, showSkillMeterEvenForNpc); (OR DO: skill.StartSkillGain()) /// When done: skill.StopSkillGain();
But that's just the easy way of doing it The actual potty training code actually has this whole stuff of how many points to give it depending on traits, nannies and such.
#5
25th Feb 2021 at 5:26 PM
Posts: 845
Thanks: 368 in 3 Posts
Wow, thank you so much for the piece of code Lyralei! Going to test it and let you know how it went.
#6
27th Feb 2021 at 1:59 AM
Posts: 845
Thanks: 368 in 3 Posts
Tiny update: problem #1 is now solved! Tuning the "SkillThresholdValue" to "-1" (instead of "0") successfully unlocks the "use the potty chair" interaction for all toddlers, even those that no adult ever sat on the chair! Yay, thank you both lizcandor and Lyralei for this insight! I'd never have thought about using this negative value.
I need to implement the "skill progress bar above toddlers head" code tomorrow, will let you know how it went!
I need to implement the "skill progress bar above toddlers head" code tomorrow, will let you know how it went!
#7
5th Mar 2021 at 5:02 PM
Last edited by MissPat : 11th Mar 2021 at 5:07 PM.
Posts: 845
Thanks: 368 in 3 Posts
EA Default Values for Potty Training
Small progress & update: I've done what I call a "benchmark" gameplay with no mods affecting the potty training skill, and found this data for reference (includes looking up EA's own ITUN files data):Description | EA Default |
---|---|
Who can use the potty chair | Only toddlers who have already gained the "potty training" skill |
How long the toddler sits on the potty chair, per 1x "use the potty chair" interaction | 25 sim minutes |
How many "potty training" skill points the toddler gains, per 1x "use the potty chair" interaction | 225 skill points/30 min (EA code says: 550 skill points per hour and seems that EA grants all 550 points for each cycle of sitting on the potty chair) |
How many total "potty training" skill points a toddler needs to acquire, for the game to consider s.he is potty trained | 1200 skill points total |
How many times does the toddler need to sit on the potty chair, to gain the skill | 3 times |
How many days does it take for a toddler to go through the required cycles of bladder needs (see line above) | 3 days - at the condition that the toddler has not been bathed, since bathing fills up the Bladder motive along with the Hygiene motive! |
What pushes the toddler to autonomously use the potty chair | Nothing when the toddler is not potty trained yet: they have a Bladder "accident" and then their Bladder motive goes back to full, while their Hygiene motive goes in the red (that's when the caretaker has to bathe / change them. Also need to bathe the toddler *anyway* at least every 3 days due to naturally failing hygiene motive). |
CORRECTION
I wrote "Also: at the condition that the toddler's caretaker (parent/robonanny/daycare pro) has not used the "change the diaper" interaction which fills up the Bladder motive." However after testing in-game this statement, it turns out that there is no such interaction as "change the diaper" in the game, that fills up both the Hygiene bar and the Bladder bar.
The interaction name is only "change" and it only fills up the "Hygiene" bar. Mea maxima culpa.
#8
5th Mar 2021 at 5:59 PM
Last edited by MissPat : 11th Mar 2021 at 5:02 PM.
Posts: 845
Thanks: 368 in 3 Posts
Baby / Toddler Wipes Mod Idea
The main insight/breakthrough I had through my "benchmark" gameplay of the potty training skill, is that caretakers will unknowingly ruin critical opportunities for toddlers to learn the skill, when looking after the toddler's hygiene motive. Indeed, as it turns out, It may not sound like a big deal, but it is annoying when you consider that in a "normal" lifespan, your toddler has 7 days to learn all 3 essential skills (potty train, talk, walk) and then some extra skills like they do when playing with the xylophone / activity table and so on.
Do also keep in mind that my mod ideas are almost always geared towards townies - and in this case townie toddlers - achieving things autonomously, on their own, as opposed to the vanilla EA, user-directs-all gameplay.
Strong (and frustrated by) this discovery, I took it to Discord and asked:
Quote:
So I have a question for moms / dads in real life: I want to make TS3 toddlers learn to use the potty chair on their own. Untrained toddlers can click on the potty chair and have the "use the potty chair" interaction which is by default only available to trained toddlers. It's great to learn the skill as soon as I see the toddler's bladder bar way down. Problem in my test gameplay is: as soon as the caretaker sees the toddler has a low hygiene bar, the caretaker bathes them. Problem is, it deprives the toddler of an opportunity to potty train, since bathing them fills up BOTH the bladder and hygiene bars. My question is: what would be a realistic interaction where the toddler could have their hygiene bar filled up, without their bladder bar being filled up...? |
The amazing @SimsKtar came to the rescue and made a jaw-dropping really good point:
Quote:
Washing their face and hands. Sometimes just hands, but with toddlers it’s often the face as well. I mean, IRL we often use baby wipes, but that’d require soooo much work in sims. |
This is nothing short of a brilliant idea and the kind of gameplay breakthrough I live for, as a Tuning Modder and a (very struggling) aspiring script modder! Baby / toddlers wipes mod idea was born from this exchange and I'll be creating a separate thread to discuss that very mod development.
For now, back to working on the "Potty Train Self" mod. Hope that sounds like a cool thing to do with my days.
#9
11th Mar 2021 at 4:52 PM
Posts: 845
Thanks: 368 in 3 Posts
Short but mighty update: I did a final "benchmark" gameplay using EA default value for the potty chair usage, and it turns out that it took a whopping 16 hours for my test potty-trained toddler, to go from a full Bladder bar, to a critical orange Bladder (bar only about 5% full), when he autonomously decided to go and use the potty chair.
Judging from this data, the bladder of EA programmers' toddlers must be made of steel.
NEXT STEPS
Then it will be time to take fun game pics for the MTS upload queue. Can you believe I found colorful toilet paper rolls CC just yesterday! So ready to use them.
CORRECTION
I've edited one of my posts above where I claimed that the "change" interaction performed by a caretaker on a toddler filled up the Bladder bar of toddlers. I assumed "change" meant "change the diaper". Wrong assumption on my end. Mea culpa. I've tested this interaction, and it does not fill up the Bladder bar of the toddler, at all. It only fills up their Hygiene bar.
Judging from this data, the bladder of EA programmers' toddlers must be made of steel.
NEXT STEPS
- I'm going to be tuning the "use potty chair" ITUN file mentioned in original post, to see if I could get both untrained and trained toddlers to use the potty chair at least 2-3 times a day, at home. Unsure usage frequency can be influenced purely via tuning?
- Then, I'm going to tune the file to see if I can get active & townie toddlers that story progression sends to an active Daycare lot and a townie-run Daycare lot, to autonomously use the potty chairs on the lot, throughout the day.
- Finally, I'm going to tune the file to see if I can get active & townie toddlers to autonomously use the potty chairs installed on *all* community lots, to amplify the chances that once they're dropped at the nearby park by their otherwise busy caretakers, toddlers have no excuse *not* to learn the skill.
Then it will be time to take fun game pics for the MTS upload queue. Can you believe I found colorful toilet paper rolls CC just yesterday! So ready to use them.
CORRECTION
I've edited one of my posts above where I claimed that the "change" interaction performed by a caretaker on a toddler filled up the Bladder bar of toddlers. I assumed "change" meant "change the diaper". Wrong assumption on my end. Mea culpa. I've tested this interaction, and it does not fill up the Bladder bar of the toddler, at all. It only fills up their Hygiene bar.
#10
12th Mar 2021 at 6:51 PM
Posts: 3,856
Thanks: 8483 in 67 Posts
LOL that IS a strong bladder! :p Especially given the fact that for child and above, the moodlets for toilets are like in 3 steps!
Can't wait to see it!
Can't wait to see it!
#11
12th Mar 2021 at 9:55 PM
Posts: 845
Thanks: 368 in 3 Posts
Thank you for the support Lyralei!
Today's update:
So I did try to add a "Fun" commodity kind to the "use potty chair" ITUN file. I tried to set the advertising value to, in order: 400, 150 and 100 and the actual value to 0. With those values, the test trained toddler would literally PEE IN A LOOP. He'd get on and off the potty chair every 30 minutes (every end of usage cycle). Apparently *nothing else* in the home appeared more fun than the potty chair. Did. Not. Expect. That. Wow.
When I checked the "Fun" value that EA sets for most toddlers objects, it is either 30, 35 or 40, at the exception of the "play with the mirror" interaction in the playpen, that lasts 10 min each time and has a "Fun" value of 150! No wonder toddlers can't stop babbling in the playpen.
So now I'm down to the fun value 45 since it's barely above EA's max value of 40 and doesn't seem to be distracting toddlers from going about their day (playing with toys, reading toddler skill books, etc.) before autonomously using the chair.
The trained toddler still go every 16-18h to the potty chair autonomously which I guess from the data above, I can't quite influence (I can't make him use the chair more frequently unless it involves a pee loop). Now I'm hoping that untrained toddlers, with the Fun advertised at 45, will not have Bladder accidents anymore and will autonomously use the potty chair when their Bladder bar is only 5% full.
If it fails, and untrained toddlers still have Bladder accidents, then it will mean my tuning mod can't work as I intended it. In which case, I will need to start my plan from scratch with script modding... One can only hope it works
To be continued.
Today's update:
So I did try to add a "Fun" commodity kind to the "use potty chair" ITUN file. I tried to set the advertising value to, in order: 400, 150 and 100 and the actual value to 0. With those values, the test trained toddler would literally PEE IN A LOOP. He'd get on and off the potty chair every 30 minutes (every end of usage cycle). Apparently *nothing else* in the home appeared more fun than the potty chair. Did. Not. Expect. That. Wow.
When I checked the "Fun" value that EA sets for most toddlers objects, it is either 30, 35 or 40, at the exception of the "play with the mirror" interaction in the playpen, that lasts 10 min each time and has a "Fun" value of 150! No wonder toddlers can't stop babbling in the playpen.
So now I'm down to the fun value 45 since it's barely above EA's max value of 40 and doesn't seem to be distracting toddlers from going about their day (playing with toys, reading toddler skill books, etc.) before autonomously using the chair.
The trained toddler still go every 16-18h to the potty chair autonomously which I guess from the data above, I can't quite influence (I can't make him use the chair more frequently unless it involves a pee loop). Now I'm hoping that untrained toddlers, with the Fun advertised at 45, will not have Bladder accidents anymore and will autonomously use the potty chair when their Bladder bar is only 5% full.
If it fails, and untrained toddlers still have Bladder accidents, then it will mean my tuning mod can't work as I intended it. In which case, I will need to start my plan from scratch with script modding... One can only hope it works
To be continued.
#12
13th Mar 2021 at 2:51 PM
Posts: 845
Thanks: 368 in 3 Posts
Tuning failure
My untrained toddler had a Bladder failure accident. He never autonomously walked to the potty chair, even when his Bladder need became critical.I guess it was to be expected? Unlocking the "use potty chair" via tuning for untrained toddlers, does not equate to giving untrained toddlers the "instinct" to actually crawl to the chair and use it.
I'm not going to lie, this is a huge disappointment as I was hoping I could achieve all this via tuning. I'm back to square one and having to roll up my sleeves and learn script modding to reach my goals.
I'm going to start with Pudding Face's video tutorial here. Going to take a break from this mod for a bit and pick up pending mod projects where I'm more likely to be successful...
*Terminator Voice* I'll be back.
Who Posted
|