Help has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Feature #866911


Build settlers of nationalities present in the city

Added by Alexandro Ignatiev about 4 years ago. Updated almost 2 years ago.

Start date:
Due date:
% Done:


Estimated time:


Currently, any unit a city builds is of its owner's nationality, including pop-consuming ones (see city_create_unit() in cityt
urn.c). This may be exploit-like when we conquer a city and can relatively cheap cope with nationality unhappiness building and adding back migrants. Any way, it's presumed that nationalities in the game don't easily change without assimilation.
Let the unit be of the nationality we remove from city population. This of course may be more complicated if we spend pop_cost>1, but at least we can require that the nationality of the unit should be present among the removed ones (like, a close group of colonists in the need to communicate accepts some common culture, most probably the dominant among them or one ruling in the city they depart from).
We then need also the feature present in commercial games - ability to select the settler's nationality. I propose put an editable list of nationalities on the city settings tab, and the first one possible will be selected. Let there also be a tick "purge the built ones", to be able to put the nationalities on the city production plan.


Actions #1

Updated by Alexandro Ignatiev about 4 years ago

Did some tests in Civ3 Conquests and found a discussion: Actually, in Civ3 no button found to select from whom to build settler. Two pops (one for worker), likely leftmost from the pop-faces row and a random (?) another, are taken, second one determines the nationality of the unit, the nation of the other one is forgotten; if you have only one your civ citizen, the settler will be foreign. That does not mean we need it exactly the same.

Actions #3

Updated by Marko Lindqvist almost 2 years ago

For freeciv the main effect is probably that with some rulesets, when you build a settler from a conquered city and then found a city with that settler, the newly founded city is going to be unhappy with you (the enemy).


- "diff = MAX;" - I guess you meant to use MIN instead of MAX here.
- "city_nations[selected].change = (change += diff);" > divide two two lines for clarity (first assign 'change'). For a moment I thought there was a bug here.
"struct player_slot *city_nations[MAX_CITY_NATIONALITIES];" on citizens_update() would require other changes as well, unlike the one in citizens_convert(). The difference between citizens_convert() and citizens_update() cases is that former puts in only those nationalities that actually exist in the city (and thus cannot exceed MAX_CITY_SIZE) "if (nationality != 0) {" and latter all the nations.

Actions #4

Updated by Alexandro Ignatiev almost 2 years ago

Well, I won't change citizens_update(). I only added a fix over negative production since we modify this function any way and likely we could not get the error in previous branches.

Actions #5

Updated by Marko Lindqvist almost 2 years ago

  • Category set to Server
  • Status changed from New to Resolved
  • Assignee set to Marko Lindqvist
Actions #6

Updated by Marko Lindqvist almost 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF