on_actions = {
	on_startup = {
		effect = {
			FRA = {
				country_event = { hours = 2 id = deluge_france.1 }
			}
		}
	}
	# country 
	on_new_term_election = {
		random_events = {
			100 = deluge_elections.1  # Radicals promise to nationalise industries and build a welfare state
			100 = deluge_elections.4  # Radicals argue for separating church and state
			100 = deluge_elections.8  # Radicals promise to shut down labour camps
			100 = deluge_elections.12 # Radicals argue for ending the gold standard
			100 = deluge_elections.18 # Radicals becoming popular due to government policy of welfare state

			100 = deluge_elections.2  # Democrats argue for cutting social spending
			100 = deluge_elections.3  # Democrats argue for separating church and state
			100 = deluge_elections.10 # Democrats promise to shut down labour camps
			100 = deluge_elections.19 # Democrats argue for restoring the gold standard
			100 = deluge_elections.17 # Democrats becoming popular due to government policy of robber barons

			100 = deluge_elections.6  # Monarchists demand religious tests for receiving state aid
			100 = deluge_elections.7  # Monarchists promise to shut down labour camps
			100 = deluge_elections.11 # Monarchists propose merger of state and church functions
			100 = deluge_elections.13 # Monarchists argue for restoring the gold standard
			100 = deluge_elections.16 # Monarchists becoming popular due to government policy of established religion

			100 = deluge_elections.14 # Ultranationalists promise to end hyper-inflation
			100 = deluge_elections.9  # Ultranationalists demand end to welfare for foreigners
			100 = deluge_elections.5  # Ultranationalists demand restrictions on foreigner movement
			100 = deluge_elections.15 # Ultranationalists becoming popular thanks to government policy of harsh labour camps
			
			100 = deluge_elections.20 # Democrats win re-election with plurality
			100 = deluge_elections.21 # Radicals win re-election with plurality
			100 = deluge_elections.22 # Monarchists win re-election with plurality
			100 = deluge_elections.23 # Ultranationalists win re-election with plurality
		}
	}

	# Ace pilots
	# country, FROM = ace
	on_ace_promoted = {
		random_events = {
			100 = ace_promoted.1
			5 = ace_promoted.2
		}
	}

	# country, FROM = ace, PREV = enemy ace 
	# This event fires twice, once for each ace.
	on_aces_killed_each_other = {
		random_events = {
			100 = aces_killed_each_other.1
		}
	}
	
	# country, FROM = our ace, 
	# PREV = enemy ace, has killed FROM
	on_ace_killed_by_ace = {
		random_events = {
			100 = ace_killed_by_ace.1
		}
	}

	# country, FROM = our ace, 
	# PREV = enemy ace, killed by FROM
	on_ace_killed_other_ace = {
		random_events = {
			100 = ace_killed_other_ace.1
		}
	}

	# country, FROM = ace
	on_ace_killed = {
		random_events = {
			100 = ace_died.1
		}
	}

	# During justifying wargoals
	# triggered daily, so make sure there is a sink somewhere not firing events
	# country, FROM = target nation
	on_justifying_wargoal_pulse = {

		random_events = {
			100 = polish_expansion.5 # Create Republican International
		}
		
		random_events = {
			100 = russia_expansion.14 # Create Republican International
		}
		
		random_events = {
			100 = deluge_americas.1 # Create Latin Royalists etc
		}
		
		random_events = {
			100 = war_justification.1
			100 = war_justification.2
			100 = war_justification.3
			100 = war_justification.4
			100 = war_justification.5
			100 = war_justification.6
			100 = war_justification.7
			100 = war_justification.8
			100 = war_justification.9
			100 = war_justification.10
			100 = war_justification.11
			100 = war_justification.12
			100 = war_justification.13
			100 = war_justification.14
			100 = war_justification.15
			100 = war_justification.16
			100 = war_justification.17
			100 = war_justification.18
			100 = war_justification.19
			17000 = 0
		}
	}

	on_wargoal_expire = {
		random_events = {
			100 = war_justification.301
		}
	}

	#FROM is state #ROOT is broken as hell
	on_nuke_drop = {

		effect = {
			news_event = { id = nuke_dropped.2 days = 1}
			news_event = { id = nuke_dropped.3 days = 1}
			news_event = { id = nuke_dropped.4 days = 1}
			news_event = { id = nuke_dropped.5 days = 1}
			news_event = { id = nuke_dropped.6 days = 1}
			news_event = { id = nuke_dropped.7 days = 1}
			news_event = { id = nuke_dropped.8 days = 1}
			news_event = { id = nuke_dropped.9 days = 1}
			news_event = { id = nuke_dropped.10 days = 1}
			news_event = { id = nuke_dropped.11 days = 1}
			news_event = { id = nuke_dropped.12 days = 1}
			news_event = { id = nuke_dropped.13 days = 1}
		}
		random_events = {
			100 = nuke_dropped.0
		}
	}

	# country random events
	#on_bi_yearly_pulse = {
	#	random_events = {
	#		1000 = 0
	#	}
	#}

	#on_five_year_pulse = {
	#
	#}

	on_border_war_lost = {
		effect = {
		}
	}
	
	on_leave_faction = {
		effect = {
			FROM = {
				add_opinion_modifier = {
					modifier = faction_traitor
					target = ROOT
					days = 365
				}
			
				add_opinion_modifier = {
					modifier = faction_traitor_trade
					target = ROOT
					days = 365
				}
			}
		}
	}

	#FROM is the one that joins the faction
	on_create_faction = {
	}

	#FROM is country getting invited.
	on_offer_join_faction = {
	}

	#FROM is faction leader on join faction requests.
	on_join_faction = {
		effect = {
		}
	}

	#FROM is war target
	on_declare_war = {
	}
	
	# When a new faction is formed
	on_faction_formed = {
		effect = {
			news_event = { id = news.159 }
		}
	}
	
	# ROOT is capitulated country, FROM is winner
	on_capitulation = {
		effect = {
			news_event = { id = country_capitulated.0 days = 0 }
			
			
			# Chinese troops march into Nantong
			if = {
				limit = {
					tag = ENG
					787 = {
						is_owned_by = ENG
					}
					OR = {
						613 = {
							is_owned_by = CHI
						}
						613 = {
							is_owned_by = PRC
						}
					}
				}
				613 = {
					owner = {
						country_event = deluge_china.13
					}
				}
			}

			# Chinese troops march into Weihai
			if = {
				limit = {
					tag = ENG
					794 = {
						is_owned_by = ENG
					}
					OR = {
						597 = {
							is_owned_by = CHI
						}
						597 = {
							is_owned_by = PRC
						}
					}
				}
				597 = {
					owner = {
						country_event = deluge_china.14
					}
				}
			}

			# Chinese troops march into Hong Kong
			if = {
				limit = {
					tag = ENG
					326 = {
						is_owned_by = ENG
					}
					OR = {
						593 = {
							is_owned_by = CHI
						}
						593 = {
							is_owned_by = PRC
						}
					}
				}
				593 = {
					owner = {
						country_event = deluge_china.15
					}
				}
			}

			# Chinese troops march into Macau
			if = {
				limit = {
					tag = POR
					729 = {
						is_owned_by = POR
					}
					OR = {
						592 = {
							is_owned_by = CHI
						}
						592 = {
							is_owned_by = PRC
						}
					}
				}
				592 = {
					owner = {
						country_event = deluge_china.16
					}
				}
			}
			
			# Chinese troops march into Zhanjiang
			if = {
				limit = {
					tag = FRA
					728 = {
						is_owned_by = FRA
					}
					OR = {
						594 = {
							is_owned_by = CHI
						}
						594 = {
							is_owned_by = PRC
						}
					}
				}
				594 = {
					owner = {
						country_event = deluge_china.17
					}
				}
			}
			
			# Chinese troops march into Qingdao
			if = {
				limit = {
					tag = FRA
					743 = {
						is_owned_by = FRA
					}
					OR = {
						597 = {
							is_owned_by = CHI
						}
						597 = {
							is_owned_by = PRC
						}
					}
				}
				597 = {
					owner = {
						country_event = deluge_china.18
					}
				}
			}			
		}
	}

	on_government_change = {
		effect = {
			if = {
				limit = { has_idea = deluge_fascism_crackdown_idea }
				remove_ideas = deluge_fascism_crackdown_idea
			}
			if = {
				limit = { has_idea = deluge_fascism_liberalisation_idea }
				remove_ideas = deluge_fascism_liberalisation_idea
			}
			if = {
				limit = { has_idea = deluge_democratic_crackdown_idea }
				remove_ideas = deluge_democratic_crackdown_idea
			}
			if = {
				limit = { has_idea = deluge_democratic_liberalisation_idea }
				remove_ideas = deluge_democratic_liberalisation_idea
			}
			if = {
				limit = { has_idea = deluge_communism_crackdown_idea }
				remove_ideas = deluge_communism_crackdown_idea
			}
			if = {
				limit = { has_idea = deluge_communism_liberalisation_idea }
				remove_ideas = deluge_communism_liberalisation_idea
			}
			if = {
				limit = { has_idea = deluge_neutrality_crackdown_idea }
				remove_ideas = deluge_neutrality_crackdown_idea
			}
			if = {
				limit = { has_idea = deluge_neutrality_liberalisation_idea }
				remove_ideas = deluge_neutrality_liberalisation_idea
			}
		}
	}

	on_coup_succeeded = {
		effect = {
			#Turn elections on for democracies created from coup
			random_country = {
				limit = {
					has_government = democratic
					original_tag = ROOT
				}
				set_politics = {
					elections_allowed = yes
				}
			}
		}
	}

	#ROOT is winner #FROM gets annexed
	on_civil_war_end = {
		effect = {
		}
	}
	
	#used when puppeting in a peace conference
	#ROOT = nation being puppeted, FROM = overlord
	on_puppet = {
		effect = {
			every_state = { 
				remove_claim_by = ROOT
			}
			if = {
				limit = {
					has_government = communism
				}
				set_politics = {
					elections_allowed = yes
				}
				add_ideas = universal
				add_ideas = welfare_state
			}
			if = {
				limit = {
					has_government = democratic
				}
				set_politics = {
					elections_allowed = yes
				}
				add_ideas = restricted
				add_ideas = robber_barons
			}
			if = {
				limit = {
					has_government = neutrality
				}
				set_politics = {
					elections_allowed = yes
				}
				add_ideas = landed
				add_ideas = established_religion
			}
			if = {
				limit = {
					has_government = fascism
				}
				set_politics = {
					elections_allowed = no
				}
				add_ideas = novote
				add_ideas = labour_camps
			}
			if = {
				limit = {
					has_idea = generic_trades_unionist
					NOT = { has_government = communism }
				}
				remove_ideas = generic_trades_unionist
			}
			if = {
				limit = {
					has_idea = generic_innovative_capitalist
					NOT = { has_government = democratic }
				}
				remove_ideas = generic_innovative_capitalist
			}
			if = {
				limit = {
					has_idea = generic_landed_gentleman
					NOT = { has_government = neutrality }
				}
				remove_ideas = generic_landed_gentleman
			}
			if = {
				limit = {
					has_idea = generic_great_war_hero
					NOT = { has_government = fascism }
				}
				remove_ideas = generic_great_war_hero
			}
			if = {
				limit = {
					has_idea = generic_deluge_communist_revolutionary
					NOT = { has_government = communism }
				}
				remove_ideas = generic_deluge_communist_revolutionary
			}
			if = {
				limit = {
					has_idea = generic_deluge_democratic_reformer
					NOT = { has_government = democratic }
				}
				remove_ideas = generic_deluge_democratic_reformer
			}
			if = {
				limit = {
					has_idea = generic_monarchist_statesman
					NOT = { has_government = neutrality }
				}
				remove_ideas = generic_monarchist_statesman
			}
			if = {
				limit = {
					has_idea = generic_deluge_fascist_demagogue
					NOT = { has_government = fascism }
				}
				remove_ideas = generic_deluge_fascist_demagogue
			}
			if = {
				limit = {
					has_idea = bourbon_king
					NOT = { has_government = neutrality }
				}
				remove_ideas = bourbon_king
			}
			if = {
				limit = {
					has_idea = american_king
					NOT = { has_government = neutrality }
				}
				remove_ideas = american_king
			}
			if = {
				limit = {
					has_idea = swedish_king
					NOT = { has_government = neutrality }
				}
				remove_ideas = swedish_king
			}
			if = {
				limit = {
					has_idea = emperor_napoleon
					NOT = { has_government = neutrality }
				}
				remove_ideas = emperor_napoleon
			}
			if = {
				limit = {
					has_idea = ottoman_emperor
					NOT = { has_government = neutrality }
				}
				remove_ideas = ottoman_emperor
			}
			if = {
				limit = {
					has_idea = fighting_king
					NOT = {
						OR = {
							has_government = neutrality
							has_government = fascism
						}
					}
				}
				remove_ideas = fighting_king
			}
			if = {
				limit = {
					has_idea = wettin_king
					NOT = {
						OR = {
							has_government = neutrality
							has_government = fascism
						}
					}
				}
				remove_ideas = wettin_king
			}
			if = {
				limit = {
					has_idea = emperor_puyi
					NOT = { has_government = neutrality }
				}
				remove_ideas = emperor_puyi
			}
			if = {
				limit = {
					has_idea = hu_hanmin
					NOT = { has_government = democratic }
				}
				remove_ideas = hu_hanmin
			}
			if = {
				limit = {
					has_idea = sohn_seiner_klasse
					NOT = { has_government = communism }
				}
				remove_ideas = sohn_seiner_klasse
			}
			if = {
				limit = {
					has_idea = aryan_supremacist
					NOT = { has_government = fascism }
				}
				remove_ideas = aryan_supremacist
			}
			if = {
				limit = {
					has_idea = habsburg_emperor
					NOT = { has_government = neutrality }
				}
				remove_ideas = habsburg_emperor
			}
			if = {
				limit = {
					has_idea = westphalian_king
					NOT = { has_government = neutrality }
				}
				remove_ideas = westphalian_king
			}
			if = {
				limit = {
					has_idea = life_hussar
					NOT = { has_government = fascism }
				}
				remove_ideas = life_hussar
			}
			if = {
				limit = {
					AND = {
						TAG = CAN
						is_subject_of = ENG
					}
				}
				if = {
					limit = {
						has_global_flag = flag_united_kingdom_formed
					}
					set_cosmetic_tag = CAN_UK
				}
				if = {
					limit = {
						NOT = {
							OR = {
								has_global_flag = flag_united_kingdom_formed
								has_global_flag = flag_british_republic
							}
						}
					}
					set_cosmetic_tag = CAN_GB
				}
				set_party_name = { ideology = democratic name = deluge_canadian_democratic_short long_name = deluge_canadian_democratic_long }
				set_party_name = { ideology = fascism name = deluge_canadian_ultranat_short long_name = deluge_canadian_ultranat_long }
				set_party_name = { ideology = neutrality name = deluge_canadian_neutrality_short long_name = deluge_canadian_neutrality_long }
				create_country_leader = {
					name = "Lord Belmont"
					desc = ""
					picture = "gfx/leaders/deluge/earl_of_strafford.dds"
					expire = "1965.1.1"
					ideology = bonapartist_ideology
					traits = {
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = CAN
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = CAN_GB
				drop_cosmetic_tag = CAN_UK
				set_party_name = { ideology = democratic name = deluge_quebec_democratic_short long_name = deluge_quebec_democratic_long }
				set_party_name = { ideology = fascism name = deluge_quebec_ultranat_short long_name = deluge_quebec_ultranat_long }
				set_party_name = { ideology = neutrality name = deluge_quebec_neutrality_short long_name = deluge_quebec_neutrality_long }
				create_country_leader = {
					name = "Guillaume I"
					desc = ""
					picture = "gfx/leaders/deluge/marquess_of_londonderry.dds"
					expire = "1965.1.1"
					ideology = reactionary_ideology
					traits = {
						#
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = BUR
						is_subject_of = ENG
					}
				}
				if = {
					limit = {
						has_global_flag = flag_united_kingdom_formed
					}
					set_cosmetic_tag = BUR_UK
				}
				if = {
					limit = {
						NOT = {
							OR = {
								has_global_flag = flag_united_kingdom_formed
								has_global_flag = flag_british_republic
							}
						}
					}
					set_cosmetic_tag = BUR_GB
				}
				
				set_party_name = { ideology = neutrality name = deluge_burma_uk_neutrality_short long_name = deluge_burma_uk_neutrality_long }
				
				create_country_leader = {
					name = "Viscount Gough"
					desc = ""
					picture = "gfx/leaders/deluge/viscount_gough.dds"
					expire = "1953.3.1"
					ideology = reactionary_ideology
					traits = {
						
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = BUR
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = BUR_GB
				drop_cosmetic_tag = BUR_UK
				
				set_party_name = { ideology = neutrality name = deluge_burma_neutrality_short long_name = deluge_burma_neutrality_long }
				
				create_country_leader = {
					name = "Taw Phaya"
					desc = ""
					picture = "gfx/leaders/deluge/indian_princes/rajadhirat.dds"
					expire = "1953.3.1"
					ideology = reactionary_ideology
					traits = {
						
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = IRE
						is_subject_of = ENG
					}
				}
				if = {
					limit = {
						has_global_flag = flag_united_kingdom_formed
					}
					set_cosmetic_tag = IRE_GB # just in case
				}
				if = {
					limit = {
						NOT = {
							OR = {
								has_global_flag = flag_united_kingdom_formed
								has_global_flag = flag_british_republic
							}
						}
					}
					set_cosmetic_tag = IRE_GB
				}
			}
			if = {
				limit = {
					AND = {
						TAG = IRE
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = IRE_GB
			}
			if = {
				limit = {
					AND = {
						TAG = SAF
						is_subject_of = ENG
					}
				}
				if = {
					limit = {
						has_global_flag = flag_united_kingdom_formed
					}
					set_cosmetic_tag = SAF_UK
				}
				if = {
					limit = {
						NOT = {
							OR = {
								has_global_flag = flag_united_kingdom_formed
								has_global_flag = flag_british_republic
							}
						}
					}
					set_cosmetic_tag = SAF_GB
				}
			}
			if = {
				limit = {
					AND = {
						TAG = SAF
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = SAF_GB
				drop_cosmetic_tag = SAF_UK
			}
			if = {
				limit = {
					AND = {
						TAG = AST
						is_subject_of = ENG
					}
				}
				if = {
					limit = {
						has_global_flag = flag_united_kingdom_formed
					}
					set_cosmetic_tag = AST_UK
				}
				if = {
					limit = {
						NOT = {
							OR = {
								has_global_flag = flag_united_kingdom_formed
								has_global_flag = flag_british_republic
							}
						}
					}
					set_cosmetic_tag = AST_GB
				}
			}
			if = {
				limit = {
					AND = {
						TAG = AST
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = AST_GB
				drop_cosmetic_tag = AST_UK
			}
			if = {
				limit = {
					AND = {
						TAG = NZL
						is_subject_of = ENG
					}
				}
				if = {
					limit = {
						has_global_flag = flag_united_kingdom_formed
					}
					set_cosmetic_tag = NZL_UK
				}
				if = {
					limit = {
						NOT = {
							OR = {
								has_global_flag = flag_united_kingdom_formed
								has_global_flag = flag_british_republic
							}
						}
					}
					set_cosmetic_tag = NZL_GB
				}
			}
			if = {
				limit = {
					AND = {
						TAG = NZL
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = NZL_GB
				drop_cosmetic_tag = NZL_UK
			}
			if = {
				limit = {
					AND = {
						TAG = USA
						is_subject_of = ENG
					}
				}
				if = {
					limit = {
						has_global_flag = flag_united_kingdom_formed
					}
					set_cosmetic_tag = USA_UK
				}
				if = {
					limit = {
						NOT = {
							OR = {
								has_global_flag = flag_united_kingdom_formed
								has_global_flag = flag_british_republic
							}
						}
					}
					set_cosmetic_tag = USA_GB
				}
			}
			if = {
				limit = {
					AND = {
						TAG = USA
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = USA_GB
				drop_cosmetic_tag = USA_UK
			}
			if = {
				limit = {
					AND = {
						TAG = RAJ
						is_subject_of = ENG
					}
				}
				if = {
					limit = {
						has_global_flag = flag_united_kingdom_formed
					}
					set_cosmetic_tag = RAJ_UK
				}
				if = {
					limit = {
						NOT = {
							OR = {
								has_global_flag = flag_united_kingdom_formed
								has_global_flag = flag_british_republic
							}
						}
					}
					set_cosmetic_tag = RAJ_GB
				}
				
				set_party_name = { ideology = neutrality name = deluge_british_raj_neutrality_short long_name = deluge_british_raj_neutrality_long }

				create_country_leader = {
					name = "Lord Linlithgow"
					desc = ""
					picture = "gfx/leaders/deluge/lord_linlithgow.dds"
					expire = "1965.1.1"
					ideology = reactionary_ideology
					traits = {
						
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = RAJ
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = RAJ_GB
				drop_cosmetic_tag = RAJ_UK
				
				set_party_name = { ideology = neutrality name = deluge_india_neutrality_short long_name = deluge_india_neutrality_long }

				create_country_leader = {
					name = "Sayajirao III"
					desc = ""
					picture = "gfx/leaders/deluge/indian_princes/sayajirao_gaekwad_iii.dds"
					expire = "1965.1.1"
					ideology = bonapartist_ideology
					traits = {
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = MAL
						is_subject_of = ENG
					}
				}
				if = {
					limit = {
						has_global_flag = flag_united_kingdom_formed
					}
					set_cosmetic_tag = MAL_UK
				}
				if = {
					limit = {
						NOT = {
							OR = {
								has_global_flag = flag_united_kingdom_formed
								has_global_flag = flag_british_republic
							}
						}
					}
					set_cosmetic_tag = MAL_GB
				}
			}
			if = {
				limit = {
					AND = {
						TAG = MAL
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = MAL_GB
				drop_cosmetic_tag = MAL_UK
			}
			if = {
				limit = {
					AND = {
						TAG = ZIM
						is_subject_of = ENG
					}
				}
				if = {
					limit = {
						has_global_flag = flag_united_kingdom_formed
					}
					set_cosmetic_tag = ZIM_UK
				}
				if = {
					limit = {
						NOT = {
							OR = {
								has_global_flag = flag_united_kingdom_formed
								has_global_flag = flag_british_republic
							}
						}
					}
					set_cosmetic_tag = ZIM_GB
				}
			}
			if = {
				limit = {
					AND = {
						TAG = ZIM
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = ZIM_GB
				drop_cosmetic_tag = ZIM_UK
			}
			if = {
				limit = {
					AND = {
						TAG = INS
						is_subject_of = HOL
					}
				}
				set_cosmetic_tag = INS_HL
				set_party_name = { ideology = democratic name = deluge_indonesia_dutch_democratic_short long_name = deluge_indonesia_dutch_democratic_long }
				create_country_leader = {
					name = "A. T. van Starkenborgh Stachouwer"
					desc = ""
					picture = "gfx/leaders/deluge/alidius_tjarda_van_starkenborgh_stachouwer.dds"
					expire = "1953.3.1"
					ideology = liberal_republican_ideology 
					traits = {
						
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = INS
						NOT = {
							is_subject_of = HOL
						}
					}
				}
				drop_cosmetic_tag = INS_HL
				set_party_name = { ideology = democratic name = deluge_indonesia_democratic_short long_name = deluge_indonesia_democratic_long }
				create_country_leader = {
					name = "Sukarno"
					desc = ""
					picture = "gfx/leaders/deluge/sukarno.dds"
					expire = "1953.3.1"
					ideology = liberal_republican_ideology
					traits = {
						
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = NEP
						is_subject_of = POR
					}
				}
				set_cosmetic_tag = NEP_PR
				set_party_name = { ideology = neutrality name = deluge_portuguese_india_neutrality_short long_name = deluge_portuguese_india_neutrality_long }
				create_country_leader = {
					name = "José Ricardo Pereira Cabral"
					desc = ""
					picture = "gfx/leaders/deluge/portuguese_officer.dds"
					expire = "1965.1.1"
					ideology = reactionary_ideology
					traits = {
						#
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = NEP
						NOT = {
							is_subject_of = POR
						}
					}
				}
				drop_cosmetic_tag = NEP_PR
				set_party_name = { ideology = neutrality name = deluge_mysore_neutrality_short long_name = deluge_mysore_neutrality_long }
				create_country_leader = {
					name = "Krishna Raja Wadiyar IV"
					desc = ""
					picture = "gfx/leaders/deluge/indian_princes/krishna_raja_wadiyar.dds"
					expire = "1965.1.1"
					ideology = bonapartist_ideology
					traits = {
						#
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = BHU
						is_subject_of = FRA
					}
				}
				set_cosmetic_tag = BHU_FR
				set_party_name = { ideology = neutrality name = deluge_french_india_neutrality_short long_name = deluge_french_india_neutrality_long }
				create_country_leader = {
					name = "Louis Alexis Étienne Bonvin"
					desc = ""
					picture = "gfx/leaders/deluge/louis_faidherbe.dds"
					expire = "1965.1.1"
					ideology = reactionary_ideology
					traits = {
						#
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = BHU
						NOT = {
							is_subject_of = FRA
						}
					}
				}
				drop_cosmetic_tag = BHU_FR
				set_party_name = { ideology = neutrality name = deluge_travancore_neutrality_short long_name = deluge_travancore_neutrality_long }
				create_country_leader = {
					name = "Chithira Thirunal"
					desc = ""
					picture = "gfx/leaders/deluge/indian_princes/chithira_thirunal_balarama_varma.dds"
					expire = "1965.1.1"
					ideology = bonapartist_ideology
					traits = {
						#
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = VIN
						is_subject_of = FRA
					}
				}
				set_cosmetic_tag = VIN_FR
				
				set_party_name = { ideology = neutrality name = deluge_indochine_neutrality_short long_name = deluge_indochine_neutrality_long }

				create_country_leader = {
					name = "Jules Davout d'Auerstaedt"
					desc = ""
					picture = "gfx/leaders/deluge/joseph_vinoy.dds"
					expire = "1953.3.1"
					ideology = bonapartist_ideology
					traits = {
						
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = VIN
						NOT = {
							is_subject_of = FRA
						}
					}
				}
				drop_cosmetic_tag = VIN_FR
				
				set_party_name = { ideology = neutrality name = deluge_vietnam_neutrality_short long_name = deluge_vietnam_neutrality_long }
				
				create_country_leader = {
					name = "Bao Đai"
					desc = ""
					picture = "gfx/leaders/deluge/king_bao_dai.dds"
					expire = "1953.3.1"
					ideology = bonapartist_ideology
					traits = {
						
					}
				}
			}
		}
	}

	#used when puppeting through the occupied territories menu during peace time (or when releasing from non-core but owned territory, f.e. Britain releasing Egypt)
	#ROOT = nation being released, FROM = overlord
	on_release_as_puppet = {
		effect = {
			every_state = {
				remove_claim_by = ROOT
			}
			if = {
				limit = {
					has_government = communism
				}
				set_politics = {
					elections_allowed = yes
				}
				add_ideas = universal
				add_ideas = labour_camps
			}
			if = {
				limit = {
					has_government = democratic
				}
				set_politics = {
					elections_allowed = yes
				}
				add_ideas = restricted
				add_ideas = robber_barons
			}
			if = {
				limit = {
					has_government = neutrality
				}
				set_politics = {
					elections_allowed = yes
				}
				add_ideas = landed
				add_ideas = established_religion
			}
			if = {
				limit = {
					has_government = fascism
				}
				set_politics = {
					elections_allowed = no
				}
				add_ideas = novote
				add_ideas = labour_camps
			}
			if = {
				limit = {
					AND = {
						TAG = CAN
						is_subject_of = ENG
					}
				}
				if = {
					limit = {
						has_global_flag = flag_united_kingdom_formed
					}
					set_cosmetic_tag = CAN_UK
				}
				if = {
					limit = {
						NOT = {
							OR = {
								has_global_flag = flag_united_kingdom_formed
								has_global_flag = flag_british_republic
							}
						}
					}
					set_cosmetic_tag = CAN_GB
				}
				set_party_name = { ideology = democratic name = deluge_canadian_democratic_short long_name = deluge_canadian_democratic_long }
				set_party_name = { ideology = fascism name = deluge_canadian_ultranat_short long_name = deluge_canadian_ultranat_long }
				set_party_name = { ideology = neutrality name = deluge_canadian_neutrality_short long_name = deluge_canadian_neutrality_long }
				create_country_leader = {
					name = "Lord Belmont"
					desc = ""
					picture = "gfx/leaders/deluge/earl_of_strafford.dds"
					expire = "1965.1.1"
					ideology = bonapartist_ideology
					traits = {
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = CAN
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = CAN_GB
				drop_cosmetic_tag = CAN_UK
				set_party_name = { ideology = democratic name = deluge_quebec_democratic_short long_name = deluge_quebec_democratic_long }
				set_party_name = { ideology = fascism name = deluge_quebec_ultranat_short long_name = deluge_quebec_ultranat_long }
				set_party_name = { ideology = neutrality name = deluge_quebec_neutrality_short long_name = deluge_quebec_neutrality_long }
				create_country_leader = {
					name = "Guillaume I"
					desc = ""
					picture = "gfx/leaders/deluge/marquess_of_londonderry.dds"
					expire = "1965.1.1"
					ideology = reactionary_ideology
					traits = {
						#
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = BUR
						is_subject_of = ENG
					}
				}
				if = {
					limit = {
						has_global_flag = flag_united_kingdom_formed
					}
					set_cosmetic_tag = BUR_UK
				}
				if = {
					limit = {
						NOT = {
							OR = {
								has_global_flag = flag_united_kingdom_formed
								has_global_flag = flag_british_republic
							}
						}
					}
					set_cosmetic_tag = BUR_GB
				}
				
				set_party_name = { ideology = neutrality name = deluge_burma_uk_neutrality_short long_name = deluge_burma_uk_neutrality_long }
				
				create_country_leader = {
					name = "Viscount Gough"
					desc = ""
					picture = "gfx/leaders/deluge/viscount_gough.dds"
					expire = "1953.3.1"
					ideology = reactionary_ideology
					traits = {
						
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = BUR
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = BUR_GB
				drop_cosmetic_tag = BUR_UK
				
				set_party_name = { ideology = neutrality name = deluge_burma_neutrality_short long_name = deluge_burma_neutrality_long }
				
				create_country_leader = {
					name = "Taw Phaya"
					desc = ""
					picture = "gfx/leaders/deluge/indian_princes/rajadhirat.dds"
					expire = "1953.3.1"
					ideology = reactionary_ideology
					traits = {
						
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = IRE
						is_subject_of = ENG
					}
				}
				if = {
					limit = {
						has_global_flag = flag_united_kingdom_formed
					}
					set_cosmetic_tag = IRE_GB # Ireland shouldn't be able to exist but just in case
				}
				if = {
					limit = {
						NOT = {
							OR = {
								has_global_flag = flag_united_kingdom_formed
								has_global_flag = flag_british_republic
							}
						}
					}
					set_cosmetic_tag = IRE_GB
				}
			}
			if = {
				limit = {
					AND = {
						TAG = IRE
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = IRE_GB
				drop_cosmetic_tag = IRE_UK
			}
			if = {
				limit = {
					AND = {
						TAG = SAF
						is_subject_of = ENG
					}
				}
				if = {
					limit = {
						has_global_flag = flag_united_kingdom_formed
					}
					set_cosmetic_tag = SAF_UK
				}
				if = {
					limit = {
						NOT = {
							OR = {
								has_global_flag = flag_united_kingdom_formed
								has_global_flag = flag_british_republic
							}
						}
					}
					set_cosmetic_tag = SAF_GB
				}
			}
			if = {
				limit = {
					AND = {
						TAG = SAF
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = SAF_GB
				drop_cosmetic_tag = SAF_UK
			}
			if = {
				limit = {
					AND = {
						TAG = AST
						is_subject_of = ENG
					}
				}
				if = {
					limit = {
						has_global_flag = flag_united_kingdom_formed
					}
					set_cosmetic_tag = AST_UK
				}
				if = {
					limit = {
						NOT = {
							OR = {
								has_global_flag = flag_united_kingdom_formed
								has_global_flag = flag_british_republic
							}
						}
					}
					set_cosmetic_tag = AST_GB
				}
			}
			if = {
				limit = {
					AND = {
						TAG = AST
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = AST_GB
				drop_cosmetic_tag = AST_UK
			}
			if = {
				limit = {
					AND = {
						TAG = NZL
						is_subject_of = ENG
					}
				}
				if = {
					limit = {
						has_global_flag = flag_united_kingdom_formed
					}
					set_cosmetic_tag = NZL_UK
				}
				if = {
					limit = {
						NOT = {
							OR = {
								has_global_flag = flag_united_kingdom_formed
								has_global_flag = flag_british_republic
							}
						}
					}
					set_cosmetic_tag = NZL_GB
				}
			}
			if = {
				limit = {
					AND = {
						TAG = NZL
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = NZL_GB
				drop_cosmetic_tag = NZL_UK
			}
			if = {
				limit = {
					AND = {
						TAG = USA
						is_subject_of = ENG
					}
				}
				if = {
					limit = {
						has_global_flag = flag_united_kingdom_formed
					}
					set_cosmetic_tag = USA_UK
				}
				if = {
					limit = {
						NOT = {
							OR = {
								has_global_flag = flag_united_kingdom_formed
								has_global_flag = flag_british_republic
							}
						}
					}
					set_cosmetic_tag = USA_GB
				}
			}
			if = {
				limit = {
					AND = {
						TAG = USA
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = USA_GB
				drop_cosmetic_tag = USA_UK
			}
			if = {
				limit = {
					AND = {
						TAG = RAJ
						is_subject_of = ENG
					}
				}
				if = {
					limit = {
						has_global_flag = flag_united_kingdom_formed
					}
					set_cosmetic_tag = RAJ_UK
				}
				if = {
					limit = {
						NOT = {
							OR = {
								has_global_flag = flag_united_kingdom_formed
								has_global_flag = flag_british_republic
							}
						}
					}
					set_cosmetic_tag = RAJ_GB
				}
				
				set_party_name = { ideology = neutrality name = deluge_british_raj_neutrality_short long_name = deluge_british_raj_neutrality_long }

				create_country_leader = {
					name = "Lord Linlithgow"
					desc = ""
					picture = "gfx/leaders/deluge/lord_linlithgow.dds"
					expire = "1965.1.1"
					ideology = reactionary_ideology
					traits = {
						
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = RAJ
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = RAJ_GB
				drop_cosmetic_tag = RAJ_UK
				
				set_party_name = { ideology = neutrality name = deluge_india_neutrality_short long_name = deluge_india_neutrality_long }

				create_country_leader = {
					name = "Sayajirao III"
					desc = ""
					picture = "gfx/leaders/deluge/indian_princes/sayajirao_gaekwad_iii.dds"
					expire = "1965.1.1"
					ideology = bonapartist_ideology
					traits = {
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = MAL
						is_subject_of = ENG
					}
				}
				if = {
					limit = {
						has_global_flag = flag_united_kingdom_formed
					}
					set_cosmetic_tag = MAL_UK
				}
				if = {
					limit = {
						NOT = {
							OR = {
								has_global_flag = flag_united_kingdom_formed
								has_global_flag = flag_british_republic
							}
						}
					}
					set_cosmetic_tag = MAL_GB
				}
			}
			if = {
				limit = {
					AND = {
						TAG = MAL
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = MAL_GB
				drop_cosmetic_tag = MAL_UK
			}
			if = {
				limit = {
					AND = {
						TAG = ZIM
						is_subject_of = ENG
					}
				}
				if = {
					limit = {
						has_global_flag = flag_united_kingdom_formed
					}
					set_cosmetic_tag = ZIM_UK
				}
				if = {
					limit = {
						NOT = {
							OR = {
								has_global_flag = flag_united_kingdom_formed
								has_global_flag = flag_british_republic
							}
						}
					}
					set_cosmetic_tag = ZIM_GB
				}
			}
			if = {
				limit = {
					AND = {
						TAG = ZIM
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = ZIM_GB
				drop_cosmetic_tag = ZIM_UK
			}
			if = {
				limit = {
					AND = {
						TAG = INS
						is_subject_of = HOL
					}
				}
				set_cosmetic_tag = INS_HL
				set_party_name = { ideology = democratic name = deluge_indonesia_dutch_democratic_short long_name = deluge_indonesia_dutch_democratic_long }
				create_country_leader = {
					name = "A. T. van Starkenborgh Stachouwer"
					desc = ""
					picture = "gfx/leaders/deluge/alidius_tjarda_van_starkenborgh_stachouwer.dds"
					expire = "1953.3.1"
					ideology = liberal_republican_ideology 
					traits = {
						
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = INS
						NOT = {
							is_subject_of = HOL
						}
					}
				}
				drop_cosmetic_tag = INS_HL
				set_party_name = { ideology = democratic name = deluge_indonesia_democratic_short long_name = deluge_indonesia_democratic_long }
				create_country_leader = {
					name = "Sukarno"
					desc = ""
					picture = "gfx/leaders/deluge/sukarno.dds"
					expire = "1953.3.1"
					ideology = liberal_republican_ideology
					traits = {
						
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = NEP
						is_subject_of = POR
					}
				}
				set_cosmetic_tag = NEP_PR
				set_party_name = { ideology = neutrality name = deluge_portuguese_india_neutrality_short long_name = deluge_portuguese_india_neutrality_long }
				create_country_leader = {
					name = "José Ricardo Pereira Cabral"
					desc = ""
					picture = "gfx/leaders/deluge/portuguese_officer.dds"
					expire = "1965.1.1"
					ideology = reactionary_ideology
					traits = {
						#
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = NEP
						NOT = {
							is_subject_of = POR
						}
					}
				}
				drop_cosmetic_tag = NEP_PR
				set_party_name = { ideology = neutrality name = deluge_mysore_neutrality_short long_name = deluge_mysore_neutrality_long }
				create_country_leader = {
					name = "Krishna Raja Wadiyar IV"
					desc = ""
					picture = "gfx/leaders/deluge/indian_princes/krishna_raja_wadiyar.dds"
					expire = "1965.1.1"
					ideology = bonapartist_ideology
					traits = {
						#
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = BHU
						is_subject_of = FRA
					}
				}
				set_cosmetic_tag = BHU_FR
				set_party_name = { ideology = neutrality name = deluge_french_india_neutrality_short long_name = deluge_french_india_neutrality_long }
				create_country_leader = {
					name = "Louis Alexis Étienne Bonvin"
					desc = ""
					picture = "gfx/leaders/deluge/louis_faidherbe.dds"
					expire = "1965.1.1"
					ideology = reactionary_ideology
					traits = {
						#
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = BHU
						NOT = {
							is_subject_of = FRA
						}
					}
				}
				drop_cosmetic_tag = BHU_FR
				set_party_name = { ideology = neutrality name = deluge_travancore_neutrality_short long_name = deluge_travancore_neutrality_long }
				create_country_leader = {
					name = "Chithira Thirunal"
					desc = ""
					picture = "gfx/leaders/deluge/indian_princes/chithira_thirunal_balarama_varma.dds"
					expire = "1965.1.1"
					ideology = bonapartist_ideology
					traits = {
						#
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = VIN
						is_subject_of = FRA
					}
				}
				set_cosmetic_tag = VIN_FR
				
				set_party_name = { ideology = neutrality name = deluge_indochine_neutrality_short long_name = deluge_indochine_neutrality_long }

				create_country_leader = {
					name = "Jules Davout d'Auerstaedt"
					desc = ""
					picture = "gfx/leaders/deluge/joseph_vinoy.dds"
					expire = "1953.3.1"
					ideology = bonapartist_ideology
					traits = {
						
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = VIN
						NOT = {
							is_subject_of = FRA
						}
					}
				}
				drop_cosmetic_tag = VIN_FR
				
				set_party_name = { ideology = neutrality name = deluge_vietnam_neutrality_short long_name = deluge_vietnam_neutrality_long }
				
				create_country_leader = {
					name = "Bao Đai"
					desc = ""
					picture = "gfx/leaders/deluge/king_bao_dai.dds"
					expire = "1953.3.1"
					ideology = bonapartist_ideology
					traits = {
						
					}
				}
			}
		}
	}

	#ROOT is free nation FROM is releaser
	on_release_as_free = {
		effect = {
			every_state = {
				remove_claim_by = ROOT
			}
			if = {
				limit = {
					AND = {
						TAG = CAN
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = CAN_GB
				drop_cosmetic_tag = CAN_UK
				set_party_name = { ideology = democratic name = deluge_quebec_democratic_short long_name = deluge_quebec_democratic_long }
				set_party_name = { ideology = fascism name = deluge_quebec_ultranat_short long_name = deluge_quebec_ultranat_long }
				set_party_name = { ideology = neutrality name = deluge_quebec_neutrality_short long_name = deluge_quebec_neutrality_long }
				create_country_leader = {
					name = "Guillaume I"
					desc = ""
					picture = "gfx/leaders/deluge/marquess_of_londonderry.dds"
					expire = "1965.1.1"
					ideology = reactionary_ideology
					traits = {
						#
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = BUR
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = BUR_GB
				drop_cosmetic_tag = BUR_UK
				
				set_party_name = { ideology = neutrality name = deluge_burma_neutrality_short long_name = deluge_burma_neutrality_long }
				
				create_country_leader = {
					name = "Taw Phaya"
					desc = ""
					picture = "gfx/leaders/deluge/indian_princes/rajadhirat.dds"
					expire = "1953.3.1"
					ideology = reactionary_ideology
					traits = {
						
					}
				}
			}			
			if = {
				limit = {
					AND = {
						TAG = IRE
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = IRE_GB
				drop_cosmetic_tag = IRE_UK
			}
			if = {
				limit = {
					AND = {
						TAG = SAF
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = SAF_GB
				drop_cosmetic_tag = SAF_UK
			}
			if = {
				limit = {
					AND = {
						TAG = AST
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = AST_GB
				drop_cosmetic_tag = AST_UK
			}
			if = {
				limit = {
					AND = {
						TAG = NZL
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = NZL_GB
				drop_cosmetic_tag = NZL_UK
			}
			if = {
				limit = {
					AND = {
						TAG = USA
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = USA_GB
				drop_cosmetic_tag = USA_UK
			}
			if = {
				limit = {
					AND = {
						TAG = RAJ
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = RAJ_GB
				drop_cosmetic_tag = RAJ_UK
				
				set_party_name = { ideology = neutrality name = deluge_india_neutrality_short long_name = deluge_india_neutrality_long }

				create_country_leader = {
					name = "Sayajirao III"
					desc = ""
					picture = "gfx/leaders/deluge/indian_princes/sayajirao_gaekwad_iii.dds"
					expire = "1965.1.1"
					ideology = bonapartist_ideology
					traits = {
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = MAL
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = MAL_GB
				drop_cosmetic_tag = MAL_UK
			}
			if = {
				limit = {
					AND = {
						TAG = ZIM
						NOT = {
							is_subject_of = ENG
						}
					}
				}
				drop_cosmetic_tag = ZIM_GB
				drop_cosmetic_tag = ZIM_UK
			}
			if = {
				limit = {
					AND = {
						TAG = INS
						NOT = {
							is_subject_of = HOL
						}
					}
				}
				drop_cosmetic_tag = INS_HL
				set_party_name = { ideology = democratic name = deluge_indonesia_democratic_short long_name = deluge_indonesia_democratic_long }
				create_country_leader = {
					name = "Sukarno"
					desc = ""
					picture = "gfx/leaders/deluge/sukarno.dds"
					expire = "1953.3.1"
					ideology = liberal_republican_ideology
					traits = {
						
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = NEP
						NOT = {
							is_subject_of = POR
						}
					}
				}
				drop_cosmetic_tag = NEP_PR
				set_party_name = { ideology = neutrality name = deluge_mysore_neutrality_short long_name = deluge_mysore_neutrality_long }
				create_country_leader = {
					name = "Krishna Raja Wadiyar IV"
					desc = ""
					picture = "gfx/leaders/deluge/indian_princes/krishna_raja_wadiyar.dds"
					expire = "1965.1.1"
					ideology = bonapartist_ideology
					traits = {
						#
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = BHU
						NOT = {
							is_subject_of = FRA
						}
					}
				}
				drop_cosmetic_tag = BHU_FR
				set_party_name = { ideology = neutrality name = deluge_travancore_neutrality_short long_name = deluge_travancore_neutrality_long }
				create_country_leader = {
					name = "Chithira Thirunal"
					desc = ""
					picture = "gfx/leaders/deluge/indian_princes/chithira_thirunal_balarama_varma.dds"
					expire = "1965.1.1"
					ideology = bonapartist_ideology
					traits = {
						#
					}
				}
			}
			if = {
				limit = {
					AND = {
						TAG = VIN
						NOT = {
							is_subject_of = FRA
						}
					}
				}
				drop_cosmetic_tag = VIN_FR
				
				set_party_name = { ideology = neutrality name = deluge_vietnam_neutrality_short long_name = deluge_vietnam_neutrality_long }
				
				create_country_leader = {
					name = "Bao Đai"
					desc = ""
					picture = "gfx/leaders/deluge/king_bao_dai.dds"
					expire = "1953.3.1"
					ideology = bonapartist_ideology
					traits = {
						
					}
				}
			}
		}
	}
	
	on_unit_leader_level_up = {
		effect = {
			
		}
	}
	
	# From is owner country
	on_army_leader_daily = {
		effect = {
			if = {
				limit = {
					check_variable = { random < 0.02 }
					NOT = { has_trait = sick }
					set_temp_variable = { temp = sum_unit_terrain_modifier@sickness_chance }
					divide_temp_variable = { temp = num_units }
					check_variable = { temp > 0.75 }
					NOT = { has_unit_leader_flag = recently_sick }
				}
				add_timed_unit_leader_trait = {
					trait = sick
					days = 30
				}
				unit_leader_event = { id = generic.17 }
			}
		}
	}
	
	# From is owner country
	on_army_leader_won_combat = {
		effect = {
			if = {
				limit = {
					set_temp_variable = { chance = 0.001 }
					set_temp_variable = { factor = 1.0 }
					add_to_temp_variable = { factor = leader_modifier@wounded_chance_factor } 
					multiply_temp_variable = { chance = factor }
					check_variable = { random < chance }
					NOT = { has_trait = wounded }
				}
				add_timed_unit_leader_trait = {
					trait = wounded
					days = 90
				}
				unit_leader_event = { id = generic.18 }
			}
		}
	}
	
	# From is owner country
	on_army_leader_lost_combat = {
		effect = {
			if = {
				limit = {
					set_temp_variable = { chance = 0.005 }
					set_temp_variable = { factor = 1.0 }
					add_to_temp_variable = { factor = leader_modifier@wounded_chance_factor } 
					multiply_temp_variable = { chance = factor }
					check_variable = { random < chance }
					NOT = { has_trait = wounded }
				}
				add_timed_unit_leader_trait = {
					trait = wounded
					days = 90
				}
				unit_leader_event = { id = generic.18 }
			}
		}
	}
	
	
	on_army_leader_promoted = {
		effect = {
			add_timed_unit_leader_trait = {
				trait = recently_promoted
				days = 100
			}
		}
	}
}
