Help us improve Answers HQ! Take Survey No, Thanks

[OPEN] [DU] Duplicated merit scholarships starting the second term

by elelunicy
Reply

Original Post

[OPEN] [DU] Duplicated merit scholarships starting the second term

[ Edited ]
★ Guide

Product: The Sims 4
Platform:PC
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? 1.58.63.1010
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))

 

Message 1 of 1 (149 Views)

Need help?

We’re happy to help with your account, troubleshooting, and gameplay questions.

Contact us on EA Help

ts4-promo

Having trouble connecting to your game?

Try these steps first to clear up any problems you may have when connecting to an EA game.

Troubleshoot and test your connection

ts4-promo

Forget your EA Account ID or password?

Reset, update, or link your account information.

View More on EA Help