namespace = plentiful_traditions_technology

event = {
	id = plentiful_traditions_technology.1
	hide_window = yes
	is_triggered_only = yes
 
	immediate = {
		every_country = {
			limit = {
				NOT = { has_country_flag = tr_plentiful_order_finish_flag }
				has_tradition = tr_plentiful_order_finish
			}
		country_event = { id = plentiful_traditions_technology.2 days = 5 }
		}
		every_country = {
			limit = {
				NOT = { has_country_flag = tr_plentiful_mysticism_finish_flag }
				has_tradition = tr_plentiful_mysticism_finish
			}
		country_event = { id = plentiful_traditions_technology.3 days = 10 }
		}
		every_country = {
			limit = {
				NOT = { has_country_flag = tr_plentiful_robotics_finish_flag }
				has_tradition = tr_plentiful_robotics_finish
			}
		country_event = { id = plentiful_traditions_technology.4 days = 15 }
		}
		every_country = {
			limit = {
				NOT = { has_country_flag = tr_plentiful_faith_finish_flag }
				has_tradition = tr_plentiful_faith_finish
			}
		country_event = { id = plentiful_traditions_technology.5 days = 20 }
		}
		every_country = {
			limit = {
				NOT = { has_country_flag = tr_plentiful_aspiration_finish_flag }
				OR = {
					has_active_tradition = tr_plentiful_aspiration_gestalt_finish
					has_active_tradition = tr_plentiful_aspiration_finish
				}
			}
		country_event = { id = plentiful_traditions_technology.6 days = 25 }
		}
		every_country = {
			limit = {
				NOT = { has_country_flag = tr_plentiful_biogenesis_finish_flag }
				has_tradition = tr_plentiful_biogenesis_finish
			}
		country_event = { id = plentiful_traditions_technology.7 days = 30 }
		}
		every_country = {
			limit = {
				NOT = { has_country_flag = tr_plentiful_affinity_finish_flag }
				has_tradition = tr_plentiful_affinity_finish
			}
		country_event = { id = plentiful_traditions_technology.8 days = 35 }
		}
		every_country = {
			limit = {
				NOT = { has_country_flag = tr_plentiful_mutagenesis_finish_flag }
				has_tradition = tr_plentiful_mutagenesis_finish
			}
		country_event = { id = plentiful_traditions_technology.9 days = 40 }
		}
		every_country = {
			limit = {
				NOT = { has_country_flag = tr_plentiful_experimentalism_finish_flag }
				has_tradition = tr_plentiful_experimentalism_finish
			}
		country_event = { id = plentiful_traditions_technology.10 days = 45 }
		}
		every_country = {
			limit = {
				NOT = { has_country_flag = tr_plentiful_industry_finish_flag }
				has_tradition = tr_plentiful_industry_finish
			}
		country_event = { id = plentiful_traditions_technology.11 days = 50 }
		}
		every_country = {
			limit = {
				NOT = { has_country_flag = tr_plentiful_malice_finish_flag }
				has_tradition = tr_plentiful_malice_finish
			}
		country_event = { id = plentiful_traditions_technology.12 days = 55 }
		}
		every_country = {
			limit = {
				NOT = { has_country_flag = tr_plentiful_anguish_finish_flag }
				has_tradition = tr_plentiful_anguish_finish
			}
		country_event = { id = plentiful_traditions_technology.13 days = 60 }
		}
		every_country = {
			limit = {
				NOT = { has_country_flag = tr_plentiful_kleptocracy_finish_flag }
				has_tradition = tr_plentiful_kleptocracy_finish
			}
		country_event = { id = plentiful_traditions_technology.14 days = 65 }
		}
		every_country = {
			limit = {
				NOT = { has_country_flag = tr_prosperity_finish_flag }
				has_tradition = tr_prosperity_finish
			}
		country_event = { id = plentiful_traditions_technology.15 days = 70 }
		}
		every_country = {
			limit = {
				NOT = { has_country_flag = tr_supremacy_finish_flag }
				has_tradition = tr_supremacy_finish
			}
		country_event = { id = plentiful_traditions_technology.16 days = 75 }
		}
		every_country = {
			limit = {
				NOT = { has_country_flag = tr_diplomacy_finish_flag }
				has_tradition = tr_diplomacy_finish
			}
		country_event = { id = plentiful_traditions_technology.17 days = 80 }
		}
		every_country = {
			limit = {
				NOT = { has_country_flag = tr_discovery_finish_flag }
				has_tradition = tr_discovery_finish
			}
		country_event = { id = plentiful_traditions_technology.18 days = 85 }
		}
		every_country = {
			limit = {
				NOT = { has_country_flag = tr_domination_finish_flag }
				has_tradition = tr_domination_finish
			}
		country_event = { id = plentiful_traditions_technology.19 days = 90 }
		}
		every_country = {
			limit = {
				NOT = { has_country_flag = tr_harmony_finish_flag }
				has_tradition = tr_harmony_finish
			}
		country_event = { id = plentiful_traditions_technology.20 days = 95 }
		}
		every_country = {
			limit = {
				NOT = { has_country_flag = tr_expansion_finish_flag }
				has_tradition = tr_expansion_finish
			}
		country_event = { id = plentiful_traditions_technology.21 days = 100 }
		}
		every_country = {
			limit = {
				NOT = { has_country_flag = tr_discovery_adopt_flag }
				has_tradition = tr_discovery_adopt
			}
		country_event = { id = plentiful_traditions_technology.22 }
		}

# new traditions
		every_country = {
			limit = {
				NOT = { has_country_flag = tr_plentiful_defence_finish_flag }
				has_tradition = tr_plentiful_defence_finish
			}
		country_event = { id = plentiful_traditions_technology.23 days = 115 }
		}
		every_country = {
			limit = {
				NOT = { has_country_flag = tr_plentiful_assault_finish_flag }
				has_tradition = tr_plentiful_assault_finish
			}
		country_event = { id = plentiful_traditions_technology.24 days = 110 }
		}
		every_country = {
			limit = {
				NOT = { has_country_flag = tr_plentiful_transformation_finish_flag }
				has_tradition = tr_plentiful_transformation_finish
			}
		country_event = { id = plentiful_traditions_technology.25 days = 115 }
		}
		every_country = {
			limit = {
				NOT = { has_country_flag = tr_plentiful_endure_finish_flag }
				has_tradition = tr_plentiful_endure_finish
			}
		country_event = { id = plentiful_traditions_technology.26 days = 120 }
		}
	}
}

