#########################################
# File by Chris Stone                   #
# last revised by Chris Stone June 2005 #
#########################################

###########################
#shortbow discovery	  #	   
###########################
						   
province_event = {
	id = 3000

	name	= "TECH_DISCOVERY"
	tag	= shortbow
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = { type = not value = { type = has_advance value = { shortbow = yes } } }
		condition = { type = advance_focus value = shortbow }
	}

	mean_time_to_happen = {
		months = 50

		modifier = {
			condition = {
				type = terrain
				value = Forest
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { forestry = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = shortbow 
			}
	} 	
}
###########################
#longbow discovery	  #	   
###########################
						   
province_event = {
	id = 3001

	name	= "TECH_DISCOVERY"
	tag		= longbow
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { longbow = yes }
			}
		}
		condition = {
			type = has_advance
			value = { shortbow = yes }
		}
		condition = { type = advance_focus value = longbow }
	}

	mean_time_to_happen = {
		months = 100

		modifier = {
			condition = {
				type = terrain
				value = Forest
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { forestry = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = longbow 
			}
	} 	
}
###########################
#composite_longbow discovery	  #	   
###########################
						   
province_event = {
	id = 3002

	name	= "TECH_DISCOVERY"
	tag		= composite_longbow
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { composite_longbow = yes }
			}
		}
		condition = {
			type = has_advance
			value = { longbow = yes }
		}
		condition = { type = advance_focus value = composite_longbow }
	}

	mean_time_to_happen = {
		months = 250

		modifier = {
			condition = {
				type = terrain
				value = Forest
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { forestry = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = composite_longbow 
			}
	} 	
}
###########################
#reinforced_longbow discovery	  #	   
###########################
						   
province_event = {
	id = 3003

	name	= "TECH_DISCOVERY"
	tag		= reinforced_longbow
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { reinforced_longbow = yes }
			}
		}
		condition = {
			type = has_advance
			value = { composite_longbow = yes }
		}
		condition = { type = advance_focus value = reinforced_longbow }
	}

	mean_time_to_happen = {
		months = 500

		modifier = {
			condition = {
				type = terrain
				value = Forest
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { forestry = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = reinforced_longbow 
			}
	} 	
}
###########################
#marksman_longbow discovery	  #	   
###########################
						   
province_event = {
	id = 3004

	name	= "TECH_DISCOVERY"
	tag		= marksman_longbow
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { marksman_longbow = yes }
			}
		}
		condition = {
			type = has_advance
			value = { reinforced_longbow = yes }
		}
		condition = { type = advance_focus value = marksman_longbow }
	}

	mean_time_to_happen = {
		months = 1500

		modifier = {
			condition = {
				type = terrain
				value = Forest
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { forestry = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = marksman_longbow 
			}
	} 	
}
###########################
#slinged_javelin discovery	  #	   
###########################
						   
province_event = {
	id = 3005

	name	= "TECH_DISCOVERY"
	tag		= slinged_javelin
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { slinged_javelin = yes }
			}
		}
		condition = { type = advance_focus value = slinged_javelin }
	}

	mean_time_to_happen = {
		months = 50

		modifier = {
			condition = {
				type = has_improvement
				value = { forestry = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = slinged_javelin 
			}
	} 	
}
###########################
#light_crossbow discovery	  #	   
###########################
						   
province_event = {
	id = 3006

	name	= "TECH_DISCOVERY"
	tag	= light_crossbow
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { light_crossbow = yes }
			}
		}
		condition = {
			type = has_advance
			value = { slinged_javelin = yes }
		}
		condition = { type = advance_focus value = light_crossbow }
	}

	mean_time_to_happen = {
		months = 100

		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = light_crossbow 
			}
	} 	
}
###########################
#medium_crossbow discovery	  #	   
###########################
						   
province_event = {
	id = 3007

	name	= "TECH_DISCOVERY"
	tag		= medium_crossbow
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { medium_crossbow = yes }
			}
		}
		condition = {
			type = has_advance
			value = { light_crossbow = yes }
		}
		condition = { type = advance_focus value = medium_crossbow }
	}

	mean_time_to_happen = {
		months = 250

		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = medium_crossbow 
			}
	} 	
}
###########################
#heavy_crossbow discovery	  #	   
###########################
						   
province_event = {
	id = 3008

	name	= "TECH_DISCOVERY"
	tag		= heavy_crossbow
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { heavy_crossbow = yes }
			}
		}
		condition = {
			type = has_advance
			value = { medium_crossbow = yes }
		}
		condition = { type = advance_focus value = heavy_crossbow }
	}

	mean_time_to_happen = {
		months = 500

		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = heavy_crossbow 
			}
	} 	
}
###########################
#arbalest discovery	  #	   
###########################
						   
province_event = {
	id = 3009

	name	= "TECH_DISCOVERY"
	tag		= arbalest
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { arbalest = yes }
			}
		}
		condition = {
			type = has_advance
			value = { heavy_crossbow = yes }
		}
		condition = { type = advance_focus value = arbalest }
	}

	mean_time_to_happen = {
		months = 1500

		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = arbalest 
			}
	} 	
}
###########################
#soft_leather discovery	  #	   
###########################
						   
province_event = {
	id = 3010

	name	= "TECH_DISCOVERY"
	tag		= soft_leather
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { soft_leather = yes }
			}
		}
		condition = { type = advance_focus value = soft_leather }
	}

	mean_time_to_happen = {
		months = 50

		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.7
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = soft_leather 
			}
	} 	
}
###########################
#reinforced_leather discovery	  #	   
###########################
						   
province_event = {
	id = 3011

	name	= "TECH_DISCOVERY"
	tag		= reinforced_leather
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { reinforced_leather = yes }
			}
		}
		condition = {
			type = has_advance
			value = { soft_leather = yes }
		}
		condition = { type = advance_focus value = reinforced_leather }
	}

	mean_time_to_happen = {
		months = 100

		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.7
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = reinforced_leather 
			}
	} 	
}
###########################
#boiled_leather discovery	  #	   
###########################
						   
province_event = {
	id = 3012

	name	= "TECH_DISCOVERY"
	tag		= boiled_leather
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { boiled_leather = yes }
			}
		}
		condition = {
			type = has_advance
			value = { reinforced_leather = yes }
		}
		condition = { type = advance_focus value = boiled_leather }
	}

	mean_time_to_happen = {
		months = 250

		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.7
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = boiled_leather 
			}
	} 	
}
###########################
#rigid_leather discovery	  #	   
###########################
						   
province_event = {
	id = 3013

	name	= "TECH_DISCOVERY"
	tag		= rigid_leather
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { rigid_leather = yes }
			}
		}
		condition = {
			type = has_advance
			value = { boiled_leather = yes }
		}
		condition = { type = advance_focus value = rigid_leather }
	}

	mean_time_to_happen = {
		months = 500

		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.7
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = rigid_leather 
			}
	} 	
}
###########################
#scaled_leather discovery	  #	   
###########################
						   
province_event = {
	id = 3014

	name	= "TECH_DISCOVERY"
	tag		= scaled_leather
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { scaled_leather = yes }
			}
		}
		condition = {
			type = has_advance
			value = { rigid_leather = yes }
		}
		condition = { type = advance_focus value = scaled_leather }
	}

	mean_time_to_happen = {
		months = 1500

		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.7
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = scaled_leather 
			}
	} 	
}
###########################
#chained_leather discovery	  #	   
###########################
						   
province_event = {
	id = 3015

	name	= "TECH_DISCOVERY"
	tag		= chained_leather
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { chained_leather = yes }
			}
		}
		condition = { type = advance_focus value = chained_leather }
	}

	mean_time_to_happen = {
		months = 100

		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.7
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_advance
				value = { soft_leather = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_advance
				value = { reinforced_leather = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = chained_leather 
			}
	} 	
}
###########################
#light_chainmail discovery	  #	   
###########################
						   
province_event = {
	id = 3016

	name	= "TECH_DISCOVERY"
	tag		= light_chainmail
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { light_chainmail = yes }
			}
		}
		condition = {
			type = has_advance
			value = { chained_leather = yes }
		}
		condition = { type = advance_focus value = light_chainmail }
	}

	mean_time_to_happen = {
		months = 200

		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_advance
				value = { soft_leather = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_advance
				value = { reinforced_leather = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = light_chainmail 
			}
	} 	
}
###########################
#chainmail discovery	  #	   
###########################
						   
province_event = {
	id = 3017

	name	= "TECH_DISCOVERY"
	tag		= chainmail
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { chainmail = yes }
			}
		}
		condition = {
			type = has_advance
			value = { light_chainmail = yes }
		}
		condition = { type = advance_focus value = chainmail }
	}

	mean_time_to_happen = {
		months = 500

		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_advance
				value = { soft_leather = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_advance
				value = { reinforced_leather = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = chainmail 
			}
	} 	
}
###########################
#full_chainmail discovery	  #	   
###########################
						   
province_event = {
	id = 3018

	name	= "TECH_DISCOVERY"
	tag		= full_chainmail
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { full_chainmail = yes }
			}
		}
		condition = {
			type = has_advance
			value = { chainmail = yes }
		}
		condition = { type = advance_focus value = full_chainmail }
	}

	mean_time_to_happen = {
		months = 1000

		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = full_chainmail 
			}
	} 	
}
###########################
#plated_chainmail discovery	  #	   
###########################
						   
province_event = {
	id = 3019

	name	= "TECH_DISCOVERY"
	tag		= plated_chainmail
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { plated_chainmail = yes }
			}
		}
		condition = {
			type = has_advance
			value = { full_chainmail = yes }
		}
		condition = { type = advance_focus value = plated_chainmail }
	}

	mean_time_to_happen = {
		months = 2500

		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_advance
				value = { scalemail = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = plated_chainmail 
			}
	} 	
}
###########################
#quilted_coat discovery	  #	   
###########################
						   
province_event = {
	id = 3020

	name	= "TECH_DISCOVERY"
	tag		= quilted_coat
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { quilted_coat = yes }
			}
		}
		condition = { type = advance_focus value = quilted_coat }
	}

	mean_time_to_happen = {
		months = 125

		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.7
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_advance
				value = { soft_leather = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_advance
				value = { reinforced_leather = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = quilted_coat 
			}
	} 	
}
###########################
#scalemail discovery	  #	   
###########################
						   
province_event = {
	id = 3021

	name	= "TECH_DISCOVERY"
	tag		= scalemail
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { scalemail = yes }
			}
		}
		condition = {
			type = has_advance
			value = { quilted_coat = yes }
		}
		condition = { type = advance_focus value = scalemail }
	}

	mean_time_to_happen = {
		months = 250

		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_advance
				value = { scaled_leather = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_advance
				value = { reinforced_leather = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = scalemail 
			}
	} 	
}
###########################
#half_plate discovery	  #	   
###########################
						   
province_event = {
	id = 3022

	name	= "TECH_DISCOVERY"
	tag		= half_plate
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { half_plate = yes }
			}
		}
		condition = {
			type = has_advance
			value = { scalemail = yes }
		}
		condition = { type = advance_focus value = half_plate }
	}

	mean_time_to_happen = {
		months = 600

		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_advance
				value = { scaled_leather = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_advance
				value = { plated_chainmail = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.5
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.5
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = half_plate 
			}
	} 	
}
###########################
#platemail discovery	  #	   
###########################
						   
province_event = {
	id = 3023

	name	= "TECH_DISCOVERY"
	tag		= platemail
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { platemail = yes }
			}
		}
		condition = {
			type = has_advance
			value = { half_plate = yes }
		}
		condition = { type = advance_focus value = platemail }
	}

	mean_time_to_happen = {
		months = 1250

		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_advance
				value = { plated_chainmail = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.3
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.5
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.3
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.5
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = platemail 
			}
	} 	
}
###########################
#full_plate discovery	  #	   
###########################
						   
