Stability & civics rough overview

wolfigor

Emperor
Joined
Mar 2, 2006
Messages
1,454
Location
Oslo, Norway
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()))
towns modificator
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)
 
This is great to know.

I know there is a lot of detail in stability and it would be virtually impossible to give them all but do you know the other basic catagories which effect stability eg if your winning or losing a war?
 
hereditary rule if you have a total stability of -50 or less, it will give an other malus of -50 stability points to yout total stability.
This means that with heridatory you may get a very sudden collapse (other civics are more "soft").

incorrect. It just sets it at -50: that means that with hereditary rule you can't go below -50
 
To put all number in context, it looks like that you need a total stability of -40 or less to collapse.

You can see that hereditary rule caps you to -50... the calculation for stability continue after that point, so hereditary rule is a good help to prevent total collapse.
 
This is great to know.

I know there is a lot of detail in stability and it would be virtually impossible to give them all but do you know the other basic catagories which effect stability eg if your winning or losing a war?
War seems to influence the calculation in many ways spread in the 1000 lines. :crazyeye:

However there are some areas where the calculation is rather straight.

combat is calculated after the part of civics I already posted.
Short, simple answer:
For each combat:
+1 for a won combat
-2 for a lost combat
Sum all together to get the influence on stability with cap between -20 and +20
In some cases half of the combat value is carried on to the next turn.

More complete answer:
Spoiler :
During the turns the results for the combats get recorded for later use in the main stability calculation at the beginning of your turn.
For each combat this temporary value will be:
+1 for a won combat
-2 for a lost combat

In the main stability calculation the formula looks like:
Code:
max(-20, min(20,self.getCombatResultTempModifier(iPlayer)))
This means that there is a cap on the stability influence due to combat that can vary only between -20 and +20.

You also get an extra -1 to stability if you suffered great losses (this vary by era).

After that
If you got more than +3 or less than -3 due to combat, then half of the combat result is carried to the next turn.
Else the combat result is reset to zero.
 
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).

So, -25 for every anarchy you get in the game? And that modifier does not get less with time?
 
no, it's only for the turns of anarchy. The permanent modifier is -2 or -3
Sorry for not making it completely clear.

Hower if a CIV is already shaky, an anarchy may tip them off the threshold of collapse (-40 if I understood correctly).
 
Now what we need is someone to go through and post the best civics combinations depending on what techs you have and what era you're in.
 
There is a bonus to stability if you are a vassal? ( this makes sense... )
as human player you can't be a vassal... so what's the point? :D
However I had a look at the code, and I admit I may be wrong but i try an interpretation:
If the civ is a vassal of somebody it gets a +12
Additionally it also get a few more points (negative or positive) based on the stability of the master capped bwteen -6 and 6.
Code:
min(6,max(-6,self.getStability(iLoopCiv)/4))

If the civ has a vassal for each vassal:
Gets points based on the vassal's stability capped between -3 and +3
Code:
min(3,max(-3,self.getStability(iLoopCiv2)/4))
Naturally the civic viceroyalty gives its +4 bonus.
 
Is it possible to see somewhere in the game how many stability points I have?
yes and no. :)
You can see the icons for stability and the stars in the financial advisor screen.
I agree with Rhye that for gaming perspective it's better in this way (like non having exact dates until you discover calendar).

Anyway...
Stability < -40 COLLAPSING
-40 >= Stability < -20 UNSTABLE
-20 >= Stability < 0 SHAKY
0<= Stability < 20 STABLE
20<= Stability < 40 SOLID
Stability >= 40 VERY SOLID

how is going to make your gaming any different... you already know that if your stability is UNSTABLE having a couple of turns of anarchy is going to be very bad. :)
 
how is going to make your gaming any different... you already know that if your stability is UNSTABLE having a couple of turns of anarchy is going to be very bad. :)

It will help my decisions when changing civics. The first post in this thread lists penalties and bonuses in terms of points. So I need to have an idea of how many points I already have in order to guess whether the civics change will make me change my stability level (say, to unstable, for example).

Rodrigo
 
I would like someone to write a comprehensive guide to stability [...] Possibly without writing exact number of modifers (cos they may change), just relying on what's good, what's not, and general advices
That's a very good idea, for a full time job. :)
Stability is dependant to so many factors that is very time consuming to write down everything.

Honestly I was looking at your code and I discovered that:
1. I continue to hate weekly typed programming languages like python (it also has horrible scoping of variables)
2. I have minimal time to do it (I do work)

Given the context I decided to follow a different approach.
I added a small script that saves data about stability (only human) in excel compatible format.
You can then use excel to get a sense out of it (especially if you noted down at which turn important evens, like change civics, wars, etc. happened).

Here the graph for my last match (on v147) with Cyrus, from spawn to UHV. :)

Rhye can give you a good explanation between total stability (this is the one counting for crashing your mighty empire) and base stability.

You can easily see 3 huge falls in my stability.
The 2 deep down spikes (turns 94 and 114) are due to anarchy... all the match was hereditary-rule and slavery.
I converted very late (turn 114) because at the time there was nobody else really converted.
You see anarchy having a big but temporary effect.

At turn 140 my stability looks going down the drain, two events:
1. I conquered in short time all India (all towns fell almost at the same time, even if the battles for then lasted differently)
2. I got a beautiful pestilence spreading in my lands
It was the time I started expanding to reach 8&#37; of controlled world... as you can see fast expansion is bad for your stability.

Near the end of the match Arabia spawned and they got 2 oof my towns "for free". :(
In the same period I was at war against Rome with Greece fighting on my side... until Alexander decided to backstab me.
I made peace with Rome and Greece was at war on two fronts.
 
Top Bottom