country_event = {
	id = plentiful_traditions_technology.2
	hide_window = yes
	is_triggered_only = yes
 
	immediate = {
	set_country_flag = tr_plentiful_order_finish_flag
		if = {
			limit = {
				NOT = {
					check_variable = {
						which = num_of_traditions
						value > 0
					}
				}
			}
			set_variable = {
				which = num_of_traditions
				value = 1
			}
			else = {
				change_variable = {
					which = num_of_traditions
					value = 1
				}
			}
		}
	}
}

country_event = {
	id = plentiful_traditions_technology.3
	hide_window = yes
	is_triggered_only = yes
 
	immediate = {
	set_country_flag = tr_plentiful_mysticism_finish_flag
		if = {
			limit = {
				NOT = {
					check_variable = {
						which = num_of_traditions
						value > 0
					}
				}
			}
			set_variable = {
				which = num_of_traditions
				value = 1
			}
			else = {
				change_variable = {
					which = num_of_traditions
					value = 1
				}
			}
		}
	}
}


country_event = {
	id = plentiful_traditions_technology.4
	hide_window = yes
	is_triggered_only = yes
 
	immediate = {
	set_country_flag = tr_plentiful_robotics_finish_flag
		if = {
			limit = {
				NOT = {
					check_variable = {
						which = num_of_traditions
						value > 0
					}
				}
			}
			set_variable = {
				which = num_of_traditions
				value = 1
			}
			else = {
				change_variable = {
					which = num_of_traditions
					value = 1
				}
			}
		}
	}
}


country_event = {
	id = plentiful_traditions_technology.5
	hide_window = yes
	is_triggered_only = yes
 
	immediate = {
	set_country_flag = tr_plentiful_faith_finish_flag
		if = {
			limit = {
				NOT = {
					check_variable = {
						which = num_of_traditions
						value > 0
					}
				}
			}
			set_variable = {
				which = num_of_traditions
				value = 1
			}
			else = {
				change_variable = {
					which = num_of_traditions
					value = 1
				}
			}
		}
	}
}


country_event = {
	id = plentiful_traditions_technology.6
	hide_window = yes
	is_triggered_only = yes
 
	immediate = {
	set_country_flag = tr_plentiful_aspiration_finish_flag
		if = {
			limit = {
				NOT = {
					check_variable = {
						which = num_of_traditions
						value > 0
					}
				}
			}
			set_variable = {
				which = num_of_traditions
				value = 1
			}
			else = {
				change_variable = {
					which = num_of_traditions
					value = 1
				}
			}
		}
	}
}


country_event = {
	id = plentiful_traditions_technology.7
	hide_window = yes
	is_triggered_only = yes
 
	immediate = {
	set_country_flag = tr_plentiful_biogenesis_finish_flag
		if = {
			limit = {
				NOT = {
					check_variable = {
						which = num_of_traditions
						value > 0
					}
				}
			}
			set_variable = {
				which = num_of_traditions
				value = 1
			}
			else = {
				change_variable = {
					which = num_of_traditions
					value = 1
				}
			}
		}
	}
}