province_event = {
	id = 3024

	name	= "TECH_DISCOVERY"
	tag		= full_plate
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { full_plate = yes }
			}
		}
		condition = {
			type = has_advance
			value = { platemail = yes }
		}
		condition = { type = advance_focus value = full_plate }
	}

	mean_time_to_happen = {
		months = 2500

		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_advance
				value = { plated_chainmail = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.3
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.5
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.3
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.5
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = full_plate 
			}
	} 	
}
###########################
#handaxe discovery	  #	   
###########################
						   
province_event = {
	id = 3025

	name	= "TECH_DISCOVERY"
	tag		= handaxe
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { handaxe = yes }
			}
		}
		condition = { type = advance_focus value = handaxe }
	}

	mean_time_to_happen = {
		months = 40

		modifier = {
			condition = {
				type = terrain
				value = Forest
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.7
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = handaxe 
			}
	} 	
}
###########################
#warhammer discovery	  #	   
###########################
						   
province_event = {
	id = 3026

	name	= "TECH_DISCOVERY"
	tag		= warhammer
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { warhammer = yes }
			}
		}
		condition = {
			type = has_advance
			value = { handaxe = yes }
		}
		condition = { type = advance_focus value = warhammer }
	}

	mean_time_to_happen = {
		months = 100

		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = warhammer 
			}
	} 	
}
###########################
#mace discovery	  #	   
###########################
						   
province_event = {
	id = 3027

	name	= "TECH_DISCOVERY"
	tag		= mace
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { mace = yes }
			}
		}
		condition = {
			type = has_advance
			value = { warhammer = yes }
		}
		condition = { type = advance_focus value = mace }
	}

	mean_time_to_happen = {
		months = 250

		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = mace 
			}
	} 	
}
###########################
#morningstar discovery	  #	   
###########################
						   
province_event = {
	id = 3028

	name	= "TECH_DISCOVERY"
	tag		= morningstar
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { morningstar = yes }
			}
		}
		condition = {
			type = has_advance
			value = { mace = yes }
		}
		condition = { type = advance_focus value = morningstar }
	}

	mean_time_to_happen = {
		months = 500

		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = morningstar 
			}
	} 	
}
###########################
#battleaxe discovery	  #	   
###########################
						   
province_event = {
	id = 3029

	name	= "TECH_DISCOVERY"
	tag		= battleaxe
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { battleaxe = yes }
			}
		}
		condition = {
			type = has_advance
			value = { morningstar = yes }
		}
		condition = { type = advance_focus value = battleaxe }
	}

	mean_time_to_happen = {
		months = 1500

		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = battleaxe 
			}
	} 	
}
###########################
#shortsword discovery	  #	   
###########################
						   
province_event = {
	id = 3030

	name	= "TECH_DISCOVERY"
	tag		= shortsword
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { shortsword = yes }
			}
		}
		condition = { type = advance_focus value = shortsword }
	}

	mean_time_to_happen = {
		months = 75

		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = shortsword 
			}
	} 	
}
###########################
#broadsword discovery	  #	   
###########################
						   
province_event = {
	id = 3031

	name	= "TECH_DISCOVERY"
	tag		= broadsword
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { broadsword = yes }
			}
		}
		condition = {
			type = has_advance
			value = { shortsword = yes }
		}
		condition = { type = advance_focus value = broadsword }
	}

	mean_time_to_happen = {
		months = 250

		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = broadsword 
			}
	} 	
}
###########################
#longsword discovery	  #	   
###########################
						   
province_event = {
	id = 3032

	name	= "TECH_DISCOVERY"
	tag		= longsword
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { longsword = yes }
			}
		}
		condition = {
			type = has_advance
			value = { broadsword = yes }
		}
		condition = { type = advance_focus value = longsword }
	}

	mean_time_to_happen = {
		months = 500

		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = longsword 
			}
	} 	
}
###########################
#bastardsword discovery	  #	   
###########################
						   
province_event = {
	id = 3033

	name	= "TECH_DISCOVERY"
	tag		= bastardsword
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { bastardsword = yes }
			}
		}
		condition = {
			type = has_advance
			value = { longsword = yes }
		}
		condition = { type = advance_focus value = bastardsword }
	}

	mean_time_to_happen = {
		months = 1000

		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = bastardsword 
			}
	} 	
}
###########################
#greatsword discovery	  #	   
###########################
						   
province_event = {
	id = 3034

	name	= "TECH_DISCOVERY"
	tag		= greatsword
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { greatsword = yes }
			}
		}
		condition = {
			type = has_advance
			value = { bastardsword = yes }
		}
		condition = { type = advance_focus value = greatsword }
	}

	mean_time_to_happen = {
		months = 2500

		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = greatsword 
			}
	} 	
}
###########################
#longspear discovery	  #	   
###########################
						   
province_event = {
	id = 3035

	name	= "TECH_DISCOVERY"
	tag		= longspear
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { longspear = yes }
			}
		}
		condition = { type = advance_focus value = longspear }
	}

	mean_time_to_happen = {
		months = 40

		modifier = {
			condition = {
				type = terrain
				value = Forest
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { forestry = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.7
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = longspear 
			}
	} 	
}
###########################
#pike discovery	  #	   
###########################
						   
province_event = {
	id = 3036

	name	= "TECH_DISCOVERY"
	tag		= pike
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { pike = yes }
			}
		}
		condition = {
			type = has_advance
			value = { longspear = yes }
		}
		condition = { type = advance_focus value = pike }
	}

	mean_time_to_happen = {
		months = 100

		modifier = {
			condition = {
				type = terrain
				value = Forest
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { forestry = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.5
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = pike 
			}
	} 	
}
###########################
#lance discovery	  #	   
###########################
						   
province_event = {
	id = 3037

	name	= "TECH_DISCOVERY"
	tag		= lance
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { lance = yes }
			}
		}
		condition = {
			type = has_advance
			value = { pike = yes }
		}
		condition = { type = advance_focus value = lance }
	}

	mean_time_to_happen = {
		months = 250

		modifier = {
			condition = {
				type = terrain
				value = Forest
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { forestry = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = lance 
			}
	} 	
}
###########################
#polearm discovery	  #	   
###########################
						   
province_event = {
	id = 3038

	name	= "TECH_DISCOVERY"
	tag		= polearm
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { polearm = yes }
			}
		}
		condition = {
			type = has_advance
			value = { lance = yes }
		}
		condition = { type = advance_focus value = polearm }
	}

	mean_time_to_happen = {
		months = 500

		modifier = {
			condition = {
				type = terrain
				value = Forest
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { forestry = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.3
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = polearm 
			}
	} 	
}
###########################
#heavy_lance discovery	  #	   
###########################
						   
province_event = {
	id = 3039

	name	= "TECH_DISCOVERY"
	tag		= heavy_lance
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { heavy_lance = yes }
			}
		}
		condition = {
			type = has_advance
			value = { polearm = yes }
		}
		condition = { type = advance_focus value = heavy_lance }
	}

	mean_time_to_happen = {
		months = 1500

		modifier = {
			condition = {
				type = terrain
				value = Forest
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { forestry = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { armory = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = heavy_lance 
			}
	} 	
}
###########################
#battering_ram discovery	  #	   
###########################
						   
province_event = {
	id = 3040

	name	= "TECH_DISCOVERY"
	tag		= battering_ram
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { battering_ram = yes }
			}
		}
		condition = { type = advance_focus value = battering_ram }
	}

	mean_time_to_happen = {
		months = 65

		modifier = {
			condition = {
				type = terrain
				value = Forest
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { forestry = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { waracademy = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.7
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = battering_ram 
			}
	} 	
}
###########################
#siege_ladders discovery	  #	   
###########################
						   
province_event = {
	id = 3041

	name	= "TECH_DISCOVERY"
	tag		= siege_ladders
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { siege_ladders = yes }
			}
		}
		condition = {
			type = has_advance
			value = { battering_ram = yes }
		}
		condition = { type = advance_focus value = siege_ladders }
	}

	mean_time_to_happen = {
		months = 125

		modifier = {
			condition = {
				type = terrain
				value = Forest
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { forestry = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { waracademy = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = siege_ladders 
			}
	} 	
}
###########################
#siege_towers discovery	  #	   
###########################
						   
province_event = {
	id = 3042

	name	= "TECH_DISCOVERY"
	tag		= siege_towers
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { siege_towers = yes }
			}
		}
		condition = {
			type = has_advance
			value = { siege_ladders = yes }
		}
		condition = { type = advance_focus value = siege_towers }
	}

	mean_time_to_happen = {
		months = 350

		modifier = {
			condition = {
				type = terrain
				value = Forest
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { forestry = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { sawmill = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { waracademy = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = siege_towers 
			}
	} 	
}
###########################
#trebuchet discovery	  #	   
###########################
						   
province_event = {
	id = 3043

	name	= "TECH_DISCOVERY"
	tag		= trebuchet
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { trebuchet = yes }
			}
		}
		condition = {
			type = has_advance
			value = { siege_towers = yes }
		}
		condition = { type = advance_focus value = trebuchet }
	}

	mean_time_to_happen = {
		months = 750

		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { forestry = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { sawmill = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { waracademy = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = trebuchet 
			}
	} 	
}
###########################
#mangonel discovery	  #	   
###########################
						   
province_event = {
	id = 3044

	name	= "TECH_DISCOVERY"
	tag		= mangonel
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { mangonel = yes }
			}
		}
		condition = {
			type = has_advance
			value = { trebuchet = yes }
		}
		condition = { type = advance_focus value = mangonel }
	}

	mean_time_to_happen = {
		months = 2500

		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { forestry = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { sawmill = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { waracademy = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = mangonel 
			}
	} 	
}
###########################
#hill_fort discovery	  #	   
###########################
						   
province_event = {
	id = 3045

	name	= "TECH_DISCOVERY"
	tag		= hill_fort
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { hill_fort = yes }
			}
		}
		condition = { type = advance_focus value = hill_fort }
	}

	mean_time_to_happen = {
		months = 50

		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { forestry = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.7
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { waracademy = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = hill_fort 
			}
	} 	
}
###########################
#small_castle discovery	  #	   
###########################
						   
province_event = {
	id = 3046

	name	= "TECH_DISCOVERY"
	tag		= small_castle
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { small_castle = yes }
			}
		}
		condition = {
			type = has_advance
			value = { hill_fort = yes }
		}
		condition = { type = advance_focus value = small_castle }
	}

	mean_time_to_happen = {
		months = 150

		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { forestry = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { waracademy = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = small_castle 
			}
	} 	
}
###########################
#medium_castle discovery	  #	   
###########################
						   
province_event = {
	id = 3047

	name	= "TECH_DISCOVERY"
	tag		= medium_castle
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { medium_castle = yes }
			}
		}
		condition = {
			type = has_advance
			value = { small_castle = yes }
		}
		condition = { type = advance_focus value = medium_castle }
	}

	mean_time_to_happen = {
		months = 500

		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { sawmill = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { tilefactory = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { waracademy = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = medium_castle 
			}
	} 	
}
###########################
#large_castle discovery	  #	   
###########################
						   
province_event = {
	id = 3048

	name	= "TECH_DISCOVERY"
	tag		= large_castle
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { large_castle = yes }
			}
		}
		condition = {
			type = has_advance
			value = { medium_castle = yes }
		}
		condition = { type = advance_focus value = large_castle }
	}

	mean_time_to_happen = {
		months = 1000

		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { tilefactory = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { waracademy = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = large_castle 
			}
	} 	
}
###########################
#huge_castle discovery	  #	   
###########################
						   
