Stellaris

Stellaris

245 ratings
Carrying Capacity
 
Rate  
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
6.223 MB
Nov 27 @ 2:17pm
Dec 1 @ 10:49am
5 Change Notes ( view )

Subscribe to download
Carrying Capacity

Subscribed
Unsubscribe
Description
Realistic Growth
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.

Exponential Growth
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.

Carrying Capacity
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.

Machines and Robots
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.

Math
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.

Compatibility
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.

Mods Supported so far:
Gigastructures
Photosynthesis

Japanese Localisation

Try out some of my other Mods
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





[discordapp.com]
Popular Discussions View All (2)
22
Dec 6 @ 9:44am
PINNED: Compatibility Requests
starchitec
1
Dec 6 @ 9:54am
the math for mixed biological and robot populations
db48x
< >
129 Comments
starchitec  [author] 2 hours ago 
Not yet, but its coming. Im rearranging some things to make things work better but its a mess until I get it finished.
Mamtk 2 hours ago 
Did you reduce the base growth? Or is that in a posterior patch?
starchitec  [author] 4 hours ago 
Should have no trouble with Starnet. Only issue is mods that alter housing districts or planet size
Wirtzbua 9 hours ago 
How is the compatibility of this masterpiece with AI mods like Starnet?
starchitec  [author] 21 hours ago 
In theory, yes it should help performance a bit because planets will stabilize at a certain pop level and you shouldnt have to have tons of free jobs available. Thats not the main point of the mod tho, so its more a nice side effect than a performance fix that I would advertise.
Nuclear Millipede 21 hours ago 
Looked through the comments and didn't see anything about this, but of course I might have missed it. How does this affect mid-late game performance, since it's been determined that it's the lack of pops that's causing it when there's open jobs available. This seems like it will make it easier to keep job slots filled, but I'm still uncertain, especially when it comes to whatever the hell the AI is.
starchitec  [author] Dec 6 @ 9:50am 
the mod files are in your steam workshop folder, you can search for the mod ID 1922397818. The two files are in events, and common/scripted_effects
starchitec  [author] Dec 6 @ 9:41am 
You can put it in the compatibility requests thread and Ill look when I get a chance. If you dont mind mucking in the files and want to try and solve it yourself you would have to add the housing from any new district types from the mod to carry_effects.txt. Also I think right now I only count ringworld segments up to 6, so youd just have to copy a few lines and increment the variable in carry_events.txt in carry.1
ExaBitGaming Dec 6 @ 9:34am 
aha! is there something I can do myself to resolve this?
the ringworlds are coming from ringworld start (2.3+). It still works with this version of the game.
starchitec  [author] Dec 6 @ 9:22am 
yeah it must be a unique ringworld (vanilla ones are size 5 anyway I think). So the modded districts you are starting with arent accounted for in the mod.