﻿# This is executed last among all history
GLOBAL = {

     #France, Britain, North America
	c:FRA ?= {
		activate_law = law_type:law_private_schools
        add_technology_researched = enlightenment
        set_institution_investment_level = {
			institution = institution_schools
			level = 3
		}
	}
    c:GBR ?= {
		activate_law = law_type:law_private_schools
        add_technology_researched = enlightenment
        set_institution_investment_level = {
			institution = institution_schools
			level = 3
		}
	}
    c:USA ?= {
		activate_law = law_type:law_public_schools
        add_technology_researched = enlightenment
        set_institution_investment_level = {
			institution = institution_schools
			level = 3
		}
	}
    c:TEX ?= {
		activate_law = law_type:law_public_schools
        add_technology_researched = enlightenment
        set_institution_investment_level = {
			institution = institution_schools
			level = 2
		}
	}
      every_country = {
		limit = {
			OR = {
				country_has_primary_culture = cu:anglo_canadian
				country_has_primary_culture = cu:franco_canadian
			}
			NOT = {
				has_law_or_variant = law_type:law_state_religion
			}
		}
        add_technology_researched = enlightenment
		activate_law = law_type:law_private_schools
        set_institution_investment_level = {
			institution = institution_schools
			level = 3
		}
	}
    #Australian schooling ws mainly public because there were no rich private institutions to fund anything. Same for Traansval & Oranje
    every_country = {
		limit = {
			OR = {
				country_has_primary_culture = cu:australian
			}
			NOT = {
				has_law_or_variant = law_type:law_state_religion
			}
		}
		activate_law = law_type:law_public_schools
        add_technology_researched = enlightenment
        set_institution_investment_level = {
			institution = institution_schools
			level = 2
		}
    }
    c:ORA ?= {
		activate_law = law_type:law_religious_schools
        add_technology_researched = enlightenment
        set_institution_investment_level = {
			institution = institution_schools
			level = 2
		}
	}
	c:TRN ?= {
		activate_law = law_type:law_religious_schools
        add_technology_researched = enlightenment
        set_institution_investment_level = {
			institution = institution_schools
			level = 2
		}
	}
	c:SAF ?= {
		activate_law = law_type:law_private_schools
        add_technology_researched = enlightenment
        set_institution_investment_level = {
			institution = institution_schools
			level = 2
		}
	}
    #Northern Germany, Netherlands and Scandinavia
    every_country = {
		limit = {
            AND = {
                OR = {
                    country_has_primary_culture = cu:swedish
                    country_has_primary_culture = cu:danish
                    country_has_primary_culture = cu:norwegian
                    country_has_primary_culture = cu:alemannic
                }
				NOT = {
					has_law_or_variant = law_type:law_state_religion
				}
            }
            
		}
        add_technology_researched = enlightenment
        set_institution_investment_level = {
			institution = institution_schools
			level = 2
		}
	}
	c:FIN ?= {
		activate_law = law_type:law_religious_schools
        add_technology_researched = enlightenment
        set_institution_investment_level = {
			institution = institution_schools
			level = 2
		}
	}
	every_country = {
		limit = {
            AND = {
                country_has_primary_culture = cu:north_german
                NOT = { this = c:PRU }
            }
			NOT = {
				has_law_or_variant = law_type:law_state_religion
			}      
		}
		activate_law = law_type:law_public_schools
        add_technology_researched = enlightenment
		add_technology_researched = empiricism
        set_institution_investment_level = {
			institution = institution_schools
			level = 2
		}
	}
    c:PRU ?= {
		activate_law = law_type:law_public_schools
        #activate_law = law_type:law_restricted_child_labor #was promulgated in 1838 but needed to have better starting literacy
        add_technology_researched = enlightenment
        set_institution_investment_level = {
			institution = institution_schools
			level = 3
		}
	}
    c:NET ?= {
		effect_starting_technology_tier_1_tech = yes
		add_technology_researched = labor_movement
		activate_law = law_type:law_public_schools
		activate_law = law_type:law_restricted_child_labor #was promulgated way later but needed to have better starting literacy. Maybe country unique modifier needed instead?
        add_technology_researched = enlightenment
        set_institution_investment_level = {
			institution = institution_schools
			level = 4 #Netherland should be on top
		}
	}

    #Southern Germany and Belgium
    c:HOH = {
		activate_law ?= law_type:law_public_schools
        add_technology_researched = enlightenment
        set_institution_investment_level = {
			institution = institution_schools
			level = 2
		}
	}
	c:BAD ?= {
		activate_law = law_type:law_public_schools
        add_technology_researched = enlightenment
        set_institution_investment_level = {
			institution = institution_schools
			level = 2
		}
	}
	c:WUR ?= {
		activate_law = law_type:law_public_schools
        add_technology_researched = enlightenment
        set_institution_investment_level = {
			institution = institution_schools
			level = 2
		}
	}
	c:BAV ?= {
		activate_law = law_type:law_public_schools
        add_technology_researched = enlightenment
        set_institution_investment_level = {
			institution = institution_schools
			level = 2
		}
	}
	c:LUX ?= {
		activate_law = law_type:law_private_schools
        add_technology_researched = enlightenment
        set_institution_investment_level = {
			institution = institution_schools
			level = 2
		}
	}
    c:BEL ?= {
		activate_law = law_type:law_private_schools
        add_technology_researched = enlightenment
        set_institution_investment_level = {
			institution = institution_schools
			level = 3
		}
	}
	c:AUS ?= {
		activate_law = law_type:law_private_schools
        set_institution_investment_level = {
			institution = institution_schools
			level = 2
		}
	}
    #Italy & Iberia
    c:TUS ?= {
		activate_law = law_type:law_religious_schools
        set_institution_investment_level = {
			institution = institution_schools
			level = 2
		}
	}
	c:SAR ?= {
		activate_law = law_type:law_religious_schools
        add_technology_researched = enlightenment
        set_institution_investment_level = {
			institution = institution_schools
			level = 3
		}
	}
	c:PAR ?= {
		activate_law = law_type:law_religious_schools
        set_institution_investment_level = {
			institution = institution_schools
			level = 2
		}
	}
	c:MOD ?= {
		activate_law = law_type:law_religious_schools
        add_technology_researched = enlightenment
        set_institution_investment_level = {
			institution = institution_schools
			level = 3
		}
	}
	c:LUC ?= {
		activate_law = law_type:law_religious_schools
        set_institution_investment_level = {
			institution = institution_schools
			level = 2
		}
	}
	c:SIC ?= {
		activate_law = law_type:law_religious_schools
	}
    c:POR ?= {
		activate_law = law_type:law_religious_schools
	}
    c:SPA ?= {
		activate_law = law_type:law_religious_schools
        set_institution_investment_level = {
			institution = institution_schools
			level = 2
		}
	}
    #Balkans and Eastern Med
    c:WAL ?= {
		activate_law = law_type:law_religious_schools
	}
    c:TUR ?= {
		activate_law = law_type:law_religious_schools
	}
	c:SER ?= {
		activate_law = law_type:law_religious_schools
	}
    c:MON ?= {
		activate_law = law_type:law_religious_schools
	}
	c:MOL ?= {
		activate_law = law_type:law_religious_schools
	}
	c:ION ?= {
		activate_law = law_type:law_religious_schools
	}
	c:GRE ?= {
		activate_law = law_type:law_religious_schools
        set_institution_investment_level = {
			institution = institution_schools
			level = 2
		}
	}
	c:EGY ?= {
		activate_law = law_type:law_religious_schools
	}
    c:HAW ?= {
		activate_law = law_type:law_religious_schools
	}
    #Latin America should be mainly religious with some more progressive laws in the south
    every_country = {
		limit = {
			OR = {
				country_has_primary_culture = cu:mexican
				country_has_primary_culture = cu:central_american
				country_has_primary_culture = cu:north_andean
				country_has_primary_culture = cu:south_andean
				country_has_primary_culture = cu:brazilian
				country_has_primary_culture = cu:cariban
			}
		}
		activate_law = law_type:law_religious_schools
	}
    c:ARG ?= {
		activate_law = law_type:law_private_schools
        set_institution_investment_level = {
			institution = institution_schools
			level = 1
		}
	}
    c:CHL ?= {
        set_institution_investment_level = {
			institution = institution_schools
			level = 1
		}
	}
    #Middle East & Central Asia - Madrassahs
   every_country = {
		limit = {
			OR = {
				capital ?= { is_in_geographic_region = geographic_region_middle_east }
				capital ?= { is_in_geographic_region = geographic_region_central_asia }
			}
		}
		activate_law = law_type:law_religious_schools
	}
    c:SIN ?= {
		activate_law = law_type:law_religious_schools
	}
    c:PAN ?= {
		activate_law = law_type:law_religious_schools
	}
	c:TRI ?= {
		activate_law = law_type:law_religious_schools
	}
	c:TUN ?= {
		activate_law = law_type:law_religious_schools
	}
	c:TUG ?= {
		activate_law = law_type:law_religious_schools
	}
	c:CON ?= {
		activate_law = law_type:law_religious_schools
	}
	c:AIT ?= {
		activate_law = law_type:law_religious_schools
	}
	c:MAS ?= {
		activate_law = law_type:law_religious_schools
	}
	c:MOR ?= {
		activate_law = law_type:law_religious_schools
	}
    
    #East Asia
    c:JAP ?= {
		activate_law = law_type:law_religious_schools
        set_institution_investment_level = {
			institution = institution_schools
			level = 2
		}
		active_law:lawgroup_education_system ?= { # religious schools
			add_amendment = {
				type = amendment_terakoya
				sponsor = PREV.ig:ig_devout
			}
		}
	}
    c:KOR ?= {
		activate_law = law_type:law_religious_schools
	}
	c:CHI ?= {
		activate_law = law_type:law_religious_schools
	}
    c:DAI ?= {
		activate_law = law_type:law_religious_schools
	}
	c:BUR ?= {
		activate_law = law_type:law_religious_schools
	}
	c:CAM ?= {
		activate_law = law_type:law_religious_schools
	}
	c:SIA ?= {
		activate_law = law_type:law_religious_schools
	}
	
}