Populations grow exponentially, up to the point where pressures from their environment begin to make that unsustainable. The constant, linear population growth in Stellaris has always irked me, so after spending far too much of my free time doing math I present: Carrying Capacity, modeled after how real biological populations work. Population growth speed will no longer be the most powerful modifier in the game, as the population you have is more directly tied to what you can actually support. The goal is to dramatically increase population growth on worlds with room to expand, and rapidly curtail growth as a world fills up so that pops will reach a natural equilibrium and stop growing entirely once a planet is full. This has the nice side benefit of decreasing micro in the late game, as once your planets are at capacity they will stop growing pops naturally, and you wont have to constantly keep adding new buildings for all eternity. No need for that population controls edict, pops will simply stop procreating when they come to the cruel realization that high rents and low job prospects mean their offspring would have little to hope for.
Every non-robot pop will increase planet growth speed by 5%. On a newly colonized world, the effect is small, but as you build up a sizeable population the effect will compound. The higher the population, the faster it will grow. Machine and Robot empires have a similar mechanic, but since robots do not reproduce by traditional biological means they do not receive an assembly modifier based on pop size. Instead, they will get additional Replicator or Roboticist jobs based on the size of their population.
Every planet has a Carrying Capacity (displayed as a planetary feature) that is the ideal population size the planet can support with no other growth modifiers. Capacity is determined by combining the total amount of housing and potential housing on the planet. Free district slots count as 10 potential housing (2 more than you could get from a max tech city district), meaning that as you develop a planet its capacity will decrease, especially if you build non-city districts. Capacity applies a negative growth modifier that is scaled by the ratio of free capacity left. When your population reaches capacity, the total growth from pops will equal the negative growth from the capacity modifier, and the population will reach equilibrium. Other growth modifiers from medical workers and species traits will allow you to reach a stable population slightly higher than the natural capacity, however, exceeding capacity will create scaling emigration push.
Mechanical pops are also limited by the capacity of a planet to support them. Assembly speed is not directly altered by capacity, however a scaling percentage of Replicator and Roboticist jobs will be converted into Master Replicators and Master Roboticists. These jobs increase the output of all robots, but do not assemble any new robots. This means machines will see a simplified version of the organic growth curve, with each inflection point occurring as they gain enough pops to support another Roboticist or Master Roboticist.
I am using the standard mathematical model for biological population growth:
dN/dt = r((k-N)/k)N
N = number of pops
k = Carrying Capacity
r = growth rate constant (an arbitrary constant, but I am using .05 in this case)
Rearrange that to be useful as an additive paradox modifier, and you get:
N – N²/k-1
Where the first term, N, is the growth you get per pop. The second term, N²/k is the negative growth from capacity. This means that as N approaches k, N²/k will approach N, and the whole equation approaches -1, which in paradox math, is -100% growth speed.
Robots get 1 extra assembly job per 25 jobs (or 20 for Machine Intelligences), until they reach 50% of capacity. Then, at every 10th percentile after, 1/5th of their regular assembly jobs will be converted into the Master Replicator variant, creating overall a simplified version of the same biological curve.
Note this is just a quick sketch of the new growth curves. Notice there are no actual values, it just shows the overall behavior. Still balancing how this works relative to vanilla, new growth, and new robot growth
This all can be balanced by altering the growth constant r, which right now is 5% per pop for non-robots, and 1 replicator per 20 pops for machines. That will make the curve steeper or shallower. I may also try to make it start slower than in vanilla, then quickly catch up. In my testing so far this number seems right, but I am happy to receive feedback if overall growth seems too much or too little. Mid game, pops should grow much faster, but it will even out as the capacity reductions kick in as your planets fill up.
Save game compatible, can take a year or two for all the capacity modifiers to get applied. This mod overwrites pop categories to add in growth per pop. Beyond this, any modded source of housing will not be included in carry capacity until I add them in, Ill add in some modded sources of housing as they are reported to me in the pinned discussion below. This includes special district types and unique buildings or planet modifiers. The mod will work, you just may have a lower capacity than you otherwise would expect. It supports capacities up to 400 (that is a 5 city district ringworld). Any modded planet type or size that goes beyond this will be treated as a capacity 400 world. Any modded source of pop assembly will also not be offset by carrying capacity, which will allow you to build pops beyond capacity. Ill do my best to account for these as well as they are reported. You can check to see if housing for carrying capacity is being counted correctly by with debugtooltip. Ill have to make a patch for this and Photosynthesis because of pop categories at some point.
Mods Supported so far:
Photosynthesis Mechanics for Plantoids
My Precursor Wormholes to Precursor Systems
Local Production Planet diversification bonuses
Objective Complete GameMaster tools
Technology Guided Research Policies
Technology Repeated Repeatable Technologies
The Kronos Campaign Custom Galaxy and Lore