on_survey_planet = {
	events = {
		xt.5 # Adds +20 minerals to the surveying empire
	}
}
on_system_gained = {
	events = {
		xt.7 # Adds minerals to asteroids
		xt.10 # Adds minerals to molten worlds
		xt.14 # Fires xt.13 (adding local delicacies) for all planets (filtered) in a gained system
		xt.17 # Fires xt.16 (adding +1 energy deposit to each star) for all stars in a gained system
	}
}
on_system_lost = {
	events = {
		xt.8 # Removes minerals from asteroids
		xt.11 # removes minerals from molten worlds
		xt.18 # removes the +1 energy deposit from each star lost by the empire
	}
}
on_colonized = {
	events = {
		xt.56 #Fires xt.56 when a new colony has been established, to add penal station modifier to planet if system has a penal station
	}
}
on_monthly_pulse_country = {
	events = {
		xt.15 #Fires xt.15 monthly to check how many planet types we own that are NOT of the homeworld type, and updates variable
		xt.19 #Fires xt.19 monthly to check how many scientists in the empire have the Expertise:Particles trait, and updates variable
		xt.24 #Fires xt.24 monthly to check how many molten planets are in the empire, updates variable then increases alloy cap by 5000 multipled by this variable
		xt.26 #Fires xt.26 monthly to check how many consumer goods are in stockpile, divides by 2500, then sends to variable
		xt.30 #Fires xt.30 monthly to check how many Hyperlane Express Depots are in the empire, then updates variable
		xt.32 #Fires xt.32 monthly to check how many Hyperlane Courier fleets exist, then updates variable
		xt.33 #Fires xt.33 monthly to check how many planets are in Empire, so that courier ships from xt.29 don't spawn if there's only one planet in Empire
		xt.38 #Fires xt.38 monthly to check what the monthly influence income is
		xt.51 #Fires xt.51 monthly to see if a precinct house or judgement hall exists, if the empire hasn't adopted the Enforcement tradition tree
		xt.58 #Fires xt.58 monthly to check how many planets in empire have 0 crime, then updates variable for use in modifier
	}
}
on_added_to_leader_pool = {
	events = {
		xt.20 # Adds Expertise: Particles to leaders if they do not have it already
		xt.21 # Adds Expertise: Biology to leaders if they do not have it already
		xt.23 # Adds Metallurgic Apprentice to officials if they do not have it already
		xt.45 # Adds Expertise: Archaeostudies to leaders if they do not have it already
		xt.57 # Adds Rightous trait to officials if they do not have it already
	}
}
on_building_complete = {
	events = {
		xt.27 # Checks if last building completed was a factory, and if xt_consumerism_4 has been taken, then runs xt.28
		xt.52 # Checks if there is now a precinct houses or judgement hall building on this planet, then updates xt_enforcement_adopt_building_count if so
	}
}

on_sign_commercial_pact = {
	events = {
		xt.34 # Updates variable when a commercial pact is signed
	}
}
on_commercial_pact_broken = {
	events = {
		xt.35 # updates variable when a commercial pact is broken
	}
}
on_pop_ethic_changed = {
	events = {
		xt.39 # Adds 1 month of influence when triggered
	}
}
on_planet_bombarded = {
	events = {
		xt.40 #50% chance of calling xt.41 to change a pop's ethics towards the bombarder, per month, when devastation > 10%
	}
}

on_arch_site_finished = {
	events = {
		xt.42 #Adds the xt_archaeo_site_finished flag to countries that finish an archaeo site
		xt.46 # Provides 12 months' worth of unity to the owner of a fleet that finished an archaeological site
	}
}

on_relic_received = {
	events = {
		xt.48 # Adds 1 to the relic count
	}
}

on_relic_lost = {
	events = {
		xt.49 # Removed 1 from the relic count
	}
}

on_game_start = {
	events = {
		xt.49
	}
}