The best kittens, technology, and video games blog in the world.

Thursday, February 23, 2023

Europa Universalis IV crownland and negative absolutism bug

This bug can really mess up a campaign, but it's pretty much unknown to the community, as it's hiding behind a few layers of obfuscation.

Land shares

The system is conceptually very simple. Every estate, as well as the crown, have some amount of land.

When new land is conquered, it's distributed to everyone proportionally to their influence. For each estate, its influence is displayed directly. For the crown, influence is 60% + absolutism.

So here's an example. You have 200 dev, distributed as:

  • crown 30% - 60dev
  • nobles 35% - 70dev
  • clergy 20% - 40dev
  • burghers 15% - 30dev

Now you conquer 100dev worth of land, it's one of the first two eras, and let's say influence is 60% for clergy, 40% for nobles, and 40% for burghers. New numbers should be:

  • crown - 60dev + 30dev = 90dev = 30% (+0.0%)
  • nobles - 70dev + 20dev = 90dev = 30% (-5.0%)
  • clergy - 40dev + 30dev = 70dev = 23.3% (+3.3%)
  • burghers - 30dev + 20dev = 50dev = 16.6% (+1.6%)

In theory, it's all very straightforward.

It means it's very difficult to have high crownland share before age of absolutism, and countries with more estates have worse crownland situation, but that's just how the system works.

Also in-game tooltip "Crownland can be gained when: Conquer Land when having less than 60% total influence of all Estates" is a complete lie. This isn't even remotely how it works. It is baffling why they put such completely false information in the tooltip, as the real system is very straightforward.

The Bug

Anyway, the bug. Crown influence is 60% + absolutism, so before age of absolutism it should be just 60%. However it is not. The game still keeps track of absolutism in earlier eras, and it can be negative.

If you engage with the estate system, and give away a lot of privileges, you can spend the first two eras at massively negative absolutism, and all the crownland calculations will be broken.

Let's start as Venice - just doing the bare minimum of 3 mana privileges, and Religious Diplomats.

This brings your Max Absolutism to -56.12, so crown influence instead of 60% will be just 3.88%, and you'll get almost zero crownland from conquests.

It gets a lot worse if you get your max absolutism below -60. Then your crown influence becomes negative, and not only the estates get all the newly conquered land, but also whenever you conquer any land, you give them some of your existing lands as well. This is extremely pathological, but for example Venice gets there with just one more privilege.

There's one more complication, as the game recalculates absolutism only if you perform some absolutism affecting action (most commonly changing local autonomy), and the check (vs 0 or vs max absolutism) seems to depend on that action being absolutism increasing or decreasing.

At least you can recover from that if you increase your Max Absolutism, and then do an appropriate absolutism-affecting action, but there's no easy way to see if it worked in the game (in the save game file, it's "absolutism=XXX" line).

If you're at war, and choose peace terms that would gain you some land, you can see land share changes in the tooltip, and from it you can see if it's broken or not.

Play workaround

If you play a monarchy, and don't grant many privileges, you probably won't be affected, as your Max Absolutism should remain positive.

If you play a republic (planning to go monarchy before age of absolutism), or grant a lot of privileges (planning to revoke them before age of absolutism), this will mess up your game due to the bug. If you do both, it will mess up your game even worse due to negative crownland influence.

So the best way to play is by being extremely careful with Max Absolutism. You can view it in Government tab, in Country Modifiers. It's fine if it's just +0, as long as it never goes negative.

The obvious strategy of "just give all privileges on game start, then conquer something to regain crownland" only works for monarchies. If you try it as a republic (or as a monarchy that granted a lot of privileges) you'll get nothing out of it. And if you get to negative crown influence, you won't be able to even recover by seizing land, as every conquest will mean crownland giveaway.

If you go negative Max Absolutism for a while, but then recover (either to positive, or to less negative value), you'll need to do some kind of recovery by absolutism-affecting action. If you're at risk, verify in peace deal tooltip that land share changes are what they should be.

Mod workaround

Mods can work around this issue by giving all countries +1000% max absolutism in the first two ages with a triggered modifier. This was Max Absolutism will never be negative, until you get to the age where it matters. This way players can play the game normally as if the bug wasn't there, and it won't affect anything else.

I didn't test if the bug is still there in the last two ages, but usually at that point you'd try to have high Max Absolutism anyway.

What Paradox should do

They should make negative absolutism impossible, and that would fix the whole issue.

Sunday, February 19, 2023

