Riots Model Version 4.0 (alpha)

July 2005



I. Introduction

This model is an evolution of the version 3 model and reuses most of it.
It uses information from the social, government and economic models to create discontent measures in society. Discontent is then used to generate several different events from simple protests to revolutions and other major social events.

It's highly recommended to be familiar with the govt and social models before reading this.

I.1 Rationale for a new model

Why changing the model from v3?
There are several things in the v3 riots model that I consider flaws from a gameplay point of view. I'll list them below:

I.1.1. The correlation between a riot and its cause is hard to find.

It is difficult to know what causes a bad event to happen because the events are caused by the sum of several feelings. Thus when trying to correct an event, if the event was caused 51% by one cause and 49% by the other, it's necessary to show both causes to the player (or ai). When there are more causes with approximately equal weight, you'd have to show all of them.
The result is the user interface has to be crammed in order to show the good info to the player, and will look like a spreadsheet more than a game.

I.1.2. The model doesn't consider demographics.

The probabilities of events are the same whether the ethnic group is 1% of the population of the province or 50%.

I.1.3. Event prevention.

Certain events have no way to be prevented, which will only get the player frustrated. This is the case of Nationalistic Rebellion Feeling.
Although it's always possible to reduce the likelihood of an event by lowering civil rights, it can't reduce the PAF, only the probability by at most 40%, which is not enough to be an effective deterrant against sever events.

I.1.4. Verbally exposing discontent.

This event is useless, as it's more convenient to have a panel that gives the player an idea of which events may happen than state that people are riotting and complaining at the same time. Furthermore, this event is so common that if floods the user interface. It's also harmless so is not interesting in itself but only as a way to know other events may happen.

I.1.5. Revolutionary and Replace Ruler Feelings.

These feelings are a nightmare to show to the player or to manage by the ai.
Each social class has a preferred set of policies and power distribution. They support various regimes based on this set. When no regime matches their desires, this leads to a lot of regimes which are all "far" from the current regime. The player would have to know the preferences, in terms of regimes, of each social class, in order to try and match their desires. It means yet another panel that would have to be looked at for each social class of each ethnic group in order to do a good job. It's also useful to show each regime and how much support it has. Additionnally, the equation uses a threshod where a distance of 0.17 or more means people want to riot, and less they don't, which means they will riot quite often, and this leaves little freedom to the player.
It's by far easier to manage if there's one event per regime instead of one for all the regimes.
There's also a realism problem with these feelings, as the discontents are summed. This effectively means that if communists, royalists and theocrats are unhappy, they will ally themselves together to promote communism. This sounds really weird in my opinion.

I.1.6. Economics

There is only one event linked to poor economics, but on the forum it has been suggested that economics is a major cause for riots, and that, without economic causes that don't meet expectations, riots won't happen. If economics are a decisive factor in discontent, then its weight should be increased with regards the previous model.

I.1.7. Complexity

Although the model is said to be very simple, the equations are not. For instance:
SDF=(0.4*(1-1.25*((1-0.5*Rexp(-10,20,PAL)*PI)*(0.4+0.6*Rexp(2,-15,PAL))-0.2))+0.4*PI+0.2*(1-ES))*p
Although this may seem unimportant at first, there are several consequences to this complexity:

I.1.8. Separatism

Nationalistic Rebellion Feeling and Self Determination Feeling are different, but very similar. The v3 model states that NRF "wants to form a civ of its own" but doesn't let this feeling cause Declare Independance, which seems weird. The difference between these feelings was precised as:
"NRF and SDF may seem similar, but there's a big difference. NRF exists in people who have a conflict of nationality with the civ's govt (and depends greatly on the level of nationalism), while SDF is strictly "operative", meaning the people feel things could be run better locally without (or lower) central govt's intervention."
I am not sure that even a worker with no political power wouldn't support his landlord so that this landlord would get more power, as they would think he would care more about them than the central government would. I think these feelings could be lumped together into a single separatism feeling, whose consequences vary based on severity.

I.1.9. Lots of events

When people are unhappy, they can do many different things because of a single cause, like declaring independence and a duke rebelling at once. The latter event doesn't make sense if the province is independent, so it's a bit weird that both may happen at once and for the same reason by the same people.

