When city happiness state changes

What would you like to see in Freeciv? Do you have a good idea what should be improved or how?
Post Reply
Dino the Dinosore
Hardened
Posts: 171
Joined: Sun Dec 31, 2017 3:41 am

When city happiness state changes

Post by Dino the Dinosore »

Background - noticed this in the context of the bug in Issue https://www.hostedredmine.com/issues/885093. Example of that bug - govt is Despotism, city happiness state is Peace, city is working a Buffalo tile, which normally gives 3 production, but is 2 under Despotism. In the city dialog, if you rearrange the worked tiles so that the city should celebrate, the city dialog will now say "celebrating" and the Buffalo tile will show 3 production. Both of those are WYSIWTF - in fact at the turn change you will get 2 production from the Buffalo, and then the city happiness state will change to "celebrating" and the city starts celebrating at the start of the next turn. This behaviour matches what is said on the "Turn" page on the wiki (https://freeciv.fandom.com/wiki/Turn). The bug fix would, with this example, have the city dialog show 2 production from the Buffalo and for the happiness state show "Celebrating (Next Turn)".

However, things are different when the state changes from/to "disorder" - that takes effect immediately. Using the same example, if anything causes the city to fall into disorder, then at the turn change you get no surplus food, no surplus production, 0 science and 0 gold, which is what the city dialog says.

I think it would be better to be consistent about when a city's happiness state changes, and have changes to/from "celebrating" and changes to/from "disorder" happen at the same time, either immediately or at the turn change. Note that this issue is also closely related to the topic that GrafWasili posted in http://forum.freeciv.org/f/viewtopic.php?f=13&t=91740

Thoughts? Opinions?
Ignatus
Elite
Posts: 644
Joined: Mon Nov 06, 2017 12:05 pm
Location: St.Petersburg, Russia
Contact:

Re: When city happiness state changes

Post by Ignatus »

I think, disorder at least works in an obvious manner. Well, obvious if you remember that if you buy a temple that pacifies the city it will get surplus outputs other than production, and if you buy a warrior that would pacify it
then disorder ends only the next turn, but compared to the celebration rules it's outright obvious. It was not planned originally that disorder should accumulate some state to happen as celebration does (only "revolution when unhappy" does it from disorder turns).
ilkkachu
Posts: 5
Joined: Tue Jul 07, 2020 11:38 am

Re: When city happiness state changes

Post by ilkkachu »

Dino the Dinosore wrote:govt is Despotism, city happiness state is Peace, city is working a Buffalo tile, which normally gives 3 production, but is 2 under Despotism. In the city dialog, if you rearrange the worked tiles so that the city should celebrate, the city dialog will now say "celebrating" and the Buffalo tile will show 3 production.
Doesn't the client show "happy" (and not "celebrating") when the city is about to start celebrating after being in normal state? And at least as far as I can see, it shows the values that are going to be produced. When stopping celebrating, the map view shows the smaller numbers, but you get the bigger ones, like in the linked issue. But that's the opposite of what you said here?
Post Reply