How to fix Europa Universalis IV late game problem

This is not a rant post, this is a solutions post. However before discussing the potential solutions, it is important to understand the problem well first.

Late Game Problem

In theory, Europa Universalis IV covers the time period from 1444 to 1821. However, in practice, most players never reach 1821 or simply speed-5 through the late game for the achievement (which is easily attainable, but only 9.4% of players have earned it, due to tedium).

This raises two questions:

  • Why don't players continue to play until the end date?
  • Why don't players simply start the game in a mid/late game bookmark?

Neither of these is inevitable for a grand strategy game. For a contrast I'll be coming to a lot, Crusader Kings 2 has neither of these problems. It can be started at a variety of dates, with 4 official start dates (769, 867, 936, 1066), and a lot of later start dates that are all quite good, and full of different interesting characters.

And while "playing to win" would make a Crusader Kings 2 fairly easy in late game, the game nudges you to embrace "roleplaying". There's a lot of things to do other than expanding, and especially if you're a less experienced player, holding on to what you conquered is a very nontrivial matter, so your realm will ebb and flow naturally.

So let's first explore these two questions, and then look into some potential solutions.

Why don't players continue to play until the end date?

Europa Universalis IV is a game about a country expanding and becoming stronger. When a player's country is weak, expanding can be a challenge. But once a player conquers some land, it's done. There is no ongoing challenge in holding onto lands that have been incorporated into the player's realm and the resources they provide.

Expanding comes with many challenges, such as:

  • getting better casus belli
  • improving your diplomatic position
  • declaring wars where your allies join while enemy's allies don't
  • winning wars
  • getting best peace deals
  • managing aggressive expansion
  • preventing coalitions
  • managing truce timers
  • managing overextension
  • getting the necessary mana for peace deals and coring
  • dealing with one or two waves of nationalist rebels
  • converting conquered lands
  • reducing autonomy in conquered lands
  • managing governing capacity
  • building necessary buildings in conquered lands (since the AI is awful at it, no matter how many times patch notes claim to have fixed it)

Once the player conquers a province without triggering a coalition, cores it, reduces its autonomy, and either converts it or accepts its infidel ways, it's done. It will never cause any problems.

This isn't the only design option available. In Crusader Kings 2, each conquered province beyond your small domain is controlled by a vassal and then their heirs. These vassals could still cause trouble, even if their grandfathers were loyal to your grandfather. This is particularly true during succession. There are many tools available to help manage this issue (and it maybe got too easy in late CK2 patches, early-version CK2 and early-version CK3 are both harder for a less experienced player), but it remains a real concern. Just try it yourself - load up a saved game of your Restored Roman Empire in observe mode and you'll likely see that the empire won't survive two AI successions. In a similar scenario in EU4, however, the AI wouldn't lose a single province.

Returning to Europa Universalis IV, the main objective of the game is to increase your power, mainly through territorial expansion. This leads to a situation where the player becomes more and more dominant at a pace that is much faster than what the AI can match. As a result, the game's challenge level decreases over time. EU4 does offer a few alternative means of increasing strength, such as reducing autonomy, converting conquered territories, constructing buildings and monuments, boosting development, and increasing crown land. However, these methods also result in the player's rapid growth and superiority over the AI.

How EU4 Attempts to Address the Issue of Easiness

The most straightforward approach to addressing the issue of a game being too easy is to increase its difficulty. Europa Universalis 4 has multiple systems in place to do this.

The main one is choosing a more or less difficult starting country, with some countries providing a lot more challenging start than others. Players can also set specific goals for their campaign, along with restrictions such as no restarting or no loans. Although the goals are mostly centered around expanding and becoming stronger, some paths to achieving these goals are more challenging than others. Now this isn't Crusader Kings 2 where goals like filling the entire College of Cardinals with horses or collecting every major religious artifact are legitimate campaign ideas. Pretty much all the potential goals in Europa Universalis 4 involve expanding and getting stronger, some routes are just more difficult than others.

And finally there's the very poorly implemented difficulty slider. Most people play on Normal, where the same rules apply to players and AI, except for a few small AI cheats and hardcoded bonuses for lucky nations. Hard difficulty gives AI nations minor bonuses, and Very Hard gives them much fairly big bonuses.

