Dark Age rules will be the following:
There are 2 types of dark age points:
A) points calculated each turn from the scratch
B) points created from events in the recent turns
A-points = the sum of points from:
A1) falling back in one of the basic categories
A2) having outdated civics
A1-points:
- the basic categories: Power, Population, Land, Culture, Espionage, Wonders, Technology
- for each category
- each turn the current ranking in % is calculated compared to other known players
- this is subtracted from the best ranking ever (best rankings are reset at the end of each dark age)
- result of subtraction is added to A1 points
A2-points:
for each civics category:
- the best civic value* among known players is found
- the value* of active civic is substracted from the best civic found
- result of subtraction is added to A2 points
*value of a civic is specified in civics XML, in new tag
iContemporaryFactor
B-points = the sum of points from:
B1) points from enemy's golden age started
B2) losing buildings due to selling, destroying or becoming obsolete
these B-points are cut in half each turn after usage for dark age calculations
B1-points
depending on the attitude of the enemy towards you, you get the following dark age points upon his golden age starting:
- furious - 60
- annoyed - 50
- cautious - 40
- other attitudes (friendlier) - 0
B2-points
each building has a new property (defined in XML, tag
iDarkAgePointsObsolete); this property divided by the number of cities the player has is added to B2 points (if player has 2 barracks (iDarkAgePointsObsolete = 10) in 5 cities, when discovering the tech that makes them obsolete, he'll get 2 * 10 / 5 dark age points)
Final calculation
Sum of
A and
B points is multiplied by overall score factor. This factor makes more powerful empires more prone to dark ages. It is calculated as:
score / averageScore
where score is the total score of a player and averageScore is total score of
all live players divided by number of live players.
Additionally, if this factor is < 1 (player is below the average), dark age is not possible.
Finally, the calculated dark age points are the probability (in %) of a dark age happening (random gen tries it every turn).
[EDIT]
However, no matter how many dark age points a player has, dark age can't start during a golden age or during an existing dark age.
[/EDIT]