Forum Discussion

TriplisTrip's avatar
8 years ago

School Career question

@SimGuruModSquad Running into an issue involving school career and hoping you can point me in the right direction. I will, of course, keep looking in the mean time. What I'm trying to find is what it is that sets Child and Teen as being in school by default; if I can find the file that contains that, I think it will lead to clearing the roadblock I've currently got in front of me. I thought it would be something intuitive and obvious, but if it is, it's right in front of me and I'm missing it.

I tried looking under traits, under career, under tuning, under buffs... just about every I could find that would have a link to the life stage and tell the game to make it happen, but nothing. Maybe it's not in the XML? I can't imagine why though, if not.
  • The ids are in S4_03B33DDF_00000000_32B2CBA3DF34CAAA, it's sims.sims_info in the XML :

    12895
    9541

    which are used by update_school_career in Python (sim_info.py).

    which is used (through verify_school) in advance_age (aging_mixin.py) and _startup_sim_gen (sim.py)

    Is that what your were looking for ?
  • Assuming you want to remove the auto-join when travelling/loading/etc, but keep it when they age up, I would probably try to do it in verify_school, since you have from_age_up as a parameter. With the injection, you then call the original only if from_age_up is true.
  • This is vexing me. I found references to Max_Careers and read TDESCs on it, but I can't find any indication of anything beyond that. Plus, sims.sim_info has Max_Careers set at 3, which means it's probably a hard limit, not tied to the UI and joining/quitting careers. Cause I haven't seen any indication that anyone can have more than 1 career, outside of the special exception for Teens having job and school, which I can't find any references to either.
  • @Neia Thanks!

    I think that's what I'm looking for, more or less. I just have to figure out now if I can use an injection to tell this part to take a running jump:

                if not has_career:
    self._career_tracker.add_career(career(self, init_track=True))

    Or rather, figure out what the injection would be. From the research I've done, it's definitely possible to do the sort of thing I want to do.

    And it appears the part I quoted is the part that ensures that when the ensure_age_based_career function gets called for Child and Teen, a career (in this case, school) is added if there isn't one already. And from the look of it, disabling its add would be the least intrusive way of messing with their code, while accomplishing what I want to accomplish.
  • @Neia Good point.

    Since I'm planning to use it in conjunction with other functionality that allows Child and Teen to quit/join school, I'm just going to turn off auto-enrolling completely for now.

    But I may set up the other one as an option, too, if I can figure out how (I'm not sure I'm totally following you on using from_age_up, or it just doesn't work how imagined). In the verify_school function, I tried nesting "self.update_school_career()" inside of an if with a reference to from_age_up in various ways, but I think I'm not fully grasping how the reference to age_up is utilized.

    At least I got the other method working though. After hours of trying things lol. :smile:

    Thanks again for pointing me in the right direction on where to look!

About The Sims 4 Mods & Custom Content

Find expert tips, troubleshooting help, tutorials for mods and custom content, and The Sims 4 patch files in our forum.

4,839 PostsLatest Activity: 14 minutes ago