However, all these systems get it completely backwards. Choosing a difficult starting country or playing on Very Hard can indeed make the early game challenging, but as the campaign progresses, the difficulty drops significantly with each passing decade. For example, playing as a no-ally Hisn Kayfa on Very Hard might be challenging in the early game, but once the player has survived and won a few wars, there will be no more significant challenge left in the game, and a player skilled enough to do so might just as well quit by 1500.

Finally, the game also tries to address the issue by railroading certain AI countries to expand quickly, with a long list of bonuses, including the lucky nations bonus. This does have an impact, but it leads to repetitive and boring mid-games, such as the inevitable Otto-Blob end-game boss. After encountering the same predictable outcome repeatedly, most players learn standard counters, such as the "Ally Austria and Poland No-CB Byzantium" opening.

Could holding to what you have be a challenge?

I don't think there is any way to make holding onto what you already possess be a significant challenge.

I tried many such experiments. For example, I tried to massively increase unrest to see if rebels would achieve anything, only to discover that leads nowhere.

Using the formulas from the game's wiki, let's consider a country with 10 provinces of +1 unrest each. After 100 years, it can expect around 5 rebellions, which is a minor annoyance.

So what happens if we increase the unrest level to an unrealistic +50? The number of rebellions per 100 years only increases to 9, and individual rebellions wouldn't even be any stronger. This is mainly due to "Recent Uprising: −100 unrest for 10 years modifier", which trivializes the whole system by hard capping rebellion frequency regardless of unrest.

But it's not even the only factor. Without Recent Uprising modifier, rebellion counts would be 10 per century and 90 per century respectively, that is 50x unrest translating to 9x rebellions. The formulas themselves are still nonlinear, with rebellions needing 10 monthly ticks to happen, and tick chance is capped at 75% per month, so even nearly infinite unrest translates to less that one rebellion per year without Recent Uprisings, or to one rebellion per 11 years with Recent Uprisings.

The only other consequence of all that extra unrest is longer recruitment time. Somehow unrest in provinces doesn't carry any other penalties. You still get as much money, manpower, and everything else from a rebellious province as one where peasants fully love you.

That's not to say EU4 rebellions are never a problem. Most notably going over 100% overextension directly affects rebellion formulas, resulting in much stronger rebellions. Heavily scripted event chains like Ming Crisis or Dutch Revolt can also cause a lot of problems, at least for the AI or for a player not aware of easy ways out they usually have. And due to the way rebellion formulas scale, rebellions can be really deadly for tiny countries, especially for Japanese daimyos, as even a small rebellion can be bigger than their whole national army.

For most countries, as long as they stay under 100% overextension, rebellions are so insignificant they might just as well not be in the game.

Other ways to delay the inevitable late game easiness

If you really wanted to make the late game difficult, there are a few more options available through mods.

You could slow down expansion. The game already throws so many obstacles to expanding, why not just tweak some numbers? Increase AE, increase coring costs and time, increase province warscore cost, and so on. Weirdly a lot of players do it to themselves already by taking terrible idea groups, but a mod could do a lot more.

This somewhat delays the point at which the game becomes trivial, but there's very little to do in EU4 other than expanding, so you won't actually play longer, you'll just play at higher speed while waiting for various timers. If these same nerfs fairly apply to the AI as well, it won't even be all that effective at making the game more challenging.

In older patches it was possible to make expansion a lot more challenging by increasing number of diplomatic relations. The easiest way to become stronger is by seizing land from a weak country with no or only weak allies. Giving everyone a few more diplomatic relations slots makes it far more likely that someone strong would come to defend your potential victim. However, in recent patches allies are so good offensively I don't think this is even helpful.

Another thing to try is allowing conquest but reducing rewards from conquest by nerfing blobs. Paradox recently tried that with governing capacity system and 90% minimum autonomy in territories, but for most countries governing capacity limit is very generous. With trade companies being nearly as good as states, and courthouses being so cheap to build everywhere, at least with default values it doesn't really work.

One fairly obvious approach I haven't seen attempted yet is to make anti-blob bonus simply increase with time. This could simply be a flat bonus to every country, so small ones would benefit the most. It might start at nothing in 1444, but by 1600 every independent OPM gets +10 force limit, +10000 minimum manpower, and so on. Blobs would get the same bonus, but it would proportionally matter a lot less. This should be very simple to implement, and Extended Timeline already has a kind of era-based bonus system, it's just not used for balancing there. The trigger could be either calendar year or a specific technology.

