Developer Diary 6

Agriculture has always been the backbone of any civilization. Everything complex was and is built upon food surplus. Today, we'll be talking about how it’s handled in the mod.

Previous Issues
Previously in 2.x, agriculture was in a bit of a rough spot. People had difficulty understanding how it worked. Heck, even some of the team could lose track of how food was produced, moved and consumed.

It was also quite lacking in terms of data input. We didn’t factor in soil quality, access to water, average temperature, as well as how much usable land there is in a province. Instead, we had innate fertility and farming efficiency. Due to data modeling issues, we were forced to assume that a province with a large population at startup would have high enough innate fertility to support that population, and we assumed that a province with a sizeable urban presence at startup would have enough farming efficiency to support that city.

Those assumptions lead to inaccuracy and distortion. We had to manually tweak the values after they were set, and even after that we faced several problems. Moreover, it was near impossible to use the same method when in our new model food is just another trade good produced by an industry.

New Model
So, we had to adapt, and this is what we came up with:





First, we used a script to export how large a province is. Then, we sourced some maps for things like soil quality, average rainfall, inundation, and average temperature. We then exported that data into each of the provinces. We used that data to calculate how good a province is for agriculture, as well as roughly how much farmland there is in a province. As a result, we got ourselves the size and quality of farmable land for each province.

Now that we have that information, integrating agriculture into the economy is much simpler. We made rural industry use farmland as one of its 'inputs' and land quality affect the ‘output’. In provinces where land is abundant, the cost in rent is lower, and if the quality of the land is good, the amount of produced food trade good is higher.

Lower cost and higher income means higher profit, which leads to the industry expanding in size. As it expands, its profit decreases as the price of its produced trade good decreases while the price of land and labour increases. It will eventually converge to a size where its income is equal to the cost, and that determines how much rural product a province produces as well as how much rural population it employs in agriculture.

Benefits from the New Model
There are many benefits to this change. The greatest benefit is that unclaimed but fertile provinces now indeed have actual and realistic potential to grow. It is no longer burdened by arbitrary restrictions like how many people it has at startup. Places like Ukraine and California now have enough potential to support a large population, and the reason and cause are grounded in reality.

Mystery Map Mode
Before we end this diary, let's keep up the tradition by finishing it with a new mystery mapmode. Some people came close to the answer with our last mystery mapmode (which, if you haven’t noticed, was global growth period), so I hope this one receives some love as well!