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!
Scholar
Original Poster
#1 Old 23rd Sep 2014 at 4:31 AM Last edited by DrChillgood : 23rd Sep 2014 at 12:40 PM.
Default Disable the process on load that re-enrolls teens in school?
I've got this idea:

http://modthesims.info/showthread.php?t=535900

but there seems to be this stupid process on load that enrolls teens in high school. When I reload a save after I have a teen drop out, he/she is re-enrolled at a lower grade level.

I saw the mod that kills the "wipe out Sims" process, but that seems to be a weekly process, while the Non-Giving-Up School Guy is an on-load process. Maybe I'm not looking hard enough in the tuning, or is it even in the tuning?


Or are they doing this for good reason and a teen not enrolled in school is a Very Bad Thing?

1/8/2016: New avatar! Pre-censored for EA's approval.
3/19/2015: Teens are too close to YAs. EA needs to either shorten the teens, or add preteens and make YAs look older.
Advertisement
Pettifogging Legalist!
retired moderator
#2 Old 23rd Sep 2014 at 4:51 PM
That is a very good idea =)

I also haven't found anything in the tuning. For all I could see (was looking at teen careers before), High School looks like a bog standard career like any other .. but I also couldn't find how the game knows that a teen can have "two careers at once" (school plus a part-time job) so there must be something that makes the school careers different.

Maybe try with this tool http://modthesims.info/showthread.php?t=535749 to see whether there's anything in the data files? It's relatively new, maybe you don't know it yet (requires a Java runtime environment that I don't have installed myself, otherwise I'd have checked)

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Scholar
Original Poster
#3 Old 23rd Sep 2014 at 5:12 PM
It seems there's a "School" and a "Work" career type, from what I remember. The "Teen Careers for Everyone" mod doesn't let you take both a part-time and a full-time job, right? I wonder how schedule conflicts would work...

I see there is a hidden trait for your grade in school. Apparently, being an A student in elementary school translates to being a B student in high school, and being an A student in high school led to skipping level one of the adult careers, unless this got dummied out somewhere along the way. Ideally, I would make a hidden trait - Dropout. This trait prevents you from being able to work in the Astronaut, Secret Agent, and Tech Guru careers.

I would also make it so that the Fast Food career gives you a hidden trait at the end that lets you start higher in the Culinary career.

1/8/2016: New avatar! Pre-censored for EA's approval.
3/19/2015: Teens are too close to YAs. EA needs to either shorten the teens, or add preteens and make YAs look older.
Pettifogging Legalist!
retired moderator
#4 Old 23rd Sep 2014 at 6:27 PM
Quote: Originally posted by DrChillgood
It seems there's a "School" and a "Work" career type, from what I remember. The "Teen Careers for Everyone" mod doesn't let you take both a part-time and a full-time job, right? I wonder how schedule conflicts would work...


Not in-game, no -- once they have a career, they don't get the "Find job" thing anymore.

However, that's a good question actually for the case that users add careers with cheats. I dunno if that would drop the "old" career automatically or they'd end up having both. In the latter case they'd probably be fired at some point for never showing up =P.