There are a few additional things to consider - subjects probably shouldn't get this bonus, or get a proportionally lower one, or it would benefit strong countries with subject swarms too much. But tributaries and colonial nations should still get it, as they should be able to fight independent enemies fairly. And perhaps native OPMs shouldn't get such a bonus, or they'd swarm a colonial nation. And so on.

An interesting idea from Crusader Kings 2 (I keep repeating myself, but that's a related game that does so many things right) is giving random tiny countries ridiculous temporary bonuses at random during the game, so you'd have a random regional threat punching far above their size for a while (like IRL Brandenburg). I tried to mod that for EU4, but it really didn't do much, at least for values I tested. I've heard Anbennar does something like that with Great Conquerors, going completely over the top. This probably does more to make the late game unpredictable than difficult as such.

And speaking of Crusader Kings solutions, why not make successions a big event? For how obvious it seems, I couldn't find a single mod that even tries it. You could make successions partly reset diplomacy, reset all rebel timers, and add some modifiers to destabilize the country for the first few years. Right now all you get is one time paper mana tax - I'm not even going to pretend you "lose stability". That was true in EU3 as it took time to recover it, but in EU4 you just press one button and don't spend a single day at lower stability. Depending on how it's implemented, this wouldn't even have to be a nerf. What if it reduced accumulated AE by 25%, removed truce timers etc. as well? It might be worth a hassle of having extra rebels and losing some of your allies. This is all just vague ideas, I haven't done any testing, and a lot of CK2-style effects would be difficult to script in EU4's more limited scripting system. If someone wants to try, I think this idea has great potential.

Anyway, while there some possibilities here, I think the other path is a lot more promising.

Why don't players simply start the game in a mid/late game bookmark?

First, there's lack of flavor. In a game like Crusader Kings 2, every start date has different characters, and many historical dynasties are only available some of the time. In Europa Universalis IV countries are mostly the same, even if their borders change. And if a player would like to play a country that didn't exist in 1444 like Prussia, Persia, Spain, or Commonwealth, it's usually possible to form it, and at least for historical countries, formation is usually very easy.

There are some rare exceptions which would be too difficult or take too long to form, like Qing, United States, or Revolutionary France, and occasionally a player might want to play a specific ruler, but it's a very small factor.

So most players would only play late game starts if gameplay was good. So is it?

What mostly works

There are several things in the game that work fairly well, such as province ownership and rulers. Diplomatic relations are also in good shape, although some countries have too many subjects, causing negative diplomatic power gain, but this is only a minor issue.

The cultures and religions are setup reasonably well. There are some questionable choices, but the same can be said about the game in 1444.

Technology and institutions work quite well. Europeans have a significant technology advantage over rest of the world. Arguably it works even better than in a regular game.

Previously, Europa Universalis IV had technology groups, which gave Europeans a historically accurate technology advantage over the rest of the world. However, when the system was replaced with institutions, the spread of institutions became too fast and easy, as did developing them. As a result, the technology gap has almost become nonexistent. According to a video analysis by Reman's Paradox, the gap peaks at around 2 technologies with the Printing Press and then quickly drops towards zero after Global Trade. This issue has not changed much since the analysis was made.

Paradox is unwilling to address this issue as there is a conflict of perspectives between players who prefer a historically accurate technology (with a significant gap persisting until the end) and players who want an easy game in the Rest of the World (with a minimal gap). There is no way to satisfy both groups.

In any case, starting late means starting with the technology gaps as they were before institutions were introduced, and this is fine.

Goods prices are correct for every start date. Events that happen at specific time to change goods prices are accounted for.

What doesn't work but it doesn't matter much

Unfortunately that's where the good parts end. There's a lot of minor things that don't work, but to be fair they're not a huge deal.

There are some easily fixable bugs. Quite a few provinces are missing cores. Qing will reverse-form Manchu, as end game tag check does not apply for such starts. A mod that aims to make the late game playable should take the time to fix these issues.

There are also some undesirable, but understandable behaviors. For example, all Holy Roman Empire countries that historically had a ruler of one religion and population of another, flip their religion in the first month of any late start. It is not clear what the best fix would be.

There are other values that normally increase as game progresses - absolutism, mercantilism, and professionalism.

Absolutism is not adjusted by start date, but it's not too difficult to catch up quickly. It would probably be better if late game starts had some nonzero absolutism.

Mercantilism is not adjusted by start date. This means everyone's trade powers is lower than what it's supposed to be, but trade power only matters relative to other countries' trade power, so it doesn't really affect gameplay much.

Professionalism is adjusted by start date, and the adjustment is quite aggressive, 20% per age. Everyone starting at 60% professionalism is definitely not where it would get to naturally, but it will diverge pretty quickly as the game continues.

The game features monuments, many of which were built after 1444. This is completely unsupported. Every start has the same monuments at same level. For example even 1792 Ottomans start with tier-2 Hagia Sophia and tier-0 Sultan Mehmed Mosque in Constantinople. Interestingly the comments in monuments files imply that a feature to make them pre-built in later start was planned, just never implemented. Fortunately monuments are self-correcting. Mid/late game both money and manpower should be relatively abundant, so monument construction can definitely catch up, at least if the economy was setup properly.

HRE reforms and China reforms are not present in any late game start, and that's probably fine.

Some religions are seriously nerfed. Counter-Reformation isn't present in late game starts, and that hurts Catholicism. Orthodox countries start at 0% Patriarch Authority. However, most religions are fine, and Catholic and Orthodox are some of the strongest religions in game, so arguably this is not a big deal.

What doesn't work and messes up gameplay

And now the really awful parts.

Late game scenarios have zero buildings other than forts. This completely destroys any economic balance. In the latest 1792 bookmark, the highest income country is somehow Russia at very meager 150, number not much higher than Ming can get in 1400s. 1792 France spends 54 of its 100 income on fort maintenance alone.

There is almost no trade income. End nodes in 1792 earn 36, 28, and 17 gold respectively, numbers that look low even for 1400s.

But while incomes might look like it's 1444, the expenses do not. A lot of expenses including armies, navies, advisors, forts, and so on, scale with time. So you have worst of both worlds - early game income and late game expenses. With everyone suffering so much, nobody is going to invest in buildings with their very slow return-on-investment time, so the problem will not fix itself.

Lack of buildings affects not just economy, but everything else building provide, like manpower, force limit, governing capacity, and so on.

Government reforms are nonexistent. Even if you start in 1792, you have 0 reforms unlocked. This is quite bad, as there's no way to rush them, and you're normally expected to have a lot of reforms by this time, and quite a few late game features are locked behind government reforms.

There are no estate privileges and every country starts at the same 0% effective crownland as in 1444 - that is about 30% which you all lose by giving away the essentially mandatory mana privileges. This is also quite bad, as crownland is designed to increase slowly.

Countries in late game starts don't get to choose their idea groups - game selects them automatically, and the selections are truly dreadful, with ideas both weak and inappropriate for their countries. You can abandon idea group and pick a new one, but it will only refund 280 of 2800 points. This severely restricts player agency. It would be much better if player was offered a choice of already unlocked idea groups when starting a campaign, or if switching was possible, at least before unpausing.

Can mods fix it?

The most impactful fix would be to add buildings. There is no "historically accurate" way to do this. The most obvious solution would be running a few AI observe games, and just collecting statistics like "by 1650 50% of provinces in Western Europe have Workshops", and adjusting history files accordingly. This wouldn't be anywhere close to what a good player can pull off, but it would at least un-break game economy.

Fixing monuments by events would be fine, but I don't think this is necessary.

For government reforms, there are two solutions. Either give everyone a lot of reform points to spend (in line with what they'd get normally at this point), or increase government reform progress depending on campaign's start date so certain amount of catch up is possible. The downside of this is that a lot of countries can change government type with final reform, so it might lead to a lot of awkward month one flips.

Crownland issue could be solved either by some crownland bonus dependent on start date, or at least by starting with mana privileges, so you start the game in neutral territory. I don't see any obvious way to accelerate crownland gain. For example reducing seize land timer in later starts would be an interesting way to offer catch up, but it seems to be hardcoded.

With idea groups it's obvious what we want - for the player to be able to choose idea groups they start with, and have them already unlocked. But I'm not sure how that would be implemented. We can't even just full refund, as it would go well over mana cap, and it wouldn't be possible to change to idea group from different type this way. There are some messy solutions, most involving making idea groups nearly free before unpausing.

Summary of fixes

A mod to make late game bookmarks playable should attempt to do the following:

  • fix obvious bugs like missing cores
  • add buildings to match what AI would typically build at given time in given location
  • add government reform progress, either upfront, or by faster growth
  • fix crownland, either by increased starting crownland, or by starting with mana privileges
  • figure out some ways to let player choose idea groups

And with this, late game EU4 starts could be quite decent.

Of course someone would now need to make such a mod, and some of these can be quite challenging to do right.