City_Radius_Sq and settler city range

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
User avatar
meynaf
Veteran
Posts: 79
Joined: Sun Jan 21, 2018 10:27 am
Location: Lyon / France
Contact:

City_Radius_Sq and settler city range

Postby meynaf » Fri Feb 09, 2018 7:01 pm

I kinda like the concept of variable city size.
But there is a problem i'm currently facing.

In game.ruleset we have init_city_radius_sq.
In effects.ruleset we have City_Radius_Sq.
And it appears they're not always added together.
For the city size, ok.
But when a settler is about to found a new city, the range isn't updated (my city size depends on techs, not on city population). Only the initial value is taken into account.

Is there a way to alter the range a settler will show ?

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

Re: City_Radius_Sq and settler city range

Postby Corbeau » Fri Feb 09, 2018 8:17 pm

Which values do you have?

And, are you saying that the red frame when settler is active shows one (smaller, incorrect) value, and when you actually build a city, the radius is another (bigger, correct) value?

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

Re: City_Radius_Sq and settler city range

Postby meynaf » Sat Feb 10, 2018 8:43 am

Corbeau wrote:Which values do you have?

Current values are 2 (initial), then +3, then +5 (pretty much like experimental ruleset which i copy-pasted but i stop one step before it becomes too large imo).
I use hex cells but this shouldn't change a thing.


Corbeau wrote:And, are you saying that the red frame when settler is active shows one (smaller, incorrect) value, and when you actually build a city, the radius is another (bigger, correct) value?

Yes, exactly. This doesn't show with experimental ruleset because there all cities start out with minimum size.
When the game starts it's correct. But as soon as the tech for a larger size is researched, city size raises normally but the settler still shows the old one.

I tried to start with maximum and then add negative values, but then the city radius always uses the maximum and there are unusable cells (like with a city conflict). The settler gives the maximum value as well, so it's worse than before.

User avatar
JTN
Elite
Posts: 419
Joined: Wed Jan 30, 2013 12:15 am

Re: City_Radius_Sq and settler city range

Postby JTN » Sat Feb 10, 2018 7:49 pm

The outline drawn around city-founder units just uses init_city_radius_sq, I'm afraid; it doesn't look at effects at all.

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

Re: City_Radius_Sq and settler city range

Postby meynaf » Sun Feb 11, 2018 7:20 am

JTN wrote:The outline drawn around city-founder units just uses init_city_radius_sq, I'm afraid; it doesn't look at effects at all.

Yes this is what i guessed from what happened.
It could "emulate" a city of size 1 located at where it is itself, to check the targeted city size.

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

Re: City_Radius_Sq and settler city range

Postby meynaf » Mon Feb 12, 2018 6:02 pm

Another, easier to implement solution : create some value such as settler_radius_sq which is used if it exists (else it's init_city_radius_sq like before).
It would then receive the maximum size, to indicate what the city will look like in the future.