#Setup xinhai
country_event = {
	id = 15403020
	title = "EVTNAME154030"
	desc = "EVTDESC154030"
	picture = "constantinople_conference"
	major = yes
	
	trigger = { tag = CHI
				civilized = yes  
				NOT = { has_country_flag = xinhai_rebellion } 
				NOT = { has_country_flag = gorda } }
				
	mean_time_to_happen = { months = 6 }
				
    fire_only_once = yes
	
	option = {
		name = "Oh no."
		set_country_flag = setup_xinhai
			CHI_1523 = { add_core = NLU }
			CHI_1516 = { add_core = NLU }
			CHI_1473 = { add_core = NLU }
			CHI_1472 = { add_core = NLU }
			CHI_1550 = { add_core = NLU }
			CHI_1611 = { add_core = NLU }
			CHI_1539 = { add_core = NLU }
			CHI_1476 = { add_core = NLU }
			CHI_1563 = { add_core = NLU }
			1582 = { add_core = NLU }
			1562 = { add_core = NLU }
			1559 = { add_core = NLU }
			2062 = { add_core = NLU }
			1561 = { add_core = NLU }
			1575 = { add_core = NLU }
			1574 = { add_core = NLU }
			1573 = { add_core = NLU }
			1572 = { add_core = NLU }
			1576 = { add_core = NLU }
			2679 = { add_core = MGL }
			2608 = { add_core = MGL }
			1469 = { add_core = MGL }
			1068 = { add_core = MGL }
			1468 = { add_core = MGL }
			2678 = { add_core = MGL }
			1466 = { add_core = MGL }
			1465 = { add_core = MGL }
			2207 = { add_core = MGL }
			1467 = { add_core = MGL } 
			KMT = { civilized = yes }
			TPG = { all_core = { remove_core = TPG } }
	}
}
#Xinhai rebellion
country_event = {
	id = 154030
	title = "EVTNAME154030"
	desc = "EVTDESC154030"
	picture = "constantinople_conference"
	major = yes
	
	trigger = { tag = CHI
				civilized = yes  
				NOT = { has_country_flag = xinhai_rebellion } 
				has_country_flag = setup_xinhai
				NOT = { has_country_flag = gorda }}
				
	mean_time_to_happen = { months = 6 }
				
    fire_only_once = yes
	
	option = {
		name = "We accept their deal.(Best for players)"
		set_country_flag = xinhai_rebellion
		government = democracy
		political_reform = wealth_voting
		political_reform = state_equal_weight
		political_reform = yes_meeting
		political_reform = party_appointed
			2679 = { secede_province = MGL }
			2608 = { secede_province = MGL }
			1469 = { secede_province = MGL }
			1068 = { secede_province = MGL }
			1468 = { secede_province = MGL }
			2678 = { secede_province = MGL }
			1466 = { secede_province = MGL }
			1465 = { secede_province = MGL }
			2207 = { secede_province = MGL }
			1467 = { secede_province = MGL }
			release_vassal = XIN
			KMT = { civilized = yes }
		}
		
	option = {
		name = "Fight alongside the rebels!(historical path)"
		2221 = { add_core = NLU }
		any_owned = {
			limit = {
				is_core = NLU
				not = { province_id = 1616 }
			}
			secede_province = NLU
		}
		NLU = { government = democracy 
		civilized = yes }
		any_owned = {
			limit = {
					owned_by = CHI }
		YNN = { all_core = { secede_province = NLU } }
		GXI = { all_core = { secede_province = NLU } }
			CHI_1523 = { secede_province = NLU }
			CHI_1516 = { secede_province = NLU }
			CHI_1473 = { secede_province = NLU }
			CHI_1472 = { secede_province = NLU }
			CHI_1550 = { secede_province = NLU }
			CHI_1611 = { secede_province = NLU }
			CHI_1539 = { secede_province = NLU }
			CHI_1476 = { secede_province = NLU }
			CHI_1563 = { secede_province = NLU }
			1582 = { secede_province = NLU }
			1562 = { secede_province = NLU }
			1559 = { secede_province = NLU }
			2062 = { secede_province = NLU }
			1561 = { secede_province = NLU }
			1575 = { secede_province = NLU }
			1574 = { secede_province = NLU }
			1573 = { secede_province = NLU }
			1572 = { secede_province = NLU }
			1576 = { secede_province = NLU }
			2679 = { secede_province = MGL }
			2608 = { secede_province = MGL }
			1469 = { secede_province = MGL }
			1068 = { secede_province = MGL }
			1468 = { secede_province = MGL }
			2678 = { secede_province = MGL }
			1466 = { secede_province = MGL }
			1465 = { secede_province = MGL }
			2207 = { secede_province = MGL }
			1467 = { secede_province = MGL } }
			KMT = { civilized = yes }
			release_vassal = XIN
		war = {
			target = NLU
			attacker_goal = {
				casus_belli = civil_war
			}
			
			defender_goal = {
				casus_belli = depose_qing
			}
		}
		change_tag_no_core_switch = NLU
		NLU = { set_country_flag = xinhai_rebellion }
	}
}
#Cores for Kuomintang
country_event = {
	id = 1540301
	title = "Southern revolt"
	desc = "The Kuomintang found our rule reppresive and authoritarian, and now with some southern warlords, they are trying to reshape China."
	picture = "constantinople_conference"
	major = yes
	
	trigger = { war = no 
				tag = CHI
				civilized = yes 
				has_country_flag = xinhai_rebellion
				NOT = { has_country_flag = second_rebellion } 
				NOT = { has_country_flag = gorda } }
				
	mean_time_to_happen = { days = 15 }
	
    fire_only_once = yes
	
	option = {
		name = "Oh no."
		2221 = { add_core = KMT }
		set_country_flag = second_rebellion_pre
		any_owned = {
			limit = {
					owned_by = CHI }
			1530 = { add_core = KMT }
			1527 = { add_core = KMT }
			1478 = { add_core = KMT }
			1472 = { add_core = KMT }
			CHI_1499 = { add_core = KMT }
			CHI_1494 = { add_core = KMT }
			CHI_1550 = { add_core = KMT }
			CHI_1529 = { add_core = KMT }
			CHI_1473 = { add_core = KMT }
			CHI_1476 = { add_core = KMT }
			NLU = { all_core = { remove_core = NLU } } }
	}
}
#Revolt
country_event = {
	id = 1540302
	title = "Southern revolt"
	desc = "The Kuomintang found our rule reppresive and authoritarian, and now with some southern warlords, they are trying to reshape China."
	picture = "constantinople_conference"
	major = yes
	
	trigger = { war = no 
				tag = CHI
				civilized = yes 
				has_country_flag = xinhai_rebellion
				has_country_flag = second_rebellion_pre
				NOT = { has_country_flag = second_rebellion } 
				NOT = { has_country_flag = gorda } }
				
	mean_time_to_happen = { months = 2 }
	
    fire_only_once = yes
	
	option = {
		name = "Let's crush the rebels"
		set_country_flag = second_rebellion
        random_country = {
            limit = {
                tag = KMT
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = KMT }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = KMT }
            secede_province = KMT
        }
			war = {
			target = KMT
			attacker_goal = {
				casus_belli = civil_war
			}
			
			defender_goal = {
				casus_belli = civil_war
			}
		}
		KMT = { set_country_flag = second_rebellion }
	}
	option = {
		name = "Let's crush the rebels"
		set_country_flag = second_rebellion
        random_country = {
            limit = {
                tag = KMT
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = KMT }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = KMT }
            secede_province = KMT
        }
			war = {
			target = KMT
			attacker_goal = {
				casus_belli = civil_war
			}
			
			defender_goal = {
				casus_belli = civil_war
			}
		}
		change_tag_no_core_switch = KMT
		KMT = { set_country_flag = second_rebellion }
	}
}
#Event for releasing warlords
country_event = {
	id = 114070
	title = "WarLord Era"
	desc = "With the internal instability in China, the warlord now take up arms to control all of China."
	picture = "constantinople_conference"
	major = yes
	
	trigger = { OR = { AND = { tag = CHI
				civilized = yes 
				has_country_flag = second_rebellion 
				has_country_flag = Nothing_bad
				war = no } 
				AND = { tag = KMT
				civilized = yes 
				year = 1900 
				has_country_flag = second_rebellion 
				has_country_flag = Nothing_bad
				war = no } } 
				NOT = { has_country_flag = gorda } }
				
    fire_only_once = yes
	
	mean_time_to_happen = { months = 4 }
	
	option = {
		name = "EVTOPTA100008"
        random_country = {
            limit = {
                tag = KOR
                vassal_of = THIS
            }
            leave_alliance = THIS
            THIS = { release_vassal = KOR }
        }
        random_country = {
            limit = {
                tag = HNN
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = HNN }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = HNN }
            secede_province = HNN
        }
        random_country = {
            limit = {
                tag = SXI
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = SXI }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = SXI }
            secede_province = SXI
        }
        random_country = {
            limit = {
                tag = HUI
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = HUI }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = HUI }
            secede_province = HUI
        }
        random_country = {
            limit = {
                tag = FJN
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = FJN }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = FJN }
            secede_province = FJN
        }
        random_country = {
            limit = {
                tag = SZC
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = SZC }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = SZC }
            secede_province = SZC
        }
		GMJ = { all_core = { secede_province = ZHI } }
        random_country = {
            limit = {
                tag = XIN
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = XIN }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = XIN }
            secede_province = XIN
        }
        random_country = {
            limit = {
                tag = GNG
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = GNG }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = GNG }
            secede_province = GNG
        }
        random_country = {
            limit = {
                tag = ZHI
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = ZHI }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = ZHI }
            secede_province = ZHI
        }
        random_country = {
            limit = {
                tag = GXI
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = GXI }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        random_country = {
            limit = {
                tag = YNN
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = YNN }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = YNN }
            secede_province = YNN
        }
        any_owned = {
            limit = { is_core = GXI }
            secede_province = GXI
        }
        random_country = {
            limit = {
                tag = MCK
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = MCK }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = MCK }
            secede_province = MCK
        }
        random_country = {
            limit = {
                tag = XBI
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = XBI }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = XBI }
            secede_province = XBI
        }
			set_global_flag = warlord_era 
		}

		ai_chance = {
			factor = 100
	}
}
#Event for setup warlords
country_event = {
	id = 1140701
	title = "Establish warlords"
	desc = "The Chinese government allowed each province to have their own small army that is not part of the general government."
	picture = "constantinople_conference"
	major = yes
	
	trigger = { OR = { AND = { tag = CHI
				civilized = yes 
				has_country_flag = second_rebellion 
				war = no } 
				AND = { tag = KMT
				civilized = yes 
				year = 1900 
				has_country_flag = second_rebellion 
				war = no } } 
				NOT = { has_country_flag = gorda } }
				
    fire_only_once = yes
	
	mean_time_to_happen = { months = 4 }
	
	option = {
		name = "EVTOPTA100008"
		set_country_flag = Nothing_bad
		HUI = { civilized = yes }
		SXI = { civilized = yes }
		HNN = { civilized = yes }
		FJN = { civilized = yes }
		XBI = { civilized = yes }
		SZC = { civilized = yes }
		GMJ = { civilized = yes }
		XIN = { civilized = yes }
		GNG = { civilized = yes }
		YNN = { civilized = yes }
		ZHI = { civilized = yes }
		any_owned = {
			limit = {
					owned_by = CHI }
			1514 = { add_core = ZHI }
			CHI_1550 = { add_core = HUI }
			CHI_1611 = { add_core = HUI }
			CHI_1539 = { add_core = HUI }
			CHI_1476 = { add_core = HUI }
			CHI_1563 = { add_core = ZHI }
			CHI_1494 = { add_core = GNG }
			CHI_1499 = { add_core = GNG }
			1502 = { add_core = GXI }
			1503 = { add_core = GXI }
			1504 = { add_core = GXI }
			CHI_1529 = { add_core = HNN }
			1530 = { add_core = HNN }
			1527 = { add_core = HNN }
			CHI_1523 = { add_core = ZHI }
			CHI_1516 = { add_core = ZHI }
			CHI_1473 = { add_core = ZHI }
			CHI_1473 = { add_core = HUI }
			CHI_1472 = { add_core = ZHI }
			1564 = { add_core = ZHI }
			1568 = { add_core = ZHI }
			1563 = { add_core = ZHI }
			1570 = { add_core = ZHI }
			1614 = { add_core = GMJ }
			CHI_1513 = { add_core = GMJ }
			CHI_2062 = { add_core = GMJ }
			1489 = { add_core = GMJ }
			1492 = { add_core = GMJ }
			1491 = { add_core = GMJ }
			CHI_1578 = { add_core = SZC }
			CHI_1581 = { add_core = SZC }
			CHI_1487 = { add_core = FJN } }
		}

		ai_chance = {
			factor = 100
	}
}
country_event = {
	id = 15403070
	title = "Become China"
	desc = "Now that we control Beijing, we will be the one and only China."
	picture = "constantinople_conference"
	major = yes
	
	trigger = { OR = { tag = SXI
	tag = HNN
	tag = GXI
	tag = HUI
	tag = FJN
	tag = XBI
	tag = SZC
	tag = GMJ
	tag = XIN
	tag = GNG
	tag = YNN
	tag = ZHI }
				civilized = yes
				NOT = { exists = CHI }				
				owns = 1612
				NOT = { owns = 1493 } 
				NOT = { has_country_flag = china } } 
				
	mean_time_to_happen = { months = 2 }
				
	
	option = {
		name = "We accept their deal."
		change_tag = CHI
		set_country_flag = china
	}
}
country_event = {
	id = 15403071
	title = "Become China"
	desc = "Now that we control Nanjing, we will be the one and only China."
	picture = "constantinople_conference"
	major = yes
	
	trigger = { OR = { tag = SXI
	tag = HNN
	tag = GXI
	tag = HUI
	tag = FJN
	tag = XBI
	tag = SZC
	tag = GMJ
	tag = XIN
	tag = GNG
	tag = YNN
	tag = ZHI }
				civilized = yes
				NOT = { exists = KMT }				
				owns = 1493 
				NOT = { owns = 1612 } 
				NOT = { has_country_flag = kuoming } }
				
	mean_time_to_happen = { months = 2 }
				
	
	option = {
		name = "We accept this"
		change_tag = KMT
		CHI = { all_core = { add_core = KMT }
		set_country_flag = kuoming }
	}
}
country_event = {
	id = 154030723
	title = "Guominjun"
	desc = "The Christian warlord of the northwest declared today that Guominjun was going to liberate China."
	picture = "constantinople_conference"
	major = yes
	
	trigger = { OR = { tag = SXI
	tag = HNN
	tag = GXI
	tag = HUI
	tag = FJN
	tag = XBI
	tag = SZC
	tag = GMJ
	tag = XIN
	tag = GNG
	tag = YNN
	tag = ZHI }				
				owns = 1559 
				NOT = { has_global_flag = guominjun }
	war = no }
				
	mean_time_to_happen = { months = 2 }
				
    fire_only_once = yes
	
	option = {
		name = "Oh no."
		set_global_flag = guominjun
        any_owned = {
            limit = { is_core = GMJ }
            secede_province = GMJ
        }
		GMJ = { 1514 = { secede_province = ZHI } }
        random_country = {
            limit = {
                tag = GMJ
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = GMJ }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        } 
	}
}