Really, are there explicit types defined somewhere (school vs work)? That's probably where one could look for ways to track down the auto-enroll. Maybe worth of note: I have had a glitch once where an adult with a teen career quit his job, and the next day he suddenly had that job again. Only after quitting *again* it was gone. I've already searched for a possible cause, but couldn't find anything. But maybe this is something that somehow applies to all teen careers? At least under some circumstances? Unfortunately I don't recall the exact circumstances (not sure whether I went though any loading screens between his quitting and the sudden re-"enrollment" .. I don't think I had restarted the actual game though). Also I've had no reports from any users about sims not being able to quit.

I only have one sim in a regular adult career (who hasn't quit so far) so I don't know if that can happen with those careers too.

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Scholar
Original Poster
#5 Old 23rd Sep 2014 at 7:11 PM
Quote: Originally posted by plasticbox
Not in-game, no -- once they have a career, they don't get the "Find job" thing anymore.

However, that's a good question actually for the case that users add careers with cheats. I dunno if that would drop the "old" career automatically or they'd end up having both. In the latter case they'd probably be fired at some point for never showing up =P.

I was actually talking about having a school career conflict with a work career. I was thinking of coming up with a GED school option for YA+ dropouts, which lasts all day, but with minimal penalty for missing it (after all, the hours are flexible to accommodate working adults, the intent is that you leave early), and it would auto-quit when you reach the top level, making you a High School C or B student and erasing your Dropout trait.

It would work great for those working two careers just to make ends meet. I assume that since you get the dialog box menu thingy to let you choose to drop out of school or quit work, that you would also be able to choose which career to quit if you end up with a conflict. Or, you would know what job is less forgiving of not showing up.

1/8/2016: New avatar! Pre-censored for EA's approval.
3/19/2015: Teens are too close to YAs. EA needs to either shorten the teens, or add preteens and make YAs look older.
Pettifogging Legalist!
retired moderator
#6 Old 27th Sep 2014 at 6:47 PM
SimGuruModSquad has been shedding some light on this over at EA, for other interested people: forums.thesims.com/en_US/discussion/788832/teens-not-in-school-automatically-re-enrolled-upon-load

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Scholar
Original Poster
#7 Old 30th Sep 2014 at 2:10 AM Last edited by DrChillgood : 30th Sep 2014 at 3:38 AM.
Okay, I have the lines in Sim_Info changed. Now how do I replace the offending function? I've got this:

Code:
import sims
import sims.sim_info
 
def verify_school_dropouts_stay(self, from_age_up):
        if from_age_up or self._time_sim_was_saved is None:
            if self.is_child:
                self.create_homework(self.CHILD_HOMEWORK)
            elif self.is_teen:
                self.create_homework(self.TEEN_HOMEWORK)
	if not(self.is_teen and not from_age_up):
		self.update_school_career()
			
sims.sim_info.SimInfo.verify_school = verify_school_dropouts_stay



I see _startup_sim_gen is calling verify_school and not update_school_career.

I also want to snuff out the line in Aging where it wipes the teen careers, to go with the "Teen Jobs for Everyone" mod.

1/8/2016: New avatar! Pre-censored for EA's approval.
3/19/2015: Teens are too close to YAs. EA needs to either shorten the teens, or add preteens and make YAs look older.
Pettifogging Legalist!
retired moderator
#8 Old 30th Sep 2014 at 11:57 PM
Can't help with the scripting, but re. the not-wiping-teen-careers, is it possible (without extra bulk) to make that a separate mod? So that it's a bit modular all in all I mean -- not quitting teen careers would be very useful to have just in general, in conjunction with any teen career (future possible custom ones too), not only specifically for the dropout thing.

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Scholar
Original Poster
#9 Old 1st Oct 2014 at 2:17 AM Last edited by DrChillgood : 1st Oct 2014 at 2:35 AM.
Yeah, I plan on making the "don't quit teen careers" thing separate.

Now that I finally figured out how to get my code into the game (uncompiled py scripts, I have yet to figure out how to compile these things...)...I made the game fall down and go "boom".

File "T:\InGame\Gameplay\Scripts\Server\zone_spin_up_service.py", line 855, in update

File "T:\InGame\Gameplay\Scripts\Server\zone_spin_up_service.py", line 174, in on_enter

File "T:\InGame\Gameplay\Scripts\Server\sims\household_manager.py", line 334, in load_households

File "T:\InGame\Gameplay\Scripts\Server\sims\household_manager.py", line 418, in _load_household_from_household_proto

File "C:\Users\DrChillgood\Documents\Electronic Arts\The Sims 4\Mods\DropoutsStay\Scripts\DropoutsStay.py", line 16, in initialize_sim_infos_dropouts_stay

sim_info.verify_school(from_age_up=False)

File "C:\Users\DrChillgood\Documents\Electronic Arts\The Sims 4\Mods\DropoutsStay\Scripts\DropoutsStay.py", line 8, in verify_school_dropouts_stay

self.create_homework(self.CHILD_HOMEWORK)

File "T:\InGame\Gameplay\Scripts\Server\sims\sim_info.py", line 1306, in create_homework

AttributeError: 'NoneType' object has no attribute 'inventory_component'


The current version of my code:
Code:
import sims
import sims.sim_info
import sims.household
 
def verify_school_dropouts_stay(self, from_age_up):
	if from_age_up or self._time_sim_was_saved is None:
		if self.is_child:
			self.create_homework(self.CHILD_HOMEWORK)
		elif self.is_teen:
			self.create_homework(self.TEEN_HOMEWORK)
		self.update_school_career()
		
def initialize_sim_infos_dropouts_stay(self):
        for sim_info in self._sim_infos:
            self._on_sim_added(sim_info)
            sim_info.verify_school(from_age_up=False)
			
sims.sim_info.SimInfo.verify_school = verify_school_dropouts_stay
sims.household.Household.initialize_sim_infos = initialize_sim_infos_dropouts_stay



Basically this makes sure update_school_career is only called on creation or aging up.

1/8/2016: New avatar! Pre-censored for EA's approval.
3/19/2015: Teens are too close to YAs. EA needs to either shorten the teens, or add preteens and make YAs look older.
Scholar
Original Poster
#10 Old 3rd Oct 2014 at 9:34 PM
Sorry to bump - since ghost kids and teens are forced to go to school but they never age up - would it be a good idea to put "if not self.is_ghost" to allow ghosts to be exempt from school? School is for the living mortals.

Also - I still haven't gotten my code working...

1/8/2016: New avatar! Pre-censored for EA's approval.
3/19/2015: Teens are too close to YAs. EA needs to either shorten the teens, or add preteens and make YAs look older.
Scholar
Original Poster
#11 Old 9th Nov 2014 at 12:50 AM Last edited by DrChillgood : 10th Nov 2014 at 5:37 PM.
I was told the "make homework" was not necessary. It was there in the decompiled code, though...

Here's what I have now, it seems to work, Yibette is not re-enrolled in school, my kids are enrolled, and the game isn't going BFBVFS on me.

Code:
import sims
import sims.sim_info
import sims.household
 
def verify_school_dropouts_stay(self, from_age_up):
	if not self.is_ghost and from_age_up or self._time_sim_was_saved is None:
		self.update_school_career()
		
def initialize_sim_infos_dropouts_stay(self):
        for sim_info in self._sim_infos:
            self._on_sim_added(sim_info)
            sim_info.verify_school(from_age_up=False)
			
sims.sim_info.SimInfo.verify_school = verify_school_dropouts_stay
sims.household.Household.initialize_sim_infos = initialize_sim_infos_dropouts_stay



Note to self:

D'oh! "AND" takes precedence over "OR". This probably will cause a ghost kid to be enrolled in school.

1/8/2016: New avatar! Pre-censored for EA's approval.
3/19/2015: Teens are too close to YAs. EA needs to either shorten the teens, or add preteens and make YAs look older.
Instructor
#12 Old 17th Dec 2014 at 4:37 PM
Quote: Originally posted by DrChillgood
I've got this idea:

http://modthesims.info/showthread.php?t=535900

but there seems to be this stupid process on load that enrolls teens in high school. When I reload a save after I have a teen drop out, he/she is re-enrolled at a lower grade level.

I saw the mod that kills the "wipe out Sims" process, but that seems to be a weekly process, while the Non-Giving-Up School Guy is an on-load process. Maybe I'm not looking hard enough in the tuning, or is it even in the tuning?


Or are they doing this for good reason and a teen not enrolled in school is a Very Bad Thing?


Hi @DrChillgood.
My approach was setting the Highschool_C and Gradeschool_C duration to 0 (ZERO) and removing any negative for not doing homework.
My child and teen never go to school.
As they always start from a C grade... they never start )
Back to top