[BUG] Unhappiness calculation bug – wrong modifier with courthouse

cholsy

Warlord
Joined
Dec 20, 2010
Messages
180
Unhappiness of a city is composed of [# of city unhappiness] and [population unhappiness].
I’ll talk about [# of city unhappiness] only.

[# of city unhappiness] is 2 for each normal city and puppet city, 5 for each annexed city.
If courthouse is built in an annexed city, it should eliminate only extra value 3. (unhappiness should go from 5 to 2). But actually it eliminates all value 5. (unhappiness becomes zero).
Conclusively, in unhappiness calculation based on number of city, the program does not count conquered cities with courthouse.

On the contrary, city breakdown list about unhappiness never reflects the effect of courthouse.

I attached screenshots and excel file which shows the contradiction of this program.

Following is the example in my real gameplay, as Isabella, in standard map, prince difficulty. Of course, the patch is the most recent one in December.
There are 12 normal cities and Forbidden Palace. The [# of city unhappiness] should be 12 x 2 x 0.75 = 18. But actual result is 12.
To find the cause, I traded off lots of combinations of cities, just to check the change of the unhappiness. Finally, I found the error comes from the city which was annexed once and now has courthouse. If I give AI all my own cities and all puppet cities, the [# of city unhappiness] is only 1.5, although I still have several cities, which have courthouse.
This 1.5 comes from capital which I cannot give to AI. (2 x 0.75)

For instance, London has 15 population. It was annexed but has courthouse. Its unhappiness shoud be 15(population) + 2(city) x 0.75(Forbidden Palace) = 16.5.
But actual result in game is 15, with only population. However, city breakdown list shows 23.85 = 15 x 1.34(annexed population penalty) + 5 x 0.75.
A player expects 16.5. List shows 23.85. Actual result is 15. What a confusing system it is!!!

This error means….
1) Conquered cities are better than my own cities because they can build courthouse which actually gives +2 happiness.
2) The more courthouses are build, the less benefit has Forbidden Palace or Planned Economy.
3) Players cannot see right information on which city makes much or little unhappiness.
 

Attachments

  • Unhappiness Calculation.zip
    219.2 KB · Views: 264
I confirm. This certainly isn't the way to go to make annexed cities better than puppeted ones :lol:
 
Not only formula, also UI display needs fixing.
Total value of unhappiness is right but breakdown on econmic overview shows wrong information about annexed city with courthouse. It does not reflect the courthouse at all. Also it ignores civ trait (India). It seems this breakdown displays some interim value, not finally calculated one.
In attached sav game, Cusco is that city.
 

Attachments

  • Unhappiness breakdown error.Civ5Save
    688.8 KB · Views: 175
Can anyone confirm if this is related to the bug where happiness changes on the reload of a saved game. I suspect that someone this bug is being corrected on the load of a saved game causing many people's happiness to plummet after a load.
 
Top Bottom