 # 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
 #}
 
 # Castle
castle = {
	# All cultural buildings follow the same pattern:
	# tech required is 0, 1, 2, 4 for the levels of the buildings
	# cost is 200 + 100 per level
	# 60 maintenance of troops + 20 per level
	# + 0.15 bonus in either offensive, defensive or morale sometimes split over different units or stats same on all levels
	
	# Culture building names MUST start with ca_culture
	## Gaulish Cultural Buildings
	ca_culture_gaulish_1 = {
		desc = ca_culture_gaulish_1_desc
		potential = {
			FROM = { culture = gaulish }
		}
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		prerequisites = { ca_wall_2 }
		gold_cost = 200
		build_time = 730
		knights = 15
		knights_offensive = 0.15
		ai_creation_factor = 101

		extra_tech_building_start = 0.8
	}
	ca_culture_gaulish_2 = {
		desc = ca_culture_gaulish_1_desc
		potential = {
			FROM = { culture = gaulish }
		}
		trigger = { TECH_CASTLE_CONSTRUCTION = 1 }
		upgrades_from = ca_culture_gaulish_1
		gold_cost = 300
		build_time = 1095
		knights = 20
		knights_offensive = 0.15
		ai_creation_factor = 100
		
		extra_tech_building_start = 0.8
	}
	ca_culture_gaulish_3 = {
		desc = ca_culture_gaulish_1_desc
		potential = {
			FROM = { culture = gaulish }
		}
		trigger = { TECH_CASTLE_CONSTRUCTION = 2 }
		upgrades_from = ca_culture_gaulish_2
		gold_cost = 400
		build_time = 2190
		knights = 25
		knights_offensive = 0.15
		ai_creation_factor = 99
		
		extra_tech_building_start = 0.8
	}
	ca_culture_gaulish_4 = {
		desc = ca_culture_gaulish_1_desc
		potential = {
			FROM = { culture = gaulish }
		}
		trigger = { TECH_CASTLE_CONSTRUCTION = 4 }
		upgrades_from = ca_culture_gaulish_3
		gold_cost = 500
		build_time = 2190
		knights = 30
		knights_offensive = 0.15
		ai_creation_factor = 98
		
		extra_tech_building_start = 0.8
	}

	## Coptic Cultural Buildings
	ca_culture_egyptian_coptic_1 = {
		desc = ca_culture_egyptian_coptic_1_desc
		potential = {
			FROM = { culture = egyptian_coptic }
		}
		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }
		prerequisites = { ca_wall_2 }
		gold_cost = 200
		build_time = 730
		heavy_infantry = 15
		heavy_infantry_offensive = 0.15
		horse_archers = 5
		horse_archers_offensive = 0.1
		ai_creation_factor = 101

		extra_tech_building_start = 0.8
	}
	ca_culture_egyptian_coptic_2 = {
		desc = ca_culture_egyptian_coptic_1_desc
		potential = {
			FROM = { culture = egyptian_coptic }
		}
		trigger = { TECH_CASTLE_CONSTRUCTION = 1 }
		upgrades_from = ca_culture_egyptian_coptic_1
		gold_cost = 300
		build_time = 1095
		heavy_infantry = 30
		heavy_infantry_offensive = 0.15
		horse_archers = 10
		horse_archers_offensive = 0.1
		ai_creation_factor = 100
		
		extra_tech_building_start = 0.8
	}
	ca_culture_egyptian_coptic_3 = {
		desc = ca_culture_egyptian_coptic_1_desc
		potential = {
			FROM = { culture = egyptian_coptic }
		}
		trigger = { TECH_CASTLE_CONSTRUCTION = 2 }
		upgrades_from = ca_culture_egyptian_coptic_2
		gold_cost = 400
		build_time = 2190
		heavy_infantry = 35
		heavy_infantry_defensive = 0.15
		horse_archers = 15
		horse_archers_offensive = 0.1
		ai_creation_factor = 99
		
		extra_tech_building_start = 0.8
	}
	ca_culture_egyptian_coptic_4 = {
		desc = ca_culture_egyptian_coptic_1_desc
		potential = {
			FROM = { culture = egyptian_coptic }
		}
		trigger = { TECH_CASTLE_CONSTRUCTION = 4 }
		upgrades_from = ca_culture_egyptian_coptic_3
		gold_cost = 500
		build_time = 2190
		heavy_infantry = 40
		heavy_infantry_defensive = 0.15
		horse_archers = 20
		horse_archers_offensive = 0.1
		ai_creation_factor = 98
		
		extra_tech_building_start = 0.8
	}
	ca_kemetic_pyramid = {
		potential = {
			FROM = {
				higher_tier_than = duke
				OR = {
					religion = egyptian_pagan
					religion = aten_pagan
				}
			}
		}
		trigger = { always = no }
		desc = ca_kemetic_pyramid_desc
		gold_cost = 600
		build_time = 3650

		culture_techpoints = 0.1
		liege_piety = 0.5
		monthly_character_piety = 0.5

		ai_creation_factor = 100

		extra_tech_building_start = 0.0
	}
}

city = {
	ct_kemetic_pyramid = {
		potential = {
			FROM = {
				higher_tier_than = duke
				OR = {
					religion = egyptian_pagan
					religion = aten_pagan
				}
			}
		}
		trigger = { always = no }
		desc = ca_kemetic_pyramid_desc
		gold_cost = 600
		build_time = 3650

		culture_techpoints = 0.1
		liege_piety = 0.5
		monthly_character_piety = 0.5

		ai_creation_factor = 100

		extra_tech_building_start = 0.0
	}
}

temple = {
	tp_kemetic_pyramid = {
		potential = {
			FROM = {
				higher_tier_than = duke
				OR = {
					religion = egyptian_pagan
					religion = aten_pagan
				}
			}
		}
		trigger = { always = no }
		desc = ca_kemetic_pyramid_desc
		gold_cost = 600
		build_time = 3650

		culture_techpoints = 0.1
		liege_piety = 0.5
		monthly_character_piety = 0.5

		ai_creation_factor = 100

		extra_tech_building_start = 0.0
	}
}

tribal = {
	tb_kemetic_pyramid = {
		potential = {
			FROM = {
				higher_tier_than = duke
				OR = {
					religion = egyptian_pagan
					religion = aten_pagan
				}
			}
		}
		trigger = { always = no }
		desc = ca_kemetic_pyramid_desc
		gold_cost = 600
		build_time = 3650

		culture_techpoints = 0.1
		liege_piety = 0.5
		monthly_character_piety = 0.5

		ai_creation_factor = 100

		extra_tech_building_start = 0.0
	}
}
