on_actions = {
	on_startup = {
		effect = {
			268 = { #Djibouti
				add_dynamic_modifier = { modifier = DJI_dkaeb_railroad }
			}
			920 = { #Amhara
				add_dynamic_modifier = { modifier = ETH_dkaeb_railroad }
			}
			921 = { #Afar
				add_dynamic_modifier = { modifier = ETH_dkaeb_railroad }
			}
			271 = { #Addis Ababa
				add_dynamic_modifier = { modifier = ETH_dkaeb_railroad }
			}
			922 = { #Omo
				add_dynamic_modifier = { modifier = ETH_dkaeb_railroad }
			}
			969 = { #Rift Valley
				add_dynamic_modifier = { modifier = DJI_dkaeb_railroad }
			}
			548 = { #Uganda
				add_dynamic_modifier = { modifier = DJI_dkaeb_railroad }
			}
			1181 = { #Kibali Ituri
				add_dynamic_modifier = { modifier = DJI_dkaeb_railroad }
			}
			977 = { #Kivu
				add_dynamic_modifier = { modifier = DJI_dkaeb_railroad }
			}
			949 = { #Maniema
				add_dynamic_modifier = { modifier = DJI_dkaeb_railroad }
			}
			1182 = { #Tanganika
				add_dynamic_modifier = { modifier = DJI_dkaeb_railroad }
			}
			879 = { #Katanga
				add_dynamic_modifier = { modifier = DJI_dkaeb_railroad }
			}
		}
	}
	#ROOT is winner #FROM gets annexed - For civil wars on_civil_war_end is also fired
	on_annex = {
		effect = {
			if = {
				limit = {
					tag = MAF
					FROM = { tag = KEN }
				}
				country_event = {
					id = mittel.132
					days = 1
				}
			}
		}
	}

	on_new_term_election = {
		effect = {
			### Liberia ###
			if = {
				limit = { tag = LIB }
				country_event = lib.3 #1939
			}
		}
	}
	
	on_monthly = {
		effect = {
			if = {
				limit = {
					tag = MAF
					NOT = { has_country_flag = MAF_no_collapse }
				}
				MAF_update_collapse_var = yes
			}
		}
	}
	on_war_relation_added = {
		effect = {
			# War Breaks Out in Europe
			if = {
				limit = {
					OR = {
						AND = {
							tag = GER
							FROM = {
								OR = {
									tag = RUS
									tag = FRA
								}
							}
						}
						AND = {
							OR = {
								tag = RUS
								tag = FRA
							}
							FROM = { tag = GER }
						}
					}
				}
				every_country = {
					limit = {
						OR = {
							tag = CMR #German colonies
							tag = NMB
							tag = CEA
							tag = KOG
							tag = ZAM
							tag = COG
							tag = KTG
							tag = CIV
							tag = IVO
							tag = MAG
							tag = GHA #British colonies
							tag = NGR
							tag = KEN
							tag = UGA
							tag = BSC
							tag = MLW	
							tag = ZZB
							tag = PAF #Other colonies/countries
							tag = SIE
							tag = SFA
							tag = DJI
							tag = ETH
							tag = SOM
							tag = ZIM
							tag = SAF
							tag = SFR
							tag = SUD
						}
					}
					country_event = {
						id = ostafrika.14
						days = 7
					}
				}
				every_country = { #Anger at wartime
					limit = {
						OR = {
						tag = MAF
						tag = CMR
						tag = NMB
						tag = CEA
						tag = KOG
						tag = COG
						tag = KTG
						tag = CIV
						tag = IVO
						tag = ZAM
						tag = GHA
						tag = NGR
						tag = KEN
						tag = UGA
						tag = PAF
						tag = BSC
						tag = MLW
						tag = DJI
						tag = MAG
						}
					}
					country_event = {
						id = mittel.90
						days = 57
					}
				}
			}
		}
	}
	#FROM is war target
	on_declare_war = {
		effect = {
			# Ogaden War
			if = {
				limit = {
					tag = ETH
					FROM = { tag = SOM }
				}
				hidden_effect = {
					random_other_country = {
						news_event = { id = morenews.37 days = 1 }
					}
				}
			}
		}
	}
	
	on_declare_war = {
		effect = {
			# Yucatan
			if = {
				limit = {
					tag = MEX
					FROM = { tag = YUC }
				}
				hidden_effect = {
					random_other_country = {
						news_event = { id = morenews.0 days = 2 }
					}
				}
			}
		}
	}
	
	on_government_change = {
		effect = {
			if = {
				limit = {
					tag = CUB
					has_socialist_government = yes
					has_country_flag = CUB_socialists_consolidate
					has_completed_focus = CUB_leftists
					NOT = {
						has_completed_focus = CUB_coalition_and_conflict
					}
				}
				hidden_effect = {
					random_other_country = {
						news_event = { id = morenews.6 days = 2 }
					}
				}
			}
		}
	}

	on_government_change = {
		effect = {
			if = {
				limit = {
					tag = CUB
					has_authoritarian_government = yes
					has_country_flag = CUB_natpop_march
					has_completed_focus = CUB_autenticfoc_begin
					is_subject = no
					}
				hidden_effect = {
					random_other_country = {
						news_event = { id = morenews.7 days = 2 }
					}
				}
			}
		}
	}
	
	on_government_change = {
		effect = {
			if = {
				limit = {
					tag = CUB
					has_authoritarian_government = yes
					has_country_flag = CUB_milcoup_flag
					has_completed_focus = CUB_order_restored
					is_subject = no
					}
				hidden_effect = {
					random_other_country = {
						news_event = { id = morenews.8 days = 2 }
					}
				}
			}
		}
	}
	
	on_government_change = {
		effect = {
			if = {
				limit = {
					tag = CUB
					has_authoritarian_government = yes
					has_country_flag = CUB_USpuppet
					}
				hidden_effect = {
					random_other_country = {
						news_event = { id = morenews.9 days = 2 }
					}
				}
			}
		}
	}
	
	on_government_change = {
		effect = {
			if = {
				limit = {
					tag = CUB
					has_elected_government = yes
					has_country_flag = CUB_electionman_flag
					has_completed_focus = CUB_new_elections
					is_subject = no
					}
				hidden_effect = {
					random_other_country = {
						news_event = { id = morenews.10 days = 2 }
					}
				}
			}
		}
	}
	
	on_declare_war = {
		effect = {
			# Parsley War
			if = {
				limit = {
					tag = HAI
					FROM = { tag = DOM }
				}
				hidden_effect = {
					random_other_country = {
						news_event = { id = morenews.11 days = 2 }
					}
				}
			}
		}
	}
	#Dominician Republic
	on_government_change = {
		effect = {
			if = {
				limit = {
					tag = DOM
					has_authoritarian_government = yes
					OR = {
						has_country_flag = DOM_estrella_gone
						has_country_flag = DOM_trujillo_wins
					}
				}
				hidden_effect = {
					random_other_country = {
						news_event = { id = morenews.12 days = 2 }
					}
				}
			}
		}
	}
#Guatemala
	on_government_change = {
		effect = {
			if = {
				limit = {
					tag = GUA
					OR = {
						has_country_flag = GUA_NPP_wins_flag
						has_country_flag = GUA_orellana_wins_flag
					}
				}
				hidden_effect = {
					random_other_country = {
						news_event = { id = morenews.17 days = 2 }
					}
				}
			}
		}
	}
#El Salvador
	on_government_change = {
		effect = {
			if = {
				limit = {
					tag = ELS
					has_socialist_government = yes
				}
				hidden_effect = {
					random_other_country = {
						news_event = { id = morenews.18 days = 2 }
					}
				}
			}
		}
	}
#Honduras
	on_government_change = {
		effect = {
			if = {
				limit = {
					tag = HON
					has_government = paternal_autocrat
					has_idea = HON_Jose_Leon_Castro_hog_pau
					is_subject = no
				}
				hidden_effect = {
					random_other_country = {
						news_event = { id = morenews.19 days = 2 }
					}
				}
			}
		}
	}
	
	on_government_change = {
		effect = {
			if = {
				limit = {
					tag = HON
					has_government = totalist
					is_subject = no
					has_country_leader = {
						name = "Venancio Callejas"
						ruling_only = yes
					}
				}
				hidden_effect = {
					random_other_country = {
						news_event = { id = morenews.20 days = 2 }
					}
				}
			}
		}
	}
#Honduras
	on_government_change = {
		effect = {
			if = {
				limit = {
					tag = HON
					has_government = paternal_autocrat
					has_cosmetic_tag = HON_banana
				}
				hidden_effect = {
					random_other_country = {
						news_event = { id = morenews.21 days = 2 }
					}
				}
			}
		}
	}
#Nicaragua
	on_government_change = {
		effect = {
			if = {
				limit = {
					tag = NIC
					has_government = social_liberal
					has_country_flag = NIC_liberal_revolution_flag
				}
				hidden_effect = {
					random_other_country = {
						news_event = { id = morenews.22 days = 2 }
					}
				}
			}
		}
	}
#Costa Rica
	on_faction_formed = {
		effect = {
			if = {
				limit = {
					tag = COS
					is_faction_leader = yes
				}
				hidden_effect = {
					random_other_country = {
						news_event = { id = morenews.24 days = 2 }
					}
				}
			}
		}
	}
#Panama Police Coup
	on_government_change = {
		effect = {
			if = {
				limit = {
					tag = PAN
					has_government = paternal_autocrat
					has_completed_focus = PAN_police_coup
					NOT = {
						has_completed_focus = PAN_a_new_constitution
					}
				}
				hidden_effect = {
					random_other_country = {
						news_event = { id = morenews.33 days = 2 }
					}
				}
			}
		}
	}
	#Flemish Revolt
	#FROM is war target
	on_declare_war = {
		effect = {
			# Flanders
			if = {
				limit = {
					tag = BEL
					FROM = { tag = FLN }
				}
				hidden_effect = {
					random_other_country = {
						news_event = { id = morenews.49 days = 2 }
					}
				}
			}
		}
	}
	#Belgium changes government
	on_government_change = {
		effect = {
			if = {
				limit = {
					tag = BEL
					OR = {
						is_subject = no
						is_subject_of = GER
					}
					OR = {
						has_socialist_government = yes
						has_elected_government = yes
					}
				}
				hidden_effect = {
					random_other_country = {
						news_event = { id = morenews.51 days = 2 }
					}
				}
			}
		}
	}
	
	#FROM is war target
	on_declare_war = {
		effect = {
			# Bolivia vs Chile
			if = {
				limit = {
					tag = BOL
					FROM = { tag = CHL }
					has_country_flag = BOL_Revenge
				}
				hidden_effect = {
					random_other_country = {
						news_event = { id = morenews.52 days = 2 }
					}
				}
			}
		}
	}
	
	on_government_change = {
		effect = {
			if = {
				limit = {
					tag = CAF
					has_government = social_democrat
					has_country_flag = CAF_pa_pl_coalition_flag
				}
				hidden_effect = {
					random_other_country = {
						news_event = { id = morenews.54 days = 2 }
					}
				}
			}
		}
	}
	
	on_government_change = {
		effect = {
			if = {
				limit = {
					tag = CAF
					has_government = authoritarian_democrat
					has_country_flag = CAF_governors_coup
				}
				hidden_effect = {
					random_other_country = {
						news_event = { id = morenews.55 days = 2 }
					}
				}
			}
		}
	}
	
	on_government_change = {
		effect = {
			if = {
				limit = {
					tag = CAF
					has_socialist_government = yes
					has_country_flag = CAF_governors_coup
				}
				hidden_effect = {
					random_other_country = {
						news_event = { id = morenews.56 days = 2 }
					}
				}
			}
		}
	}

	on_government_change = {
		effect = {
			if = {
				limit = {
					tag = ICE
					has_socialist_government = yes
					NOT = {
						has_completed_focus = ICE_Synd_Gov_Form
					}
					has_global_flag = Cod_War_TI_Victory
				}
				hidden_effect = {
					random_other_country = {
						news_event = { id = morenews.59 days = 2 }
					}
				}
			}
		}
	}
	
	on_government_change = {
		effect = {
			if = {
				limit = {
					tag = URG
					OR = {
						has_government = syndicalist
						has_government = authoritarian_democrat
						AND = {
							has_government = radical_socialist
							has_country_flag = URG_Socialist_Coup
						}
					}
				}
				hidden_effect = {
					random_other_country = {
						news_event = { id = morenews.65 days = 2 }
					}
				}
			}
		}
	}
	
	on_government_change = {
		effect = {
			if = {
				limit = {
					tag = DEN
					has_authoritarian_government = yes
					has_country_flag = den_kings_cabinet_flag
				}
				hidden_effect = {
					random_other_country = {
						news_event = { id = morenews.67 days = 15 }
					}
				}
			}
		}
	}
	
	on_government_change = {
		effect = {
			if = {
				limit = {
					tag = CAF
					has_government = social_democrat
					has_country_flag = CAF_pa_pnp_coalition_flag
				}
				hidden_effect = {
					random_other_country = {
						news_event = { id = morenews.68 days = 2 }
					}
				}
			}
		}
	}
	
	on_government_change = {
		effect = {
			if = {
				limit = {
					tag = CAF
					has_government = market_liberal
					has_country_flag = CAF_unity_party_victory_flag
				}
				hidden_effect = {
					random_other_country = {
						news_event = { id = morenews.69 days = 2 }
					}
				}
			}
		}
	}

	on_government_change = {
		effect = {
			if = {
				limit = {
					tag = CAF
					has_government = social_conservative
					has_country_flag = CAF_ncp_party_victory_flag
				}
				hidden_effect = {
					random_other_country = {
						news_event = { id = morenews.70 days = 2 }
					}
				}
			}
		}
	}

	#FROM is war target
#	on_war_relation_added = {
#		effect = {
#			# Ostasien and Siam at war, DJI to assist?
#			if = {
#				limit = {
#					tag = SIA
#					FROM = { tag = GEA }
#					DJI = {
#						owns_state = 831
#					}
#				}
#				hidden_effect = {
#					DJI = {
#						country_event = {
#							id = sharedafrika.49 days = 3
#						}
#					}
#				}
#			}
#		}
#	}
#	on_war_relation_added = {
#		effect = {
#			# Westasien and Siam at war, DJI to assist?
#			if = {
#				limit = {
#					tag = SIA
#					FROM = { tag = DJI }
#					DJI = {
#						owns_state = 831
#					}
#				}
#				hidden_effect = {
#					GEA = {
#						country_event = {
#							id = sharedafrika.49 days = 3
#						}
#					}
#				}
#			}
#		}
#	}
	
	on_war_relation_added = {
		effect = {
			# Burma and Siam at war, DJI to assist?
			if = {
				limit = {
					tag = BRM
					FROM = { tag = DJI }
					DJI = {
						owns_state = 790
					}
				}
				hidden_effect = {
					GEA = {
						country_event = {
							id = sharedafrika.50 days = 3
						}
					}
				}
			}
		}
	}
	
	on_war_relation_added = {
		effect = {
			# SIA vs royalist Siam, GEA takes back land
			if = {
				limit = {
					tag = SIR
					FROM = { tag = SIA }
					NOT = {
						GEA = {
							owns_state = 751
							owns_state = 999
						}
					}
				}
				hidden_effect = {
					GEA = {
						transfer_state = 751 #
						transfer_state = 999 #
					}
				}
			}
		}
	}
	
on_annex = {
	effect = {
		# Congo annexes KTG during Yeke Revolt
		if = {
			limit = {
				tag = COG
				FROM = { tag = KTG }
				COG = {
					NOT = {
						has_country_flag = COG_first_wave_done
					}
				}
			}
		COG = {
			country_event = {
				id = congo.23
				days = 1
				}
			}
		}
	}
}

on_capitulation = {
	effect = {
		# Mau Mau somehow defeat the Kenyans
		if = {
			limit = {
				tag = KEN
				FROM = { tag = KIK }
				NOT = {
					OR = {
					has_global_flag = KIK_second_uprising
					has_country_flag = KIK_miracle_victory
					}
				}
			}
		KIK = {
			country_event = {
				id = sharedafrika.115
				days = 1
				}
			}
		}
	}
}

on_annex = {
	effect = {
		# Kenya defeats the Mau Mau revolt openly
		if = {
			limit = {
				tag = KEN
				FROM = { tag = KIK }
				KIK = {
					NOT = {
						has_completed_focus = KIK_only_we_can_be_the_salvation_of_kenya
						}
					}
				}
			KEN = {
				country_event = {
					id = obama.11
					days = 1
				}
			}
		}
		if = {
			limit = {
				tag = KEN
				FROM = { tag = KIK }
				KEN = {
					has_idea = KEN_Maumau
				}
			}
		KEN = {
			country_event = {
				id = ugken.5
				days = 3
				}
			}
		MAF = {
			country_event = {
				id = ugken.5
				days = 3
				}
			}
		UGA = {
			country_event = {
				id = ugken.5
				days = 3
				}
			}
		SOM = {
			country_event = {
				id = ugken.5
				days = 3
				}
			}
		ETH = {
			country_event = {
				id = ugken.5
				days = 3
				}
			}
		}
	}
}

on_annex = {
	effect = {
		# Dahomey conquers Westafrika
		if = {
			limit = {
				tag = DAH
				FROM = { tag = CIV }
			}
		DAH = {
			country_event = {
				id = sharedafrika.102
				days = 7
				}
			}
		}
	}
}

on_annex = {
	effect = {
		# Westafrika conquers Dahomey
		if = {
			limit = {
				tag = CIV
				FROM = { tag = DAH }
			}
		CIV = {
			country_event = {
				id = sharedafrika.102
				days = 7
				}
			}
			MAF = {
				country_event = {
					id = sharedafrika.102
					days = 8 random_days = 2
				}
			}
		}
	}
}

	on_government_change = { # GEA intervenes in Samoa/attacks HAW
		effect = {
			if = {
				limit = {
					tag = HAW
					has_socialist_government = yes
				}
				hidden_effect = {
					GEA = {
						country_event = {
							id = geaflavour.56
							days = 2
						}
					}
				}
			}
		}
	}

	#FROM is war target
	on_war_relation_added = {
		effect = {
			#LKMT threatens Xiamen, state owner response?
			if = {
				limit = {
					tag = LEP
					FROM = { tag = CHI }
				}
				hidden_effect = {
					var:802.owner = {
						country_event = {
							id = sharedafrika.49 days = 3
						}
					}
				}
			}
		}
	}
#End
}