I.1.10. Welfare inconsistencies

Poor Welfare Feeling has a welfare part which is very weird. The equations imply that PWF will increase if social policy increases. This looks weird. If people are unhappy because of poor welfare, then, without changing the taxes, the solution to make them happy is to promise them no welfare at all. That doesn't sound right at all. The PAF equation, expanded in order to take Social Policy into account was:
PWF=0.8*(1-Exp(-((HPCI/PCI)-1))+0.2*(1-AEL)
Adding the missing ")" and removing the PCI part, we get:
PWF = Constant - 0.2 * AEL
I expand AEL:
PWF = Constant - 0.2 * (1-0.5*Rexp(-10,20,PAL)*PI)*(0.4+0.6*Rexp(2,-15,PAL))*Min(1,ININ/OII)
I'm interested only in the term depending on social policy, so this translates as:
PWF = Constant - Constant2*Min(1,ININ/OII)
Considering the case where ININ/OII is less than 1, and replacing OII, this gives:
PWF = Constant - Constant2/(Constant3+0.2*SP)
All the constants being positive, as SP increases, PWF increases too. This is wrong.

I.1.11. Military Coup and independance inconsistencies

Military Coup was described with "probabilities of the Military Coup event are averaged along all Ethnic Groups and all social classes in all provinces. A fraction (equal to that average found) of existing military units receive the "rebel" status and a pointer to a regime is stored in each of those units. That regime is the one with highest value in the support regime shares of the social class calling the event." This links a single social class in one province to everything else in the world. The chances that ethnic group A who want regime B will help ethnic group C to get a regime D seems low to me.
Declaring Independance effects were also not clear, since in case of civil war it created units, but used a fraction as defined by the military coup, so it wasn't clear whether units became rebels or new units were created, or, from other parts of the model, whether loyalist units were created.

I.1.12. Internal Military Opponents

Civil Wars stated that a new civ would not be formed if a civil war was declared, and all revolutionary units would be rebels instead of revolutionaries. Since a unit requires a civilization for many things, in particular in order to know who their allies and enemeis are, it would be a real pain to have units of a civilization who are at war with that civ and at the same time have different diplomatic statuses with another civ. It's far easier in terms of code to let the independentists be a real civ. IT also allows people to help the independentists and make treaties with them.
Note that the problem happens with all internal opponents. You might want an ally help you get rid of rebels. In particular, I see no reason why a revolutionary camp couldn't have diplomacy with other civilizations. For example, Korea underwent a revolution and China helped one side while America helped the other. It's easier to handle if both sides are civilizations.

I.2 What changes

The philosophy of the model doesn't change. The way of computing PAFs, and the way they are used to lead to events, change. Some are also altered.
For the most part, however, this document is identical to version 3 of the model.

II. Model Overview

Discontent is measured in several ways taking into account different factors. Discontent moves people to action with a specific intention depending on the source of discontent. Actions take the form of "events" happening in the civ with a probability given by the discontent level. Events give the player info about what's wrong in the civ, but can actually lead to dramatic changes, most of them in the govt (affecting the govt model), but even beyond, like creating new civs when actions pursue independence.

in several ways taking into account different factors. Discontent moves people to action with a specific intention depending on the source of discontent. Actions take the form of "events" happening in the civ with a probability given by the discontent level. Events give the player info about what's wrong in the civ, but can actually lead to dramatic changes, most of them in the govt (affecting the govt model), but even beyond, like creating new civs when actions pursue independence.

The model describes only how to create probabilities for the events. The events themselves are the interesting thing to deal with in game terms. Each event will have a procedure associated instructing the game engine what to do when the event occurs. In this document only a rough description of what happens when an event takes place is given. The model describes only how to create probabilities for the events. The events themselves are the interesting thing to deal with in game terms. Each event will have a procedure associated instructing the game engine what to do when the event occurs. In this document only a rough description of what happens when an event takes place is given.

III. Clash Society and Discontent

The people in a civ is divided in Ethnic Groups (EG) (defined in the social model) and they in time are divided in social classes (defined in the govt model). EG's are located at provinces. The model creates measures of unhappiness at the social class level. Even though population and social classes may be detailed at the square level, the model only handles them at province level.

As can be concluded from the previous section, the model doesn't handle unhappiness via a single measure. It uses several measures, each associated with a specific source of unhappiness. These measures are called Pro-Active Feelings (PAFs), because the higher they are, the likelier people will take actions, mostly against the govt. But the name shouldn't confuse: A PAF is unhappiness.

The idea of using several unhappiness measures is to get better modeling of what happens when people is upset. Some people can be upset because they want their province to go independent from the empire, while others may be looking to change the type of govt. The outcome if either one is successful in trying to change things is very different. So, the difference between PAF's is the goal the people is trying to accomplish through the actions the PAF triggers.

IV. Pro-Action Feelings

Separatism Feeling (SEF)

Discontent because the ethnic group the social class belongs to is ruled by another civ (a civ with another nationality), or by a central government which doesn't care about them. The EG feels "invaded", so it wants to form a civ of its own or join the civ of the same nationality if it already exists. If the feeling is not strong enough, the EG may only ask for "autonomy", which means having more influence in the decisions affecting the province.
Equation:
SEF=((1-DN)*(1-PAL)/(1 + exp(8-13*NAT)) + (PI*PAL*politicalpower))*sqrt(1-CR)
where:
DN is a dummy variable taking the value 1 if the govt nationality and the EG's nationality are the same and 0 otherwise.
NAT is EG's Nationalism.
politicalpower is the political power share of the social class.
PAL is Province Autonomy.
PI is Province Isolation.
CR is Civil Rights level.

Anti Discrimination Feeling (ADF)

The civ's govt may discriminate people because of their nationality or the religion they follow and maybe enslave them, as described in the govt model. This PAF reflects the discontent caused by this discrimination (if it exists and affects the social class). Here the goal is to abolish the discriminations and enslavement.
Equation:
ADF=0.5*FR+0.5*FE
where:
FR is EG's Religious Discrimination Factor.
FE is EG's Ethnic Discrimination Factor.

Bad Policies Feeling (BPF)

Discontent because of "incorrect" (as perceived by the social class) central govt policies. The goal is to make the govt change the policies.
Equation:
BPF=1/(1 + exp(10-48*DNPD))
where:
DNPD is the social class' Govt_DNP-SocialClass_DNP distance.

Poor Welfare Feeling (PWF)

Discontent because of the welfare produced by the level of civil rights and the administration effectiveness (see more on administration in the govt model).
Equation:
PWF=(1 - AEL)*(1 - SP)
where:
AEL is Administration Efectiveness Level.
SP is Social Policy level.

Political Change Feelings (PCF)

The feeling that the regime must be changed to another specific regime, because the very essence and structure of the current regime are "wrong". Note that each possible regime causes a different PAF.
Equation:
For each Regime other than conservative and ruler's regime
PCF=S * sqrt(REGD).
where REGD is the Govt-Regime Distance and S is the support share for the regime.

Replace Ruler Feeling (RRF)

The feeling that the ruler himself, not the whole regime, should be changed, either because the ruler's policies feel wrong (the govt model states the ruler does not necessarily set the govt profile as he wishes) or because he uses Goons Squads. Note goon squads aren't taken into account in the equation for now.
Equation:
RRF=(1 - PI)*distance between ruler policies and ethnic group policies. where:
PI is province isolation.
The distance includes all policies: (DNPdistance + regime distance)/2.

Note

ADF is the feeling a discriminated person has. People who don't suffer discrimination have ADF=0. However, people not discriminated can be upset about the existence of discrimination, but it's measured within BAF.

V. Events

These are the events the PAF's can trigger.

Riots

The people go violent. A random amount of infrastructure is destroyed in the province where the event was called.

Revolutionary Forces Formation

In the province the event was called, a (people's) military unit is created and passed to AI control. Revolutionary units try to conquer the civ's capital. If they succeed, the ruler and govt are replaced. See below for more details on that. See also below how a "total" revolution can be triggered.

Guerrilla Forces Formation

In the province the event was called, a (people's) military unit is created and passed to AI control. The objective of guerrilla units is to liberate the province from the civ's control. If they achieve it, the province is annexed to a civ with matching nationality or, if such civ doesn't exist, a new civ is created.

Attempt to Murder the Ruler

Once the event is called, dices are rolled to check if the attempt is successful. The success probability is determined through several factors. If the attempts fails, a message is displayed informing the player of the attempt, which should warn him of how bad things are. If successful, the ruler is changed. See more about replacing the ruler below.

Military Coup

When the event is called, a number of the civ's military units (depending on the average values of the event probabilities along all EG's and all social classes) become "rebels" and pass to AI control. The rebels will try to conquer the civ's capital province. See below for what happens if they succeed. See also below how this can lead to a "civil war".

Army Betrayal

This is like the Revolutionary Forces Formation event, but instead of creating a people's military unit, a military unit already existent betrays the ruler and joins the revolution (becomes a revolutionary unit).

Declaring Independence

The province where the event was called becomes a new civ. Contiguous provinces' PAF's are checked to see if they would join the declaration.

Rebel Duke

A military/nobility leader in a province decides to decrease central govt's influence over the province. It's like a less radical form of independence declaration, where the local leaders just want more autonomy, but still find valuable belonging to the civ. The Province's Autonomy Level in the province is increased and associated Feudal Units are created (see Govt Model). See more of Feudal Units below.

Note

The events, as mentioned before, are produced by the social classes. But a given event can be produced by only some classes. This is to avoid having the aristocrats rioting cities or peasants conducting military coups. The list of events a social class can call is defined by pre-settings (given the complexity of the model, they are likely not to be moddable).

VI. Computing PAFs and Event Probabilities

Computing PAF

Each PAF leads to a probability for the various events. Some PAF's may have an associated weight of zero for some events, so, for example, the Bad Policies Feeling doesn't affect the Guerrilla Forces Formation probability because the ethnic group wanting its freedom just doesn't care which particular policies the invasive civ may be issuing.
The PAF has also a "circumstances" term, which is explained later.
The higher the PAF is, the higher the probabilities for events. Four factors affect this basic rule:
  1. The lower the civ's civil rights are (Civil Rights is a govt model's variable), the lower the events probabilities. This is to simulate a tight control by the govt. But it's a double-edged sword, because the low civil rights will increase the Poor Welfare Feeling. However, the model equations will make the "low civil rights" solution a good one in terms of lowering the overall chances of events. The cost of a low level of civil rights should appear in other aspects of the game, maybe in economic performance and/or tech development.
  2. The higher the cultural attribute "aggressiveness" is, the higher the probability for all events.
  3. If the govt uses "internal intelligence services", probabilities for violent events are lowered to reflect the govt's capacity to destroy attempts to threaten the establishment. This is like an extension of the "low civil rights" solution, but this one costs money.
  4. Monetary aid from another civ could help organize dissidents, increasing event probabilities. (link with the Diplomacy Model)
  5. Population. An ethnic group whose population is very minoritary will be less likely to call an event.
  6. A factor based on economics growth. If the economics growth is null, the factor is 1. If the economics is excellent, it may go down up to 0, if it is bad (worse than expectations) then it will go up.

Probability

Severity of a feeling = PAF * ((1-sign(CUS))*(1 - 0.3*KGB)*(0.6 + 0.4*CR) + sign(CUS)) * (0.8+0.2*AGG) * (1 - 0.3*ES) * (PAF+CT) * sqrt(POP) * (HPCI/PCI).
where:
CR is govt's Civil Rights level.
ES is govt’s Empire Stability level.
CUS is the Civilization’s Unrest Status.
AGG is Ethnic Group's Aggressiveness.
KGB is govt's Internal Intelligence Services level.
CT is the Circumstance Tern.
PCI and HPCI are Per Capita Income and Historical Per Capita Income.
POP is the proportion of the ethnic group in the whole population.
The probability that an event happens is (severity - threshold). If that's more than 1, then something bad will happen systematically.

Effects

Events are ordered by intensity, and there's a threshold under which no event happens. The higher the PAF, the higher the likelihood of events happening, and the higher the likelihood of a severe event occurring. For example:
Separatism Feeling can cause any one of riots, rebel duke, guerilla forces formation, or declaring independance. Events like rebel duke and independance are not compatible. Independance is also much more drastic, and would require a higher PAF to happen. IF I consider (to keep things simple in the example) that all events have the same weight of 1, are ordered as I just listed them, that a PAF is 0-1, the threshold for an event is 0.1, and a PAF od 1 means 90% chance of a riot, then for the following PAFs, the likelihood of events are:
PAF Riots Rebel Duke Guerilla Independance
0.1 0% 0% 0% 0%
0.2 5% 5% 0% 0%
0.4 10% 10% 10% 0%
0.8 20% 20% 20% 10%

The events are ordered in priority this way:
  1. Riots
  2. Rebel Duke
  3. Attempt to Murder the Ruler
  4. Revolutionary Forces Formation
  5. Guerrilla Forces Formation
  6. Army Betrayal
  7. Military Coup
  8. Declaring Independence
Each PAF may lead to only certain events, with various weights. This, along with the minimum % to be considered (threshold: No use to trigger events when they have less than this value) should be set in a resources/scenario file.
Default weight values are:
Riot Rebel Duke Attempt to Murder the Ruler Revolutionary Forces Formation Guerrilla Forces Formation Army Betrayal Military Coup Declaring Independence
SEF 10 10 0 0 10 0 1 10
ADF 10 0 0 0 2 0 0 0
BPF 6 3 2 2 0 2 3 1
PWF 10 0 1 2 3 2 3 2
PCF 10 0 3 10 1 10 5 2
RRF 1 0 10 0 0 0 3 0
These weights may be reduced if the social class can't reasonably call the event:
Based on the composition of the social class (human, warfare, ethics, bureaucracy, workers), the weight of various events is modified:
where:
not aristocrats = human - warfare - ethics - bureaucracy + worker (limited inside the 0-1 range).

VII. Effects of Events

Each event has specific effects, but they also all have generic effects:

VII.1. Generic effects

The event is shown in a list of events that happened this turn, with the possibility of getting detailed information on which social class of which ethnic group called the event, and for which reason.

Each time an event takes place, the govt model's variable "Empire's Stability" is decreased. ES represents people's perception of civ's stability. Events probabilities, in time, depend on this variable, having two effects: If ES is high, "conquered" peoples (ethnic groups not having the civ's nationality) can find valuable the stability and choose not to rebel (pax romana effect). On the other side, if ES is low, people may feel it's a good opportunity to take advantage of the apparent unstable situation to go into action, increasing the event probability.

Because of the circular relation between ES and events, a civ facing some events could see itself in a escalation of troubles if the ruler is not able to find long term solutions.

ES should start at 1 and be reduced by 0.1 per event happening, then increase each turn by 0.1 in order as things revert to normal state. Figures to be tuned.

The Circumstances Term (CT)

This term is used to include in the unhappiness modeling things that happen in the civ that may upset a social class in a particular time. For example, a peace treaty signed that annoys the military. Or the ruler closing the parliament, outraging the people. Or an expropriation of private property that pisses off the aristocracy. Things that, at the moment when they happen, produce an immediate increase of unhappiness, but are forgotten as time passes by. The model will increase the value of the Circumstances Term when a thing like that happens. To simulate the "forgetting", the model decreases the CT slowly each game turn.

Doing this, it'll be probable that after "bad" decisions, the ruler will face events against him. And they can be accumulated: if in a short period he makes a series of decisions upsetting classes, chances are he'll suffer the consequences.

A specific list of things that can increase the CT is not available yet.

VII.2. Specific effects

Riots

A random amount of infrastructure is destroyed in the province.

Revolutionary Forces Formation

One people’s military unit is created in the province. It is given a "revolutionary" status and a pointer to a regime should be stored in the unit too. That regime is that of the PAF leading to that event.

Guerrilla Forces Formation

One people’s military unit is created in the province. It is given a "guerrilla" status and a nationality. That nationality is the one the Ethnic Group calling the event has.

Attempt to Murder the Ruler

A random number between 0 and 1 is created. If the result is lower than 0.7-0.5*KGB, where KGB is govt’s intelligence services level, then attempt is successful and the regime with highest regime support shares value is passed to the procedure "Replace Ruler" (see section VIIII)). If the result is higher, the event will be shown as a failed attempt to murder the ruler.

