Well, dang... Looks like I was getting too creative with the code. There are two basic problems to work through. The first is the solution I gave you earlier actually exacerbated the problem. The line that looked like this:
Code:
local iChangePressure = CalculateAIGovernmentChangePressure(pPlayer) * 2
Should have looked like this:
Code:
local iChangePressure = CalculateAIGovernmentChangePressure(pPlayer) / 2
But this still won't completely address your original question about forcing AI governments to change more often. The code is missing a "minimum chance" for changing governments. This could be a problem as the game progresses and the AI gets better at managing the things that contribute to the pressure to change governments (e.g. happiness, gold income, demographic competitiveness, etc.). Simply put, once the AI Civ gets its act together, there is almost no chance they'll ever change governments. That was definitely NOT my intention in the mod. I'll add this to the list of things to fix in the next version.
In the interim, however, you could address this by adding a single line. In the "GovernmentOverviewAIFunctions.lua" file, almost at the bottom, you're looking for this line:
Code:
if iGovChangeChance > 33 then iGovChangeChance = 33 end
You need to add this line directly after the line above:
Code:
if iGovChangeChance < 10 then iGovChangeChance = 10 end
You can change "10" to any number you like. It is the "minimum chance" each turn that the AI will change governments, regardless of any other pressures the AI might be feeling. Getting this number right is a bit tricky. You really don't want AI changing governments every 5 turns, as it will take them that long to work through all the change government overhead.
In a game of 300 turns, the number 10 above might lead to 15-45 changes total, which seems quite excessive. If it were me, I'd probably go with 3 or even 2.
If you try it, I'd appreciate it if you can let me know what number you selected and about how often AI Civs changed government with that choice.
Good luck!