province_event = {
	id = 3049

	name	= "TECH_DISCOVERY"
	tag		= huge_castle
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { huge_castle = yes }
			}
		}
		condition = {
			type = has_advance
			value = { large_castle = yes }
		}
		condition = { type = advance_focus value = huge_castle }
	}

	mean_time_to_happen = {
		months = 5000

		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { tilefactory = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { waracademy = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.75
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = huge_castle 
			}
	} 	
}
###########################
#defensive_terrain discovery	  #	   
###########################
						   
province_event = {
	id = 3050

	name	= "TECH_DISCOVERY"
	tag		= defensive_terrain
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { defensive_terrain = yes }
			}
		}
		condition = { type = advance_focus value = defensive_terrain }
	}

	mean_time_to_happen = {
		months = 75

		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { traininggrounds = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { waracademy = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = defensive_terrain 
			}
	} 	
}
###########################
#positional_combat discovery	  #	   
###########################
						   
province_event = {
	id = 3051

	name	= "TECH_DISCOVERY"
	tag		= positional_combat
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { positional_combat = yes }
			}
		}
		condition = {
			type = has_advance
			value = { defensive_terrain = yes }
		}
		condition = { type = advance_focus value = positional_combat }
	}

	mean_time_to_happen = {
		months = 150

		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { traininggrounds = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { waracademy = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = positional_combat 
			}
	} 	
}
###########################
#missile_barrage discovery	  #	   
###########################
						   
province_event = {
	id = 3052

	name	= "TECH_DISCOVERY"
	tag		= missile_barrage
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { missile_barrage = yes }
			}
		}
		condition = {
			type = has_advance
			value = { positional_combat = yes }
		}
		condition = { type = advance_focus value = missile_barrage }
	}

	mean_time_to_happen = {
		months = 300

		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { traininggrounds = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { waracademy = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = missile_barrage 
			}
	} 	
}
###########################
#drilled_pikers discovery	  #	   
###########################
						   
province_event = {
	id = 3053

	name	= "TECH_DISCOVERY"
	tag		= drilled_pikers
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { drilled_pikers = yes }
			}
		}
		condition = {
			type = has_advance
			value = { missile_barrage = yes }
		}
		condition = { type = advance_focus value = drilled_pikers }
	}

	mean_time_to_happen = {
		months = 1000

		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { traininggrounds = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { waracademy = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = drilled_pikers 
			}
	} 	
}
###########################
#unitorganization discovery	  #	   
###########################
						   
province_event = {
	id = 3054

	name	= "TECH_DISCOVERY"
	tag		= unitorganization
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { unitorganization = yes }
			}
		}
		condition = {
			type = has_advance
			value = { drilled_pikers = yes }
		}
		condition = { type = advance_focus value = unitorganization }
	}

	mean_time_to_happen = {
		months = 3000

		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { traininggrounds = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { waracademy = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = not
				value = {
					type = ruler_martial
					value = 2
				}
			}
			factor = 1.5
		}
		modifier = {
			condition = {
				type = not
				value = {
					type = ruler_martial
					value = 5
				}
			}
			factor = 1.2
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = unitorganization 
			}
	} 	
}
###########################
#offensive_terrain discovery	  #	   
###########################
						   
province_event = {
	id = 3055

	name	= "TECH_DISCOVERY"
	tag		= offensive_terrain
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { offensive_terrain = yes }
			}
		}
		condition = { type = advance_focus value = offensive_terrain }
	}

	mean_time_to_happen = {
		months = 75

		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { traininggrounds = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { waracademy = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}


	immidiate = {
		effect = { 
				type = add_advance 
				value = offensive_terrain 
			}
	} 	
}
###########################
#frontal_charge discovery	  #	   
###########################
						   
province_event = {
	id = 3056

	name	= "TECH_DISCOVERY"
	tag		= frontal_charge
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { frontal_charge = yes }
			}
		}
		condition = {
			type = has_advance
			value = { offensive_terrain = yes }
		}
		condition = { type = advance_focus value = frontal_charge }
	}

	mean_time_to_happen = {
		months = 150

		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { traininggrounds = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { waracademy = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = frontal_charge 
			}
	} 	
}
###########################
#reserves discovery	  #	   
###########################
						   
province_event = {
	id = 3057

	name	= "TECH_DISCOVERY"
	tag		= reserves
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { reserves = yes }
			}
		}
		condition = {
			type = has_advance
			value = { frontal_charge = yes }
		}
		condition = { type = advance_focus value = reserves}
	}

	mean_time_to_happen = {
		months = 300

		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { traininggrounds = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { waracademy = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = reserves 
			}
	} 	
}
###########################
#dismounted_knights discovery	  #	   
###########################
						   
province_event = {
	id = 3058

	name	= "TECH_DISCOVERY"
	tag		= dismounted_knights
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { dismounted_knights = yes }
			}
		}
		condition = {
			type = has_advance
			value = { reserves = yes }
		}
		condition = { type = advance_focus value = dismounted_knights }
	}

	mean_time_to_happen = {
		months = 1000

		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { traininggrounds = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { waracademy = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = dismounted_knights 
			}
	} 	
}
###########################
#hierarkic_command discovery	  #	   
###########################
						   
province_event = {
	id = 3059

	name	= "TECH_DISCOVERY"
	tag		= hierarkic_command
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { hierarkic_command = yes }
			}
		}
		condition = {
			type = has_advance
			value = { dismounted_knights = yes }
		}
		condition = { type = advance_focus value = hierarkic_command }
	}

	mean_time_to_happen = {
		months = 3000

		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { traininggrounds = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { waracademy = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = not
				value = {
					type = ruler_martial
					value = 3
				}
			}
			factor = 1.5
		}
		modifier = {
			condition = {
				type = not
				value = {
					type = ruler_martial
					value = 5
				}
			}
			factor = 1.2
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 8
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_martial
				value = 13
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = martial_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = misguided_warrior }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = tough_soldier }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = knowledged_tactician }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = brilliant_strategist }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = hierarkic_command 
			}
	} 	
}

###########################
#two_field_system discovery	  #	   
###########################
						   
province_event = {
	id = 3060

	name	= "TECH_DISCOVERY"
	tag		= two_field_system
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { two_field_system = yes }
			}
		}
		condition = { type = advance_focus value = two_field_system }
	}

	mean_time_to_happen = {
		months = 50

		modifier = {
			condition = {
				type = terrain
				value = Plains
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = terrain
				value = Desert
			}
			factor = 1.15
		}
		modifier = {
			condition = {
				type = terrain
				value = Mountains
			}
			factor = 1.15
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.3
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 1.2
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.85
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = two_field_system 
			}
	} 	
}
###########################
#three_field_system discovery	  #	   
###########################
						   
province_event = {
	id = 3061

	name	= "TECH_DISCOVERY"
	tag		= three_field_system
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { three_field_system = yes }
			}
		}
		condition = {
			type = has_advance
			value = { two_field_system = yes }
		}
		condition = { type = advance_focus value = three_field_system }
	}

	mean_time_to_happen = {
		months = 125

		modifier = {
			condition = {
				type = terrain
				value = Plains
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = terrain
				value = Desert
			}
			factor = 1.15
		}
		modifier = {
			condition = {
				type = terrain
				value = Mountains
			}
			factor = 1.15
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.3
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 1.2
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.85
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = three_field_system 
			}
	} 	
}
###########################
#stripe_ploughing discovery	  #	   
###########################
						   
province_event = {
	id = 3062

	name	= "TECH_DISCOVERY"
	tag		= stripe_ploughing
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { stripe_ploughing = yes }
			}
		}
		condition = {
			type = has_advance
			value = { three_field_system = yes }
		}
		condition = { type = advance_focus value = stripe_ploughing }
	}

	mean_time_to_happen = {
		months = 500

		modifier = {
			condition = {
				type = terrain
				value = Plains
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = terrain
				value = Desert
			}
			factor = 1.1
		}
		modifier = {
			condition = {
				type = terrain
				value = Mountains
			}
			factor = 1.1
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 1.2
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.85
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = stripe_ploughing 
			}
	} 	
}
###########################
#soil_amelioration discovery	  #	   
###########################
						   
province_event = {
	id = 3063

	name	= "TECH_DISCOVERY"
	tag		= soil_amelioration
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { soil_amelioration = yes }
			}
		}
		condition = {
			type = has_advance
			value = { stripe_ploughing = yes }
		}
		condition = { type = advance_focus value = soil_amelioration }
	}

	mean_time_to_happen = {
		months = 1500

		modifier = {
			condition = {
				type = terrain
				value = Plains
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = terrain
				value = Desert
			}
			factor = 1.1
		}
		modifier = {
			condition = {
				type = terrain
				value = Mountains
			}
			factor = 1.1
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.5
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 1.2
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.85
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = soil_amelioration 
			}
	} 	
}
###########################
#rooting_out discovery	  #	   
###########################
						   
province_event = {
	id = 3064

	name	= "TECH_DISCOVERY"
	tag		= rooting_out
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { rooting_out = yes }
			}
		}
		condition = {
			type = has_advance
			value = { soil_amelioration = yes }
		}
		condition = { type = advance_focus value = rooting_out }
	}

	mean_time_to_happen = {
		months = 5000

		modifier = {
			condition = {
				type = terrain
				value = Plains
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = terrain
				value = Desert
			}
			factor = 1.1
		}
		modifier = {
			condition = {
				type = terrain
				value = Mountains
			}
			factor = 1.1
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.5
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 1.2
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.85
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = rooting_out 
			}
	} 	
}
###########################
#wood_plows discovery	  #	   
###########################
						   
province_event = {
	id = 3065

	name	= "TECH_DISCOVERY"
	tag		= wood_plows
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { wood_plows = yes }
			}
		}
		condition = { type = advance_focus value = wood_plows }
	}

	mean_time_to_happen = {
		months = 50

		modifier = {
			condition = {
				type = terrain
				value = Plains
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = terrain
				value = Desert
			}
			factor = 1.1
		}
		modifier = {
			condition = {
				type = terrain
				value = Mountains
			}
			factor = 1.15
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { forestry = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 1.2
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = wood_plows 
			}
	} 	
}
###########################
#ironedged_wood_plows discovery	  #	   
###########################
						   
province_event = {
	id = 3066

	name	= "TECH_DISCOVERY"
	tag		= ironedged_wood_plows
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { ironedged_wood_plows = yes }
			}
		}
		condition = {
			type = has_advance
			value = { wood_plows = yes }
		}
		condition = { type = advance_focus value = ironedged_wood_plows }
	}

	mean_time_to_happen = {
		months = 125

		modifier = {
			condition = {
				type = terrain
				value = Plains
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = terrain
				value = Desert
			}
			factor = 1.1
		}
		modifier = {
			condition = {
				type = terrain
				value = Mountains
			}
			factor = 1.15
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 1.2
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = ironedged_wood_plows 
			}
	} 	
}
###########################
#ironplows discovery	  #	   
###########################
						   
province_event = {
	id = 3067

	name	= "TECH_DISCOVERY"
	tag		= ironplows
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { ironplows = yes }
			}
		}
		condition = {
			type = has_advance
			value = { ironedged_wood_plows = yes }
		}
		condition = { type = advance_focus value = ironplows }
	}

	mean_time_to_happen = {
		months = 500

		modifier = {
			condition = {
				type = terrain
				value = Plains
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = terrain
				value = Desert
			}
			factor = 1.1
		}
		modifier = {
			condition = {
				type = terrain
				value = Mountains
			}
			factor = 1.1
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.5
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 1.2
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = ironplows 
			}
	} 	
}
###########################
#pitchforks_and_harrows discovery	  #	   
###########################
						   
