Description
Colonists repeatedly satisfy daily interests
Windows
Steam
What is your game version?
1001569
Do you have Space Race installed?
Yes
Please explain your issue is in as much detail as possible.
Colonists will repeatedly try to satisfy their daily interests, even if they have already done so during that sol.
It's possible that this is intended behavior, but it seems broken since 1) it ends up consuming a lot more resources than expected, and 2) means that service buildings can be repeatedly occupied by a just few colonists, preventing other colonists from using it.
I looked at the source code (from github) and confirmed why this behavior occurs:
In colonist.lua, toward the end of the Colonist:Idle function, there is a check to see if self.daily_interest is set to a value or not. If it is, the game attempts to find an available building which can service that interest. The existence of that check implies that the game expects self.daily_interest to get cleared at some point -- presumably once the colonist's chosen interest has been fulfilled (until the next day, when a new interest is chosen). This design would in fact prevent a colonist from repeatedly trying to fulfil their chosen interest every time the idle function is run (which happens multiple times per day).
It looks like there is code that clears self.daily_interest in Colonist:VisitService. However that code path can only be reached if the "need" parameter passed into the function is nil. Unfortunately, Colonist:TryVisit always passes the chosen daily interest as the "need" parameter, so this code path can never be reached. It looks like maybe the code that checks and clears self.daily_interest should have been outside of the check for "need" being nil -- probably after the check for the gamer trait and before the call to service:Service.
One other likely bug I noticed is in the same code toward the end of Colonist:Idle, right after it calls Colonist:TryVisit. The code checks to see if the attempt to service the daily interest failed, and merges that result into the existing value of self.daily_interest_fail. However, I think that expression should have used Min instead of Max. The way it's currently written, if a colonist tries to fulfil their daily interest e.g. 10 times and fails even just once, they are flagged as having failed to fulfil the interest for the day -- even though they succeeded 9 other times. One would expect that a colonist should be satisfied with having fulfilled their interest at least once during they day, even if they couldn't do it every time they tried.
Maybe both of these things are the intended game design, but it feels broken that colonists would be so unreasonably greedy and temperamental.
Can you replicate the issue?
A very simple way to observe this is to have Service Bots researched, so you can have a working dome with just a single colonist.
Build a small dome with a house (any kind), a grocer, a spacebar, and an electronics store. Then assign a single scientist to that dome (which now has all the services they need). On days where the scientist chooses gaming as their daily interest, you can see them visiting the electronics store over and over again (consuming electronics with every visit).
Attachments
File(s) attached
Colonists repeatedly satisfy daily interests
Windows
Steam
What is your game version?
1001569
Do you have Space Race installed?
Yes
Please explain your issue is in as much detail as possible.
Colonists will repeatedly try to satisfy their daily interests, even if they have already done so during that sol.
It's possible that this is intended behavior, but it seems broken since 1) it ends up consuming a lot more resources than expected, and 2) means that service buildings can be repeatedly occupied by a just few colonists, preventing other colonists from using it.
I looked at the source code (from github) and confirmed why this behavior occurs:
In colonist.lua, toward the end of the Colonist:Idle function, there is a check to see if self.daily_interest is set to a value or not. If it is, the game attempts to find an available building which can service that interest. The existence of that check implies that the game expects self.daily_interest to get cleared at some point -- presumably once the colonist's chosen interest has been fulfilled (until the next day, when a new interest is chosen). This design would in fact prevent a colonist from repeatedly trying to fulfil their chosen interest every time the idle function is run (which happens multiple times per day).
It looks like there is code that clears self.daily_interest in Colonist:VisitService. However that code path can only be reached if the "need" parameter passed into the function is nil. Unfortunately, Colonist:TryVisit always passes the chosen daily interest as the "need" parameter, so this code path can never be reached. It looks like maybe the code that checks and clears self.daily_interest should have been outside of the check for "need" being nil -- probably after the check for the gamer trait and before the call to service:Service.
One other likely bug I noticed is in the same code toward the end of Colonist:Idle, right after it calls Colonist:TryVisit. The code checks to see if the attempt to service the daily interest failed, and merges that result into the existing value of self.daily_interest_fail. However, I think that expression should have used Min instead of Max. The way it's currently written, if a colonist tries to fulfil their daily interest e.g. 10 times and fails even just once, they are flagged as having failed to fulfil the interest for the day -- even though they succeeded 9 other times. One would expect that a colonist should be satisfied with having fulfilled their interest at least once during they day, even if they couldn't do it every time they tried.
Maybe both of these things are the intended game design, but it feels broken that colonists would be so unreasonably greedy and temperamental.
Can you replicate the issue?
A very simple way to observe this is to have Service Bots researched, so you can have a working dome with just a single colonist.
Build a small dome with a house (any kind), a grocer, a spacebar, and an electronics store. Then assign a single scientist to that dome (which now has all the services they need). On days where the scientist chooses gaming as their daily interest, you can see them visiting the electronics store over and over again (consuming electronics with every visit).
Attachments
File(s) attached
Attachments
Last edited:
Upvote
0