[1.4.2 1974] Generic infrastructure mission urbanization branch doesn't target the highest population territory

  • We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

DC123456789

Field Marshal
87 Badges
Oct 22, 2012
6.422
2.476
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Rajas of India
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Major Wiki Contributor
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Surviving Mars
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Cossacks
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Ancient Relics
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Cities: Skylines - Parklife
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV
  • Europa Universalis IV: Golden Century
  • Imperator: Rome Sign Up
  • Imperator: Rome
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Imperator: Rome Deluxe Edition
  • Victoria 2
  • Stellaris: Distant Stars
  • Stellaris: Galaxy Edition
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Hearts of Iron IV: No Step Back
The target of the Growth of X/urbanize_city mission task in the generic infrastructure mission urbanize_area_city seems to be selected in a random way, rather than going for the highest population territory as would be sensible (and as the code suggests was intended). The problem seems to be in lines 499-504, where the possibilities for the urbanize_area_city scope are ranked by adding up the population of each territory in the province - which doesn't work since we are iterating through territories, not provinces.

As an example, see the attached save, where the urbanization branch has triggered for Lycaonia and asks to build a city in and make the state capital Kongoustos (population 4), when Ikonion (population 24) is the obvious choice for what the target should be.

As an aside, the conditions in lines 449-452 are somewhat strange as it is simply a convoluted way of checking if the province capital is not a city, which suggests that it might not be quite what was intended (perhaps meaning to check if there are no cities outside the province capital?).
 

Attachments

  • 450.10.1 - Phrygia.rome
    38,4 MB · Views: 0
Upvote 0