province_event = {
	id = 3068

	name	= "TECH_DISCOVERY"
	tag		= pitchforks_and_harrows
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { pitchforks_and_harrows = yes }
			}
		}
		condition = {
			type = has_advance
			value = { ironplows = yes }
		}
		condition = { type = advance_focus value = pitchforks_and_harrows }
	}

	mean_time_to_happen = {
		months = 1500

		modifier = {
			condition = {
				type = terrain
				value = Plains
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = terrain
				value = Desert
			}
			factor = 1.1
		}
		modifier = {
			condition = {
				type = terrain
				value = Mountains
			}
			factor = 1.1
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.5
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { smithy = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.5
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 1.2
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = pitchforks_and_harrows 
			}
	} 	
}
###########################
#padded_horsecollars discovery	  #	   
###########################
						   
province_event = {
	id = 3069

	name	= "TECH_DISCOVERY"
	tag		= padded_horsecollars
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { padded_horsecollars = yes }
			}
		}
		condition = {
			type = has_advance
			value = { pitchforks_and_harrows = yes }
		}
		condition = { type = advance_focus value = padded_horsecollars }
	}

	mean_time_to_happen = {
		months = 5000

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.5
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 1.2
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = padded_horsecollars 
			}
	} 	
}
###########################
#chickens discovery	  #	   
###########################

province_event = {
	id = 3070

	name	= "TECH_DISCOVERY"
	tag		= chickens
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { chickens = yes }
			}
		}
		condition = { type = advance_focus value = chickens }
	}

	mean_time_to_happen = {
		months = 50

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.3
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 1.2
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = chickens 
			}
	} 	
}
###########################
#goats discovery	  #	   
###########################
						   
province_event = {
	id = 3071

	name	= "TECH_DISCOVERY"
	tag		= goats
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { goats = yes }
			}
		}
		condition = {
			type = has_advance
			value = { chickens = yes }
		}
		condition = { type = advance_focus value = goats }
	}

	mean_time_to_happen = {
		months = 125

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.3
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 1.2
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = goats 
			}
	} 	
}
###########################
#pigs discovery	  #	   
###########################
						   
province_event = {
	id = 3072

	name	= "TECH_DISCOVERY"
	tag		= pigs
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { pigs = yes }
			}
		}
		condition = {
			type = has_advance
			value = { goats = yes }
		}
		condition = { type = advance_focus value = pigs }
	}

	mean_time_to_happen = {
		months = 500

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 1.2
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = pigs 
			}
	} 	
}
###########################
#sheep discovery	  #	   
###########################
						   
province_event = {
	id = 3073

	name	= "TECH_DISCOVERY"
	tag		= sheep
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { sheep = yes }
			}
		}
		condition = {
			type = has_advance
			value = { pigs = yes }
		}
		condition = { type = advance_focus value = sheep }
	}

	mean_time_to_happen = {
		months = 1500

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.5
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 1.2
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = sheep 
			}
	} 	
}
###########################
#cows discovery	  #	   
###########################
						   
province_event = {
	id = 3074

	name	= "TECH_DISCOVERY"
	tag		= cows
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { cows = yes }
			}
		}
		condition = {
			type = has_advance
			value = { sheep = yes }
		}
		condition = { type = advance_focus value = cows }
	}

	mean_time_to_happen = {
		months = 5000

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.5
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 1.2
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = cows 
			}
	} 	
}
###########################
#saltrefinery discovery	  #	   
###########################
						   
province_event = {
	id = 3075

	name	= "TECH_DISCOVERY"
	tag		= saltrefinery
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { saltrefinery = yes }
			}
		}
		condition = { type = advance_focus value = saltrefinery }
	}

	mean_time_to_happen = {
		months = 65

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.7
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { fishing_wharf = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.3
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.85
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = saltrefinery 
			}
	} 	
}
###########################
#glassblowing discovery	  #	   
###########################
						   
province_event = {
	id = 3076

	name	= "TECH_DISCOVERY"
	tag		= glassblowing
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { glassblowing = yes }
			}
		}
		condition = {
			type = has_advance
			value = { saltrefinery = yes }
		}
		condition = { type = advance_focus value = glassblowing }
	}

	mean_time_to_happen = {
		months = 150

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.3
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.85
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = glassblowing 
			}
	} 	
}
###########################
#clothmaking discovery	  #	   
###########################
						   
province_event = {
	id = 3077

	name	= "TECH_DISCOVERY"
	tag		= clothmaking
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { clothmaking = yes }
			}
		}
		condition = {
			type = has_advance
			value = { glassblowing = yes }
		}
		condition = { type = advance_focus value = clothmaking }
	}

	mean_time_to_happen = {
		months = 750

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.7
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.85
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = clothmaking 
			}
	} 	
}
###########################
#sugerrefinery discovery	  #	   
###########################
						   
province_event = {
	id = 3078

	name	= "TECH_DISCOVERY"
	tag		= sugerrefinery
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { sugerrefinery = yes }
			}
		}
		condition = {
			type = has_advance
			value = { clothmaking = yes }
		}
		condition = { type = advance_focus value = sugerrefinery }
	}

	mean_time_to_happen = {
		months = 2000

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.55
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.85
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = sugerrefinery 
			}
	} 	
}
###########################
#papermaking discovery	  #	   
###########################
						   
province_event = {
	id = 3079

	name	= "TECH_DISCOVERY"
	tag		= papermaking
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { papermaking = yes }
			}
		}
		condition = {
			type = has_advance
			value = { sugerrefinery = yes }
		}
		condition = { type = advance_focus value = papermaking }
	}

	mean_time_to_happen = {
		months = 5000

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.55
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.85
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = papermaking 
			}
	} 	
}
###########################
#stonepit discovery	  #	   
###########################
						   
province_event = {
	id = 3080

	name	= "TECH_DISCOVERY"
	tag		= stonepit
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { stonepit = yes }
			}
		}
		condition = { type = advance_focus value = stonepit }
	}

	mean_time_to_happen = {
		months = 65

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.3
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.85
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = stonepit 
			}
	} 	
}
###########################
#coalpit discovery	  #	   
###########################
						   
province_event = {
	id = 3081

	name	= "TECH_DISCOVERY"
	tag		= coalpit
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { coalpit = yes }
			}
		}
		condition = {
			type = has_advance
			value = { stonepit = yes }
		}
		condition = { type = advance_focus value = coalpit }
	}

	mean_time_to_happen = {
		months = 150

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.3
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.85
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = coalpit 
			}
	} 	
}
###########################
#ironworks discovery	  #	   
###########################
						   
province_event = {
	id = 3082

	name	= "TECH_DISCOVERY"
	tag		= ironworks
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { ironworks = yes }
			}
		}
		condition = {
			type = has_advance
			value = { coalpit= yes }
		}
		condition = { type = advance_focus value = ironworks }
	}

	mean_time_to_happen = {
		months = 600

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.85
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = ironworks 
			}
	} 	
}
###########################
#percussion_drilling discovery	  #	   
###########################
						   
province_event = {
	id = 3083

	name	= "TECH_DISCOVERY"
	tag		= percussion_drilling
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { percussion_drilling = yes }
			}
		}
		condition = {
			type = has_advance
			value = { ironworks = yes }
		}
		condition = { type = advance_focus value = percussion_drilling }
	}

	mean_time_to_happen = {
		months = 2000

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.5
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.85
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = percussion_drilling 
			}
	} 	
}
###########################
#cast_iron discovery	  #	   
###########################
						   
province_event = {
	id = 3084

	name	= "TECH_DISCOVERY"
	tag		= cast_iron
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { cast_iron = yes }
			}
		}
		condition = {
			type = has_advance
			value = { percussion_drilling = yes }
		}
		condition = { type = advance_focus value = cast_iron }
	}

	mean_time_to_happen = {
		months = 5000

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.55
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.97
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.85
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.8
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = cast_iron 
			}
	} 	
}
###########################
#basilican_structures discovery	  #	   
###########################
						   
province_event = {
	id = 3085

	name	= "TECH_DISCOVERY"
	tag		= basilican_structures
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { basilican_structures = yes }
			}
		}
		condition = { type = advance_focus value = basilican_structures }
	}

	mean_time_to_happen = {
		months = 50

		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 1.35
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { tilefactory = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_advance
				value = { stonepit = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.3
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 2
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = basilican_structures 
			}
	} 	
}
###########################
#brickwork_structures discovery	  #	   
###########################
						   
province_event = {
	id = 3086

	name	= "TECH_DISCOVERY"
	tag		= brickwork_structures
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { brickwork_structures = yes }
			}
		}
		condition = {
			type = has_advance
			value = { basilican_structures = yes }
		}
		condition = { type = advance_focus value = brickwork_structures }
	}

	mean_time_to_happen = {
		months = 150

		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 1.25
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { tilefactory = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_advance
				value = { stonepit = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.3
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 2
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = brickwork_structures 
			}
	} 	
}
###########################
#romanesque_vaulting discovery	  #	   
###########################
						   
province_event = {
	id = 3087

	name	= "TECH_DISCOVERY"
	tag		= romanesque_vaulting
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { romanesque_vaulting = yes }
			}
		}
		condition = {
			type = has_advance
			value = { brickwork_structures = yes }
		}
		condition = { type = advance_focus value = romanesque_vaulting }
	}

	mean_time_to_happen = {
		months = 500

		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 1.35
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { tilefactory = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_advance
				value = { stonepit = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 2
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = romanesque_vaulting 
			}
	} 	
}
###########################
#cylindrical_structures discovery	  #	   
###########################
						   
province_event = {
	id = 3088

	name	= "TECH_DISCOVERY"
	tag		= cylindrical_structures
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { cylindrical_structures = yes }
			}
		}
		condition = {
			type = has_advance
			value = { romanesque_vaulting = yes }
		}
		condition = { type = advance_focus value = cylindrical_structures }
	}

	mean_time_to_happen = {
		months = 1500

		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { tilefactory = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_advance
				value = { stonepit = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.55
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 2
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = cylindrical_structures 
			}
	} 	
}
###########################
#gothic_buttresses discovery	  #	   
###########################
						   
province_event = {
	id = 3089

	name	= "TECH_DISCOVERY"
	tag		= gothic_buttresses
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { gothic_buttresses = yes }
			}
		}
		condition = {
			type = has_advance
			value = { cylindrical_structures = yes }
		}
		condition = { type = advance_focus value = gothic_buttresses }
	}

	mean_time_to_happen = {
		months = 3000

		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { tilefactory = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_advance
				value = { stonepit = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.55
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 0.8
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 2
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = gothic_buttresses 
			}
	} 	
}
###########################
#road_building discovery	  #	   
###########################
						   
province_event = {
	id = 3090

	name	= "TECH_DISCOVERY"
	tag		= road_building
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { road_building = yes }
			}
		}
		condition = { type = advance_focus value = road_building }
	}

	mean_time_to_happen = {
		months = 50

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.5
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.5
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { tilefactory = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_advance
				value = { stonepit = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.3
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.95
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = road_building 
			}
	} 	
}
###########################
#large_ship_building discovery	  #	   
###########################
						   