country_event = {
	id = 15403072
	title = "Become China"
	desc = "Now that we control Beijing and Canton, we must accept all Chinese peoples."
	picture = "constantinople_conference"
	major = yes
	
	trigger = { OR = { tag = CHI
	tag = KMT }
				civilized = yes				
				owns = 1493 
				owns = 1612 
	year = 1915 } 
				
	mean_time_to_happen = { months = 15 }
				
    fire_only_once = yes
	
	option = {
		name = "We accept this"
		add_accepted_culture = nanfaren
		add_accepted_culture = beifaren
	}
}

country_event = {
	id = 15403073
	title = "Normalize China"
	desc = "Now that we control Beijing and Canton, we can normalize our country and centralise it."
	picture = "constantinople_conference"
	major = yes
	
	trigger = {  
	NOT = { exists = SXI }
	NOT = { exists = HNN }
	NOT = { exists = GXI }
	NOT = { exists = HUI }
	NOT = { exists = FJN }
	NOT = { exists = XBI }
	NOT = { exists = SZC }
	NOT = { exists = GMJ }
	NOT = { exists = XIN }
	NOT = { exists = GNG }
	NOT = { exists = YNN }
	NOT = { exists = ZHI }   
	OR = { tag = CHI tag = KMT } 
				civilized = yes				
				owns = 1493 
				owns = 1612
			has_global_flag = warlord_era  }
				
	mean_time_to_happen = { months = 3 }
				
    fire_only_once = yes
	
	option = {
		name = "We accept this"
		
		HUI = { all_core = { remove_core = HUI } }
		SXI = { all_core = { remove_core = SXI } }
		HNN = { all_core = { remove_core = HNN } }
		FJN = { all_core = { remove_core = FJN } }
		XBI = { all_core = { remove_core = XBI } }
		SZC = { all_core = { remove_core = SZC } }
		GMJ = { all_core = { remove_core = GMJ } }
		XIN = { all_core = { remove_core = XIN } }
		GNG = { all_core = { remove_core = GNG } }
		YNN = { all_core = { remove_core = YNN } }
		ZHI = { all_core = { remove_core = ZHI } }
	}
}
#Event for setup warlords
country_event = {
	id = 2140701
	title = "Establish warlords"
	desc = "The Chinese government allowed each province to have their own small army that is not part of the general government."
	picture = "constantinople_conference"
	major = yes
	
	trigger = { tag = TPG
				civilized = yes 
				exists = yes
				owns = 615
				owns = 2221
				war = no } 
				
    fire_only_once = yes
	
	mean_time_to_happen = { months = 8 }
	
	option = {
		name = "EVTOPTA100008"
		set_country_flag = Nothing_bad
		HUI = { civilized = yes }
		SXI = { civilized = yes }
		HNN = { civilized = yes }
		FJN = { civilized = yes }
		XBI = { civilized = yes }
		SZC = { civilized = yes }
		GMJ = { civilized = yes }
		XIN = { civilized = yes }
		GNG = { civilized = yes }
		YNN = { civilized = yes }
		ZHI = { civilized = yes }
		any_owned = {
			limit = {
					owned_by = TPG }
			1514 = { add_core = ZHI }
			CHI_1550 = { add_core = HUI }
			CHI_1611 = { add_core = HUI }
			CHI_1539 = { add_core = HUI }
			CHI_1476 = { add_core = HUI }
			CHI_1563 = { add_core = ZHI }
			CHI_1494 = { add_core = GNG }
			CHI_1499 = { add_core = GNG }
			1502 = { add_core = GXI }
			1503 = { add_core = GXI }
			1504 = { add_core = GXI }
			CHI_1529 = { add_core = HNN }
			1530 = { add_core = HNN }
			1527 = { add_core = HNN }
			CHI_1523 = { add_core = ZHI }
			CHI_1516 = { add_core = ZHI }
			CHI_1473 = { add_core = ZHI }
			CHI_1473 = { add_core = HUI }
			CHI_1472 = { add_core = ZHI }
			1564 = { add_core = ZHI }
			1568 = { add_core = ZHI }
			1563 = { add_core = ZHI }
			1570 = { add_core = ZHI }
			1614 = { add_core = GMJ }
			CHI_1513 = { add_core = GMJ }
			CHI_2062 = { add_core = GMJ }
			1489 = { add_core = GMJ }
			1492 = { add_core = GMJ }
			1491 = { add_core = GMJ }
			CHI_1578 = { add_core = SZC }
			CHI_1581 = { add_core = SZC }
			CHI_1487 = { add_core = FJN } }
		}

		ai_chance = {
			factor = 100
	}
}
#Event for releasing warlords
country_event = {
	id = 214070
	title = "War Lord Era"
	desc = "With the internal instability in China, the warlord now take up arms to control all of China."
	picture = "constantinople_conference"
	major = yes
	
	trigger = { OR = { AND = { tag = TPG
				civilized = yes 
				has_country_flag = Nothing_bad
				war = no } } }
				
    fire_only_once = yes
	
	mean_time_to_happen = { months = 8 }
	
	option = {
		name = "EVTOPTA100008"
        random_country = {
            limit = {
                tag = KOR
                vassal_of = THIS
            }
            leave_alliance = THIS
            THIS = { release_vassal = KOR }
        }
        random_country = {
            limit = {
                tag = HNN
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = HNN }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = HNN }
            secede_province = HNN
        }
        random_country = {
            limit = {
                tag = SXI
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = SXI }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = SXI }
            secede_province = SXI
        }
        random_country = {
            limit = {
                tag = HUI
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = HUI }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = HUI }
            secede_province = HUI
        }
        random_country = {
            limit = {
                tag = FJN
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = FJN }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = FJN }
            secede_province = FJN
        }
        random_country = {
            limit = {
                tag = SZC
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = SZC }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = SZC }
            secede_province = SZC
        }
		GMJ = { all_core = { secede_province = ZHI } }
        random_country = {
            limit = {
                tag = XIN
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = XIN }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = XIN }
            secede_province = XIN
        }
        random_country = {
            limit = {
                tag = GNG
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = GNG }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = GNG }
            secede_province = GNG
        }
        random_country = {
            limit = {
                tag = ZHI
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = ZHI }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = ZHI }
            secede_province = ZHI
        }
        random_country = {
            limit = {
                tag = GXI
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = GXI }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        random_country = {
            limit = {
                tag = YNN
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = YNN }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = YNN }
            secede_province = YNN
        }
        any_owned = {
            limit = { is_core = GXI }
            secede_province = GXI
        }
        random_country = {
            limit = {
                tag = MCK
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = MCK }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = MCK }
            secede_province = MCK
        }
        random_country = {
            limit = {
                tag = XBI
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = XBI }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = XBI }
            secede_province = XBI
        }
			set_global_flag = warlord_era 
		}

		ai_chance = {
			factor = 100
	}
}

