Occupation Strength and Police Modifiers
*As a result of my current campaign, I’ve found two problems in the occupation and police code.
The first is that the Resistance Modifier of a population used for occupation or reducing unrest should be (Determination + Militancy + Xenophobia) / 300, but was actually Determination + Militancy + (Xenophobia / 300). Assuming all stats were 50, that meant the result would be 100.6 rather than the correct 0.5, creating a resistance modifier 200x higher than intended.
The second bug is that the occupation strength of ground units was far higher than intended. A ground element should have occupation strength of SQRT(Size) * Units * (Morale/100) * 0.01. However, I forgot the 0.01, so the actual occupation strength was 100x higher than intended. So the occupation strength bug countered half the effect of the resistance bug* ![]()
For v1.12.0 the following formulae are used for occupation and police:
Occupation
-
Required Occupation Strength = ((Determination + Militancy + Xenophobia) / 300) * Population Amount * Political Status Occupation Modifier.
-
Political Status Occupation Modifier = Slave Colony 1.5, Conquered 1.0, Occupied 0.75, Subjugated 0.25, All Others 0
-
Actual Occupation Strength is the sum of the individual element occupations strengths.
-
Element Occupation Strength = (SQRT(Size) * Units * Morale) / 10000
Reduction in Unrest
-
Police Strength = Actual Occupation Strength - Required Occupation Strength
-
Effective Population Size = ((Determination + Militancy + Xenophobia) / 300) * Population Amount
-
Police Modifier = Police Strength / Effective Population Size
-
Unrest points are reduced by 100 * Police Modifier per year