province_event = {
	id = 3091

	name	= "TECH_DISCOVERY"
	tag		= large_ship_building
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { large_ship_building = yes }
			}
		}
		condition = {
			type = has_advance
			value = { road_building = yes }
		}
		condition = { type = advance_focus value = large_ship_building }
	}

	mean_time_to_happen = {
		months = 125

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.5
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.5
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.5
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { forestry = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { sawmill = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.95
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = large_ship_building 
			}
	} 	
}
###########################
#windwheel discovery	  #	   
###########################
						   
province_event = {
	id = 3092

	name	= "TECH_DISCOVERY"
	tag		= windwheel
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { windwheel = yes }
			}
		}
		condition = {
			type = has_advance
			value = { large_ship_building = yes }
		}
		condition = { type = advance_focus value = windwheel }
	}

	mean_time_to_happen = {
		months = 500

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { sawmill = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.5
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.95
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = windwheel 
			}
	} 	
}
###########################
#waterwheel discovery	  #	   
###########################
						   
province_event = {
	id = 3093

	name	= "TECH_DISCOVERY"
	tag		= waterwheel
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { waterwheel = yes }
			}
		}
		condition = {
			type = has_advance
			value = { windwheel = yes }
		}
		condition = { type = advance_focus value = waterwheel }
	}

	mean_time_to_happen = {
		months = 1500

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { sawmill = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.5
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.95
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = waterwheel 
			}
	} 	
}
###########################
#black_coal discovery	  #	   
###########################
						   
province_event = {
	id = 3094

	name	= "TECH_DISCOVERY"
	tag		= black_coal
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { black_coal = yes }
			}
		}
		condition = {
			type = has_advance
			value = { waterwheel = yes }
		}
		condition = { type = advance_focus value = black_coal }
	}

	mean_time_to_happen = {
		months = 4000

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { mine = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { improved_mine = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.55
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.95
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = black_coal 
			}
	} 	
}
###########################
#minor_merchant_houses discovery	  #	   
###########################
						   
province_event = {
	id = 3095

	name	= "TECH_DISCOVERY"
	tag		= minor_merchant_houses
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { minor_merchant_houses = yes }
			}
		}
		condition = { type = advance_focus value = minor_merchant_houses }
	}

	mean_time_to_happen = {
		months = 50

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.3
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = minor_merchant_houses 
			}
	} 	
}
###########################
#local_merchant_houses discovery	  #	   
###########################
						   
province_event = {
	id = 3096

	name	= "TECH_DISCOVERY"
	tag		= local_merchant_houses
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { local_merchant_houses = yes }
			}
		}
		condition = {
			type = has_advance
			value = { minor_merchant_houses = yes }
		}
		condition = { type = advance_focus value = local_merchant_houses }
	}

	mean_time_to_happen = {
		months = 125

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.3
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = local_merchant_houses 
			}
	} 	
}
###########################
#mint discovery	  #	   
###########################
						   
province_event = {
	id = 3097

	name	= "TECH_DISCOVERY"
	tag		= mint
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { mint = yes }
			}
		}
		condition = {
			type = has_advance
			value = { local_merchant_houses = yes }
		}
		condition = { type = advance_focus value = mint }
	}

	mean_time_to_happen = {
		months = 500

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = mint 
			}
	} 	
}
###########################
#guilds discovery	  #	   
###########################
						   
province_event = {
	id = 3098

	name	= "TECH_DISCOVERY"
	tag		= guilds
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { guilds = yes }
			}
		}
		condition = {
			type = has_advance
			value = { mint = yes }
		}
		condition = { type = advance_focus value = guilds }
	}

	mean_time_to_happen = {
		months = 1500

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.5
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = guilds 
			}
	} 	
}
###########################
#reknown_merchant_houses discovery	  #	   
###########################
						   
province_event = {
	id = 3099

	name	= "TECH_DISCOVERY"
	tag		= reknown_merchant_houses
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { reknown_merchant_houses = yes }
			}
		}
		condition = {
			type = has_advance
			value = { guilds = yes }
		}
		condition = { type = advance_focus value = reknown_merchant_houses }
	}

	mean_time_to_happen = {
		months = 4000

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.55
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = reknown_merchant_houses 
			}
	} 	
}
###########################
#business_contracts discovery	  #	   
###########################
						   
province_event = {
	id = 3100

	name	= "TECH_DISCOVERY"
	tag		= business_contracts
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { business_contracts = yes }
			}
		}
		condition = { type = advance_focus value = business_contracts }
	}

	mean_time_to_happen = {
		months = 50

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.3
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = business_contracts 
			}
	} 	
}
###########################
#promissory_note discovery	  #	   
###########################
						   
province_event = {
	id = 3101

	name	= "TECH_DISCOVERY"
	tag		= promissory_note
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { promissory_note = yes }
			}
		}
		condition = {
			type = has_advance
			value = { business_contracts = yes }
		}
		condition = { type = advance_focus value = promissory_note }
	}

	mean_time_to_happen = {
		months = 125

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.3
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = promissory_note 
			}
	} 	
}
###########################
#letters_of_credit discovery	  #	   
###########################
						   
province_event = {
	id = 3102

	name	= "TECH_DISCOVERY"
	tag		= letters_of_credit
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { letters_of_credit = yes }
			}
		}
		condition = {
			type = has_advance
			value = { promissory_note = yes }
		}
		condition = { type = advance_focus value = letters_of_credit }
	}

	mean_time_to_happen = {
		months = 500

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = letters_of_credit 
			}
	} 	
}
###########################
#double_entry_bookkeeping discovery	  #	   
###########################
						   
province_event = {
	id = 3103

	name	= "TECH_DISCOVERY"
	tag		= double_entry_bookkeeping
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { double_entry_bookkeeping = yes }
			}
		}
		condition = {
			type = has_advance
			value = { letters_of_credit = yes }
		}
		condition = { type = advance_focus value = double_entry_bookkeeping }
	}

	mean_time_to_happen = {
		months = 1500

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.5
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = double_entry_bookkeeping 
			}
	} 	
}
###########################
#foreign_accreditation discovery	  #	   
###########################
						   
province_event = {
	id = 3104

	name	= "TECH_DISCOVERY"
	tag		= foreign_accreditation
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { foreign_accreditation = yes }
			}
		}
		condition = {
			type = has_advance
			value = { double_entry_bookkeeping = yes }
		}
		condition = { type = advance_focus value = foreign_accreditation }
	}

	mean_time_to_happen = {
		months = 5000

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.55
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 10
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 10
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.25
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 10
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.98
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = foreign_accreditation 
			}
	} 	
}
###########################
#annual_sailing discovery	  #	   
###########################
						   
province_event = {
	id = 3105

	name	= "TECH_DISCOVERY"
	tag		= annual_sailing
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { annual_sailing = yes }
			}
		}
		condition = { type = advance_focus value = annual_sailing }
	}

	mean_time_to_happen = {
		months = 50

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.3
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.85
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = annual_sailing 
			}
	} 	
}
###########################
#local_fairs discovery	  #	   
###########################
						   
province_event = {
	id = 3106

	name	= "TECH_DISCOVERY"
	tag		= local_fairs
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { local_fairs = yes }
			}
		}
		condition = {
			type = has_advance
			value = { annual_sailing = yes }
		}
		condition = { type = advance_focus value = local_fairs }
	}

	mean_time_to_happen = {
		months = 125

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = not value = { type = atwar } }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 2.5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 1.5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 2.5
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.85
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = local_fairs 
			}
	} 	
}
###########################
#distant_trading discovery	  #	   
###########################
						   
province_event = {
	id = 3107

	name	= "TECH_DISCOVERY"
	tag		= distant_trading
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { distant_trading = yes }
			}
		}
		condition = {
			type = has_advance
			value = { local_fairs = yes }
		}
		condition = { type = advance_focus value = distant_trading }
	}

	mean_time_to_happen = {
		months = 500

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.5
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_diplomacy
				value = 8
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_diplomacy
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_diplomacy
				value = 13
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 10
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 10
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 10
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 10
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.85
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = distant_trading 
			}
	} 	
}
###########################
#exotic_trading discovery	  #	   
###########################
						   
province_event = {
	id = 3108

	name	= "TECH_DISCOVERY"
	tag		= exotic_trading
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { exotic_trading = yes }
			}
		}
		condition = {
			type = has_advance
			value = { distant_trading = yes }
		}
		condition = { type = advance_focus value = exotic_trading }
	}

	mean_time_to_happen = {
		months = 1500

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.55
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_diplomacy
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_diplomacy
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_diplomacy
				value = 13
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 10
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 10
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 10
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 10
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.85
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = exotic_trading 
			}
	} 	
}
###########################
#international_fairs discovery	  #	   
###########################
						   
province_event = {
	id = 3109

	name	= "TECH_DISCOVERY"
	tag		= international_fairs
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { international_fairs = yes }
			}
		}
		condition = {
			type = has_advance
			value = { exotic_trading = yes }
		}
		condition = { type = advance_focus value = international_fairs }
	}

	mean_time_to_happen = {
		months = 5000

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.6
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_diplomacy
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_diplomacy
				value = 10
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_diplomacy
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = hole_in_the_pocket }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = proven_accountant }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = fortune_builder }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = midas_touched }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 10
		}
		modifier = {
			condition = { type = has_province_effect value = { bubonic_plague = yes } }
			factor = 10
		}
		modifier = {
			condition = { type = has_province_effect value = { pneumonic_plague = yes } }
			factor = 10
		}
		modifier = {
			condition = { type = has_province_effect value = { malaria = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { dysentery = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { small_pox = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { typhoid_fever = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { struggling = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_province_effect value = { poor = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_province_effect value = { prosperous = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_province_effect value = { rich = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_province_effect value = { looted = yes } }
			factor = 5
		}
		modifier = {
			condition = { type = has_province_effect value = { revolt = yes } }
			factor = 10
		}
		modifier = { 
			condition = { type = has_advance value = { aristotelian_logics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { scholastics = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { astrology = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { natural_philosophy = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { science = yes } }
			factor = 0.85
		}
		modifier = { 
			condition = { type = has_advance value = { ascetism = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { apostolic_poverty = yes } }
			factor = 0.95
		}
		modifier = { 
			condition = { type = has_advance value = { critical_bible_interpretations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { bible_translations = yes } }
			factor = 0.9
		}
		modifier = { 
			condition = { type = has_advance value = { critical_thinking = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = international_fairs 
			}
	} 	
}
###########################
#divine_rights discovery	  #	   
###########################
						   
province_event = {
	id = 3110

	name	= "TECH_DISCOVERY"
	tag		= divine_rights
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { divine_rights = yes }
			}
		}
		condition = { type = advance_focus value = divine_rights }
	}

	mean_time_to_happen = {
		months = 75

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.7
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_intrigue
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_intrigue
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_intrigue
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = naive_wirepuller }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = flamboyant_schemer }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = intricate_webweaver }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = illusive_shadow }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { royal_preorgatory_law = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { feudal_contract_law = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { traditional_custom_law = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_law value = { popular_law = yes } }
			factor = 1.25
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = divine_rights 
			}
	} 	
}
###########################
#chronicle_writing discovery	  #	   
###########################
						   
province_event = {
	id = 3111

	name	= "TECH_DISCOVERY"
	tag		= chronicle_writing
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { chronicle_writing = yes }
			}
		}
		condition = {
			type = has_advance
			value = { divine_rights = yes }
		}
		condition = { type = advance_focus value = chronicle_writing }
	}

	mean_time_to_happen = {
		months = 250

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_diplomacy
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_diplomacy
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_diplomacy
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = amateurish_pettifogger }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = proven_dealbreaker }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = charismatic_negotiator }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = grey_eminence }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { royal_preorgatory_law = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { feudal_contract_law = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { traditional_custom_law = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { popular_law = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = chronicle_writing 
			}
	} 	
}
###########################
#romantic_poetry discovery	  #	   
###########################
						   
province_event = {
	id = 3112

	name	= "TECH_DISCOVERY"
	tag		= romantic_poetry
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { romantic_poetry = yes }
			}
		}
		condition = {
			type = has_advance
			value = { chronicle_writing = yes }
		}
		condition = { type = advance_focus value = romantic_poetry }
	}

	mean_time_to_happen = {
		months = 500

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.5
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_intrigue
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_intrigue
				value = 10
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_intrigue
				value = 13
			}
			factor = 0.95
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = amateurish_pettifogger }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = proven_dealbreaker }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = charismatic_negotiator }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = grey_eminence }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { royal_preorgatory_law = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { feudal_contract_law = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { traditional_custom_law = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_law value = { popular_law = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 1.15
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = romantic_poetry 
			}
	} 	
}
###########################
#heraldry discovery	  #	   
###########################
						   
province_event = {
	id = 3113

	name	= "TECH_DISCOVERY"
	tag		= heraldry
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { heraldry = yes }
			}
		}
		condition = {
			type = has_advance
			value = { romantic_poetry = yes }
		}
		condition = { type = advance_focus value = heraldry }
	}

	mean_time_to_happen = {
		months = 1000

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.55
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_diplomacy
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_diplomacy
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_diplomacy
				value = 13
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = amateurish_pettifogger }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = proven_dealbreaker }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = charismatic_negotiator }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = grey_eminence }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { royal_preorgatory_law = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { feudal_contract_law = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_law value = { traditional_custom_law = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { popular_law = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 1.15
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = heraldry 
			}
	} 	
}
###########################
#oblige_noblesse discovery	  #	   
###########################
						   
province_event = {
	id = 3114

	name	= "TECH_DISCOVERY"
	tag		= oblige_noblesse
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { oblige_noblesse = yes }
			}
		}
		condition = {
			type = has_advance
			value = { heraldry = yes }
		}
		condition = { type = advance_focus value = oblige_noblesse }
	}

	mean_time_to_happen = {
		months = 2000

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = noble_power
				value = 0.55
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_intrigue
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_intrigue
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_intrigue
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = naive_wirepuller }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = flamboyant_schemer }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = intricate_webweaver }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = illusive_shadow }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { royal_preorgatory_law = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { feudal_contract_law = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { traditional_custom_law = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { popular_law = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 0.85
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = oblige_noblesse 
			}
	} 	
}
###########################
#divine_duty discovery	  #	   
###########################
						   
province_event = {
	id = 3115

	name	= "TECH_DISCOVERY"
	tag		= divine_duty
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { divine_duty = yes }
			}
		}
		condition = { type = advance_focus value = divine_duty }
	}

	mean_time_to_happen = {
		months = 75

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.5
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { royal_preorgatory_law = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { feudal_contract_law = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_law value = { traditional_custom_law = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { popular_law = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 0.9
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = divine_duty 
			}
	} 	
}
###########################
#jongleurs discovery	  #	   
###########################
						   
province_event = {
	id = 3116

	name	= "TECH_DISCOVERY"
	tag		= jongleurs
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { jongleurs = yes }
			}
		}
		condition = {
			type = has_advance
			value = { divine_duty = yes }
		}
		condition = { type = advance_focus value = jongleurs }
	}

	mean_time_to_happen = {
		months = 250

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.55
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = amateurish_pettifogger }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = proven_dealbreaker }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = charismatic_negotiator }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = grey_eminence }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { royal_preorgatory_law = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { feudal_contract_law = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_law value = { traditional_custom_law = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { popular_law = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 1.2
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = jongleurs 
			}
	} 	
}
###########################
#troubadours discovery	  #	   
###########################
						   
province_event = {
	id = 3117

	name	= "TECH_DISCOVERY"
	tag		= troubadours
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { troubadours = yes }
			}
		}
		condition = {
			type = has_advance
			value = { jongleurs = yes }
		}
		condition = { type = advance_focus value = troubadours }
	}

	mean_time_to_happen = {
		months = 500

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.55
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = amateurish_pettifogger }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = proven_dealbreaker }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = charismatic_negotiator }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = grey_eminence }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { royal_preorgatory_law = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { feudal_contract_law = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_law value = { traditional_custom_law = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { popular_law = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 1.25
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = troubadours 
			}
	} 	
}
###########################
#miracle_plays discovery	  #	   
###########################
						   
province_event = {
	id = 3118

	name	= "TECH_DISCOVERY"
	tag		= miracle_plays
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { miracle_plays = yes }
			}
		}
		condition = {
			type = has_advance
			value = { troubadours = yes }
		}
		condition = { type = advance_focus value = miracle_plays }
	}

	mean_time_to_happen = {
		months = 1000

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.55
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = naive_wirepuller }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = flamboyant_schemer }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = intricate_webweaver }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = illusive_shadow }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { royal_preorgatory_law = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { feudal_contract_law = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_law value = { traditional_custom_law = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { popular_law = yes } }
			factor = 0.8
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 1.15
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = miracle_plays 
			}
	} 	
}
###########################
#carnivals discovery	  #	   
###########################
						   
province_event = {
	id = 3119

	name	= "TECH_DISCOVERY"
	tag		= carnivals
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { carnivals = yes }
			}
		}
		condition = {
			type = has_advance
			value = { miracle_plays = yes }
		}
		condition = { type = advance_focus value = carnivals }
	}

	mean_time_to_happen = {
		months = 2000

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = peasant_power
				value = 0.6
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = amateurish_pettifogger }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = proven_dealbreaker }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = charismatic_negotiator }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = grey_eminence }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { royal_preorgatory_law = yes } }
			factor = 1.2
		}
		modifier = {
			condition = { type = has_law value = { feudal_contract_law = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { traditional_custom_law = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { popular_law = yes } }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 1.25
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = carnivals 
			}
	} 	
}
###########################
#the_seven_liberal_arts discovery	  #	   
###########################
						   
province_event = {
	id = 3120

	name	= "TECH_DISCOVERY"
	tag		= the_seven_liberal_arts
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { the_seven_liberal_arts = yes }
			}
		}
		condition = { type = advance_focus value = the_seven_liberal_arts }
	}

	mean_time_to_happen = {
		months = 75

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.7
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.3
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 1.15
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = the_seven_liberal_arts 
			}
	} 	
}
###########################
#monastic_schools discovery	  #	   
###########################
						   
province_event = {
	id = 3121

	name	= "TECH_DISCOVERY"
	tag		= monastic_schools
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { monastic_schools = yes }
			}
		}
		condition = {
			type = has_advance
			value = { the_seven_liberal_arts = yes }
		}
		condition = { type = advance_focus value = monastic_schools }
	}

	mean_time_to_happen = {
		months = 250

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.3
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.5
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 1.15
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = monastic_schools 
			}
	} 	
}
###########################
#cathedral_schools discovery	  #	   
###########################
						   
province_event = {
	id = 3122

	name	= "TECH_DISCOVERY"
	tag		= cathedral_schools
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { cathedral_schools = yes }
			}
		}
		condition = {
			type = has_advance
			value = { monastic_schools = yes }
		}
		condition = { type = advance_focus value = cathedral_schools }
	}

	mean_time_to_happen = {
		months = 500

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.5
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 1.25
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 0.85
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = cathedral_schools 
			}
	} 	
}
###########################
#universities discovery	  #	   
###########################
						   
province_event = {
	id = 3123

	name	= "TECH_DISCOVERY"
	tag		= universities
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { universities = yes }
			}
		}
		condition = {
			type = has_advance
			value = { cathedral_schools = yes }
		}
		condition = { type = advance_focus value = universities }
	}

	mean_time_to_happen = {
		months = 1000

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.55
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 1.1
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = universities 
			}
	} 	
}
###########################
#academic_disciplines discovery	  #	   
###########################
						   
province_event = {
	id = 3124

	name	= "TECH_DISCOVERY"
	tag		= academic_disciplines
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { academic_disciplines = yes }
			}
		}
		condition = {
			type = has_advance
			value = { universities = yes }
		}
		condition = { type = advance_focus value = academic_disciplines }
	}

	mean_time_to_happen = {
		months = 2000

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.55
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 8
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 10
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = ruler_stewardship
				value = 13
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 1.1
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = academic_disciplines 
			}
	} 	
}

#############################################################################
# "Thoughts" discovery should be hard to discover and more likely to spread #
#############################################################################

#################################
# aristotelian_logics discovery #	   
#################################
						   
province_event = {
	id = 3125

	name	= "TECH_DISCOVERY"
	tag	= aristotelian_logics
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { aristotelian_logics = yes }
			}
		}
		condition = { type = advance_focus value = aristotelian_logics }
	}

	mean_time_to_happen = {
		months = 250

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.7
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 0.85
		}
	}

	immidiate = {
		effect = { type = add_advance value = aristotelian_logics }
		effect = { type = ruler_prestige value = 25 }
	} 	
}
#########################
# scholastics discovery	#	   
#########################
						   
province_event = {
	id = 3126

	name	= "TECH_DISCOVERY"
	tag	= scholastics
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { scholastics = yes }
			}
		}
		condition = {
			type = has_advance
			value = { aristotelian_logics = yes }
		}
		condition = { type = advance_focus value = scholastics }
	}

	mean_time_to_happen = {
		months = 600

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 0.85
		}
	}

	immidiate = {
		effect = { type = add_advance value = scholastics }
		effect = { type = ruler_prestige value = 25 }
	} 	
}
#######################
# astrology discovery #	   
#######################
						   
province_event = {
	id = 3127

	name	= "TECH_DISCOVERY"
	tag	= astrology
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { astrology = yes }
			}
		}
		condition = {
			type = has_advance
			value = { scholastics = yes }
		}
		condition = { type = advance_focus value = astrology }
	}

	mean_time_to_happen = {
		months = 1200

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 1.15
		}
	}

	immidiate = {
		effect = { type = add_advance value = astrology }
		effect = { type = ruler_prestige value = 25 }
	} 	
}
################################
# natural_philosophy discovery #	   
################################
						   
province_event = {
	id = 3128

	name	= "TECH_DISCOVERY"
	tag	= natural_philosophy
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { natural_philosophy = yes }
			}
		}
		condition = {
			type = has_advance
			value = { astrology = yes }
		}
		condition = { type = advance_focus value = natural_philosophy }
	}

	mean_time_to_happen = {
		months = 2500

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 1.15
		}
	}

	immidiate = {
		effect = { type = add_advance value = natural_philosophy }
		effect = { type = ruler_prestige value = 50 }
	} 	
}
#####################
# science discovery #	   
#####################
						   
province_event = {
	id = 3129

	name	= "TECH_DISCOVERY"
	tag	= science
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { science = yes }
			}
		}
		condition = {
			type = has_advance
			value = { natural_philosophy = yes }
		}
		condition = { type = advance_focus value = science }
	}

	mean_time_to_happen = {
		months = 5000

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 1.15
		}
	}

	immidiate = {
		effect = { type = add_advance value = science }
		effect = { type = ruler_prestige value = 75 }
	} 	
}

###########################
#sculptures discovery	  #	   
###########################
						   
province_event = {
	id = 3130

	name	= "TECH_DISCOVERY"
	tag		= sculptures
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { sculptures = yes }
			}
		}
		condition = { type = advance_focus value = sculptures }
	}

	mean_time_to_happen = {
		months = 50

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.3
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = naive_wirepuller }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = flamboyant_schemer }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = intricate_webweaver }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = illusive_shadow }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { royal_preorgatory_law = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { feudal_contract_law = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_law value = { traditional_custom_law = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { popular_law = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 1.15
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = sculptures 
			}
	} 	
}
###########################
#musical_instruments discovery	  #	   
###########################
						   
province_event = {
	id = 3131

	name	= "TECH_DISCOVERY"
	tag		= musical_instruments
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { musical_instruments = yes }
			}
		}
		condition = {
			type = has_advance
			value = { sculptures = yes }
		}
		condition = { type = advance_focus value = musical_instruments }
	}

	mean_time_to_happen = {
		months = 120

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.3
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = naive_wirepuller }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = flamboyant_schemer }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = intricate_webweaver }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = illusive_shadow }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { royal_preorgatory_law = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { feudal_contract_law = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { traditional_custom_law = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_law value = { popular_law = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 1.15
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = musical_instruments 
			}
	} 	
}
###########################
#ballads discovery	  #	   
###########################
						   
province_event = {
	id = 3132

	name	= "TECH_DISCOVERY"
	tag		= ballads
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { ballads = yes }
			}
		}
		condition = {
			type = has_advance
			value = { musical_instruments = yes }
		}
		condition = { type = advance_focus value = ballads }
	}

	mean_time_to_happen = {
		months = 250

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.5
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = naive_wirepuller }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = flamboyant_schemer }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = intricate_webweaver }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = illusive_shadow }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { royal_preorgatory_law = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { feudal_contract_law = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { traditional_custom_law = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { popular_law = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 1.25
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = ballads 
			}
	} 	
}
###########################
#fashion_clothes discovery	  #	   
###########################
						   
province_event = {
	id = 3133

	name	= "TECH_DISCOVERY"
	tag		= fashion_clothes
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { fashion_clothes = yes }
			}
		}
		condition = {
			type = has_advance
			value = { ballads = yes }
		}
		condition = { type = advance_focus value = fashion_clothes }
	}

	mean_time_to_happen = {
		months = 750

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.5
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = naive_wirepuller }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = flamboyant_schemer }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = intricate_webweaver }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = illusive_shadow }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { royal_preorgatory_law = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { feudal_contract_law = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { traditional_custom_law = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { popular_law = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 1.2
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = fashion_clothes 
			}
	} 	
}
###########################
#vernacular_literature discovery	  #	   
###########################
						   
province_event = {
	id = 3134

	name	= "TECH_DISCOVERY"
	tag		= vernacular_literature
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { vernacular_literature = yes }
			}
		}
		condition = {
			type = has_advance
			value = { fashion_clothes = yes }
		}
		condition = { type = advance_focus value = vernacular_literature }
	}

	mean_time_to_happen = {
		months = 2500

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = burgher_power
				value = 0.55
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = naive_wirepuller }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = flamboyant_schemer }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = intricate_webweaver }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = illusive_shadow }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { royal_preorgatory_law = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_law value = { feudal_contract_law = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { traditional_custom_law = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { popular_law = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 1.25
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = vernacular_literature 
			}
	} 	
}
###########################
#relics discovery	  #	   
###########################
						   
province_event = {
	id = 3135

	name	= "TECH_DISCOVERY"
	tag		= relics
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { relics = yes }
			}
		}
		condition = { type = advance_focus value = relics }
	}

	mean_time_to_happen = {
		months = 50

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.3
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 0.85
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = relics 
			}
	} 	
}
###########################
#music_notation_system discovery	  #	   
###########################
						   
province_event = {
	id = 3136

	name	= "TECH_DISCOVERY"
	tag		= music_notation_system
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { music_notation_system = yes }
			}
		}
		condition = {
			type = has_advance
			value = { relics = yes }
		}
		condition = { type = advance_focus value = music_notation_system }
	}

	mean_time_to_happen = {
		months = 125

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.3
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.45
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 0.85
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = music_notation_system 
			}
	} 	
}
###########################
#choir_song discovery	  #	   
###########################
						   
province_event = {
	id = 3137

	name	= "TECH_DISCOVERY"
	tag		= choir_song
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { choir_song = yes }
			}
		}
		condition = {
			type = has_advance
			value = { music_notation_system = yes }
		}
		condition = { type = advance_focus value = choir_song }
	}

	mean_time_to_happen = {
		months = 450

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.3
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.5
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 0.85
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = choir_song 
			}
	} 	
}
###########################
#tapestries discovery	  #	   
###########################
						   
province_event = {
	id = 3138

	name	= "TECH_DISCOVERY"
	tag		= tapestries
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { tapestries = yes }
			}
		}
		condition = {
			type = has_advance
			value = { choir_song = yes }
		}
		condition = { type = advance_focus value = tapestries }
	}

	mean_time_to_happen = {
		months = 1000

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.35
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.5
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 0.85
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = tapestries 
			}
	} 	
}
###########################
#extravagant_decoration discovery	  #	   
###########################
						   
province_event = {
	id = 3139

	name	= "TECH_DISCOVERY"
	tag		= extravagant_decoration
	picture = event_techinvention
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { extravagant_decoration = yes }
			}
		}
		condition = {
			type = has_advance
			value = { tapestries = yes }
		}
		condition = { type = advance_focus value = extravagant_decoration }
	}

	mean_time_to_happen = {
		months = 2500

		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.4
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.5
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 0.85
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = extravagant_decoration 
			}
	} 	
}

###########################################################################
# "Religious" tech are used for Heresy                                    #
# Note: These events are if the player actively sought the religious tech #
# A lot of events will make these tech to appear anyway                   #
###########################################################################

# Religious Stringency

###############################
# clerical_celibacy discovery #	   
###############################
						   
province_event = {
	id = 3140

	name	= "TECH_DISCOVERY"
	tag	= clerical_celibacy
	picture = event_religion
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { clerical_celibacy = yes }
			}
		}
		condition = { type = or
			condition = { type = demesne value = PAPA }
			condition = { type = advance_focus value = clerical_celibacy }
		}
	}

	mean_time_to_happen = {
		months = 100

		modifier = {
			condition = { type = religion value = catholic }
			condition = { type = ruler_religion value = catholic }
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { monastery = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { church = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { large_church = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { domed_church = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { cathedral = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { templar_house = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.5
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.66
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = not
				value = {
					type = clergy_power
					value = 0.25
				}
			}
			factor = 1.1
		}
		modifier = {
			condition = {
				type = not
				value = {
					type = clergy_power
					value = 0.11
				}
			}
			factor = 1.25
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = { type = trait value = chaste }
				}
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = { type = trait value = lustful }
				}
			}
			factor = 1.33
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = {
						type = and
						condition = { type = trait value = zealous }
						condition = { type = not value = { type = trait value = heretic } }
					}
				}
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = {
						type = or
						condition = { type = trait value = sceptical }
						condition = { type = trait value = heretic }
						condition = { type = trait value = excommunicated }
					}
				}
			}
			factor = 1.25
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 0.85
		}
	}

	immidiate = {
		effect = { type = add_advance value = clerical_celibacy }
		effect = { type = ruler_piety value = 25 }
	} 	
}
###################################
# letters_of_indulgence discovery #	   
###################################
						   
province_event = {
	id = 3141

	name	= "TECH_DISCOVERY"
	tag	= letters_of_indulgence
	picture = event_religion
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { letters_of_indulgence = yes }
			}
		}
		condition = {
			type = has_advance
			value = { clerical_celibacy = yes }
		}
		condition = { type = or
			condition = { type = demesne value = PAPA }
			condition = { type = advance_focus value = letters_of_indulgence }
		}
	}

	mean_time_to_happen = {
		months = 250

		modifier = {
			condition = { type = religion value = catholic }
			condition = { type = ruler_religion value = catholic }
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { monastery = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { church = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { large_church = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { domed_church = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { cathedral = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { templar_house = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.5
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.66
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = not
				value = {
					type = clergy_power
					value = 0.25
				}
			}
			factor = 1.1
		}
		modifier = {
			condition = {
				type = not
				value = {
					type = clergy_power
					value = 0.11
				}
			}
			factor = 1.25
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = { type = trait value = selfish }
				}
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = { type = trait value = generous }
				}
			}
			factor = 1.1
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = {
						type = and
						condition = { type = trait value = zealous }
						condition = { type = not value = { type = trait value = heretic } }
					}
				}
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = {
						type = or
						condition = { type = trait value = sceptical }
						condition = { type = trait value = heretic }
						condition = { type = trait value = excommunicated }
					}
				}
			}
			factor = 2
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 0.85
		}
	}

	immidiate = {
		effect = { type = add_advance value = letters_of_indulgence }
		effect = { type = ruler_piety value = 25 }
	} 	
}
#########################
# inquisition discovery #	   
#########################
						   
province_event = {
	id = 3142

	name	= "TECH_DISCOVERY"
	tag	= inquisition
	picture = event_heretic
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { inquisition = yes }
			}
		}
		condition = {
			type = has_advance
			value = { letters_of_indulgence = yes }
		}
		condition = { type = or
			condition = { type = demesne value = PAPA }
			condition = { type = advance_focus value = inquisition }
		}
	}

	mean_time_to_happen = {
		months = 1000

		modifier = {
			condition = { type = religion value = catholic }
			condition = { type = ruler_religion value = catholic }
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { monastery = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { church = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { large_church = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { domed_church = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { cathedral = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.5
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.66
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = not
				value = {
					type = clergy_power
					value = 0.25
				}
			}
			factor = 1.1
		}
		modifier = {
			condition = {
				type = not
				value = {
					type = clergy_power
					value = 0.11
				}
			}
			factor = 1.25
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = { type = trait value = arbitrary }
				}
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = { type = trait value = just }
				}
			}
			factor = 1.25
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = {
						type = and
						condition = { type = trait value = zealous }
						condition = { type = not value = { type = trait value = heretic } }
					}
				}
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = {
						type = or
						condition = { type = trait value = sceptical }
						condition = { type = trait value = heretic }
						condition = { type = trait value = excommunicated }
					}
				}
			}
			factor = 5
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 0.85
		}
	}

	immidiate = {
		effect = { type = add_advance value = inquisition }
		effect = { type = ruler_piety value = 25 }
	} 	
}
#################################
# formalized_lithurgy discovery #	   
#################################
						   
province_event = {
	id = 3143

	name	= "TECH_DISCOVERY"
	tag	= formalized_lithurgy
	picture = event_religion
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { formalized_lithurgy = yes }
			}
		}
		condition = {
			type = has_advance
			value = { inquisition = yes }
		}
		condition = { type = or
			condition = { type = demesne value = PAPA }
			condition = { type = advance_focus value = formalized_lithurgy }
		}
	}

	mean_time_to_happen = {
		months = 1500

		modifier = {
			condition = { type = religion value = catholic }
			condition = { type = ruler_religion value = catholic }
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.7
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.5
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.66
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = not
				value = {
					type = clergy_power
					value = 0.25
				}
			}
			factor = 1.1
		}
		modifier = {
			condition = {
				type = not
				value = {
					type = clergy_power
					value = 0.11
				}
			}
			factor = 1.25
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = { type = trait value = energetic }
				}
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = { type = trait value = lazy }
				}
			}
			factor = 1.33
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = {
						type = and
						condition = { type = trait value = zealous }
						condition = { type = not value = { type = trait value = heretic } }
					}
				}
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = {
						type = or
						condition = { type = trait value = sceptical }
						condition = { type = trait value = heretic }
						condition = { type = trait value = excommunicated }
					}
				}
			}
			factor = 3
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 0.85
		}
	}

	immidiate = {
		effect = { type = add_advance value = formalized_lithurgy }
		effect = { type = ruler_piety value = 50 }
	} 	
}
#####################
# jubilee discovery #	   
#####################
						   
