city setup destroyed when growing

Various topics about the game, the website, or anything else Freeciv related that doesn't fit elsewhere.
User avatar
meynaf
Veteran
Posts: 83
Joined: Sun Jan 21, 2018 10:27 am
Location: Lyon / France
Contact:

Re: city setup destroyed when growing

Postby meynaf » Sun Feb 11, 2018 8:59 am

GriffonSpade wrote:How specifically would you handle barbs leaving?

It's notable that simply waiting for all tiles to be valid can be blocked for other reasons, like other cities working them.

When barbs come, the cells they occupy have their worker go elsewhere. Perhaps then it could attempt to find the most similar cell for the new one.
When barbs leave, nothing special occurs.

User avatar
GriffonSpade
Elite
Posts: 578
Joined: Mon Apr 29, 2013 4:41 pm

Re: city setup destroyed when growing

Postby GriffonSpade » Mon Feb 12, 2018 9:41 am

meynaf wrote:
GriffonSpade wrote:How specifically would you handle barbs leaving?

It's notable that simply waiting for all tiles to be valid can be blocked for other reasons, like other cities working them.

When barbs come, the cells they occupy have their worker go elsewhere. Perhaps then it could attempt to find the most similar cell for the new one.
When barbs leave, nothing special occurs.


Hmm, with no saving whatsoever, it'd be pretty easy to just have it use the 'normal' mode (Most Resource -> Most Food -> Most Production -> Most Trade -> [Use Special Citizen?])

Combined with a message altering the player that the city's work has been altered should be sufficient. And indeed, getting a message any time the worked-tile terrain/specials/extras change, work worked tiles become invalid and have to be changed, or even the number of invalid tiles decreases would be useful.

User avatar
meynaf
Veteran
Posts: 83
Joined: Sun Jan 21, 2018 10:27 am
Location: Lyon / France
Contact:

Re: city setup destroyed when growing

Postby meynaf » Mon Feb 12, 2018 10:26 am

GriffonSpade wrote:Hmm, with no saving whatsoever, it'd be pretty easy to just have it use the 'normal' mode (Most Resource -> Most Food -> Most Production -> Most Trade -> [Use Special Citizen?])

Combined with a message altering the player that the city's work has been altered should be sufficient. And indeed, getting a message any time the worked-tile terrain/specials/extras change, work worked tiles become invalid and have to be changed, or even the number of invalid tiles decreases would be useful.

Normal mode seems good enough.
No problem will remain for me, as long as events trigger a minimalistic impact rather than killing a whole city's setup.

Hans Lemurson
Veteran
Posts: 85
Joined: Mon Aug 22, 2016 10:25 pm

Re: city setup destroyed when growing

Postby Hans Lemurson » Sat Aug 04, 2018 8:43 am

Corbeau wrote:I'm having the same problem. I'm trying to disband a city by using Migrants, but the moment city bilds one and shrinks, it automatically redistributes workers on tiles, produces extra food and grows IMMEDIATELY. (The ruleset has a smaller food storage)

I have just had exactly this problem recently. I even created a Governor to maximize production at the expense of food, but the Governor got disabled every time the city shrank, and it used the high-food tiles in its radius.
Wishes he could convert Civ2's scenarios to FreeCiv...
But instead, he made his own tileset variants, RoundSquare and Sextant-enHANSed, and refuses to play on anything else. Check them out!

nef
Veteran
Posts: 76
Joined: Mon Jun 25, 2018 5:01 pm

Re: city setup destroyed when growing

Postby nef » Mon Aug 06, 2018 1:26 pm

I have had no problem using the CMA to kill a city. I move them all the time. Make sure the "minimal surplus" settings don't break when the city shrinks.

User avatar
meynaf
Veteran
Posts: 83
Joined: Sun Jan 21, 2018 10:27 am
Location: Lyon / France
Contact:

Re: city setup destroyed when growing

Postby meynaf » Wed Oct 17, 2018 8:19 am

Just found another problem linked to that.

When a migrant is built, the city setup is redone.
But, food got from cells is computed from the new setup, not from the old one !
This means worked cells used for production and worked cells used for food, are not the same in that turn...

Reproducing that is easy : setup your city so that food goes wildly negative but you get a migrant (or settler) next turn.
You will notice that the food storage actually doesn't shrink because it is not computed from your previous setup. Urgh.

User avatar
Corbeau
Elite
Posts: 840
Joined: Mon Jan 13, 2014 11:13 pm

Re: city setup destroyed when growing

Postby Corbeau » Wed Oct 17, 2018 3:45 pm

Wait, so you get production from production-rich tiles, then something happens to redistribute tiles to more food-rich and THEN you get food?

User avatar
meynaf
Veteran
Posts: 83
Joined: Sun Jan 21, 2018 10:27 am
Location: Lyon / France
Contact:

Re: city setup destroyed when growing

Postby meynaf » Wed Oct 17, 2018 4:21 pm

Corbeau wrote:Wait, so you get production from production-rich tiles, then something happens to redistribute tiles to more food-rich and THEN you get food?

Yep. But it requires to reduce the population so obviously you can't do that every turn ;)
Actually it's just a pain because it prevents reducing the food when moving a city if doing one migrant per turn... and so the city grows again.