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

TwiddleFactor

Second Lieutenant
38 Badges
Aug 17, 2010
190
92
  • Crusader Kings II: Charlemagne
  • Knights of Honor
  • Sword of the Stars
  • Sengoku
  • Rome Gold
  • Europa Universalis: Rome
  • Europa Universalis IV: Res Publica
  • Heir to the Throne
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Divine Wind
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Europa Universalis III Complete
  • Imperator: Rome
  • Europa Universalis IV
  • Imperator: Rome Deluxe Edition
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Jade Dragon
  • Crusader Kings Complete
  • Imperator: Rome - Magna Graecia
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Mount & Blade: Warband
  • 500k Club
  • Rome: Vae Victis
  • Europa Universalis III Complete
  • Europa Universalis III Complete
Settlement Populations
by: TwiddleFactor​


Description:

This mod adds a new mechanic to the game in the form of populations in all settlements. Each non-nomad settlement tracks 4 classes of populations, serfs/slaves, freemen, burghers and gentry. The populations will grow, shrink, promote, demote and migrate over the course of a game in response to a variety of factors. In addition to the populations themselves, the populations participate in an economic simulation that includes the production and consumption of goods for money and the trade of those goods to other provinces.

Levies and Taxes have been revamped to now be governed by the numbers of each population type and the obligation laws that have been set. The tax revenue produced by trade posts is also directly connected to the wealth generated by trade conducted by a given province.


Manual:

UI:
  • Population Details: right click ing on a settlement will show a settlement decision with the total settlement population. Details about the population breakdown and the wealth, income, expenses and taxes of each class are provided in the decision tooltip.
  • Trade Details: trade details are shown in a title decision that can be accessed by right clicking on the coat of arms of a county.
  • Custom Maps: custom maps of the population in every province as well as the trade income from the trade of resources can be ciewed using custom councillor jobs. Select a map type using the demographic map and economic map options in the intrigue menu. After selecting a map type, a new councillor job for the chancellor, in the case of a demographic map, and for the steward, in the case of an economic map. Clicking the councillor job will add a colour coded overlay to the world map.
Population Mechanics
Resource Production and Buildings
Trade System
Levies and Taxes

I will try to expand this section in the future, but for the time being...

To see the population in a settlement, right click on the settlement and hover over the population decision
To see trade details about a province, right click on the county title and hover over the trade details decision
To see global details about trade or pops, use the custom map mod decisions in the intrigue menu. Choose the map type you want and then open your council screen and use the additional councillor job on the chancellor or steward to see the custom map.
The population tax/levy obligations use the default vassal obligation laws, with gentry=feudal, burghers=republic, and freemen/serfs=tribal.

Features at a Glance

Population
  • Freemen: Freemen are simplest population type and represent free landed peasantry. They produce resources and are paid according the amount of a resource they produce and the price of said resource and then use the wealth they accumulate to consume a moderate amount of resources of varying types. Freemen will provide a reasonable mix of low and mid tier troops (light infantry, archers, heavy infantry, light cavalry)
  • Peasants: Peasants are either unfree or free labourers that do not hold their own land and therefore work on the land of the gentry. They produce resources similar to the freemen, but a portion of their income is taken by the gentry in the province. As the ratio of gentry to peasants increases, the gentry will take a larger and larger fraction of the peasant income. Peasants will consume a much smaller amount of resources. Peasants will provide small number of low tier troops (archers, light infantry)
  • Gentry: Gentry represent the landed elite. They do not work and instead live off the revenue they take from the peasants which they use to purchase large amounts of resources, including luxurious silks from the east. Gentry will provide a large number (relative to their population) of high tier troops whose exact composition will depend on the owner's culture. Some cultures will field an even larger number of mid-tier troops instead (ie. anglo-saxon gentry provide a large number of heavy infantry)
  • Burghers: Burghers represent the merchant class. They manage the trade of goods between provinces and thus their income is directly determined by the trade income of the province they are situated in. Burghers have similar consumption patterns to freemen and will provide similar troop types, but they provide fewer troops than freemen in general.