Military Coup

A fraction of existing military units in the province receive the "rebel" status and a pointer to a regime is stored in each of those units. That regime is the one with highest value in the support regime shares of the social class calling the event or that of the PAF which triggered the event. If the People’s Political Block in the Current Government Profile has 20% or more power, the player will be asked if he/she wants to call loyal citizens to fight the rebels, triggering a Civil War. The fraction of units is equal to the probability of the event times the proportion of this ethnic group in the province population.

Army Betrayal

One military unit in the province receive "revolutionary" status and a pointer to a regime. That regime is the one with highest value among the regime support shares of the social class or of the PAF triggering the event.

Declaring Independence

Provinces surrounding the one that called the event, are checked to see if they join the independence movement. If the value of SEF in the same social class and Ethnic Group in each surrounding province is 0.5 or higher, the province is assumed to join. The insurrect provinces will form a new civilization.
If the People’s Political Block in the Current Government Profile has 20% or more power, the player will be asked if he/she wants to call loyal citizens to fight the rebels, triggering a Civil War.

Rebel Duke

The Minimum Province Autonomy Level (a province-level variable) is increased by 0.1. The detailed message the ruler sees is "The local leaders have increased their effective control over the local administration in [province], without our consent. This will increase the efficiency of the local government, but will reduce our control over it from the central government."

