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!
Quick Reply
Search this Thread
Deceased
Original Poster
#1 Old 13th Apr 2015 at 6:17 AM
Default Get to Work Employees
So I've been looking through some of the retail code to see what improvements (if any) can be made. I was specificially looking for how they decided whether an employee was paid properly, too little or too much as the buffs are in the XML but I can't seem to find anything that references them. I may just try changing the decay rates in there to see if that can help, because a slightly underpaid employee loses satisfaction fast and plummets all the way down to -100.

Anyway, while looking I ran across this brilliant gem for how those not-so-stellar NPC employees decide what they're going to do next (when you don't take them by the hand and tell them what to do so they can ignore it anyway):
Code:
    def _choose_next_state(self):
        valid_states = [self.state_socialize, self.state_restock, self.state_clean, self.state_ring_up_customers]
        random_state = random.choice(valid_states)
        return random_state()

So, I'm picturing an EA coder thinking "How am I going to accomplish this?" looking at their desk and seeing their "Executive Decision Maker" and having a "EUREKA!" moment.
Advertisement
Mad Poster
#2 Old 15th Apr 2015 at 2:29 PM
Omg. I could understand socializing and cleaning set to random, but not ringing up customers and restocking.

♥ }i{ Monarch of the Receptacle Refugees }i{ ♥
Deceased
Original Poster
#3 Old 16th Apr 2015 at 6:31 AM
Quote: Originally posted by ~MadameButterfly~
Omg. I could understand socializing and cleaning set to random, but not ringing up customers and restocking.

After looking at it a bit more, it's not as bad as it looks. It really just controls what the employee "defaults" to if you don't set them a task and once the buff that you do set runs out. It's why sometimes one of your employees will start the day wanting to clean, even though you'd told them the day before to do something else. The buff runs out after some time, I think it was 1200 sim minutes. So they shouldn't just jump into random roles every ten minutes.

Still pretty weird, just not as weird as I first thought
Mad Poster
#4 Old 16th Apr 2015 at 12:39 PM
Ah ok, good! lol I was ready to flip the table.

♥ }i{ Monarch of the Receptacle Refugees }i{ ♥
Back to top