city = {
	# Merchant's Guild
	ct_merchant_guild_1 = {
		gold_cost = 128
		build_time = 365
		ai_creation_factor = 150
		extra_tech_building_start = -1

		tax_income = 2.5

		trigger = {
			TECH_CITY_CONSTRUCTION >= 0
			ai_can_build_trigger = yes
		}
	}

	ct_merchant_guild_2 = {
		upgrades_from = ct_merchant_guild_1
		gold_cost = 256
		build_time = 547
		ai_creation_factor = 150
		extra_tech_building_start = 1.2

		tax_income = 2.5

		trigger = {
			TECH_CITY_CONSTRUCTION >= 3
			ai_can_build_trigger = yes
		}
	}

	ct_merchant_guild_3 = {
		upgrades_from = ct_merchant_guild_2
		gold_cost = 512
		build_time = 1095
		ai_creation_factor = 150
		extra_tech_building_start = 1.2

		tax_income = 3

		trigger = {
			TECH_CITY_CONSTRUCTION >= 6
			ai_can_build_trigger = yes
		}
	}

	# City Guard
	ct_city_guard_1 = {
		gold_cost = 100
		build_time = 365
		ai_creation_factor = 96
		extra_tech_building_start = 1.2

		pikemen = 45

		potential = {
			FROMFROM = {
				OR = {
					has_building = ct_merchant_guild_1
					has_building = ct_city_guard_1
				}
			}
		}

		trigger = {
			TECH_CITY_CONSTRUCTION >= 0
			ai_can_build_trigger = yes
		}
	}

	ct_city_guard_2 = {
		upgrades_from = ct_city_guard_1
		gold_cost = 320
		build_time = 730
		ai_creation_factor = 94
		extra_tech_building_start = 0.8

		pikemen = 120

		trigger = {
			TECH_CITY_CONSTRUCTION >= 4
			ai_can_build_trigger = yes
		}
	}

	ct_city_guard_3 = {
		upgrades_from = ct_city_guard_2
		gold_cost = 700
		build_time = 2190
		ai_creation_factor = 92
		extra_tech_building_start = 1.2

		pikemen = 160

		trigger = {
			TECH_CITY_CONSTRUCTION >= 8
			ai_can_build_trigger = yes
		}
	}

	# Merchant Republic Arsenal
	ct_rep_arsenal_1 = {
		gold_cost = 200
		build_time = 1460
		fort_level = 0.5
		garrison_size = 0.05

		ai_creation_factor = 95
		extra_tech_building_start = 0.4

		galleys = 15

		potential = {
			OR = {
				FROMFROM = { has_building = ct_rep_arsenal_1 }

				FROM = {
					is_merchant_republic = yes

					capital_holding = {
						title = FROMFROM
						has_building = ct_merchant_guild_1
					}
				}
			}
		}

		trigger = {
			TECH_CITY_CONSTRUCTION >= 0
			ai_can_build_trigger = yes
		}
	}

	ct_rep_arsenal_2 = {
		upgrades_from = ct_rep_arsenal_1
		gold_cost = 400
		build_time = 1460
		fort_level = 1.0
		ai_creation_factor = 95
		extra_tech_building_start = 0.6

		garrison_size = 0.05
		galleys = 15

		potential = {
			OR = {
				FROMFROM = { has_building = ct_rep_arsenal_2 }

				FROM = {
					is_merchant_republic = yes
					capital_holding = { title = FROMFROM }
				}
			}
		}

		trigger = {
			TECH_CITY_CONSTRUCTION >= 4
			ai_can_build_trigger = yes
		}
	}

	ct_rep_arsenal_3 = {
		upgrades_from = ct_rep_arsenal_2
		gold_cost = 600
		build_time = 2190
		ai_creation_factor = 95
		extra_tech_building_start = 0.8

		fort_level = 2.0
		garrison_size = 0.05
		galleys = 15

		potential = {
			OR = {
				FROMFROM = { has_building = ct_rep_arsenal_3 }

				FROM = {
					is_merchant_republic = yes
					capital_holding = { title = FROMFROM }
				}
			}
		}

		trigger = {
			TECH_CITY_CONSTRUCTION >= 7
			ai_can_build_trigger = yes
		}
	}

	# Training Grounds
	ct_training_grounds_1 = {
		gold_cost = 200
		build_time = 730
		ai_creation_factor = 89
		extra_tech_building_start = 1.4

		land_morale = 0.1
		levy_reinforce_rate = 0.1
		retinuesize = 20

		potential = {
			FROMFROM = {
				OR = {
					has_building = ct_merchant_guild_1
					has_building = ct_training_grounds_1
				}
			}
		}

		trigger = {
			TECH_CITY_CONSTRUCTION >= 0
			ai_can_build_trigger = yes
		}
	}

	ct_training_grounds_2 = {
		upgrades_from = ct_training_grounds_1
		gold_cost = 250
		build_time = 1095
		ai_creation_factor = 88
		extra_tech_building_start = 0.9

		land_morale = 0.15
		levy_reinforce_rate = 0.15
		retinuesize = 20

		trigger = {
			TECH_CITY_CONSTRUCTION >= 3
			ai_can_build_trigger = yes
		}
	}

	ct_training_grounds_3 = {
		upgrades_from = ct_training_grounds_2
		gold_cost = 300
		build_time = 2190
		ai_creation_factor = 88
		extra_tech_building_start = 0.8

		land_morale = 0.2
		levy_reinforce_rate = 0.2
		retinuesize = 20

		trigger = {
			TECH_CITY_CONSTRUCTION >= 6
			ai_can_build_trigger = yes
		}
	}

	# Town Market
	ct_town_market_1 = {
		prestige_cost = 0
		build_time = 0
		ai_creation_factor = 120
		extra_tech_building_start = -1

		tax_income = 0.5

		add_number_to_name = no

		trigger = {
			TECH_CITY_CONSTRUCTION >= 0
		}
	}

	ct_town_market_2 = {
		upgrades_from = ct_town_market_1
		gold_cost = 100
		build_time = 547
		ai_creation_factor = 120
		extra_tech_building_start = 1.2

		tax_income = 0.5

		add_number_to_name = no

		trigger = {
			TECH_CITY_CONSTRUCTION >= 1
			ai_can_build_trigger = yes
		}
	}

	ct_town_market_3 = {
		upgrades_from = ct_town_market_2
		gold_cost = 200
		build_time = 730
		ai_creation_factor = 120
		extra_tech_building_start = 0.8

		tax_income = 1

		add_number_to_name = no

		trigger = {
			TECH_CITY_CONSTRUCTION >= 3
			ai_can_build_trigger = yes
		}
	}

	ct_town_market_4 = {
		upgrades_from = ct_town_market_3
		gold_cost = 250
		build_time = 1095
		ai_creation_factor = 120
		extra_tech_building_start = 1.0

		tax_income = 3

		add_number_to_name = no

		trigger = {
			TECH_CITY_CONSTRUCTION >= 5
			ai_can_build_trigger = yes
		}
	}

	ct_town_market_5 = {
		upgrades_from = ct_town_market_4
		gold_cost = 300
		build_time = 2190
		ai_creation_factor = 120
		extra_tech_building_start = 1.2

		tax_income = 4

		add_number_to_name = no

		trigger = {
			TECH_CITY_CONSTRUCTION >= 7
			ai_can_build_trigger = yes
		}
	}

	# Housing
	ct_housing_1 = {
		prestige_cost = 0
		build_time = 0
		ai_creation_factor = 120
		extra_tech_building_start = -1

		land_morale = 0.05
		levy_size = 0.025
		levy_reinforce_rate = 0.05
		light_infantry = 16
		archers = 12

		trigger = {
			TECH_CITY_CONSTRUCTION >= 0
		}
	}

	ct_housing_2 = {
		prerequisites = { ct_town_market_1 }
		upgrades_from = ct_housing_1
		gold_cost = 200
		build_time = 730
		ai_creation_factor = 89
		extra_tech_building_start = 1.4

		land_morale = 0.05
		levy_size = 0.025
		levy_reinforce_rate = 0.05
		light_infantry = 16
		archers = 12

		trigger = {
			TECH_CITY_CONSTRUCTION >= 1
			ai_can_build_trigger = yes
		}
	}

	ct_housing_3 = {
		upgrades_from = ct_housing_2
		gold_cost = 250
		build_time = 1095
		ai_creation_factor = 88
		extra_tech_building_start = 0.9

		land_morale = 0.05
		levy_size = 0.025
		levy_reinforce_rate = 0.05
		light_infantry = 16
		archers = 12

		trigger = {
			TECH_CITY_CONSTRUCTION >= 3
			ai_can_build_trigger = yes
		}
	}

	ct_housing_4 = {
		upgrades_from = ct_housing_3
		gold_cost = 400
		build_time = 1095
		ai_creation_factor = 88
		extra_tech_building_start = 0.9

		land_morale = 0.05
		levy_size = 0.025
		levy_reinforce_rate = 0.05
		light_infantry = 16
		archers = 12

		trigger = {
			TECH_CITY_CONSTRUCTION >= 5
			ai_can_build_trigger = yes
		}
	}

	ct_housing_5 = {
		upgrades_from = ct_housing_4
		gold_cost = 500
		build_time = 1095
		ai_creation_factor = 88
		extra_tech_building_start = 0.9

		land_morale = 0.15
		levy_size = 0.025
		levy_reinforce_rate = 0.25
		light_infantry = 16
		archers = 12

		trigger = {
			TECH_CITY_CONSTRUCTION >= 7
			ai_can_build_trigger = yes
		}
	}

	# Stable
	ct_stable_1 = {
		gold_cost = 100
		build_time = 365
		ai_creation_factor = 89
		extra_tech_building_start = 0.6

		light_cavalry = 46

		potential = {
			OR = {
				FROMFROM = { has_building = ct_stable_1 }

				AND = {
					TECH_CAVALRY >= 1

					FROMFROM = {
						OR = {
							has_building = ct_merchant_guild_1

							AND = {
								has_building = ct_town_market_1
								has_building = ct_housing_1
							}
						}
					}
				}
			}
		}

		trigger = {
			TECH_CAVALRY >= 1
			ai_can_build_trigger = yes
		}
	}

	ct_stable_2 = {
		upgrades_from = ct_stable_1
		gold_cost = 120
		build_time = 547
		ai_creation_factor = 88
		extra_tech_building_start = 1.2

		light_cavalry = 56

		trigger = {
			TECH_CAVALRY >= 1
			ai_can_build_trigger = yes
		}
	}

	ct_stable_3 = {
		upgrades_from = ct_stable_2
		gold_cost = 200
		build_time = 730
		ai_creation_factor = 87
		extra_tech_building_start = 0.8

		light_cavalry = 66

		trigger = {
			TECH_CAVALRY >= 3
			ai_can_build_trigger = yes
		}
	}

	ct_stable_4 = {
		upgrades_from = ct_stable_3
		gold_cost = 300
		build_time = 1095
		ai_creation_factor = 86
		extra_tech_building_start = 1.0

		light_cavalry = 66
		knights = 15

		trigger = {
			TECH_CAVALRY >= 5
			ai_can_build_trigger = yes
		}
	}

	ct_stable_5 = {
		upgrades_from = ct_stable_4
		gold_cost = 400
		build_time = 2190
		ai_creation_factor = 85
		extra_tech_building_start = 1.2

		light_cavalry = 66
		knights = 20

		trigger = {
			TECH_CAVALRY >= 7
			ai_can_build_trigger = yes
		}
	}

	# Desert Stable
	ct_desert_stable_1 = {
		replaces = ct_stable_1
		gold_cost = 100
		build_time = 365
		ai_creation_factor = 89
		extra_tech_building_start = 0.6

		camel_cavalry = 46

		potential = {
			terrain = desert

			OR = {
				FROMFROM = { has_building = ct_desert_stable_1 }

				AND = {
					TECH_CAVALRY >= 1

					FROMFROM = {
						OR = {
							has_building = ct_merchant_guild_1

							AND = {
								has_building = ct_town_market_1
								has_building = ct_housing_1
							}
						}
					}
				}
			}
		}

		trigger = {
			TECH_CAVALRY >= 1
			ai_can_build_trigger = yes
		}
	}

	ct_desert_stable_2 = {
		replaces = ct_stable_2
		upgrades_from = ct_desert_stable_1
		gold_cost = 120
		build_time = 547
		ai_creation_factor = 88
		extra_tech_building_start = 1.2

		camel_cavalry = 56

		potential = {
			terrain = desert
		}

		trigger = {
			TECH_CAVALRY >= 1
			ai_can_build_trigger = yes
		}
	}

	ct_desert_stable_3 = {
		replaces = ct_stable_3
		upgrades_from = ct_desert_stable_2
		gold_cost = 200
		build_time = 730
		ai_creation_factor = 87
		extra_tech_building_start = 0.8

		camel_cavalry = 66

		potential = {
			terrain = desert
		}

		trigger = {
			TECH_CAVALRY >= 3
			ai_can_build_trigger = yes
		}
	}

	ct_desert_stable_4 = {
		replaces = ct_stable_4
		upgrades_from = ct_desert_stable_3
		gold_cost = 300
		build_time = 1095
		ai_creation_factor = 86
		extra_tech_building_start = 1.0

		camel_cavalry = 66
		knights = 15

		potential = {
			terrain = desert
		}

		trigger = {
			TECH_CAVALRY >= 5
			ai_can_build_trigger = yes
		}
	}

	ct_desert_stable_5 = {
		replaces = ct_stable_5
		upgrades_from = ct_desert_stable_4
		gold_cost = 400
		build_time = 2190
		ai_creation_factor = 85
		extra_tech_building_start = 1.2

		camel_cavalry = 66
		knights = 20

		potential = {
			terrain = desert
		}

		trigger = {
			TECH_CAVALRY >= 7
			ai_can_build_trigger = yes
		}
	}

	# Steppe Stable
	ct_steppe_stable_1 = {
		replaces = ct_stable_1
		gold_cost = 100
		build_time = 365
		ai_creation_factor = 89
		extra_tech_building_start = 0.6

		light_cavalry = 32
		horse_archers = 14

		potential = {
			OR = {
				FROMFROM = { has_building = ct_steppe_stable_1 }

				AND = {
					terrain = steppe
					TECH_CAVALRY >= 1

					FROMFROM = {
						OR = {
							has_building = ct_merchant_guild_1

							AND = {
								has_building = ct_town_market_1
								has_building = ct_housing_1
							}
						}
					}
				}
			}
		}

		trigger = {
			TECH_CAVALRY >= 1
			ai_can_build_trigger = yes
		}
	}

	ct_steppe_stable_2 = {
		replaces = ct_stable_2
		upgrades_from = ct_steppe_stable_1
		gold_cost = 120
		build_time = 547
		ai_creation_factor = 88
		extra_tech_building_start = 1.2

		light_cavalry = 42
		horse_archers = 24

		potential = {
			terrain = steppe
		}

		trigger = {
			TECH_CAVALRY >= 1
			ai_can_build_trigger = yes
		}
	}

	ct_steppe_stable_3 = {
		replaces = ct_stable_3
		upgrades_from = ct_steppe_stable_2
		gold_cost = 200
		build_time = 730
		ai_creation_factor = 87
		extra_tech_building_start = 0.8

		light_cavalry = 42
		horse_archers = 24

		potential = {
			terrain = steppe
		}

		trigger = {
			TECH_CAVALRY >= 3
			ai_can_build_trigger = yes
		}
	}

	ct_steppe_stable_4 = {
		replaces = ct_stable_4
		upgrades_from = ct_steppe_stable_3
		gold_cost = 300
		build_time = 1095
		ai_creation_factor = 86
		extra_tech_building_start = 1.0

		light_cavalry = 42
		horse_archers = 24
		knights = 15

		potential = {
			terrain = steppe
		}

		trigger = {
			TECH_CAVALRY >= 5
			ai_can_build_trigger = yes
		}
	}

	ct_steppe_stable_5 = {
		replaces = ct_stable_5
		upgrades_from = ct_steppe_stable_4
		gold_cost = 400
		build_time = 2190
		ai_creation_factor = 85
		extra_tech_building_start = 1.2

		light_cavalry = 42
		horse_archers = 24
		knights = 20

		potential = {
			terrain = steppe
		}

		trigger = {
			TECH_CAVALRY >= 7
			ai_can_build_trigger = yes
		}
	}

	# City Wall
	ct_wall_1 = {
		gold_cost = 100
		build_time = 365
		ai_creation_factor = 90
		extra_tech_building_start = 1.2

		fort_level = 1

		potential = {
			OR = {
				FROMFROM = { has_building = ct_wall_1 }

				AND = {
					TECH_FORTIFICATIONS_CONSTRUCTION >= 1

					FROMFROM = {
						has_building = ct_town_market_1
						has_building = ct_housing_1
					}
				}
			}
		}

		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION >= 1
			ai_can_build_trigger = yes
		}
	}

	ct_wall_2 = {
		upgrades_from = ct_wall_1
		gold_cost = 100
		build_time = 547 #1.5y
		ai_creation_factor = 89
		extra_tech_building_start = 0.6

		fort_level = 0.75

		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION >= 2
			ai_can_build_trigger = yes
		}
	}

	ct_wall_3 = {
		upgrades_from = ct_wall_2
		gold_cost = 200
		build_time = 730 #2y
		ai_creation_factor = 88
		extra_tech_building_start = 0.8

		fort_level = 1.5

		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION >= 4
			ai_can_build_trigger = yes
		}
	}

	ct_wall_4 = {
		upgrades_from = ct_wall_3
		gold_cost = 200
		build_time = 1095 #3y
		ai_creation_factor = 87
		extra_tech_building_start = 1.0

		fort_level = 1.5

		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION >= 6
			ai_can_build_trigger = yes
		}
	}

	ct_wall_5 = {
		desc = ct_wall_5_desc
		upgrades_from = ct_wall_4
		gold_cost = 300
		build_time = 1460 #4y
		ai_creation_factor = 86
		extra_tech_building_start = 1.2

		fort_level = 2.0

		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION >= 8
			ai_can_build_trigger = yes
		}
	}

	# Militia
	ct_militia_1 = {
		gold_cost = 100
		build_time = 365
		ai_creation_factor = 100
		extra_tech_building_start = 1.2

		light_infantry = 50
		archers = 100

		potential = {
			FROMFROM = {
				OR = {
					has_building = ct_militia_1

					AND = {
						has_building = ct_town_market_1
						has_building = ct_housing_1
					}
				}
			}
		}

		trigger = {
			TECH_LIGHT_INFANTRY >= 0
			ai_can_build_trigger = yes
		}
	}

	ct_militia_2 = {
		upgrades_from = ct_militia_1
		gold_cost = 120
		build_time = 547
		ai_creation_factor = 98
		extra_tech_building_start = 1.2

		light_infantry = 50
		archers = 100

		trigger = {
			TECH_LIGHT_INFANTRY >= 1
			ai_can_build_trigger = yes
		}
	}

	ct_militia_3 = {
		upgrades_from = ct_militia_2
		gold_cost = 200
		build_time = 1095
		ai_creation_factor = 98
		extra_tech_building_start = 1.2

		light_infantry = 50
		archers = 100

		trigger = {
			TECH_LIGHT_INFANTRY >= 3
			ai_can_build_trigger = yes
		}
	}

	ct_militia_4 = {
		upgrades_from = ct_militia_2
		gold_cost = 300
		build_time = 1095
		ai_creation_factor = 98
		extra_tech_building_start = 1.2

		light_infantry = 50
		archers = 100

		trigger = {
			TECH_LIGHT_INFANTRY >= 5
			ai_can_build_trigger = yes
		}
	}

	ct_militia_5 = {
		upgrades_from = ct_militia_2
		gold_cost = 400
		build_time = 1095
		ai_creation_factor = 98
		extra_tech_building_start = 1.2

		light_infantry = 50
		archers = 100

		trigger = {
			TECH_LIGHT_INFANTRY >= 7
			ai_can_build_trigger = yes
		}
	}

	# Navy
	ct_shipyard_1 = {
		gold_cost = 100
		build_time = 365
		ai_creation_factor = 85
		extra_tech_building_start = 0.5

		galleys = 10

		port = yes

		potential = {
			OR = {
				FROMFROM = { has_building = ct_shipyard_1 }

				AND = {
					TECH_NAVAL >= 1

					FROMFROM = {
						OR = {
							has_building = ct_merchant_guild_1

							AND = {
								has_building = ct_town_market_1
								has_building = ct_housing_1
							}
						}
					}
				}
			}
		}

		trigger = {
			TECH_NAVAL >= 1
			ai_can_build_trigger = yes
		}
	}

	ct_shipyard_2 = {
		upgrades_from = ct_shipyard_1
		gold_cost = 100
		build_time = 730
		ai_creation_factor = 85
		extra_tech_building_start = 0.7

		galleys = 5

		port = yes

		trigger = {
			TECH_NAVAL >= 2
			ai_can_build_trigger = yes
		}
	}

	ct_shipyard_3 = {
		upgrades_from = ct_shipyard_2
		gold_cost = 100
		build_time = 1095
		ai_creation_factor = 85
		extra_tech_building_start = 0.9

		galleys = 7

		port = yes

		trigger = {
			TECH_NAVAL >= 3
			ai_can_build_trigger = yes
		}
	}

	ct_shipyard_4 = {
		upgrades_from = ct_shipyard_3
		gold_cost = 100
		build_time = 1460
		ai_creation_factor = 85
		extra_tech_building_start = 1.1

		galleys = 8

		port = yes

		trigger = {
			TECH_NAVAL >= 4
			ai_can_build_trigger = yes
		}
	}

	ct_shipyard_5 = {
		upgrades_from = ct_shipyard_4
		gold_cost = 100
		build_time = 1460
		ai_creation_factor = 85
		extra_tech_building_start = 1

		galleys = 10

		port = yes

		trigger = {
			TECH_NAVAL >= 5
			ai_can_build_trigger = yes
		}
	}

	# Trade
	ct_port_1 = {
		gold_cost = 100
		build_time = 365
		ai_creation_factor = 130
		extra_tech_building_start = 0

		tax_income = 0.5

		port = yes

		potential = {
			OR = {
				FROMFROM = { has_building = ct_port_1 }

				AND = {
					TECH_NAVAL >= 1
					TECH_TRADE_PRACTICES >= 1

					FROMFROM = {
						has_building = ct_town_market_1
						has_building = ct_housing_1
					}
				}
			}
		}

		trigger = {
			TECH_NAVAL >= 1
			TECH_TRADE_PRACTICES >= 1
			ai_can_build_trigger = yes
		}
	}

	ct_port_2 = {
		upgrades_from = ct_port_1
		gold_cost = 150
		build_time = 547
		ai_creation_factor = 130
		extra_tech_building_start = 0.6

		tax_income = 0.5

		port = yes

		trigger = {
			TECH_TRADE_PRACTICES >= 3
			ai_can_build_trigger = yes
		}
	}

	ct_port_3 = {
		upgrades_from = ct_port_2
		gold_cost = 200
		build_time = 730
		ai_creation_factor = 130
		extra_tech_building_start = 0.8

		tax_income = 0.5

		port = yes

		trigger = {
			TECH_TRADE_PRACTICES >= 5
			ai_can_build_trigger = yes
		}
	}

	ct_port_4 = {
		upgrades_from = ct_port_3
		gold_cost = 300
		build_time = 1095
		ai_creation_factor = 130
		extra_tech_building_start = 1.0

		tax_income = 0.5

		port = yes

		trigger = {
			TECH_TRADE_PRACTICES >= 6
			ai_can_build_trigger = yes
		}
	}

	ct_port_5 = {
		upgrades_from = ct_port_4
		gold_cost = 400
		build_time = 2190
		ai_creation_factor = 130
		extra_tech_building_start = 1.2

		tax_income = 1

		port = yes

		trigger = {
			TECH_TRADE_PRACTICES >= 7
			ai_can_build_trigger = yes
		}
	}

	# University
	ct_university_1 = {
		gold_cost = 200
		build_time = 730
		ai_creation_factor = 90
		extra_tech_building_start = 1.2

		tech_growth_modifier = 0.1
		economy_techpoints = 0.05

		potential = {
			OR = {
				FROMFROM = { has_building = ct_university_1 }

				AND = {
					TECH_CITY_CONSTRUCTION >= 3

					FROMFROM = {
						has_building = ct_town_market_1
						has_building = ct_housing_1
					}
				}
			}
		}

		trigger = {
			TECH_CITY_CONSTRUCTION >= 3
			ai_can_build_trigger = yes
		}
	}

	ct_university_2 = {
		desc = ct_university_1_desc
		upgrades_from = ct_university_1
		gold_cost = 400
		build_time = 2190
		ai_creation_factor = 89
		extra_tech_building_start = 1.2

		tech_growth_modifier = 0.2
		economy_techpoints = 0.05

		trigger = {
			TECH_CITY_CONSTRUCTION >= 6
			ai_can_build_trigger = yes
		}
	}

	ct_university_3 = {
		desc = ct_university_1_desc
		upgrades_from = ct_university_2
		gold_cost = 800
		build_time = 2190
		ai_creation_factor = 88
		extra_tech_building_start = 1.2

		tech_growth_modifier = 0.3
		economy_techpoints = 0.05

		trigger = {
			TECH_CITY_CONSTRUCTION >= 8
			ai_can_build_trigger = yes
		}
	}

	# Architect Bloodline buildings
	ct_planned_infrastructure_1 = { # Garrisoned roads
		desc = ct_planned_infrastructure_1_desc
		potential = {
			# Show the building only if it has been already built or if the owner has the proper bloodline to build it.
			OR = {
				FROMFROM = { has_building = ct_planned_infrastructure_1 }

				FROM = {
					OR = {
						any_owned_bloodline = {
							has_bloodline_flag = bloodline_architect
							bloodline_is_active_for = PREV
						}

						any_liege = {
							any_owned_bloodline = {
								has_bloodline_flag = bloodline_architect
								bloodline_is_active_for = PREV
							}
						}
					}
				}
			}
		}

		trigger = {
			TECH_CITY_CONSTRUCTION >= 1

			custom_tooltip = {
				text = tooltip_has_architect_bloodline

				FROM = {
					OR = {
						any_owned_bloodline = {
							has_bloodline_flag = bloodline_architect
							bloodline_is_active_for = PREV
						}

						any_liege = {
							any_owned_bloodline = {
								has_bloodline_flag = bloodline_architect
								bloodline_is_active_for = PREV
							}
						}
					}
				}
			}
		}

		is_active_trigger = {
			FROM = {
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}
		}

		gold_cost = 125
		build_time = 365
		tax_income = 3
		land_morale = 0.05
		tech_growth_modifier = 0.05
		tradevalue = 5

		add_number_to_name = no

		ai_creation_factor = 88

		extra_tech_building_start = 1.2
	}

	ct_planned_infrastructure_2 = { # Stone Roads
		gold_cost = 250
		build_time = 560
		ai_creation_factor = 88
		extra_tech_building_start = 1.2

		tax_income = 3
		max_tradeposts = 2
		tech_growth_modifier = 0.05
		tradevalue = 5

		add_number_to_name = no

		trigger = {
			TECH_CITY_CONSTRUCTION >= 3

			custom_tooltip = {
				text = tooltip_has_architect_bloodline

				FROM = {
					OR = {
						any_owned_bloodline = {
							has_bloodline_flag = bloodline_architect
							bloodline_is_active_for = PREV
						}

						any_liege = {
							any_owned_bloodline = {
								has_bloodline_flag = bloodline_architect
								bloodline_is_active_for = PREV
							}
						}
					}
				}
			}
		}

		is_active_trigger = {
			FROM = {
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}
		}
	}

	ct_planned_infrastructure_3 = { # Cleared Pathways
		upgrades_from = ct_planned_infrastructure_2
		gold_cost = 450
		build_time = 760
		ai_creation_factor = 88
		extra_tech_building_start = 1.2

		tech_growth_modifier = 0.1
		levy_reinforce_rate = 0.1
		tradevalue = 5
		disease_defence = 0.05

		add_number_to_name = no

		trigger = {
			TECH_CITY_CONSTRUCTION >= 5

			custom_tooltip = {
				text = tooltip_has_architect_bloodline

				FROM = {
					OR = {
						any_owned_bloodline = {
							has_bloodline_flag = bloodline_architect
							bloodline_is_active_for = PREV
						}

						any_liege = {
							any_owned_bloodline = {
								has_bloodline_flag = bloodline_architect
								bloodline_is_active_for = PREV
							}
						}
					}
				}
			}
		}

		is_active_trigger = {
			FROM = {
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}
		}
	}

	ct_planned_infrastructure_4 = { # Great Acqueduct
		upgrades_from = ct_planned_infrastructure_3
		gold_cost = 750
		build_time = 1250
		ai_creation_factor = 88
		extra_tech_building_start = 1.2

		tech_growth_modifier = 0.05
		tradevalue = 5
		economy_techpoints = 0.1
		disease_defence = 0.1

		add_number_to_name = no

		trigger = {
			TECH_CITY_CONSTRUCTION >= 7

			custom_tooltip = {
				text = tooltip_has_architect_bloodline

				FROM = {
					OR = {
						any_owned_bloodline = {
							has_bloodline_flag = bloodline_architect
							bloodline_is_active_for = PREV
						}

						any_liege = {
							any_owned_bloodline = {
								has_bloodline_flag = bloodline_architect
								bloodline_is_active_for = PREV
							}
						}
					}
				}
			}
		}

		is_active_trigger = {
			FROM = {
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}
		}
	}
}