VIII. Replacing the Ruler and/or the Government

This can happen as a result of:
  1. A revolutionary or rebel military unit entering the capital: Both the govt and the ruler are replaced. The govt profile and the ruler's govt profile (in the govt model) are made equal to the mentality of the successful unit. In order to simulate the change of ruler (the ruler was changed but the player remains the same), the "govt window" becomes unavailable for player intervention for some years or game turns. After that, the game resumes normally.
  2. A successful attempt of murdering the ruler: Just the ruler's govt profile is changed (made equal to the social class' mentality calling the event) and the govt window becomes unavailable for some time.

IX. Revolutions, Civil Wars and Internal Military Opponents

There'll be a civ-level variable called "Civ's Unrest Status" that can take 3 possible values: When the civ has a Civ's Unrest Status of 1 or 2, other aspects of the game should be affected. The economic and tech development performances should lower. Maybe also in the diplomatic side peace treaties and alliances with other powers should be ignored. These possible effects should be discussed in the future.

IX.1. Revolutions

The event "Revolutionary Forces Formation" creates revolutionary military units, but the mere presence of these units in the map doesn't represent a revolution. This is made so in order to make the game smoother and to "protect the game from the probabilities". The event probability can be low and yet be possible for it to happen, just because the game engine is rolling dices every game turn. The game would be very unstable if we change the Civ's Unrest Status to "under revolution" simply by one revolutionary unit appearing. A revolution is considered so when "enough" revolutionary units are on the map, where "enough" is a number TBD.