Economic Simulation
  • Populations will produce and consume resources which they will be paid for and will pay for, respectively. The wealth of populations will change depending on the balance of their income and expenses, and their changing wealth will in turn affect their consumption.
  • The price of every resource type is calculated in each province based on the balance of the supply and demand
  • Provinces where a resource is cheap will export resources to provinces where the resource is expensive, altering the supply and demand and changing the price in both provinces. The difference in the prices and the amount of resource being exported will determine the trade income made by the two provinces.
  • The resources produced by a given settlement are determined by the resource building present
  • All provinces can trade with neighbouring provinces and provinces in the same sea zone, but long-range trade uses the system trade-post system. Trade posts have a trade post and trade port building chains that allows them to trade with other trade-post provinces farther away by land and sea, respectively.
Dynamic Levies
  • Raising levies from demesne provinces will directly take population from the populations in a settlement
  • The population to take from each population class is calculated based on obligation laws and population numbers
  • Disbanding levies will return the populations to the settlements with
Dynamic Population Change
  • Populations will grow each year by a rate that is affected by how much of their needs they can fulfill
  • Promotion and demotion between classes occurs depending on the wealth of populations
  • Diseases will kill pops, but hospitals will help to reduce the severity of epidemics
  • The inhabitants of a captured settlement can be enslaved, slaughtered, or left to live peacefully
  • Populations will migrate between settlements and between provinces to find better opportunities
Optional Trade Route Sub-mod
  • Many additional trade-routes and tweaks to the vanilla trade routes to facilitate inter-province resource trade
Lots of other changes that help to integrate the system into the base game have also been made.
When I have the time, I will try to add a manual that explains how to actually interact with the systems and how they work.


Installation:

Simply take the contents of the zip file and place them in your CK2 mod folder.
 

Attachments

  • Settlement Populations - Trade v2.0.3.zip
    9,6 KB · Views: 0
  • Settlement Populations v2.0.3.zip
    897,9 KB · Views: 0
Last edited:
  • 4Like
Reactions:
Sure, but there isn't all that much to show. Most of it is under the hood events that don't have any visible displays. The only visible things are the population, a couple growth rate increasing buildings, and the events when you capture a settlement. Nonetheless, I'll add some screenshots to the description in a few minutes.
 
If the chest on the holding are part of your mod, I'd like to suggest using another modifier if possible, the Muslim use the same one for their non-believer tax and it could be mixed up at first glance.

But it is just a minor visual issue for me. The mod look interesting.
 
If the chest on the holding are part of your mod, I'd like to suggest using another modifier if possible, the Muslim use the same one for their non-believer tax and it could be mixed up at first glance.

But it is just a minor visual issue for me. The mod look interesting.

Ya, the chest is the modifier I've been using for marking the population tier. I've actually even been confused while play testing this mod before. Whenever I look at a muslim realm, I think my mod has bugged out and created two copies of the modifier. Ideally I'd use a modifier with little green heads, or something like that, but since one doesn't exist in vanilla, I settled for this at the moment. It's probably a better idea to switch to a vanilla icon that isn't used on holdings for now though eh? I'll do this for the next update.

Thank you for the feedback. I'm open to input from anyone, and I'd be really glad if people can give me ideas and advice.

Edit: I just noticed there is a vanilla icon with two people and a plus sign. I think I'll switch it to that one. It's usually only used for characters, and so shouldn't ever pop up on a settlement in vanilla.
 
Hey Farbolo, thank you for the encouragement. Some of the code relies on new modding features added with 2.8, so I'll have to wait until HIP updates for the new patch until I can make them compatible, but it shouldn't be too difficult once that happens.
 
Hey Farbolo, thank you for the encouragement. Some of the code relies on new modding features added with 2.8, so I'll have to wait until HIP updates for the new patch until I can make them compatible, but it shouldn't be too difficult once that happens.

