November - last edited 4 weeks ago by crinrict
Product: The Sims 4
Which language are you playing the game in? English
How often does the bug occur? Every time (100%)
What is your current game version number? 220.127.116.110
What expansions, game packs, and stuff packs do you have installed? All
Steps: How can we find the bug ourselves? Enroll a Sim whose skills are high enough to receive a merit scholarship. After finishing the first term, enroll them for the second term and see what scholarships they have got.
What happens when the bug occurs? The Sim is receiving multiple merit scholarships. I've seen two merit scholarships when enrolling for the second term and three merit scholarships when enrolling for the third term.
What do you expect to see? The Sim should only be awarded the merit scholarship once per term.
Have you installed any customization with the game, e.g. Custom Content or Mods? Not now. I've removed them.
Did this issue appear after a specific patch or change you made to your system? No
A more technical explanation:
The python function for handling scholarships after enrollment contains the following lines that re-evaluate the merit scholarship at the start of every term:
def handle_scholarships_after_enrollment(self, total_scholarship_taken): scholarship_manager = services.get_instance_manager(sims4.resources.Types.SNIPPET) self.evaluate_scholarship(ScholarshipTuning.MERIT_SCHOLARSHIP, skip_pending=True) active_scholarships = [scholarship_manager.get(scholarship_id) for scholarship_id in itertools.chain(self.get_active_scholarships(), self.get_accepted_scholarships())]
If the evaluation is successful then the merit scholarship is immediately added to _accepted_scholarships. The problem is that the merit scholarship from the previous term is never removed from _active_scholarships, which means the itertools.chain of self.get_active_scholarships() and self.get_accepted_scholarships() would contain two merit scholarships. As the Sim enrolls for more terms, more meric scholarships are duplicated. To fix this, use something like sets to remove the duplicated items from the active_scholarships list:
active_scholarships = list(set(active_scholarships))