The moment the status is changed to "under revolution", the following things happen:

  1. The "Empire's Stability" variable is halved. This will increase all event probabilities with a potential of great damage overall to the civ in the years the revolution lasts. It also has implications in the govt model.
  2. Just in this game turn, the Revolutionary Feeling PAF is artificially increased to encourage the formation of a big revolutionary army simulating a "call for revolution". Note doing this could imply the formation of different revolutionary forces, that is, revolutionaries supporting different regimes. Remember a revolution, as handled in this model, has as a goal a change of regime. So, in a revolution there can be several sides fighting each other trying to put each their regime in the govt.
  3. The effect of the Civil Rights and the "internal intelligence services" is ignored in the calculation of event probabilities, reflecting govt's lost of control over the people. This will increase the event probabilities of all kinds.
The revolution is considered finished when a revolutionary unit conquers the capital (replacing govt and ruler) and no revolutionary units of other faction exist. Or, if all revolutionaries are killed by the player. The end of the revolution transforms all revolutionary units into normal military units and the Civ's Unrest Status is set back to "normal". The Empire's Stability is increased a little.

IX.2. Civil Wars

A civil war can only be invoked by the ruler. In order to do it, at least one of these two conditions must be met: When a civil war is invoked, like in a revolution, the Empire's Stability is halved and the effect of Civil Rights and internal intelligence services vanishes in the calculation of event probabilities. What the ruler gets is the formation of loyal people's military units in all provinces so he can fight the rebels. The latter happens only at the moment of invoking the civil war. Also, no "Declaring Independence" event can take place during the time the civil war develops.