Actually, right now you will find in the HIP-subforum an ongoing debate between potential submodders who would like to "represent economic and population growth in a simple, elegant way" (<-- Thread title [I am never not sure if forum-policy allows me to post a direct link, so here is the indirect hint]). I know, your focus lies on population, but both topics are somewhat entangled, I'd say, and maybe you'll find there some inspiration and like-minded people to share ideas with :)
 
There is a bug i have found that happens when a settlement grows to big and the numer loops into a negitive and the holding gets destroyed

Thanks for helping me bug test. Do you know how long it took for the population to get so large that the number became negative? I havent seen a settlement get close to even one million in any of my playthroughs yet, but I haven't gotten near the late game. Also, just to confirm, it happened around 2 million right?

Yeah, variables in ck2 and other paradox games can range from 2,147,483.648 to -2,147,483.648. That said, the fact that a holding can reach a seven digits fegure seems a balance issue of it's own.

Ya, this is correct, and something I knew going in. I didnt expect the settlements to get close to 2 million though. Ill have to go in an rebalance the growth.

Amazing. I've been waiting for something like this. Is there any way you can make a ck2+ copy?

Ya, making this compatible with CK2+ is definitely possible, but it will have to wait until they update to 2.8.

EDIT: I have uploaded a new version that should prevent the populations from going over the maximum variable limit. I drastically increased the growth penalty for larger sizes, decreased the growth bonus for buildings and settlement type, and made it impossible to grow when the population is above 1.5 million. I haven't had a chance to test this one yet though, so for the moment I have uploaded it as v0.1b.
 
Last edited:
No worries, that is a good way to search for bugs. Ideally if its balanced properly even with all the buildings it should be a struggle to get to 1million. I've added a new version with updated growth rates and stopped growth for cities with a population above 1.5 million. This should prevent cities from reachig the 2.1 million mark that breaks the variable.
 
One thing that may be worth looking into is tying in the "reclaiming land" event from the prosparity events to be tied too pop size. Once it hits a certain level, the even fires or has a chance to fire allowing the building of more holdings, just replicating how spaces in other holdings are disappearing due to the amount of people.
 
Hey, I'm the guy who made the thread in the HIP subforum. I had in mind tying pop and pop growth to a more radical change to how holdings work, so I'm not sure how compatible our projects are, but at the very least we could share resources.

So far, most of my work has been taking historical population estimates, and mapping them onto the CKII province map. I have in mind a system where each castle and city holding can represent up to 50k rural people (with temples not representing actual concentrations of population, and being limited to one per province), so the maps represent population by number of holdings per province. I'm currently in the process of editing the history files to account for carrying capacity (i.e. holding slots) and population in 867 (actual holdings).

If you want to make this mod more realistic, I'd suggest that you also attach (rural) pop limits to holdings, if only to make it easier to represent carrying capacity - without using holding slots, you'd have to add a modifier to every province. Obviously urban population should not be tied to these caps, and I think that for now you could easily, if crudely, represent urban growth with a holding modifier for big cities that lets them ignore the per-holding limit.

I've attached my maps of carrying capacity (based on the max population reached by an area before the widespread adoption of New World crops/the Agricultural Revolution), as well as the population in 867. The source for population is the Atlas of World Population History (https://www.fichier-pdf.fr/2014/12/21/pour-happliquer/pour-happliquer.pdf), and the distribution within the 1978 borders that Atlas figures are given for is based on of a map of population density circa 1600, or modern maps/intuition for areas that that map doesn't cover. Of course that isn't perfect, but it's the best I could do.

Even if you don't want to tie population to holding number, you can still get estimates for rural population per province by multiplying the number of holdings by 50k. If you do decide to make use of limits per holding, you're welcome to use my modified province history files (which should be uploaded as the first stage of my submod within a week or two). The 867 population figures are very similar to the ones for 769, and it wouldn't be a travesty to use them for 769 without modification.
 

Attachments

  • Population - Max.png
    Population - Max.png
    469 KB · Views: 494
  • Population - 867.png
    Population - 867.png
    460,7 KB · Views: 434