• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
Mar 30, 2021
4
3
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
 

Attachments

  • code.png
    code.png
    59,2 KB · Views: 0
Last edited:
Upvote 0
MAC-3728
Thanks very much for the very detailed report. I've logged a bug on it now referencing this thread.

Can't say when it will be fixed but I hope in a patch soon!
 
I can't find exactly when it was added since I don't have all the . releases and I didn't see anything after a quick glance at the changelogs.
It wasn't in Gagarin, but it was in by Kuiper

238,8082018-12-14?Patch Notes: Kuiper Patch is Now Live!
238,4552018-11-30?Patch Notes: Space Race Hotfix has Landed!
237,9202018-11-15?Patch Notes: Space Race Expansion Patch Notes
237,4252018-11-15?Patch Notes: Gagarin Free Update Patch Notes

Anyways here's a fix for it (an unemployed scientist will wander around outside till the Sol is over instead of chewing up 0.6 electronics).

If not on steam then use in-game mod manager: Edit: Fix Bugs
 
Last edited:
As always ChoGGi, you are amazing.

I tried out this mod, and it does work to prevent a colonist from consuming extra resources. However, it can still leave them in a state where the game thinks they didn't fulfill their daily interest.

For example, if they try to fill their interest and there are no free buildings, it will set self.daily_interest_failed to a non-zero value (typically 3 if there are buildings that could have serviced the colonist, but they were all full). The colonist will then roam for an hour, and check again. If they are then able to find an empty space in a building that fills their interest, then self.daily_interest_failed should get set back to zero. But the code in Colonist:Idle uses Max instead of Min, so that doesn't happen.

For completeness, if you set self.daily_interest_failed to zero after setting self.daily_interest to "" in your patch for Colonist:EnterBuilding, it would fix this issue as well.

Probably I should just round up all the tools so I can make these kinds of changes myself, but admittedly I'm too lazy. Friend me on Steam (I commented there) and I'll shoot you something off your wishlist for your time though. Cheers!
 
Thanks very much for the very detailed report. I've logged a bug on it now referencing this thread.

Can't say when it will be fixed but I hope in a patch soon!
@Aiwyth , I forgot to ask now you're here - should I assign that bug report to you or someone?