Developer Diary 3

Introduction
Introducing population to EU4 is one of the primary features of M&T. That is still true for 3.0, as at its earliest conception 3.0 was a population rework focused on a higher level of fidelity and accuracy. In this dev diary, we'll be delving deep into how population works, how they change, and most importantly, how they move.



Class
In 3.0, population are divided into units called classes, where each classes represent a significant and historic role that were played by people in this era. A class could be a rural slave, a freeholder, burgher, artisan, noble, etc. This was made possible when we disentangled population from development, something which our long fans may have noticed with 2.5.

The population system and its many scripts are all built on and built to support what each class can and should do. Classes, and their exact effects and structure, will be the topic of another dev diary, but let us continue with population in the abstract.



Growth
First, population has to grow, the most fundamental aspect of any population system. In 2.x, population growth was handled by a logistic growth model. The idea was that as time ticks on, population slowly grows towards the ideal point with a nice logistic curve. It was a good model but it had flaws, the greatest of which was that population didn't decline naturally. The entirety of POP was built around natural growth, and exterior forces for decline. The other notable flaw was that populations could not ever experience population booms, except in the exact middle of their ideal population, which is not entirely historical either.

In 3.0, we did our best to unify the various requirements under a single model. Every class in 3.0 has a base birth and death rate, which determines how many are born and die each year. Then, those birth rates and death rates are modified by how much of their life needs are fulfilled (as discussed in our previous dev diary). If their life needs are under-fulfilled, then they have less births and die more. If they are over-fulfilled, then they give birth more and die less. The result is a net population growth or death rate.

This new model has many benefits. First, we can directly simulate the effect of resource constraint on population growth, rather than abstracting that part with a logistic growth model. When food is scarce, people die. When people are crowded together, disease takes it toll, and people die. Basically...so many ways to die.

And with death, comes natural population decline. This means that areas can experience negative population growth without any catastrophic cause. This was not possible in 2.x, all that could be done was that growth comes to a stop, or declines to serious incident. As such, famine is no longer its own system, but an intrinsic element of growth itself. The plague system still exists, but will be a far more rare occurrence, with equally higher impact. Common disease will be handled within the growth/death system.

But KJH, some of you might ask, this is all grim and good but doesn't that fail to represent that some places might have enough food but lack job opportunities? Shouldn't they still see a decrease in population? That is very well and true, my dear viewer, and that is why population can migrate now.



Migration
Yes, in 3.0, population can move. The static pops of 2.x have been left behind by the process...probably because they couldn't move... In 3.0, those features are built in from the start. Population can migrate to other provinces based on available opportunities or be promoted and/or demoted in their own provinces depending on socio-economic circumstances.

Let's start with migration. It can be defined as a movement of people from provinces where gravity is below population size, to provinces where gravity is above population size. Gravity is individual to each class, and represents the occupation opportunities a province has for a given class. Gravity is calculated directly from the employment rate, which is a byproduct of the labour market system (also outlined in the previous dev diary). Therefore, a province which lacks labour will attract migrants from provinces that have saturated labour. Of course, gravity will also consider whether a population can't feed itself, that will obviously take priority in most cases.

Migration is one side of how classes move, but that is not the only one. While migration handles lateral movement, we also need vertical movement. This is where class motion comes in.



Motion
Class motion is the sum of promotion and demotion. You can view it as a bankrupt artisan deciding to go out to the docks to do hauling work, or a wealthy burgher becoming more and more aristocratic. There are specific conditions for each class which enables or disables their movement to other classes. The main factors in this process are largely property, luxury fulfillment, comfort fulfillment, and knowledge fulfillment.

For example, a peasant can turn into an urban resident. It first requires that peasant being unable to find employment as a farmer or other labourer. If you want to build cities, then enclosure would be a great way to achieve it. Urban residents can also turn into peasants when their life fulfillment is low, which would represent people fleeing from cities to avoid starvation. Again, the exact needs of a class will vary, and that will be covered in more detail in an upcoming Classes DD.

Conclusion
Hopefully this provides a solid overview of the new population system for 3.0. With the three key systems described above, which were growth, migration, and motion, we were able to create a population architecture that is both dynamic and emergent. It reacts to economic changes, it empowers both growth and decline, and gives many opportunities as well as downfalls for players to enjoy.

Until next time, farewell.