 # Triggers are in Province scope. The From Scope contains the settlement holder (character)
 # start trigger is in title scope.
 
 #<tag> = {
 #	desc = description used in the tooltip of the building
 #	trigger = used for tech requirement of the building, set to 0 if no requirement so it can be build automatically on new games
 #	gold_cost = cost to build the building
 #	build_time = time to build, in days
 #	
 #	ai_creation_factor = weight that the AI uses to determine what building to build
 #	extra_tech_building_start = when starting a new game this building will be pre-built if the province has higher tech than the requirement + this + random 0-1
 #}

# City
city = {
	ct_wall_q_1 = {
		desc = ct_wall_q_1_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		prerequisites = { ct_wall_1 }
		gold_cost = 50
		build_time = 182
		fort_level = 0.4
		ai_creation_factor = 60
		
		extra_tech_building_start = 1.2
	}
	ct_wall_q_2 = {
		desc = ct_wall_q_2_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 1
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		prerequisites = { ct_wall_2 }
		upgrades_from = ct_wall_q_1
		gold_cost = 50
		build_time = 182
		fort_level = 0.4
		ai_creation_factor = 59

		extra_tech_building_start = 1.9
	}	
	ct_wall_q_3 = {
		desc = ca_wall_q_3_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 3
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ct_wall_q_2
		gold_cost = 50
		build_time = 182
		fort_level = 0.5
		ai_creation_factor = 58

		extra_tech_building_start = 1.6
	}
	ct_wall_q_4 = {
		desc = ca_wall_q_4_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 5
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ct_wall_q_3
		gold_cost = 100
		build_time = 365
		fort_level = 1
		ai_creation_factor = 57

		extra_tech_building_start = 1.0
	}
	ct_wall_q_5 = {
		desc = ca_wall_q_5_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 7
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ct_wall_q_4
		gold_cost = 100
		build_time = 365
		fort_level = 1
		ai_creation_factor = 56

		extra_tech_building_start = 1.2
	}

	ct_wall_1 = {
		desc = ca_wall_1_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 100
		build_time = 365
		fort_level = 0.5

		tax_income = 0.25
		ai_creation_factor = 99


		extra_tech_building_start = 1.2
	}
	ct_wall_2 = {
		desc = ca_wall_2_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 2
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ct_wall_1
		gold_cost = 100
		build_time = 547
		fort_level = 0.5

		tax_income = 0.25
		ai_creation_factor = 98

		extra_tech_building_start = 1.9
	}
	ct_wall_3 = {
		desc = ct_wall_3_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 4
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ct_wall_2
		gold_cost = 200
		build_time = 730
		fort_level = 1.0

		tax_income = 0.5
		ai_creation_factor = 97

		extra_tech_building_start = 2.6
	}
	ct_wall_4 = {
		desc = ct_wall_4_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 6
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ct_wall_3
		gold_cost = 200
		build_time = 1095
		fort_level = 1.0

		tax_income = 0.5
		ai_creation_factor = 96

		extra_tech_building_start = 1.8
	}
	ct_wall_5 = {
		desc = ct_wall_5_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 8
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ct_wall_4
		gold_cost = 300
		build_time = 1460
		fort_level = 1.5


		tax_income = 0.75
		ai_creation_factor = 95

		extra_tech_building_start = 1.2
	}
	
	# Merchant Republic Arsenal
	ct_rep_arsenal_1 = {
		potential = {
			FROM = { 
				capital_holding = { title = FROMFROM }
				is_merchant_republic = yes
			}
		}
		trigger = {
			TECH_CITY_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		desc = ct_rep_arsenal_1_desc
		gold_cost = 200
		build_time = 1460
		fort_level = 0.5
		garrison_size = 0.05

		galleys = 15
		ai_creation_factor = 95

		extra_tech_building_start = 0.4
	}
	ct_rep_arsenal_2 = {
		potential = {
			FROM = { 
				capital_holding = { title = FROMFROM }
				is_merchant_republic = yes
			}
		}
		upgrades_from = ct_rep_arsenal_1
		trigger = {
			TECH_CITY_CONSTRUCTION = 4
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		desc = ct_rep_arsenal_2_desc
		gold_cost = 400
		build_time = 1460
		fort_level = 1.0

		garrison_size = 0.05

		galleys = 15
		ai_creation_factor = 95

		extra_tech_building_start = 0.6
	}
	ct_rep_arsenal_3 = {
		potential = {
			FROM = { 
				capital_holding = { title = FROMFROM }
				is_merchant_republic = yes
			}
		}
		upgrades_from = ct_rep_arsenal_2
		trigger = {
			TECH_CITY_CONSTRUCTION = 7
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		desc = ct_rep_arsenal_3_desc
		gold_cost = 600
		build_time = 2190
		fort_level = 2.0
		garrison_size = 0.05

		galleys = 15
		ai_creation_factor = 95

		extra_tech_building_start = 0.8
	}
	
	ct_training_grounds_1 = {
		desc = ct_training_grounds_1_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 150
		build_time = 547
		levy_size = 0.05
		garrison_size = 0.05
		ai_creation_factor = 98

		extra_tech_building_start = 0.8
	}
	ct_training_grounds_2 = {
		desc = ct_training_grounds_1_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		prerequisites = { ct_wall_1 }
		upgrades_from = ct_training_grounds_1
		gold_cost = 200
		build_time = 730
		levy_size = 0.05
		garrison_size = 0.05
		ai_creation_factor = 97

		extra_tech_building_start = 1.6
	} 
	ct_training_grounds_3 = {
		desc = ct_training_grounds_1_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 2
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ct_training_grounds_2
		gold_cost = 300
		build_time = 1095
		levy_size = 0.05
		garrison_size = 0.05
		ai_creation_factor = 96

		extra_tech_building_start = 0.8
	} 
	ct_training_grounds_4 = {
		desc = ct_training_grounds_1_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 4
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ct_training_grounds_3
		gold_cost = 400
		build_time = 1460
		levy_size = 0.05
		garrison_size = 0.05
		ai_creation_factor = 95

		extra_tech_building_start = 1.0
	} 
	ct_training_grounds_5 = {
		desc = ct_training_grounds_1_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 6
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ct_training_grounds_4
		gold_cost = 500
		build_time = 2190
		levy_size = 0.05
		garrison_size = 0.05
		ai_creation_factor = 94

		extra_tech_building_start = 1.2
	}
	ct_training_grounds_6 = {
		desc = ct_training_grounds_1_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 8
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ct_training_grounds_5
		gold_cost = 600
		build_time = 2190
		levy_size = 0.05
		garrison_size = 0.05
		ai_creation_factor = 93

		extra_tech_building_start = 1.4
	}
	
	ct_barracks_1 = {
		desc = ct_barracks_1_desc
		trigger = {
			TECH_CITY_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 100
		build_time = 365
		light_infantry = 60
		archers = 30
		ai_creation_factor = 95
		
		extra_tech_building_start = 0.7
	}
	ct_barracks_2 = {
		desc = ct_barracks_2_desc
		trigger = {
			TECH_CITY_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		prerequisites = { ct_wall_1 }
		upgrades_from = ct_barracks_1
		gold_cost = 120
		build_time = 547
		light_infantry = 40
		archers = 70
		ai_creation_factor = 94

		extra_tech_building_start = 1.4
	}
	ct_barracks_3 = {
		desc = ct_barracks_1_desc
		trigger = {
			TECH_CITY_CONSTRUCTION = 1
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		prerequisites = { ct_wall_2 }
		upgrades_from = ct_barracks_2
		gold_cost = 200
		build_time = 730
		light_infantry = 80
		archers = 50
		ai_creation_factor = 93

		extra_tech_building_start = 1.6
	}
	ct_barracks_4 = {
		desc = ct_barracks_2_desc
		trigger = {
			TECH_CITY_CONSTRUCTION = 3
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ct_barracks_3
		gold_cost = 300
		build_time = 1095
		light_infantry = 60
		archers = 90
		ai_creation_factor = 92

		extra_tech_building_start = 1.0
	}
	ct_barracks_5 = {
		desc = ct_barracks_1_desc
		trigger = {
			TECH_CITY_CONSTRUCTION = 5
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ct_barracks_4
		gold_cost = 400
		build_time = 2190
		light_infantry = 100
		archers = 70
		ai_creation_factor = 91

		extra_tech_building_start = 1.2
	}
	ct_barracks_6 = {
		desc = ct_barracks_2_desc
		trigger = {
			TECH_CITY_CONSTRUCTION = 7
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ct_barracks_5
		gold_cost = 500
		build_time = 2190
		light_infantry = 80
		archers = 110
		ai_creation_factor = 90

		extra_tech_building_start = 1.4
	}
	
	ct_guard_1 = {
		desc = ct_guard_1_desc
		trigger = {
			TECH_CITY_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 100
		build_time = 365
		pikemen = 45
		ai_creation_factor = 96
		
		extra_tech_building_start = 1.2
	}
	ct_guard_2 = {
		desc = ct_guard_1_desc
		trigger = {
			TECH_CITY_CONSTRUCTION = 2
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		prerequisites = { ct_wall_1 }
		upgrades_from = ct_guard_1
		gold_cost = 120
		build_time = 547
		pikemen = 55
		ai_creation_factor = 95

		extra_tech_building_start = 0.6
	}
	ct_guard_3 = {
		desc = ct_guard_1_desc
		trigger = {
			TECH_CITY_CONSTRUCTION = 4
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		prerequisites = { ct_wall_2 }
		upgrades_from = ct_guard_2
		gold_cost = 200
		build_time = 730
		pikemen = 65
		ai_creation_factor = 94
		
		extra_tech_building_start = 0.8
	}
	ct_guard_4 = {
		desc = ct_guard_1_desc
		trigger = {
			TECH_CITY_CONSTRUCTION = 6
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ct_guard_3
		gold_cost = 300
		build_time = 1095
		pikemen = 75
		ai_creation_factor = 93
		
		extra_tech_building_start = 1.0
	}
	ct_guard_5 = {
		desc = ct_guard_1_desc
		trigger = {
			TECH_CITY_CONSTRUCTION = 8
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ct_guard_4
		gold_cost = 400
		build_time = 2190
		pikemen = 85
		ai_creation_factor = 92

		extra_tech_building_start = 1.2
	}
	
	ct_marketplace_1 = {
		desc = ct_marketplace_1_desc
		trigger = {
			TECH_CITY_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 100
		build_time = 365
		tax_income = 1.5
		ai_creation_factor = 110
		add_number_to_name = no
		
		extra_tech_building_start = 0.6
	}
	ct_marketplace_2 = {
		desc = ct_marketplace_2_desc
		prerequisites = { ct_wall_1 }
		trigger = {
			TECH_CITY_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ct_marketplace_1
		gold_cost = 150
		build_time = 547
		tax_income = 2.25
		ai_creation_factor = 109
		add_number_to_name = no

		extra_tech_building_start = 1.2
	}
	ct_marketplace_3 = {
		desc = ct_marketplace_3_desc
		trigger = {
			TECH_CITY_CONSTRUCTION = 1
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		prerequisites = { ct_wall_2 }
		upgrades_from = ct_marketplace_2
		gold_cost = 200
		build_time = 730
		tax_income = 3.0
		ai_creation_factor = 108
		add_number_to_name = no

		extra_tech_building_start = 0.8
	}
	ct_marketplace_4 = {
		desc = ct_marketplace_4_desc
		trigger = {
			TECH_CITY_CONSTRUCTION = 3
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ct_marketplace_3
		gold_cost = 250
		build_time = 1095
		tax_income = 3.75
		ai_creation_factor = 107
		add_number_to_name = no

		extra_tech_building_start = 1.0
	}
	ct_marketplace_5 = {
		desc = ct_marketplace_5_desc
		trigger = {
			TECH_CITY_CONSTRUCTION = 5
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ct_marketplace_4
		gold_cost = 300
		build_time = 2190
		tax_income = 4.5
		ai_creation_factor = 106
		add_number_to_name = no

		extra_tech_building_start = 1.2
	}
	ct_marketplace_6 = {
		desc = ct_marketplace_6_desc
		trigger = {
			TECH_CITY_CONSTRUCTION = 7
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ct_marketplace_5
		gold_cost = 400
		build_time = 2190
		tax_income = 6
		ai_creation_factor = 105
		add_number_to_name = no

		extra_tech_building_start = 1.4
	}
	
	ct_port_1 = {
		desc = ct_port_1_desc
		port = yes
		trigger = {
			TECH_TRADE_PRACTICES = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 100
		build_time = 365
		tax_income = 1
		ai_creation_factor = 110
		
		extra_tech_building_start = 0.8
	}
	ct_port_2 = {
		desc = ct_port_1_desc
		port = yes
		trigger = {
			TECH_TRADE_PRACTICES = 1
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		prerequisites = { ct_wall_1 }
		upgrades_from = ct_port_1
		gold_cost = 150
		build_time = 547
		tax_income = 1.5
		ai_creation_factor = 109

		extra_tech_building_start = 0.6
	}
	ct_port_3 = {
		desc = ct_port_1_desc
		port = yes
		trigger = {
			TECH_TRADE_PRACTICES = 3
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		prerequisites = { ct_wall_2 }
		upgrades_from = ct_port_2
		gold_cost = 200
		build_time = 730
		tax_income = 2
		ai_creation_factor = 108

		extra_tech_building_start = 0.8
	}
	ct_port_4 = {
		desc = ct_port_1_desc
		port = yes
		trigger = {
			TECH_TRADE_PRACTICES = 4
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ct_port_3
		gold_cost = 300
		build_time = 1095
		tax_income = 3
		ai_creation_factor = 107

		extra_tech_building_start = 1.0
	}
	ct_port_5 = {
		desc = ct_port_1_desc
		port = yes
		trigger = {
			TECH_TRADE_PRACTICES = 6
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ct_port_4
		gold_cost = 400
		build_time = 2190
		tax_income = 4
		ai_creation_factor = 106

		extra_tech_building_start = 1.2
	}
	
	ct_shipyard_1 = {
		desc = shipyard_desc
		port = yes
		trigger = {
			TECH_NAVAL = 1
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 100
		build_time = 365
		galleys = 4
		ai_creation_factor = 98
		
		extra_tech_building_start = 0.4
	}
	ct_shipyard_2 = {
		desc = shipyard_desc
		port = yes
		trigger = {
			TECH_NAVAL = 2
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ct_shipyard_1
		gold_cost = 100
		build_time = 730
		galleys = 5
		ai_creation_factor = 97
		
		extra_tech_building_start = 0.6
	}
	ct_shipyard_3 = {
		desc = shipyard_desc
		port = yes
		trigger = {
			TECH_NAVAL = 3
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ct_shipyard_2
		gold_cost = 100
		build_time = 1095
		galleys = 6
		ai_creation_factor = 96
		
		extra_tech_building_start = 0.8
	}
	ct_shipyard_4 = {
		desc = shipyard_desc
		port = yes
		trigger = {
			TECH_NAVAL = 4
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ct_shipyard_3
		gold_cost = 100
		build_time = 1460
		galleys = 7
		ai_creation_factor = 95
		
		extra_tech_building_start = 1.0
	}

	ct_university_1 = {
		desc = ct_university_1_desc
		trigger = {
			TECH_CITY_CONSTRUCTION = 3
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 200
		build_time = 730
		
		tech_growth_modifier = 0.1
		economy_techpoints = 0.05
		
		ai_creation_factor = 90

		extra_tech_building_start = 1.2
	}
	ct_university_2 = {
		desc = ct_university_1_desc
		trigger = {
			TECH_CITY_CONSTRUCTION = 6
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ct_university_1
		gold_cost = 400
		build_time = 2190
		
		tech_growth_modifier = 0.2
		economy_techpoints = 0.05
		
		ai_creation_factor = 89

		extra_tech_building_start = 1.2
	}
	ct_university_3 = {
		desc = ct_university_1_desc
		trigger = {
			TECH_CITY_CONSTRUCTION = 8
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = ct_university_2
		gold_cost = 800
		build_time = 2190
		
		tech_growth_modifier = 0.3
		economy_techpoints = 0.05
		
		ai_creation_factor = 88

		extra_tech_building_start = 1.2
	}
}


# Temple
temple = {
	tp_wall_q_1 = {	
		desc = tp_wall_q_1_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		prerequisites = { tp_wall_1 }
		gold_cost = 50
		build_time = 182
		fort_level = 0.5
		ai_creation_factor = 82
		
		extra_tech_building_start = 0.7
	}
	tp_wall_q_2 = {
		desc = tp_wall_q_2_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 1
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		prerequisites = { tp_wall_2 }
		upgrades_from = tp_wall_q_1
		gold_cost = 50
		build_time = 182
		fort_level = 0.5
		ai_creation_factor = 81

		extra_tech_building_start = 1.3
	}	
	tp_wall_q_3 = {
		desc = ca_wall_q_3_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 3
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tp_wall_q_2
		gold_cost = 50
		build_time = 182
		fort_level = 0.5
		ai_creation_factor = 80

		extra_tech_building_start = 0.9
	}
	tp_wall_q_4 = {
		desc = ca_wall_q_4_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 5
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tp_wall_q_3
		gold_cost = 100
		build_time = 365
		fort_level = 1
		ai_creation_factor = 79

		extra_tech_building_start = 1.1
	}
	tp_wall_q_5 = {
		desc = ca_wall_q_5_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 7
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tp_wall_q_4
		gold_cost = 100
		build_time = 365
		fort_level = 1
		ai_creation_factor = 78

		extra_tech_building_start = 1.3
	}

	tp_wall_1 = {
		desc = ca_wall_1_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 100
		build_time = 365
		fort_level = 0.5

		tax_income = 0.25
		ai_creation_factor = 95

		extra_tech_building_start = 0.8
	}
	tp_wall_2 = {
		desc = ca_wall_2_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 2
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tp_wall_1
		gold_cost = 100
		build_time = 547
		fort_level = 0.5

		tax_income = 0.25
		ai_creation_factor = 94

		extra_tech_building_start = 1.5
	}
	tp_wall_3 = {
		desc = tp_wall_3_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 4
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tp_wall_2
		gold_cost = 200
		build_time = 730
		fort_level = 1.0

		tax_income = 0.5
		ai_creation_factor = 93

		extra_tech_building_start = 2.2
	}
	tp_wall_4 = {
		desc = tp_wall_4_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 6
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tp_wall_3
		gold_cost = 200
		build_time = 1095
		fort_level = 1.0

		tax_income = 0.5
		ai_creation_factor = 92

		extra_tech_building_start = 1.1
	}
	tp_wall_5 = {
		desc = tp_wall_5_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 8
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tp_wall_4
		gold_cost = 300
		build_time = 1460
		fort_level = 1.5

		tax_income = 0.75
		ai_creation_factor = 91

		extra_tech_building_start = 1.3
	}

	tp_monastery_1 = {
		desc = tp_monastery_1_desc
		trigger = {
			TECH_TEMPLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 150
		build_time = 547
		levy_size = 0.05
		garrison_size = 0.05
		ai_creation_factor = 96
		add_number_to_name = no
		liege_piety = 0.05

		extra_tech_building_start = 0.5
	}
	tp_monastery_2 = {
		desc = tp_monastery_1_desc
		trigger = {
			TECH_TEMPLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		prerequisites = { tp_wall_1 }
		upgrades_from = tp_monastery_1
		gold_cost = 200
		build_time = 730
		levy_size = 0.05
		garrison_size = 0.05
		ai_creation_factor = 95
		add_number_to_name = no
		liege_piety = 0.05
		
		extra_tech_building_start = 0.7
	} 
	tp_monastery_3 = {
		desc = tp_monastery_1_desc
		trigger = {
			TECH_TEMPLE_CONSTRUCTION = 2
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tp_monastery_2
		gold_cost = 300
		build_time = 1095
		levy_size = 0.05
		garrison_size = 0.05
		ai_creation_factor = 94
		add_number_to_name = no
		liege_piety = 0.05

		extra_tech_building_start = 0.9
	} 
	tp_monastery_4 = {
		desc = tp_monastery_2_desc
		trigger = {
			TECH_TEMPLE_CONSTRUCTION = 4
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tp_monastery_3
		gold_cost = 400
		build_time = 1460
		levy_size = 0.05
		garrison_size = 0.05
		ai_creation_factor = 93
		add_number_to_name = no
		liege_piety = 0.05

		extra_tech_building_start = 1.1
	} 
	tp_monastery_5 = {
		desc = tp_monastery_2_desc
		trigger = {
			TECH_TEMPLE_CONSTRUCTION = 6
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tp_monastery_4
		gold_cost = 500
		build_time = 2190
		levy_size = 0.05
		garrison_size = 0.05
		ai_creation_factor = 92
		add_number_to_name = no
		liege_piety = 0.05

		extra_tech_building_start = 1.3
	}
	tp_monastery_6 = {
		desc = tp_monastery_2_desc
		trigger = {
			TECH_TEMPLE_CONSTRUCTION = 8
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tp_monastery_5
		gold_cost = 600
		build_time = 2190
		levy_size = 0.05
		garrison_size = 0.05
		ai_creation_factor = 91
		add_number_to_name = no
		liege_piety = 0.05

		extra_tech_building_start = 1.5
	}
	
	tp_barracks_1 = {
		desc = tp_barracks_1_desc
		trigger = {
			TECH_TEMPLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 100
		build_time = 365
		light_infantry = 60
		archers = 30
		ai_creation_factor = 94

		extra_tech_building_start = 0.8
	}
	tp_barracks_2 = {
		desc = tp_barracks_1_desc
		trigger = {
			TECH_TEMPLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		prerequisites = { tp_wall_1 }
		upgrades_from = tp_barracks_1
		gold_cost = 120
		build_time = 547
		light_infantry = 65
		archers = 45
		ai_creation_factor = 93

		extra_tech_building_start = 1.5
	}
	tp_barracks_3 = {
		desc = tp_barracks_1_desc
		trigger = {
			TECH_TEMPLE_CONSTRUCTION = 1
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		prerequisites = { tp_wall_2 }
		upgrades_from = tp_barracks_2
		gold_cost = 200
		build_time = 730
		light_infantry = 70
		archers = 60
		ai_creation_factor = 92

		extra_tech_building_start = 1.2
	}
	tp_barracks_4 = {
		desc = tp_barracks_1_desc
		trigger = {
			TECH_TEMPLE_CONSTRUCTION = 3
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tp_barracks_3
		gold_cost = 300
		build_time = 1095
		light_infantry = 75
		archers = 75
		ai_creation_factor = 91

		extra_tech_building_start = 1.1
	}
	tp_barracks_5 = {
		desc = tp_barracks_1_desc
		trigger = {
			TECH_TEMPLE_CONSTRUCTION = 5
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tp_barracks_4
		gold_cost = 400
		build_time = 2190
		light_infantry = 85
		archers = 85
		ai_creation_factor = 90

		extra_tech_building_start = 1.3
	}
	tp_barracks_6 = {
		desc = tp_barracks_1_desc
		trigger = {
			TECH_TEMPLE_CONSTRUCTION = 7
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tp_barracks_5
		gold_cost = 500
		build_time = 2190
		light_infantry = 95
		archers = 95
		ai_creation_factor = 89

		extra_tech_building_start = 1.5
	}
	
	tp_elite_barracks_1 = {
		desc = tp_elite_barracks_1_desc
		trigger = {
			TECH_TEMPLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 100
		build_time = 365
		heavy_infantry = 45
		ai_creation_factor = 95

		extra_tech_building_start = 0.8
	}
	tp_elite_barracks_2 = {
		desc = tp_elite_barracks_1_desc
		trigger = {
			TECH_TEMPLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		prerequisites = { tp_wall_1 }
		upgrades_from = tp_elite_barracks_1
		gold_cost = 120
		build_time = 730
		heavy_infantry = 55
		ai_creation_factor = 94

		extra_tech_building_start = 1.5
	}
	tp_elite_barracks_3 = {
		desc = tp_elite_barracks_1_desc
		trigger = {
			TECH_TEMPLE_CONSTRUCTION = 2
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		prerequisites = { tp_wall_2 }
		upgrades_from = tp_elite_barracks_2
		gold_cost = 200
		build_time = 730
		heavy_infantry = 65
		ai_creation_factor = 93

		extra_tech_building_start = 0.9
	}
	tp_elite_barracks_4 = {
		desc = tp_elite_barracks_1_desc
		trigger = {
			TECH_TEMPLE_CONSTRUCTION = 4
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tp_elite_barracks_3
		gold_cost = 300
		build_time = 1095
		heavy_infantry = 75
		ai_creation_factor = 92

		extra_tech_building_start = 1.1
	}
	tp_elite_barracks_5 = {
		desc = tp_elite_barracks_1_desc
		trigger = {
			TECH_TEMPLE_CONSTRUCTION = 6
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tp_elite_barracks_4
		gold_cost = 400
		build_time = 2190
		heavy_infantry = 85
		ai_creation_factor = 91

		extra_tech_building_start = 1.3
	}
	tp_elite_barracks_6 = {
		desc = tp_elite_barracks_1_desc
		trigger = {
			TECH_TEMPLE_CONSTRUCTION = 8
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tp_elite_barracks_5
		gold_cost = 500
		build_time = 2190
		heavy_infantry = 95
		ai_creation_factor = 90

		extra_tech_building_start = 1.5
	}
	
	tp_town_1 = {
		desc = tp_town_1_desc
		trigger = {
			TECH_TEMPLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 100
		build_time = 365
		tax_income = 1.0
		ai_creation_factor = 97

		extra_tech_building_start = 0.6
	}
	tp_town_2 = {
		desc = tp_town_2_desc
		trigger = {
			TECH_TEMPLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		prerequisites = { tp_wall_1 }
		upgrades_from = tp_town_1
		gold_cost = 150
		build_time = 547
		tax_income = 1.5
		ai_creation_factor = 96

		extra_tech_building_start = 1.1
	}
	tp_town_3 = {
		desc = tp_town_3_desc
		trigger = {
			TECH_TEMPLE_CONSTRUCTION = 1
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		prerequisites = { tp_wall_2 }
		upgrades_from = tp_town_2
		gold_cost = 200
		build_time = 730
		tax_income = 2.0
		ai_creation_factor = 95

		extra_tech_building_start = 0.9
	}
	tp_town_4 = {
		desc = tp_town_4_desc
		trigger = {
			TECH_TEMPLE_CONSTRUCTION = 3
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tp_town_3
		gold_cost = 250
		build_time = 1095
		tax_income = 2.5
		ai_creation_factor = 94

		extra_tech_building_start = 1.1
	}
	tp_town_5 = {
		desc = tp_town_4_desc
		trigger = {
			TECH_TEMPLE_CONSTRUCTION = 5
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tp_town_4
		gold_cost = 300
		build_time = 2190
		tax_income = 3.0
		ai_creation_factor = 93

		extra_tech_building_start = 1.3
	}
	tp_town_6 = {
		desc = tp_town_5_desc
		trigger = {
			TECH_TEMPLE_CONSTRUCTION = 7
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tp_town_5
		gold_cost = 400
		build_time = 2190
		tax_income = 4.0
		ai_creation_factor = 92

		extra_tech_building_start = 1.5
	}
	
	tp_shipyard_1 = {
		desc = shipyard_desc
		port = yes
		trigger = {
			TECH_NAVAL = 1
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 100
		build_time = 365
		galleys = 4
		ai_creation_factor = 87
		
		extra_tech_building_start = 0.7
	}
	tp_shipyard_2 = {
		desc = shipyard_desc
		port = yes
		trigger = {
			TECH_NAVAL = 2
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tp_shipyard_1
		gold_cost = 100
		build_time = 730
		galleys = 5
		ai_creation_factor = 86
		
		extra_tech_building_start = 0.9
	}
	tp_shipyard_3 = {
		desc = shipyard_desc
		port = yes
		trigger = {
			TECH_NAVAL = 3
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tp_shipyard_2
		gold_cost = 100
		build_time = 1095
		galleys = 6
		ai_creation_factor = 85
		
		extra_tech_building_start = 1.1
	}
	tp_shipyard_4 = {
		desc = shipyard_desc
		port = yes
		trigger = {
			TECH_NAVAL = 4
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tp_shipyard_3
		gold_cost = 100
		build_time = 1460
		galleys = 7
		ai_creation_factor = 84
		
		extra_tech_building_start = 1.3
	}

	tp_school_1 = {
		desc = tp_school_1_desc
		trigger = {
			TECH_TEMPLE_CONSTRUCTION = 2
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		prerequisites = { tp_wall_1 }
		gold_cost = 200
		build_time = 547
		
		tech_growth_modifier = 0.1
		culture_techpoints = 0.05
		
		ai_creation_factor = 93
		add_number_to_name = no


		extra_tech_building_start = 0.5
	}
	tp_school_2 = {
		desc = tp_school_1_desc
		trigger = {
			TECH_TEMPLE_CONSTRUCTION = 4
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		prerequisites = { tp_wall_2 }
		upgrades_from = tp_school_1
		gold_cost = 400
		build_time = 547
		
		tech_growth_modifier = 0.2
		culture_techpoints = 0.05


		ai_creation_factor = 92
		add_number_to_name = no



		extra_tech_building_start = 0.7
	}
}

family_palace = {

	# Mansion
	fp_mansion_1 = {
		desc = fp_mansion_1_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 200
		build_time = 1095
		ai_creation_factor = 110
		
		levy_size = 0.1
		retinuesize = 200
		heavy_infantry = 100
		light_infantry = 100
		archers = 100
		tax_income = 2
		max_tradeposts = 2
		
		extra_tech_building_start = 0.0
	}
	
	# Great Mansion
	fp_mansion_2 = {
		desc = fp_mansion_2_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = fp_mansion_1
		gold_cost = 300
		build_time = 1460
		ai_creation_factor = 109
		
		levy_size = 0.1
		retinuesize = 400
		heavy_infantry = 100
		light_infantry = 100
		archers = 100
		tax_income = 3
		max_tradeposts = 2
		
		extra_tech_building_start = 2.0
	}
	
	# Palace
	fp_mansion_3 = {
		desc = fp_mansion_3_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = fp_mansion_2
		gold_cost = 400
		build_time = 2190
		ai_creation_factor = 108
		
		levy_size = 0.1
		retinuesize = 600
		heavy_infantry = 100
		light_infantry = 100
		archers = 100
		tax_income = 4
		max_tradeposts = 2
		
		extra_tech_building_start = 3.5
	}
	
	# Grand Palace
	fp_mansion_4 = {
		desc = fp_mansion_4_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = fp_mansion_3
		gold_cost = 500
		build_time = 2190
		ai_creation_factor = 107
		
		levy_size = 0.1
		tax_income = 5

		max_tradeposts = 2
		retinuesize = 800
		heavy_infantry = 100
		light_infantry = 100
		archers = 100
		intrigue = 1
		
		extra_tech_building_start = 5.0
	}
	
	# Guard Barracks
	fp_barracks_1 = {
		desc = fp_barracks_1_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 150
		build_time = 730
		ai_creation_factor = 105
		
		heavy_infantry = 70
		pikemen = 50
		
		extra_tech_building_start = 1.0
	}
	
	# Swordsmith
	fp_barracks_2 = {
		desc = fp_barracks_2_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = fp_barracks_1
		prerequisites = { fp_mansion_2 }
		gold_cost = 250
		build_time = 1095
		ai_creation_factor = 104
		
		heavy_infantry = 85
		pikemen = 65
		
		extra_tech_building_start = 2.5
	}
	
	# Armory
	fp_barracks_3 = {
		desc = fp_barracks_3_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = fp_barracks_2
		prerequisites = { fp_mansion_3 }
		gold_cost = 350
		build_time = 1460
		ai_creation_factor = 103
		
		heavy_infantry = 100
		pikemen = 80
		
		extra_tech_building_start = 4.0
	}
	
	# Small Stable
	fp_stable_1 = {
		desc = fp_stable_1_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 150
		build_time = 730
		ai_creation_factor = 105
		
		light_cavalry = 75
		
		extra_tech_building_start = 1.0
	}
	
	# Riding Grounds
	fp_stable_2 = {
		desc = fp_stable_2_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 250
		build_time = 1095
		upgrades_from = fp_stable_1
		prerequisites = { fp_mansion_2 }
		ai_creation_factor = 104
		
		light_cavalry = 90
		
		extra_tech_building_start = 2.5
	}
	
	# Horse Breeder
	fp_stable_3 = {
		desc = fp_stable_3_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 350
		build_time = 1460
		upgrades_from = fp_stable_2
		prerequisites = { fp_mansion_3 }
		ai_creation_factor = 103
		
		light_cavalry = 105
		knights = 45
		
		extra_tech_building_start = 4.0
	}
	
	# Bowyer
	fp_bowyer_1 = {
		desc = fp_bowyer_1_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 150
		build_time = 730
		ai_creation_factor = 105
		
		light_infantry = 95
		archers = 95
		
		extra_tech_building_start = 1.0
	}
	
	# Target Range
	fp_bowyer_2 = {
		desc = fp_bowyer_2_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 250
		build_time = 1095
		upgrades_from = fp_bowyer_1
		prerequisites = { fp_mansion_2 }
		ai_creation_factor = 104
		
		light_infantry = 110
		archers = 110
		
		extra_tech_building_start = 2.5
	}
	
	# Crossbow Workshop
	fp_bowyer_3 = {
		desc = fp_bowyer_3_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 350
		build_time = 1460
		upgrades_from = fp_bowyer_2
		prerequisites = { fp_mansion_3 }
		ai_creation_factor = 103
		
		light_infantry = 120
		archers = 120
		
		extra_tech_building_start = 4.0
	}
	
	# Map Room
	fp_shipyard_1 = {
		desc = fp_shipyard_1_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 150
		build_time = 730
		ai_creation_factor = 105
		
		galleys = 12
		
		extra_tech_building_start = 1.0
	}
	
	#  Private Shipyard
	fp_shipyard_2 = {
		desc = fp_shipyard_2_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 250
		build_time = 1095
		upgrades_from = fp_shipyard_1
		prerequisites = { fp_mansion_2 }
		ai_creation_factor = 104
		
		galleys = 18
		
		extra_tech_building_start = 2.5
	}
	
	# Naval Arsenal
	fp_shipyard_3 = {
		desc = fp_shipyard_3_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 350
		build_time = 1460
		upgrades_from = fp_shipyard_2
		prerequisites = { fp_mansion_3 }
		ai_creation_factor = 103
		
		galleys = 24
		
		extra_tech_building_start = 4.0
	}
	
	# Military Warehouse
	fp_warehouse_1 = {
		desc = fp_warehouse_1_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 200
		build_time = 730
		ai_creation_factor = 105
		
		land_morale = 0.1
		levy_reinforce_rate = 0.1
		retinuesize = 200
		
		extra_tech_building_start = 1.0
	}
	
	# Palace Archive
	fp_warehouse_2 = {
		desc = fp_warehouse_2_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 400
		build_time = 1095
		upgrades_from = fp_warehouse_1
		prerequisites = { fp_mansion_2 }
		ai_creation_factor = 104

		land_morale = 0.2
		levy_reinforce_rate = 0.2
		retinuesize = 300
		
		extra_tech_building_start = 2.5
	}
	
	# Administrative Office
	fp_warehouse_3 = {
		desc = fp_warehouse_3_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 600
		build_time = 1460
		upgrades_from = fp_warehouse_2
		prerequisites = { fp_mansion_3 }
		ai_creation_factor = 103

		land_morale = 0.3
		levy_reinforce_rate = 0.3
		retinuesize = 500
		
		extra_tech_building_start = 4.0
	}
	
	# Palace Garden
	fp_garden_1 = {
		desc = fp_garden_1_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 100
		build_time = 730
		ai_creation_factor = 105
		
		monthly_character_prestige = 0.10

		extra_tech_building_start = 1.0
	}
	
	# Scenic Pond
	fp_garden_2 = {
		desc = fp_garden_2_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 200
		build_time = 1095
		ai_creation_factor = 104

		upgrades_from = fp_garden_1
		prerequisites = { fp_mansion_2 }

		monthly_character_prestige = 0.20

		extra_tech_building_start = 2.5
	}
	
	# Hedge Maze
	fp_garden_3 = {
		desc = fp_garden_3_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 300
		build_time = 1460
		ai_creation_factor = 103

		upgrades_from = fp_garden_2
		prerequisites = { fp_mansion_3 }

		diplomacy = 1
		monthly_character_prestige = 0.30
		
		extra_tech_building_start = 4.0
	}
	
	# Wine Cellar
	fp_cellar_1 = {
		desc = fp_cellar_1_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 100
		build_time = 730
		ai_creation_factor = 105
		
		fertility = 0.1
		
		extra_tech_building_start = 1.0
	}
	
	# Catacombs
	fp_cellar_2 = {
		desc = fp_cellar_2_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 200
		build_time = 1095
		ai_creation_factor = 104

		upgrades_from = fp_cellar_1
		prerequisites = { fp_mansion_2 }
		
		monthly_character_piety = 0.10
		
		extra_tech_building_start = 2.5
	}
	
	# Dungeon Complex
	fp_cellar_3 = {
		desc = fp_cellar_3_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 300
		build_time = 1460
		ai_creation_factor = 103
		
		upgrades_from = fp_cellar_2
		prerequisites = { fp_mansion_3 }
		
		martial = 1
		monthly_character_prestige = 0.30
		
		extra_tech_building_start = 4.0
	}
	
	# Secluded Shrine
	fp_shrine_1 = {
		desc = fp_shrine_1_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 100
		build_time = 730
		ai_creation_factor = 105

		monthly_character_piety = 0.05
		
		extra_tech_building_start = 1.0
	}
	
	# Private Art Collection
	fp_shrine_2 = {
		desc = fp_shrine_2_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 200
		build_time = 1095
		upgrades_from = fp_shrine_1
		prerequisites = { fp_mansion_2 }
		ai_creation_factor = 104		

		monthly_character_piety = 0.10
		
		extra_tech_building_start = 2.5
	}
	
	# Grand Library
	fp_shrine_3 = {
		desc = fp_shrine_3_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 300
		build_time = 1460
		upgrades_from = fp_shrine_2
		prerequisites = { fp_mansion_3 }
		ai_creation_factor = 103
		
		learning = 1
		monthly_character_piety = 0.15
		
		extra_tech_building_start = 4.0
	}
	
	# Fortified Vault
	fp_vault_1 = {
		desc = fp_vault_1_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 100
		build_time = 730
		ai_creation_factor = 105
		
		tax_income = 1.5
		
		extra_tech_building_start = 1.0
	}
	
	# Secret Passages
	fp_vault_2 = {
		desc = fp_vault_2_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 200
		build_time = 1095
		upgrades_from = fp_vault_1
		prerequisites = { fp_mansion_2 }
		ai_creation_factor = 104
		
		tax_income = 2.5

		extra_tech_building_start = 2.5
	}
	
	# Hidden Chamber
	fp_vault_3 = {
		desc = fp_vault_3_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		gold_cost = 300
		build_time = 1460
		upgrades_from = fp_vault_2
		prerequisites = { fp_mansion_3 }
		ai_creation_factor = 103
		
		tax_income = 4
		stewardship = 1
		
		extra_tech_building_start = 4.0
	}
}
