• 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.

unmerged(61237)

Corporal
Sep 26, 2006
26
0
Ave,

In my game as Rome (VV 2.2), I played with hyper-aggressive colonization. After 150 years or so, most of my Italian cities were big (50+) and rich. However, the eternal Rome itself was poor and little more than a colony (8-10) because each colonization took from its population.

As the capital of an empire should also be one of its biggest and richest cities, there could be a counterbalancing event to this capital decay, basically moving people from other big cities to the capital. If this kind of event does not exist yet, I might implement it at some point.
 
Indeed, I've noticed this as well. It's particularly bad when you're playing as a country that doesn't have the crazy populations of Rome.

It seems like a pretty simple task to create an event for this. Here's something I knocked up in a few minutes:

Code:
province_event = {
	id = 9999999
	
	trigger = {
		is_capital = yes
		NOT = { population = 20 }
		any_neighbor_province = { 
			population = 20 
			owned_by = THIS
		}
	}
	
	mean_time_to_happen = {
		months = 120
		
		modifier = {
			factor = 0.5
			NOT = { population = 15 }
		}
		
		modifier = { 
			factor = 0.5
			NOT = { population = 10 }
		}
		
		modifier = { 
			factor = 0.1
			NOT = { population = 5 }
		}
	}
	
	title = "Capitol Attraction"
	desc = "As we establish more colonies on our borders, men and women leave the capital and leave behind them opportunity for others."
	
	option = {
		name = "Encourage people to move to the city"
		country = { 
			any_owned = {
				limit = {
					any_neighbor_province = {
						owned_by = THIS
						is_capital = yes
					}
					owned_by = THIS
					population = 20
				}
				population = -2
				capital_scope = { population = 2 }
			}
		}
	}
}

Basically, it means that if your capital has less than 20 pop and any of your provinces neighboring the capital has 20 or more pop, then the event has a chance to fire. On average, it should take 10 years; if you have less than 15 pop in your capital, it should take 5 years; if you have less than 10 pop in your capital, it should take 2.5 years; if you have less than 5 pop in your capital, it should take about 3 months. Give or take.

Give it a go and let me know if it works. It is savegame compatible.
 
Thanks, that's what I was looking for. However, the event part was not functioning, I needed to change it to:

Code:
	option = {
		name = "Encourage people to move to the city"
		owner = {
			random_owned = {
				limit = {
					is_capital = no
					population = 20
				}
				population = -2
			}
		}
		population = 2
	}

I removed the neighbor condition since I want the capital to draw population from all over the world. I'll still test and tune the trigger conditions and frequencies, visioning a more aggressive event which can raise the capital population even up to 50-100 with a large enough empire.
 
After some tuning, here is the "final" event:

Code:
province_event = {
	id = 1029999
	
	trigger = {
		is_capital = yes
		owner = { num_of_cities = 10 }
		NOT = { population = 120 }
		owner = { 
			any_province = {
				is_capital = no
				population = 30
			}
		}
	}
	
	mean_time_to_happen = {
		months = 48

		modifier = {
			factor = 1.4
			population = 90
		}

		modifier = {
			factor = 1.4
			population = 70
		}

		modifier = {
			factor = 0.7
			NOT = { population = 50 }
		}

		modifier = {
			factor = 0.7
			NOT = { population = 30 }
		}
		
		modifier = {
			factor = 0.5
			NOT = { population = 15 }
		}
		
		modifier = { 
			factor = 0.5
			NOT = { population = 10 }
		}
		
		modifier = { 
			factor = 0.1
			NOT = { population = 5 }
		}

		modifier = {
			factor = 1.6
			NOT = { owner = { num_of_cities = 15 } }
		}

		modifier = {
			factor = 1.6
			NOT = { owner = { num_of_cities = 25 } }
		}

		modifier = {
			factor = 1.6
			NOT = { owner = { num_of_cities = 40 } }
		}

		modifier = {
			factor = 0.7
			owner = { num_of_cities = 65 }
		}

		modifier = {
			factor = 0.7
			owner = { num_of_cities = 100 }
		}
	}
	
	title = "Migration to the capital"
	desc = "Our capital is the center of administration, culture, economy and learning
. It constantly attracts provincial people who look for better 

opportunities in life."

	option = {
		name = "Encourage people to move to the city"
		owner = {
			random_owned = {
				limit = {
					is_capital = no
					population = 30
				}
				population = -4
			}
		}
		population = 4
	}
}

For small empires (10-15 cities) and small capitals (<15), this event gives 4 immigrants each 8 years (worth 1 colonization each 4 years), at least as long as there are enough large cities to supply population. For small empires and large capitals (90, think of Alexandria), 4 immigrants will be coming each 32 years. For Imperium size countries, this event should keep the capital population at 50+ (or 100+ for larger Imperiums) no matter the colonization rate.