﻿university = {
	audio_tier = 3
	is_foreign = no
	pop_type = bureaucrats
	max_levels = 1
	
	
	category = cultural_category
	employment_size = religious_building_employment
	
	town = yes
	city = yes
	megalopolis = yes

	AI_ignore_available_worker_flag = yes #since we may build this to increase pop promotion we don't want lack of workers to block it

	expensive = yes

	build_time = large_cultural_building_time
	
	forbidden_for_estates = yes

	allow = {	
		is_core_of = owner		
		owner = { modifier:university_construction_blocked = no }
	}
	
	modifier = {
		local_cultural_influence = 0.5
		local_burghers_max_literacy = 10
		local_monthly_literacy = 0.05
		local_migration_attraction = 0.05
		local_pop_promotion_speed = 0.001
		local_institution_growth_modifier = 0.33
	}
	
	unique_production_methods = {
		university_maintenance = {
		icon_type = goods
		icon = paper
		paper = 0.5
		books = 0.25
		glass = 0.25
		beeswax = 0.05
	
		category = building_maintenance
		}
	}
	
	construction_demand = university_construction
}

library = {
	audio_tier = 2
	is_foreign = no
	pop_type = bureaucrats
	max_levels = 1
	
	category = cultural_category
	employment_size = cultural_employment
	
	AI_ignore_available_worker_flag = yes #since we may build this to increase pop promotion we don't want lack of workers to block it

	town = yes
	city = yes
	megalopolis = yes
	
	forbidden_for_estates = yes

	
	graphical_tags = { medium_religious }

	build_time = cultural_building_time
	
	modifier = {
		local_cultural_influence = 0.1
		local_monthly_literacy = 0.5
		local_pop_promotion_speed = 0.001
		local_institution_growth_modifier = 0.25
	}
	
	possible_production_methods = {
		library_maintenance
	}

	
	construction_demand = library_construction
}

#Similar to a Library for Confucianism
#Hyanggyo https://en.wikipedia.org/wiki/Hyanggyo
#Shuyuan https://en.wikipedia.org/wiki/Academies_of_Classical_Learning
confucian_school = {
	audio_tier = 1
	is_special = yes
	is_foreign = no
	max_levels = 1
	pop_type = nobles
	
	employment_size = noble_cultural_employment
	category = cultural_category
	
	AI_ignore_available_worker_flag = yes #since we may build this to increase pop promotion we don't want lack of workers to block it

	rural_settlement = no
	town = yes
	city = yes
	megalopolis = yes
	
	build_time = cultural_building_time

	
	
	country_potential = {
		OR = {
			culture = { has_culture_group = culture_group:confucian_group }
			religion ?= religion:sanjiao
			any_international_organizations_member_of = {
				international_organization_type = international_organization_type:sect
				international_organization_has_policy = policy:confucianism_policy
			}
			custom_tooltip = {
				text = has_neo_confucianism_tt
				has_variable = has_neo_confucianism
			}
			is_member_of_international_organization = international_organization:middle_kingdom
		}
	}
	
	possible_production_methods = {
		confucian_school_maintenance
	}

	construction_demand = school_construction
	
	modifier = {
		local_max_literacy = 5
		local_pop_promotion_speed = 0.001
		local_institution_growth_modifier = 0.25
	}
	capital_country_modifier = {
		monthly_towards_sinicized = societal_value_tiny_monthly_move
	}
}

#Intermediate building between confucian_school and university
#Seowon https://en.wikipedia.org/wiki/Seowon
#Shuyuan https://en.wikipedia.org/wiki/Academies_of_Classical_Learning
confucian_academy = {
	audio_tier = 2
	is_special = yes
	is_foreign = no
	pop_type = nobles
	max_levels = 1
	
	category = cultural_category
	employment_size = noble_cultural_employment
	
	AI_ignore_available_worker_flag = yes #since we may build this to increase pop promotion we don't want lack of workers to block it

	town = yes
	city = yes
	megalopolis = yes

	expensive = yes

	build_time = cultural_building_time

	allow = {	
		is_core_of = owner
	}
	
	modifier = {
		local_pop_promotion_speed = 0.001
		local_institution_growth_modifier = 0.5
	}
	capital_country_modifier = {
		monthly_towards_sinicized = societal_value_tiny_monthly_move
	}
	
	unique_production_methods = {
		confucian_academy_maintenance = {
			icon_type = goods
			icon = paper
			paper = 0.4
			beeswax = 0.1
			books = 0.2
			cloth = 0.3
			fine_cloth = 0.1
			
			category = building_maintenance
		}

	}

	
	construction_demand = academy_construction
}