country_event = {
	id = plentiful_traditions_technology.8
	hide_window = yes
	is_triggered_only = yes
 
	immediate = {
	set_country_flag = tr_plentiful_affinity_finish_flag
		if = {
			limit = {
				NOT = {
					check_variable = {
						which = num_of_traditions
						value > 0
					}
				}
			}
			set_variable = {
				which = num_of_traditions
				value = 1
			}
			else = {
				change_variable = {
					which = num_of_traditions
					value = 1
				}
			}
		}
	}
}


country_event = {
	id = plentiful_traditions_technology.9
	hide_window = yes
	is_triggered_only = yes
 
	immediate = {
	set_country_flag = tr_plentiful_mutagenesis_finish_flag
		if = {
			limit = {
				NOT = {
					check_variable = {
						which = num_of_traditions
						value > 0
					}
				}
			}
			set_variable = {
				which = num_of_traditions
				value = 1
			}
			else = {
				change_variable = {
					which = num_of_traditions
					value = 1
				}
			}
		}
	}
}


country_event = {
	id = plentiful_traditions_technology.10
	hide_window = yes
	is_triggered_only = yes
 
	immediate = {
	set_country_flag = tr_plentiful_experimentalism_finish_flag
		if = {
			limit = {
				NOT = {
					check_variable = {
						which = num_of_traditions
						value > 0
					}
				}
			}
			set_variable = {
				which = num_of_traditions
				value = 1
			}
			else = {
				change_variable = {
					which = num_of_traditions
					value = 1
				}
			}
		}
	}
}


country_event = {
	id = plentiful_traditions_technology.11
	hide_window = yes
	is_triggered_only = yes
 
	immediate = {
	set_country_flag = tr_plentiful_industry_finish_flag
		if = {
			limit = {
				NOT = {
					check_variable = {
						which = num_of_traditions
						value > 0
					}
				}
			}
			set_variable = {
				which = num_of_traditions
				value = 1
			}
			else = {
				change_variable = {
					which = num_of_traditions
					value = 1
				}
			}
		}
	}
}


country_event = {
	id = plentiful_traditions_technology.12
	hide_window = yes
	is_triggered_only = yes
 
	immediate = {
	set_country_flag = tr_plentiful_malice_finish_flag
		if = {
			limit = {
				NOT = {
					check_variable = {
						which = num_of_traditions
						value > 0
					}
				}
			}
			set_variable = {
				which = num_of_traditions
				value = 1
			}
			else = {
				change_variable = {
					which = num_of_traditions
					value = 1
				}
			}
		}
	}
}


country_event = {
	id = plentiful_traditions_technology.13
	hide_window = yes
	is_triggered_only = yes
 
	immediate = {
	set_country_flag = tr_plentiful_anguish_finish_flag
		if = {
			limit = {
				NOT = {
					check_variable = {
						which = num_of_traditions
						value > 0
					}
				}
			}
			set_variable = {
				which = num_of_traditions
				value = 1
			}
			else = {
				change_variable = {
					which = num_of_traditions
					value = 1
				}
			}
		}
	}
}


country_event = {
	id = plentiful_traditions_technology.14
	hide_window = yes
	is_triggered_only = yes
 
	immediate = {
	set_country_flag = tr_plentiful_kleptocracy_finish_flag
		if = {
			limit = {
				NOT = {
					check_variable = {
						which = num_of_traditions
						value > 0
					}
				}
			}
			set_variable = {
				which = num_of_traditions
				value = 1
			}
			else = {
				change_variable = {
					which = num_of_traditions
					value = 1
				}
			}
		}
	}
}


country_event = {
	id = plentiful_traditions_technology.15
	hide_window = yes
	is_triggered_only = yes
 
	immediate = {
	set_country_flag = tr_prosperity_finish_flag
		if = {
			limit = {
				NOT = {
					check_variable = {
						which = num_of_traditions
						value > 0
					}
				}
			}
			set_variable = {
				which = num_of_traditions
				value = 1
			}
			else = {
				change_variable = {
					which = num_of_traditions
					value = 1
				}
			}
		}
	}
}


country_event = {
	id = plentiful_traditions_technology.16
	hide_window = yes
	is_triggered_only = yes
 
	immediate = {
	set_country_flag = tr_supremacy_finish_flag
		if = {
			limit = {
				NOT = {
					check_variable = {
						which = num_of_traditions
						value > 0
					}
				}
			}
			set_variable = {
				which = num_of_traditions
				value = 1
			}
			else = {
				change_variable = {
					which = num_of_traditions
					value = 1
				}
			}
		}
	}
}