How many loyal units are created and where remains to be determined.

In a civil war it is considered that there're only two sides (loyal and rebel). If the "Revolutionary Forces Formation" event takes place, it won't create a revolutionary unit, but a rebel one.

A civil war ends when a peace treaty between the ruler and the rebels is signed or the rebel civ is destroyed.

As you can see, a civil war is something a player would rarely choose to call. It's meant to be the last option of a desperate situation, where he sees no way of stopping a military coup or revolution or where the independence declaration of a province or group of provinces would mean a huge loss to the empire and there appears to be no way of crashing the independence with the current army. I think here lies the right incentive for not making attractive a civil war when a far away province (colony) declares independence, but making it worth the effort if the province is an important (close) one.

IX.3. Internal Military Opponents

The model defines 4 types of internal military opponents: guerrilla, revolutionaries, rebels and feudal units. The distinction is relevant to get the right results in different situations and historic frameworks.

Guerrilla

The units are created part of a civ with given nationality. If no such civ exists, one is created. If the civ is not at war with the player's, the guerilla behave as a feudal unit of their nationality's civ at war against the player.

Revolutionaries

The AI must drive the unit looking to conquer the civ's capital. Must store the regime that produced it, so if it's successful, the game engine will know what new regime is implemented in the new govt.

Rebels