opera_house = {
	audio_tier = 2
	is_foreign = no
	pop_type = burghers
	max_levels = 1
	
	category = cultural_category
	
	employment_size = large_cultural_employment
	
	town = yes
	city = yes
	megalopolis = yes

	expensive = yes

	build_time = large_cultural_building_time
	
	modifier = {
		local_cultural_tradition = 0.5
		local_cultural_influence = 0.25
		local_unrest = -0.05
	}
	
	unique_production_methods = {
		opera_house_maintenance = {
			icon_type = goods
			icon = cloth
			cloth = 0.6
			wine = 0.6
			paper = 0.6
			lacquerware = 0.2
			fine_cloth = 0.1
			beeswax = 0.2
			
			category = building_maintenance
		}

	}

	
	construction_demand = opera_house_construction
}

theater = {
	audio_tier = 1
	is_foreign = no
	pop_type = burghers
	max_levels = 1
	
	category = cultural_category
	
	employment_size = cultural_employment
	
	town = yes
	city = yes
	megalopolis = yes

	

	build_time = cultural_building_time
	
	modifier = {
		local_cultural_tradition = 0.2
		local_unrest = -0.02
	}
	
	
	possible_production_methods = {
		theater_maintenance
	}


	construction_demand = theater_construction
}

jesuit_college = {
	audio_tier = 2
	is_special = yes
	is_foreign = no
	pop_type = clergy
	max_levels = 1
	
	category = cultural_category
	employment_size = religious_building_employment
	
	town = yes
	city = yes
	megalopolis = yes

	expensive = yes

	build_time = large_religious_building_time

	country_potential = {
		has_unlocked_building_trigger = { type = jesuit_college }
	}
	allow = {
		owner = {
			has_policy = jesuits_allowed
		}
	}

	remove_if = {
		NOT = {
			owner = {
				has_policy = jesuits_allowed
			}
		}
	}
	graphical_tags = { medium_religious }
	
	modifier = {
		local_cultural_influence = 0.2
		local_monthly_literacy = 0.05
		local_lutheranism_movement_growth_modifier = -0.4
		local_calvinism_movement_growth_modifier = -0.4
	}

	unique_production_methods = {
		
		jesuit_college_maintenance = {
			icon_type = goods
			icon = paper
			paper = 0.5
			books = 1.0
			fine_cloth = 0.2
			beeswax = 0.1

			category = building_maintenance
		}
	}
	
	construction_demand = university_construction
}

art_school = {
	audio_tier = 2
	is_foreign = no
	pop_type = burghers
	max_levels = 1
	
	category = cultural_category
	
	employment_size = cultural_employment
	
	town = yes
	city = yes
	megalopolis = yes
	
	expensive = yes
	build_time = large_cultural_building_time
	
	location_potential = {
		is_capital = yes
	}
	remove_if = {
		is_no_longer_capital = yes
	}
	
	capital_modifier = {
		local_cultural_influence = 0.1
		local_cultural_tradition = 0.1
	}
	
	capital_country_modifier = {
		skill_of_new_artists = 0.1
		work_of_art_sell_value_modifier = 0.1
	}

	possible_production_methods = {
		art_school_maintenance
	}
	construction_demand = art_school_construction
}

arts_academy = {
	audio_tier = 3
	is_foreign = no
	pop_type = burghers
	max_levels = 1

	obsolete = art_school
	
	category = cultural_category
	
	employment_size = generic_burgher_employment
	
	town = yes
	city = yes
	megalopolis = yes
	
	expensive = yes
	build_time = large_cultural_building_time
	
	location_potential = {
		is_capital = yes
	}
	remove_if = {
		is_no_longer_capital = yes
	}
	country_potential = {

	}
	
	capital_modifier = {
		local_cultural_influence = 0.25
		local_cultural_tradition = 0.25
	}
	
	capital_country_modifier = {
		skill_of_new_artists = 0.25
		work_of_art_sell_value_modifier = 0.2
	}

	possible_production_methods = {
		arts_academy_maintenance
	}

	
	construction_demand = art_school_construction
}