#Event for setup warlords for dismantled
country_event = {
	id = 1740701
	title = "Establish warlords"
	desc = "The Chinese government allowed each province to have their own small army that is not part of the general government."
	picture = "constantinople_conference"
	major = yes
	
	trigger = { year = 1837
				BRD = { owns = 549 }
				tag = CHI }
				
    fire_only_once = yes
	
	option = {
		name = "EVTOPTA100008"
		set_country_flag = Nothing_bad
		any_owned = {
			limit = {
					owned_by = CHI }
			TAI = { all_core = { secede_province = TAI } }
			1514 = { add_core = ZHI }
			CHI_1550 = { add_core = HUI }
			CHI_1611 = { add_core = HUI }
			CHI_1539 = { add_core = HUI }
			CHI_1476 = { add_core = HUI }
			CHI_1563 = { add_core = ZHI }
			CHI_1494 = { add_core = GNG }
			CHI_1499 = { add_core = GNG }
			1502 = { add_core = GXI }
			1503 = { add_core = GXI }
			1504 = { add_core = GXI }
			CHI_1529 = { add_core = HNN }
			1530 = { add_core = HNN }
			1527 = { add_core = HNN }
			CHI_1523 = { add_core = ZHI }
			CHI_1516 = { add_core = ZHI }
			CHI_1473 = { add_core = ZHI }
			CHI_1473 = { add_core = HUI }
			CHI_1472 = { add_core = ZHI }
			1564 = { add_core = ZHI }
			1568 = { add_core = ZHI }
			1563 = { add_core = ZHI }
			1570 = { add_core = ZHI }
			1614 = { add_core = GMJ }
			CHI_1513 = { add_core = GMJ }
			CHI_2062 = { add_core = GMJ }
			1489 = { add_core = GMJ }
			1492 = { add_core = GMJ }
			1491 = { add_core = GMJ }
			CHI_1578 = { add_core = SZC }
			CHI_1581 = { add_core = SZC }
			CHI_1487 = { add_core = FJN } }
        random_country = {
            limit = {
                tag = KOR
                vassal_of = THIS
            }
            leave_alliance = THIS
            THIS = { release_vassal = KOR }
        }
        random_country = {
            limit = {
                tag = HNN
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = HNN }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = HNN }
            secede_province = HNN
        }
        random_country = {
            limit = {
                tag = SXI
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = SXI }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = SXI }
            secede_province = SXI
        }
        random_country = {
            limit = {
                tag = HUI
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = HUI }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = HUI }
            secede_province = HUI
        }
        random_country = {
            limit = {
                tag = FJN
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = FJN }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = FJN }
            secede_province = FJN
        }
        random_country = {
            limit = {
                tag = SZC
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = SZC }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = SZC }
            secede_province = SZC
        }
		GMJ = { all_core = { secede_province = ZHI } }
        random_country = {
            limit = {
                tag = XIN
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = XIN }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = XIN }
            secede_province = XIN
        }
        random_country = {
            limit = {
                tag = GNG
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = GNG }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = GNG }
            secede_province = GNG
        }
        random_country = {
            limit = {
                tag = ZHI
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = ZHI }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = ZHI }
            secede_province = ZHI
        }
        random_country = {
            limit = {
                tag = GXI
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = GXI }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        random_country = {
            limit = {
                tag = YNN
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = YNN }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = YNN }
            secede_province = YNN
        }
        any_owned = {
            limit = { is_core = GXI }
            secede_province = GXI
        }
        random_country = {
            limit = {
                tag = MCK
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = MCK }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
        any_owned = {
            limit = { is_core = MCK }
            secede_province = MCK
        }
        random_country = {
            limit = {
                tag = XBI
                OR = {
                    vassal_of = THIS
                    substate_of = THIS
                }
            }
            THIS = { release_vassal = XBI }
            government = presidential_dictatorship
            ruling_party_ideology = reactionary
            political_reform = none_voting
            political_reform = party_appointed
            political_reform = no_meeting
            political_reform = state_press
            political_reform = no_trade_unions
            political_reform = underground_parties 
        }
            THIS = { release_vassal = MGI }
            THIS = { release_vassal = MGL }
            THIS = { release_vassal = KML }
        any_owned = {
            limit = { is_core = XBI }
            secede_province = XBI
        }
			set_global_flag = warlord_era 
			release_vassal = TIB
			1496 = { secede_province = GNG }
			1481 = { secede_province = MCK }
		}

		ai_chance = {
			factor = 100
	}
}