province_event = {
	id = 3144

	name	= "TECH_DISCOVERY"
	tag	= jubilee
	picture = event_religion
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { jubilee = yes }
			}
		}
		condition = {
			type = has_advance
			value = { formalized_lithurgy = yes }
		}
		condition = { type = or
			condition = { type = demesne value = PAPA }
			condition = { type = advance_focus value = jubilee }
		}
	}

	mean_time_to_happen = {
		months = 2500

		modifier = {
			condition = { type = religion value = catholic }
			condition = { type = ruler_religion value = catholic }
			factor = 0.75
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { church = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { large_church = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { domed_church = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { cathedral = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.5
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.66
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = not
				value = {
					type = clergy_power
					value = 0.25
				}
			}
			factor = 1.1
		}
		modifier = {
			condition = {
				type = not
				value = {
					type = clergy_power
					value = 0.11
				}
			}
			factor = 1.25
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = { type = trait value = indulgent }
				}
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = { type = trait value = temperate }
				}
			}
			factor = 1.1
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = {
						type = and
						condition = { type = trait value = zealous }
						condition = { type = not value = { type = trait value = heretic } }
					}
				}
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = {
						type = or
						condition = { type = trait value = sceptical }
						condition = { type = trait value = heretic }
						condition = { type = trait value = excommunicated }
					}
				}
			}
			factor = 1.5
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 0.9
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 1.05
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 0.85
		}
	}

	immidiate = {
		effect = { type = add_advance value = jubilee }
		effect = { type = ruler_piety value = 75 }
	} 	
}

# Religious Flexibility:

######################
# ascetism discovery #	   
######################
						   
province_event = {
	id = 3145

	name	= "TECH_DISCOVERY"
	tag	= ascetism
	picture = event_religion
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { ascetism = yes }
			}
		}
		condition = { type = advance_focus value = ascetism }
	}

	mean_time_to_happen = {
		months = 75

		modifier = {
			condition = {
				type = has_improvement
				value = { monastery = yes }
			}
			factor = 1.1
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { large_church = yes }
			}
			factor = 1.1
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { domed_church = yes }
			}
			factor = 1.2
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { cathedral = yes }
			}
			factor = 1.3
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.5
			}
			factor = 1.1
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.66
			}
			factor = 1.2
		}
		modifier = {
			condition = {
				type = not
				value = {
					type = clergy_power
					value = 0.25
				}
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = not
				value = {
					type = clergy_power
					value = 0.11
				}
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = { type = trait value = temperate }
				}
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = { type = trait value = indulgent }
				}
			}
			factor = 1.33
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 1.15
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 1.25
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = naive_wirepuller }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = flamboyant_schemer }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = intricate_webweaver }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = illusive_shadow }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 1.25
		}
		modifier = {
			condition = { type = has_law value = { royal_preorgatory_law = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { feudal_contract_law = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_law value = { traditional_custom_law = yes } }
			factor = 1.25
		}
		modifier = {
			condition = { type = has_law value = { popular_law = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = ascetism 
			}
	} 	
}
###############################
# apostolic_poverty discovery #	   
###############################
						   
province_event = {
	id = 3146

	name	= "TECH_DISCOVERY"
	tag	= apostolic_poverty
	picture = event_religion
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { apostolic_poverty = yes }
			}
		}
		condition = {
			type = has_advance
			value = { ascetism = yes }
		}
		condition = { type = advance_focus value = apostolic_poverty }
	}

	mean_time_to_happen = {
		months = 250

		modifier = {
			condition = {
				type = has_improvement
				value = { monastery = yes }
			}
			factor = 1.1
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { large_church = yes }
			}
			factor = 1.1
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { domed_church = yes }
			}
			factor = 1.2
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { cathedral = yes }
			}
			factor = 1.3
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.5
			}
			factor = 1.1
		}
		modifier = {
			condition = {
				type = clergy_power
				value = .66
			}
			factor = 1.2
		}
		modifier = {
			condition = {
				type = not
				value = {
					type = clergy_power
					value = 0.25
				}
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = not
				value = {
					type = clergy_power
					value = 0.11
				}
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = { type = trait value = temperate }
				}
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = { type = trait value = indulgent }
				}
			}
			factor = 1.33
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 1.15
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 1.25
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = naive_wirepuller }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = flamboyant_schemer }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = intricate_webweaver }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = illusive_shadow }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 1.25
		}
		modifier = {
			condition = { type = has_law value = { royal_preorgatory_law = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { feudal_contract_law = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_law value = { traditional_custom_law = yes } }
			factor = 1.25
		}
		modifier = {
			condition = { type = has_law value = { popular_law = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = apostolic_poverty 
			}
	} 	
}
############################################
# critical_bible_interpretations discovery #	   
############################################
						   
province_event = {
	id = 3147

	name	= "TECH_DISCOVERY"
	tag	= critical_bible_interpretations
	picture = event_religion
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { critical_bible_interpretations = yes }
			}
		}
		condition = {
			type = has_advance
			value = { apostolic_poverty = yes }
		}
		condition = { type = advance_focus value = critical_bible_interpretations }
	}

	mean_time_to_happen = {
		months = 500

		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.5
			}
			factor = 1.1
		}
		modifier = {
			condition = {
				type = clergy_power
				value = .66
			}
			factor = 1.2
		}
		modifier = {
			condition = {
				type = not
				value = {
					type = clergy_power
					value = 0.25
				}
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = not
				value = {
					type = clergy_power
					value = 0.11
				}
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = {
						type = and
						condition = { type = trait value = zealous }
						condition = { type = not value = { type = trait value = heretic } }
					}
				}
			}
			factor = 2
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = {
						type = or
						condition = { type = trait value = sceptical }
						condition = { type = trait value = heretic }
						condition = { type = trait value = excommunicated }
					}
				}
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 1.15
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 1.25
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = naive_wirepuller }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = flamboyant_schemer }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = intricate_webweaver }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = illusive_shadow }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 1.25
		}
		modifier = {
			condition = { type = has_law value = { royal_preorgatory_law = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { feudal_contract_law = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_law value = { traditional_custom_law = yes } }
			factor = 1.25
		}
		modifier = {
			condition = { type = has_law value = { popular_law = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = critical_bible_interpretations 
			}
	} 	
}
################################
# bible_translations discovery #	   
################################
						   
province_event = {
	id = 3148

	name	= "TECH_DISCOVERY"
	tag	= bible_translations
	picture = event_religion
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { bible_translations = yes }
			}
		}
		condition = {
			type = has_advance
			value = { critical_bible_interpretations = yes }
		}
		condition = { type = advance_focus value = bible_translations }
	}

	mean_time_to_happen = {
		months = 1000

		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.85
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.5
			}
			factor = 1.1
		}
		modifier = {
			condition = {
				type = clergy_power
				value = .66
			}
			factor = 1.2
		}
		modifier = {
			condition = {
				type = not
				value = {
					type = clergy_power
					value = 0.25
				}
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = not
				value = {
					type = clergy_power
					value = 0.11
				}
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = {
						type = and
						condition = { type = trait value = zealous }
						condition = { type = not value = { type = trait value = heretic } }
					}
				}
			}
			factor = 1.1
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = {
						type = or
						condition = { type = trait value = sceptical }
						condition = { type = trait value = heretic }
						condition = { type = trait value = excommunicated }
					}
				}
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 1.15
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 1.25
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = naive_wirepuller }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = flamboyant_schemer }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = intricate_webweaver }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = illusive_shadow }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 1.25
		}
		modifier = {
			condition = { type = has_law value = { royal_preorgatory_law = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { feudal_contract_law = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_law value = { traditional_custom_law = yes } }
			factor = 1.25
		}
		modifier = {
			condition = { type = has_law value = { popular_law = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = bible_translations 
			}
	} 	
}
###############################
# critical_thinking discovery #	   
###############################
						   
province_event = {
	id = 3149

	name	= "TECH_DISCOVERY"
	tag	= critical_thinking
	picture = event_religion
	trigger	= {
		condition = { type = capital value = yes }
		condition = {
			type = not
			value = {
				type = has_advance
				value = { critical_thinking = yes }
			}
		}
		condition = {
			type = has_advance
			value = { bible_translations = yes }
		}
		condition = { type = advance_focus value = critical_thinking }
	}

	mean_time_to_happen = {
		months = 2000

		modifier = {
			condition = {
				type = has_improvement
				value = { civilian_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { naval_harbour = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { grand_shipyard = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { roadnet = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { extensive_roadnet = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { library = yes }
			}
			factor = 0.95
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { school = yes }
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = has_improvement
				value = { university = yes }
			}
			factor = 0.75
		}
		modifier = {
			condition = {
				type = clergy_power
				value = 0.5
			}
			factor = 1.1
		}
		modifier = {
			condition = {
				type = clergy_power
				value = .66
			}
			factor = 1.2
		}
		modifier = {
			condition = {
				type = not
				value = {
					type = clergy_power
					value = 0.25
				}
			}
			factor = 0.9
		}
		modifier = {
			condition = {
				type = not
				value = {
					type = clergy_power
					value = 0.11
				}
			}
			factor = 0.8
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = {
						type = and
						condition = { type = trait value = zealous }
						condition = { type = not value = { type = trait value = heretic } }
					}
				}
			}
			factor = 2
		}
		modifier = {
			condition = {
				type = owner
				condition = {
					type = chaplain_csc
					condition = {
						type = or
						condition = { type = trait value = sceptical }
						condition = { type = trait value = heretic }
						condition = { type = trait value = excommunicated }
					}
				}
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = kingdom }
			}
			factor = 0.75
		}
		modifier = {
			condition = { type = owner
				condition = { type = duchy }
			}
			factor = 0.85
		}
		modifier = {
			condition = { type = owner
				condition = { type = atwar }
			}
			factor = 5
		}
		modifier = {
			condition = { type = trait value = ecclesiastical_education }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = detached_priest }
			factor = 1.05
		}
		modifier = {
			condition = { type = trait value = martial_cleric }
			factor = 1.1
		}
		modifier = {
			condition = { type = trait value = scholarly_theologian }
			factor = 1.15
		}
		modifier = {
			condition = { type = trait value = mastermind_theologian }
			factor = 1.25
		}
		modifier = {
			condition = { type = trait value = court_education }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = naive_wirepuller }
			factor = 0.95
		}
		modifier = {
			condition = { type = trait value = flamboyant_schemer }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = intricate_webweaver }
			factor = 0.85
		}
		modifier = {
			condition = { type = trait value = illusive_shadow }
			factor = 0.75
		}
		modifier = {
			condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { monastic_supremacy = yes } }
			factor = 1.15
		}
		modifier = {
			condition = { type = has_law value = { ecclesical_balance = yes } }
			factor = 0.95
		}
		modifier = {
			condition = { type = has_law value = { church_supremacy = yes } }
			factor = 1.25
		}
		modifier = {
			condition = { type = has_law value = { royal_preorgatory_law = yes } }
			factor = 0.85
		}
		modifier = {
			condition = { type = has_law value = { feudal_contract_law = yes } }
			factor = 1.1
		}
		modifier = {
			condition = { type = has_law value = { traditional_custom_law = yes } }
			factor = 1.25
		}
		modifier = {
			condition = { type = has_law value = { popular_law = yes } }
			factor = 0.8
		}
	}

	immidiate = {
		effect = { 
				type = add_advance 
				value = critical_thinking 
			}
	} 	
}
