#Everything that has to do with advancing scientific research and the infrastructure required for it

eoanb_category_institutions = {
	eoanb_decision_westernisation = {

		icon = generic_decision

		available = {
			has_tech = tribal_tatics
			has_tech = tribal_gunpowder
			has_tech = tribal_riding
			has_tech = tribal_steam_experiments
			has_tech = tribal_forging
			has_tech = tribal_artisan
			has_tech = tribal_chemistry
			has_tech = tribal_guilds_trade
			has_tech = tribal_steel_tools
			has_tech = tribal_electrical_theory
			has_tech = tribal_carrier_birds
			has_tech = tribal_crop_rotation
			has_tech = tribal_salted_smoked_goods
			has_tech = tribal_leching
		}

		visible = {
			OR = {
				has_country_flag = Oceania_industrializing
			}
			has_idea = oral_tradition
		}

		fire_only_once = no

		complete_effect = {
			custom_effect_tooltip = eoanb_tt_advance_education
			hidden_effect = {
				swap_ideas = { remove_idea = oral_tradition add_idea = privileged_education }
				set_country_flag = EDC_western_education_system_flag
			}
			custom_effect_tooltip = EDC_western_education_system_tooltip
		}

		ai_will_do = {
			base = 1000
		}
	}
	eoanb_decision_westernisation_2 = {

		icon = generic_decision

		available = {
			has_tech = tribal_tatics
			has_tech = tribal_gunpowder
			has_tech = tribal_riding
			has_tech = tribal_steam_experiments
			has_tech = tribal_forging
			has_tech = tribal_artisan
			has_tech = tribal_chemistry
			has_tech = tribal_guilds_trade
			has_tech = tribal_steel_tools
			has_tech = tribal_electrical_theory
			has_tech = tribal_carrier_birds
			has_tech = tribal_crop_rotation
			has_tech = tribal_salted_smoked_goods
			has_tech = tribal_leching
		}

		visible = {
			OR = {
				
				has_country_flag = Oceania_industrializing
			}
			has_idea = traditional_uluma
		}

		fire_only_once = no

		complete_effect = {
			custom_effect_tooltip = eoanb_tt_advance_education
			hidden_effect = {
				swap_ideas = { remove_idea = traditional_uluma add_idea = privileged_education }
				set_country_flag = EDC_western_education_system_flag
			}
			custom_effect_tooltip = EDC_western_education_system_tooltip
		}

		ai_will_do = {
			base = 1000
		}
	}

	eoanb_decision_easternisation = {

		icon = generic_decision

		available = {
			has_tech = tribal_tatics
			has_tech = tribal_gunpowder
			has_tech = tribal_riding
			has_tech = tribal_steam_experiments
			has_tech = tribal_forging
			has_tech = tribal_artisan
			has_tech = tribal_chemistry
			has_tech = tribal_guilds_trade
			has_tech = tribal_steel_tools
			has_tech = tribal_electrical_theory
			has_tech = tribal_carrier_birds
			has_tech = tribal_crop_rotation
			has_tech = tribal_salted_smoked_goods
			has_tech = tribal_leching
			NOT = {
				original_tag = TUN
				original_tag = MOR
			}
		}

		visible = {
			has_idea = oral_tradition
			has_country_flag = Oceania_industrializing
			NOT = {
				original_tag = TUN
				original_tag = MOR
			}
		}

		fire_only_once = no

		complete_effect = {
			custom_effect_tooltip = eoanb_tt_advance_education
			hidden_effect = {
				swap_ideas = { remove_idea = oral_tradition add_idea = privileged_education }
				set_country_flag = EDC_eastern_education_system_flag
			}
			custom_effect_tooltip = EDC_eastern_education_system_tooltip
		}

		ai_will_do = {
			base = 1000
		}
	}
	eoanb_decision_easternisation_2 = {

		icon = generic_decision

		available = {
			has_tech = tribal_tatics
			has_tech = tribal_gunpowder
			has_tech = tribal_riding
			has_tech = tribal_steam_experiments
			has_tech = tribal_forging
			has_tech = tribal_artisan
			has_tech = tribal_chemistry
			has_tech = tribal_guilds_trade
			has_tech = tribal_steel_tools
			has_tech = tribal_electrical_theory
			has_tech = tribal_carrier_birds
			has_tech = tribal_crop_rotation
			has_tech = tribal_salted_smoked_goods
			has_tech = tribal_leching
		}

		visible = {
			has_idea = traditional_uluma
		}

		fire_only_once = no

		complete_effect = {
			custom_effect_tooltip = eoanb_tt_advance_education
			hidden_effect = {
				swap_ideas = { remove_idea = traditional_uluma add_idea = privileged_education }
				set_country_flag = EDC_eastern_education_system_flag
			}
			custom_effect_tooltip = EDC_eastern_education_system_tooltip
		}

		ai_will_do = {
			base = 1000
		}
	}

	#Advance to the Victorian Era
	eoanb_decision_advance_to_victorian_era = {
		icon = generic_research

		available = {
			OR = {
				AND = {
					date > 1850.1.1
					num_of_factories > 10
					has_tech = steam_locomotive
					has_tech = cast_iron_industrialization
					has_tech = organic_chemistry
					has_tech = early_dynamo_generator
				}
				AND = {
					date > 1860.1.1
					num_of_factories > 5
					has_tech = steam_engine
					has_tech = industrial_blast_furnace
					has_tech = food_preserving_icebox
					has_tech = electrical_engineering
				}
				AND = {
					date > 1870.1.1
					has_tech = steam_engine
					has_tech = industrial_blast_furnace
					has_tech = food_preserving_icebox
					has_tech = electrical_engineering
				}
				date > 1880.1.1
			}
		}

		visible = {
			
			has_idea = pre_industrial_era
		}

		fire_only_once = no

		cost = 50

		days_remove = 180

		remove_effect = {
			custom_effect_tooltip = eoanb_tt_advance_era_victorian
			hidden_effect = {
				swap_ideas = { remove_idea = pre_industrial_era add_idea = victorian_era }
			}
		}

		ai_will_do = {
			base = 1000
		}
	}

	#Advance to the Machine Era
	eoanb_decision_advance_to_machine_era = {
		icon = generic_research

		available = {
			OR = {
				AND = {
					date > 1880.1.1
					num_of_factories > 25
					has_tech = petrol_engine
					has_tech = stainless_steel
					has_tech = microbiology
					has_tech = early_power_station
				}
				AND = {
					date > 1890.1.1
					num_of_factories > 10
					has_tech = mechanical_production_1
					has_tech = dry_puddling_process
					has_tech = hygiene
					has_tech = early_incandescent_lightbulb
				}
				AND = {
					date > 1900.1.1
					custom_trigger_tooltip = {
						tooltip = eoanb_trigger_tt_law_african_all
					}
					hidden_trigger = {
						
					}
				}
			}
		}

		visible = {
			has_idea = victorian_era
		}

		fire_only_once = yes

		cost = 50

		days_remove = 180

		remove_effect = {
			custom_effect_tooltip = eoanb_tt_advance_era_machine
			hidden_effect = {
				swap_ideas = { remove_idea = victorian_era add_idea = machine_era }
			}
		}

		ai_will_do = {
			base = 1000
		}
	}

	#Advance to the Oil Era
	eoanb_decision_advance_to_oil_era = {
		icon = generic_research

		available = {
			OR = {
				AND = {
					date > 1900.1.1
					num_of_factories > 35
					has_tech = machine_tools_3
					has_tech = bayer_process
					has_tech = antibiotics
					has_tech = polyphase_alternators
				}
				AND = {
					date > 1905.1.1
					num_of_factories > 15
					has_tech = petrol_combustion_engine
					has_tech = stainless_steel
					has_tech = industrial_fertilizers
					has_tech = alternators
				}
				AND = {
					date > 1925.1.1
					custom_trigger_tooltip = {
						tooltip = eoanb_trigger_tt_law_african_all
					}
					hidden_trigger = {
						
					}
				}
			}
		}

		visible = {
			has_idea = machine_era
		}

		fire_only_once = yes

		cost = 50

		days_remove = 180

		remove_effect = {
			custom_effect_tooltip = eoanb_tt_advance_era_oil
			hidden_effect = {
				swap_ideas = { remove_idea = machine_era add_idea = oil_era }
			}
		}

		ai_will_do = {
			base = 1000
		}
	}

	#Advance to the Aviation Era
	eoanb_decision_advance_to_aviation_era = {
		icon = generic_research

		available = {
			OR = {
				AND = {
					date > 1919.1.1
					num_of_factories > 45
					has_tech = full_metal_construcion
					has_tech = fuel_direct_injection
					has_tech = fuel_storage
					has_tech = neon_tubes
				}
				AND = {
					date > 1924.1.1
					num_of_factories > 20
					has_tech = wright_flyer
					has_tech = v8_engines
					has_tech = dubbs_process
					has_tech = alexanderson_alternator
				}
				AND = {
					date > 1933.1.1
					custom_trigger_tooltip = {
						tooltip = eoanb_trigger_tt_law_african_all
					}
					hidden_trigger = {
						
					}
				}
			}
		}

		visible = {
			has_idea = oil_era
		}

		fire_only_once = yes

		cost = 50

		days_remove = 180

		remove_effect = {
			custom_effect_tooltip = eoanb_tt_advance_era_aviation
			hidden_effect = {
				swap_ideas = { remove_idea = oil_era add_idea = aviation_era }
			}
		}

		ai_will_do = {
			base = 1000
		}
	}

	#Pursue the Dream of Flight (Victorian Era)
	eoanb_decision_pursue_dream_flight = {
		icon = generic_research

		available = {
			num_of_factories > 5
		}

		visible = {
			has_idea = victorian_era
			NOT = { has_tech = du_temple_monoplane }
			NOT = { has_tech = tatin_aeroplane }
			NOT = { has_tech = navigable_balloons }
		}

		fire_only_once = yes

		cost = 100

		complete_effect = {
			air_experience = 25
			add_tech_bonus = { bonus = 0.75 uses = 1 category = aviation_tech }
			set_country_flag = eoanb_decision_pursue_dream_flight_flag
		}

		ai_will_do = {
			base = 1
			modifier = {
				factor = 0
				tag = PRS
				NOT = { PRS = { has_completed_focus = PRS_focus_unlock_germany } }
			}
		}

	}
}
