Page 1 of 1

Government stability and demographics

Posted: Tue Aug 06, 2019 5:21 pm
by Ignatus
Running a government is not always smooth. Even if nobody conquers your capital and you let your cities better starve than rebel (the latter, for some reason, is considered very democratic in our games), there can be social conditions when a small group of intrigaunts or a crony system grown unnoticed may ruin the way the nation is governed or invert most basic principles of the state.

I suggest to add to the game spontaneous government changes. They would basically happen at a random turn shuffling the player's cards but coming of it should be predictable. For each such an event we declare thresholds of demographical stats (literacy, mil. service, production per citizen...) within which a specific government is stable, but each unit out of them increases the chance of power system mutation (maybe, until the maximal probability). This would make the governent game features both more developed and more smooth - e.g. you must weight the risks when in a Republic you build libraries to get techs faster rather than courthouses, as the high corruption may throw you back to Tribal. Sometimes the change may be even advantageous - you will probably get from Democracy to Communism in a heavy wartime without revolution period, just bccecause your people understand the need.

The "Revolution_When_Unhappy" effect may be replaced by this more generic mechanism. Example of a possible ruleset code:

Code: Select all

; A Despotism may be thrown into revolution
; by any rebelling city if the nation knows Republic and is literate enough
[govchange_peoples_revolution]
name = _("People's Revolution")
gov_from = "Despotism"
gov_to = "Anarchy"
;city unhappiness warnings precede
message = _("From mere local manifestations, uprisings spread all over the country!"), _("People, willing for a better government, make the dictator to retire!")
;revolution message follows
reqs = {"type", "name", "range"
 "Tech", "Republic", "Player"
}
factors = {"Stat", "MinThreshold", "BaseProbPct", "ProbIncPm", "NewGroup"
  "CityUnhappinessTurns", 1, 100 ; a city must rebel
  "Literacy", 30, 20, 5, TRUE ; 20% to 55% probable
  "CitiesUnhappy", 1, 0, 30 ; +3% each unhappy city
}

Re: Government stability and demographics

Posted: Tue Aug 06, 2019 7:07 pm
by Wahazar
Maybe just to add effect, which can be randomly called (with percentage probability defined) if its requirements are fulfilled?
It would be useful also for other events, for example disasters, which are now , if I remember correctly, hardcoded.

Re: Government stability and demographics

Posted: Tue Aug 06, 2019 8:21 pm
by Ignatus
Wahazar wrote:Maybe just to add effect, which can be randomly called (with percentage probability defined) if its requirements are fulfilled?
What we call "effects" are just sums of integer numbers each of which is included when specific requirement set is fully true; more complicated things than one number require additional data (e.g. "Inspire_Partisans" uses a Lua callback that indirectly addresses unit type with "Partisan" flag). The requirements may be various but their types include few civ stats that seem suitable for defining government stability, and these stats are not usable in other cases I can pretend. So, the mechanism would better use special syntax like for disasters.
It would be useful also for other events, for example disasters, which are now , if I remember correctly, hardcoded.
There are a lot of signals that can invoke a Lua script with flexible behaviour on different occasions. Just Lua can't yet do most of what disasters do. Also, explaining flexible things to AI is difficult overall and has about no softcoded mechanism now (the unit roles like "Hunter" are some of the few examples).