The AI uses the unit depending on the Civ's Unrest Status. If "normal", looks to conquer the capital, just like the revolutionaries, but if "under civil war" switches to "conquer as many provinces as possible". Needs to store the regime that produced it so, if successful in capturing the capital, the game engine will know what mentality the new govt must have.

Feudal Units

Little AI needed. The units simply stay in the province where they were created and defend the province from attacks. The existence of Feudal Units represent a powerful local warlord (see more on the Govt Model). Feudal units may be at war with civilizations different from those the central government. They may even be at war with the central government, though that just means they won't let their armies trespass in their own province.

X. Differences with Previous Version and Final Comments

I reverted from version 3 which said the following:
"An important change is now events probabilities use as input a summed version of PAF's. The old version handled probabilities individually for each PAF. This didn't modeled correctly how people in real life get mad by a combination of things, feeling that bad things are piling one on top of the other."
The piling of bad things on top one another is taken care of by the economic factor amplifying the PAF's. The combination of different revolutionary feelings in the same PAF was also wrong in my opinion, as a social class is not homogeneous, and people inside it who don't have the same political views shouldn't ally for a regime they don't like.

Feelings and their equations changed: Nationalistic and Self Determination have been merged into Separatism, Revolutionary Feeling has been replaced by one PAF per regime, under the name Political Change Feelings. Poor Welfare Feeling has lost the econ part and the other part has been changed.

The equation for calling an event has been replaced from a Rexp to a threshold and linear probabilities. The Rexp is just a threshold function in the first place. The same Rexp has been removed from Revolutionary/Replace Ruler Feelings: It translated as the following:
REGD 0.15 0.16 0.17 0.18 0.2
PAF 0.007 0.12 0.72 0.98 0.999
A threshold in this case is far easier to manage for the coder and the players. Tweaking 1% in a profile could yield a 60% jump in PAF. Everything happens in a 3% range here, which is a bit tight.
For Bad Policies, Rexp(10,-48,DNPD) gives:
DNPD 0.15 0.19 0.20 0.21 0.25
PAF 0.05 0.3 0.5 0.52 0.88
Here the changes happen in more than 10%, which is small but much more manageable.

The main change is that poor economy acts as a multiplier to every PAF.