wolfigor
Emperor
Disclaimer: the python code for stability is over 1000 lines, there is no way I can summarise everything in one simple post.
Target of this post: get a quick oververview of the direct effects of civics over global stability (not the stability calculated town by town).
Civics influence stability in many ways, this is just the most straight forward.
stability is calculated every turn, however every 3rd turn there is special calculation for stability that is strongly based on civics.
All modificators add together in the order I'm going to present them.
Let's start with some straight combos.
police and free speech reduce the base stability by 10 points (-10 for short)
theocracy and emancipation -3
universal suffrage and barbarism -3
caste system and state property -7
despotism and bureocracy -2
vassalage and state property -7
nationhood and pacifism -10
police state and nationhood +10
police state and state property +5
nationhood and mercantilism +6
hereditary rule and vassalage +3
representation and bureocracy +4
emancipation and free religion +2
But the combo by themselves are not enough and you need to look a bit further to something a bit more complicated...
If you have vassallage in medioeval era, then you get a +3
If you are not in medioeval era, then you get a -3 instead.
This means that hereditary rule and vassalage during the middle age is very stable (+6) but it gives you nothing in any other era.
Burocracy by itself gives you a +5 if you have five or less towns.
But if you have more than 5 towns than you get negative stability, down to a cap of -7.
Representation give you stability modificator based on the number of towns: the more towns, the less stability, down to a cap of -7.
Code:
max(-7,2*(3 - pPlayer.getNumCities()))
1 +4
2 +2
3 +0
4 -2
5 -4
6 -6
7 or more -7
So if we look at the combo representation and bureocracy we get a +4.
If we have 5 towns, we can add +5 for burocracy and a -4 for representation leading to a net of +5.
police state give you an increasing bonus based on the number of towns (the more towns the better) up to a cap of +10 (that you reach with 50 towns).
Code:
min(10, pPlayer.getNumCities()/5)
nationhood makes you more stable with wars, +3 points for each other civ your team is at war with.
despotism if you have a total stability of -60 or less, it will add to your total stability a bonus of +20 stability points.
hereditary rule if you have a total stability of -50 or less, it will set your total stability at -50 (practically a nice cap).
representation +5 if you have a total stability of 30 or more.
police state if you have a total stability of -60 or less, it will add to your total stability a bonus of +30 stability points.
universal suffrage +10 if you have a total stability of 50 or more.
Finally we arrive at combos between technologies discovered by your team and civics:
Tech Democracy if you don't switch to universal suffrage -3
Tech Democracy if you don't switch to emancipation -3
So, once you discover democracy it's better you switch civics to avoid a potential -6.
Tech Liberalism if you don't switch to free speech -3
I your team has the tech BronzeWorking and it doesn't have Constitution, then having slavery civic will give you a +3
If you are using decentralization and your team already discovered Economics -5
Anyway when you switch civic you get some anarchy (apart if you have UP to prevent it).
Anarchy is very, very bad for stability.
It reduce your stability by at least -25 points! (actually you are going to loose even more depending on your total stability, but already you got the idea).
Golden age helps your stability with a +10
(it may help if you want to switch more favourable civics when you are not too stable)