country_event = {
	id = plentiful_traditions_technology.17
	hide_window = yes
	is_triggered_only = yes
 
	immediate = {
	set_country_flag = tr_diplomacy_finish_flag
		if = {
			limit = {
				NOT = {
					check_variable = {
						which = num_of_traditions
						value > 0
					}
				}
			}
			set_variable = {
				which = num_of_traditions
				value = 1
			}
			else = {
				change_variable = {
					which = num_of_traditions
					value = 1
				}
			}
		}
	}
}


country_event = {
	id = plentiful_traditions_technology.18
	hide_window = yes
	is_triggered_only = yes
 
	immediate = {
	set_country_flag = tr_discovery_finish_flag
		if = {
			limit = {
				NOT = {
					check_variable = {
						which = num_of_traditions
						value > 0
					}
				}
			}
			set_variable = {
				which = num_of_traditions
				value = 1
			}
			else = {
				change_variable = {
					which = num_of_traditions
					value = 1
				}
			}
		}
	}
}


country_event = {
	id = plentiful_traditions_technology.19
	hide_window = yes
	is_triggered_only = yes
 
	immediate = {
	set_country_flag = tr_domination_finish_flag
		if = {
			limit = {
				NOT = {
					check_variable = {
						which = num_of_traditions
						value > 0
					}
				}
			}
			set_variable = {
				which = num_of_traditions
				value = 1
			}
			else = {
				change_variable = {
					which = num_of_traditions
					value = 1
				}
			}
		}
	}
}


country_event = {
	id = plentiful_traditions_technology.20
	hide_window = yes
	is_triggered_only = yes
 
	immediate = {
	set_country_flag = tr_harmony_finish_flag
		if = {
			limit = {
				NOT = {
					check_variable = {
						which = num_of_traditions
						value > 0
					}
				}
			}
			set_variable = {
				which = num_of_traditions
				value = 1
			}
			else = {
				change_variable = {
					which = num_of_traditions
					value = 1
				}
			}
		}
	}
}


country_event = {
	id = plentiful_traditions_technology.21
	hide_window = yes
	is_triggered_only = yes
 
	immediate = {
	set_country_flag = tr_expansion_finish_flag
		if = {
			limit = {
				NOT = {
					check_variable = {
						which = num_of_traditions
						value > 0
					}
				}
			}
			set_variable = {
				which = num_of_traditions
				value = 1
			}
			else = {
				change_variable = {
					which = num_of_traditions
					value = 1
				}
			}
		}
	}
}


country_event = {
	id = plentiful_traditions_technology.22
	hide_window = yes
	is_triggered_only = yes
 
	immediate = {
	set_country_flag = tr_discovery_adopt_flag
		if = {
			limit = {
				NOT = {
					has_technology = tech_automated_exploration
				}
			}
			give_technology = { tech = tech_automated_exploration message = no }
			else = {
				give_technology = { tech = tech_archeology_lab message = no }
			}
		}
	
	}
}

# new traditions

country_event = {
	id = plentiful_traditions_technology.23
	hide_window = yes
	is_triggered_only = yes
 
	immediate = {
	set_country_flag = tr_plentiful_defence_finish_flag
		if = {
			limit = {
				NOT = {
					check_variable = {
						which = num_of_traditions
						value > 0
					}
				}
			}
			set_variable = {
				which = num_of_traditions
				value = 1
			}
			else = {
				change_variable = {
					which = num_of_traditions
					value = 1
				}
			}
		}
	}
}


country_event = {
	id = plentiful_traditions_technology.24
	hide_window = yes
	is_triggered_only = yes
 
	immediate = {
	set_country_flag = tr_plentiful_assault_finish_flag
		if = {
			limit = {
				NOT = {
					check_variable = {
						which = num_of_traditions
						value > 0
					}
				}
			}
			set_variable = {
				which = num_of_traditions
				value = 1
			}
			else = {
				change_variable = {
					which = num_of_traditions
					value = 1
				}
			}
		}
	}
}


country_event = {
	id = plentiful_traditions_technology.25
	hide_window = yes
	is_triggered_only = yes
 
	immediate = {
	set_country_flag = tr_plentiful_transformation_finish_flag
		if = {
			limit = {
				NOT = {
					check_variable = {
						which = num_of_traditions
						value > 0
					}
				}
			}
			set_variable = {
				which = num_of_traditions
				value = 1
			}
			else = {
				change_variable = {
					which = num_of_traditions
					value = 1
				}
			}
		}
	}
}


country_event = {
	id = plentiful_traditions_technology.26
	hide_window = yes
	is_triggered_only = yes
 
	immediate = {
	set_country_flag = tr_plentiful_endure_finish_flag
		if = {
			limit = {
				NOT = {
					check_variable = {
						which = num_of_traditions
						value > 0
					}
				}
			}
			set_variable = {
				which = num_of_traditions
				value = 1
			}
			else = {
				change_variable = {
					which = num_of_traditions
					value = 1
				}
			}
		}
	}
}