Question: Migration

Various topics about the game, the website, or anything else Freeciv related that doesn't fit elsewhere.
User avatar
Corbeau
Elite
Posts: 1057
Joined: Mon Jan 13, 2014 11:13 pm

Question: Migration

Postby Corbeau » Mon Dec 31, 2018 12:04 pm

Hello. Two things need clarification.
Explanation for maximum migration distance is:

"This setting controls how far citizens may look for a suitable migration destination. The value is added to the current city radius..."

1. This implies that the "current city radius" refers to the city population is migrating from, but that doesn't make much sense. So, which city is referred to as "current" when citizens are considering migration, the source city or the destination city?

2. A bit more simple question: is this city radius or city radius square? In every other instance it's square, is this an exception?

Ignatus
Hardened
Posts: 257
Joined: Mon Nov 06, 2017 12:05 pm
Location: St.Petersburg, Russia
Contact:

Re: Question: Migration

Postby Ignatus » Mon Dec 31, 2018 2:59 pm

See check_city_migrations_player in server/cityturn.c. Yes, it's the square root of the squared radius of the target city that is added to game.server.mgr_distance and then compared to the real map distance between cities. This is hardly calculated in the most effective way but it's currently so. It was a discovery for me that the original city radius does not have effect; it should probably be clarified in help texts.

P.S. Happy New Year!

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

Re: Question: Migration

Postby Corbeau » Tue Jan 01, 2019 12:50 pm

Thanks! So it makes perfect sense, while the help is somewhat ambiguous. Better than the other way round!

Thanks and a Happy New Year to you and everybody else ;)