Replies: 5 (Who?), Viewed: 336 times.
Field Researcher
Original Poster
#1 Old 11th Apr 2021 at 11:14 PM
Default Using vehicles while carrying child
Anyone know how the game decides how a sim should travel to a lot? I want to see if I can make them use cars/bikes/etc. while carrying children, and changing the posture preconditions on all the IOwnableVehicle interactions after world load doesn't seem to be enough.
Advertisement
Trainee Moderator
staff: trainee moderator
#2 Old 12th Apr 2021 at 4:23 AM
Quote:
Originally Posted by lizcandor
Anyone know how the game decides how a sim should travel to a lot? I want to see if I can make them use cars/bikes/etc. while carrying children, and changing the posture preconditions on all the IOwnableVehicle interactions after world load doesn't seem to be enough.



I am not sure how from a modding or code way the game does this. However, to bring a toddler onto a lot they have to be carried(walked) as vehicles have issues transporting them. Young children sims have this propensity to perform this behavior known as "crying" when their motives decay that sometimes makes this limitation a "good thing" as it does not drive unsuspecting adult sims crazy also the "smelly diapers".

Now if you are trying to create a travel toddler mod merged with an "unscreaming toddler + no smelly diaper on community lot mod"- then all the best to you.
Field Researcher
Original Poster
#3 Old 12th Apr 2021 at 5:18 AM
Quote:
Originally Posted by fascisthater
travel toddler mod

Now I'm imagining toddlers being able to just hail a cab and go to the park The whole neighborhood would regret it

I'm not going that far though, I just want to see if I can let sims use vehicles other than taxis while carrying their kids, so I can turn taxis off without making them walk everywhere. It's got to be in the routing code somewhere, I'll keep looking.
Virtual gardener
staff: administrator
#4 Old 14th Apr 2021 at 12:20 PM
Quote:
Originally Posted by lizcandor
Now I'm imagining toddlers being able to just hail a cab and go to the park The whole neighborhood would regret it

I'm not going that far though, I just want to see if I can let sims use vehicles other than taxis while carrying their kids, so I can turn taxis off without making them walk everywhere. It's got to be in the routing code somewhere, I'll keep looking.
As a dutchie, bikes and carrying toddlers I'd love! :p Now thing though is, is that, while we're crazy enough to pass the king with a ladder while cycling (Which I still love the fact that someone did this), we don't do that with toddler ;D In fact we do have bike seats for it.

Now, it is technically possible, but you'd need to rewrite the entire 'cycling' class basically for it. And override the original vehicle code to add that 'posture' code to it. Might also mean you'd need to do some animation adjustments, but that I'm not 100% sure about. (See first spoiler here: https://www.modthesims.info/showthr...217#post5697217)
Field Researcher
Original Poster
#5 Old 14th Apr 2021 at 1:22 PM Last edited by lizcandor : 21st Jun 2021 at 4:49 AM.
That guy's confidence in his balance I've never even been brave enough to bike without both hands on the handlebars, add a ladder and I'd crash for sure.

Replacing the class sounds good to me! Maybe there's a general bike-related OBJK that I could replace, like the StairHelper for stairs. I probably will have to adjust the animations if this works at all, I'm expecting the proof-of-concept to look like an extremely unsafe parenting choice

Also, looking at that thread it occurs to me I should check the Route class to figure out what changes the bike/car code needs; I'd been looking at routing specifically involving an interaction with a vehicle, instead of routing in general.
--
Edit 6/20/21: Seems like it must be in Sim.GetVehicle that the game decides whether to put a sim in a taxi - if their right hand isn't free (which it isn't in the carrying child posture), GetVehicle gets a taxi as their vehicle instead of their own bike or car.

Edit again: Removing the check for whether the sim's hand is free fixes this, sims will now get into their own cars while carrying a toddler. Not bikes yet though. Would be nice to have some way of putting toddlers into the car before driving anywhere, too, so you're not limited to 1 child per adult available to carry them.
Field Researcher
Original Poster
#6 Old 26th Jun 2021 at 5:22 AM
New issue: with the free hand check core modded out, sims will get on a bike with a toddler but won't bike away for some reason? They fade onto the bike, sit there for a second looking around, and then fade off the bike without trying to go to wherever I was sending them. There's no script error, so I'm not sure what could be causing this?
Back to top