From 8b5abc4474cd85e68a7e43db3aa68693c2b18e4b Mon Sep 17 00:00:00 2001 From: Gandalph Date: Mon, 9 Feb 2026 18:25:14 +0100 Subject: [PATCH] Fix Time Scaling Factor in Population Growth Code It looks like there was a factor added to the population growth mechanics that was meant to scale the growth trate with changs in time_multiplier to keep the growth rate consistent in terms of growth per second. Unfortunately, the factor chosen does not do this. While it does scale population growth rate per check down as game speed increases, it does not do so at the correct rate to keep growth rates constant in terms of average propulation gained per second. The population growth is implemented as a set of checks over a period of time that are either a success (a pop is added) or a failure (a pop is not added) the probability of a success is not exactly fixed because it depends on the current population, but can be considered close enough to fixed with a small number of trials. This means that it can be modeled as a binomial distribution. Any binomial distribution is characterized by the probability of success p and the number of trials n. The mean output of the distribution is p * n. If we wish to keep the mean constant while varying the number of trials n (meaning that the game is running different numbers of checks as the game speed changes), we must set some value x such that p * 1 (The average growth at one trial per second) = (p/x)*n (The average growth at n trials per second). In words, we must scale down the probability of success p by some factor x when we are doing n checks in a second. Solving the abolve equation for x in terms of n and p, we get that x=n. Therefore, the correct factor to multiply the upper bound by to maintain the same growth rate as the time multiplier chagnes is to multiply it by the time multiplier value itself. Note that this change will cut population growth rates by a factor for more than two, because the current factor is roughly 1.8 with the current time multiplier setting of 4. But considering that maintaining a full population in Evolve has never been a serious difficulty, this is not likely to cause major issues. --- src/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.js b/src/main.js index a7f7ee0f6..99982ce86 100644 --- a/src/main.js +++ b/src/main.js @@ -3969,7 +3969,7 @@ function fastLoop(){ upperBound *= 3; } - upperBound *= (3 - (2 ** time_multiplier)); + upperBound *= time_multiplier; if(Math.rand(0, upperBound) <= lowerBound){ global['resource'][global.race.species].amount++; global.civic[global.civic.d_job].workers++;