Project

Profile

Help

HostedRedmine.com 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 over 2 years ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Category:
Server
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

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.

History

#1 Updated by Alexandro Ignatiev over 2 years ago

Did some tests in Civ3 Conquests and found a discussion: https://forums.civfanatics.com/threads/how-do-you-select-the-population-unit-to-pull-for-a-worker.447568 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.

#3 Updated by Marko Lindqvist 2 months 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.

#4 Updated by Alexandro Ignatiev about 2 months 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.

#5 Updated by Marko Lindqvist about 2 months ago

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

#6 Updated by Marko Lindqvist about 2 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF