﻿add_namespace = nippon



#японский истеблишмент
country_event = {
	id = nippon.1
	title = nippon.1.t
	desc = nippon.1.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes
	option = { 
		name = nippon.1.a
		add_timed_idea = {
			idea = znp_ottok_kapitala
			days = 365
		}
		random_owned_controlled_state = {
			limit = {
				industrial_complex > 1								
			}
			remove_building = {
				type = industrial_complex
				level = 1
			}
		}
		random_owned_controlled_state = {
			limit = {
				industrial_complex > 1								
			}
			remove_building = {
				type = industrial_complex
				level = 1
			}
		}
		random_owned_controlled_state = {
			limit = {
				industrial_complex > 1								
			}
			remove_building = {
				type = industrial_complex
				level = 1
			}
		}
		random_owned_controlled_state = {
			limit = {
				industrial_complex > 1								
			}
			remove_building = {
				type = industrial_complex
				level = 1
			}
		}
		random_owned_controlled_state = {
			limit = {
				arms_factory > 1								
			}
			remove_building = {
				type = arms_factory
				level = 1
			}
		}
		random_owned_controlled_state = {
			limit = {
				dockyard > 1								
			}
			remove_building = {
				type = dockyard
				level = 1
			}
		}
		random_owned_controlled_state = {
			limit = {
				dockyard > 1								
			}
			remove_building = {
				type = dockyard
				level = 1
			}
		}
		random_owned_controlled_state = {
			limit = {
				dockyard > 1								
			}
			remove_building = {
				type = dockyard
				level = 1
			}
		}
	}		
}

#прибывает первая пачка беженцев
country_event = {
	id = nippon.2
	title = nippon.2.t
	desc = nippon.2.d
	picture = GFX_report_event_generic_conference	
	trigger = {
		tag = ZNP		
		ZNP = {
			has_completed_focus = znp_imperator_arrived_focus
			has_government = neutrality
			controls_state = 797 
		}		
	}
	mean_time_to_happen = { days = 50 }
	fire_only_once = yes
	option = { 
		name = nippon.2.a
		797 = {
			add_manpower = 12875
		}
		hidden_effect = {
			797 = {
				add_manpower = 74512
			}
		}
	}		
}

#на императора было покушение! он выжил и влюбился лол
country_event = {
	id = nippon.3
	title = nippon.3.t
	desc = nippon.3.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes
	option = { 
		name = nippon.3.a
		add_stability = -0.05
		hidden_effect = {
			news_event = { hours = 3 id = ar_news.738 }
		}
	}		
}

#на императора было покушение! он выжил и юкими мертва
country_event = {
	id = nippon.4
	title = nippon.4.t
	desc = nippon.4.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes
	option = { 
		name = nippon.4.a
		add_stability = -0.05
		hidden_effect = {
			news_event = { hours = 3 id = ar_news.739 }
		}
	}		
}

#император убит!
country_event = {
	id = nippon.5
	title = nippon.5.t
	desc = nippon.5.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes
	option = { 
		name = nippon.5.a
		kill_country_leader = yes
		set_global_flag = znp_imperator_ubit_flag
		country_event = { id = nippon.24 }
		add_stability = -0.15
		hidden_effect = {
			news_event = { hours = 3 id = ar_news.740 }
		}
	}		
}

#усиление защиты императора
country_event = {
	id = nippon.6
	title = nippon.6.t
	desc = nippon.6.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes
	option = { 
		name = nippon.6.a
		set_global_flag = znp_imperatora_nachali_zashishat_flag
		army_experience = 5
		custom_effect_tooltip = nippon.6.a.tt
	}		
}

#император учится стрелять
country_event = {
	id = nippon.7
	title = nippon.7.t
	desc = nippon.7.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes
	option = { 
		name = nippon.7.a
		set_global_flag = znp_imperator_umeet_strelyat_flag
		army_experience = 5
		custom_effect_tooltip = nippon.7.a.tt
	}		
}

#император обращается с призывом к мировому сообществу
country_event = {
	id = nippon.8
	title = nippon.8.t
	desc = nippon.8.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes
	immediate = {
		set_variable = {
			var = global.znpdenejka
			value = 0
		}
		set_variable = {
			var = global.znpweapon
			value = 0
		}
		set_variable = {
			var = global.znpnichego
			value = 0
		}
	}
	option = { 
		name = nippon.8.a
		hidden_effect = {
			country_event = { days = 5 id = nippon.9 random = 5 }
			country_event = { days = 2 id = nippon.11 }
			country_event = { id = nippon.20 days = 15 random = 6 }
		}
		add_stability = 0.02
		add_political_power = 10
		every_other_country = {
			limit = {
				capital_scope = {
					is_on_continent = asia
				}
				NOT = {
					has_war_with = ZNP
				}
			}			
			country_event = {
				id = nippon.10
			}
		}
	}		
}

#прибывает экспедиционный флот, который антарктику исследоал
country_event = {
	id = nippon.9
	title = nippon.9.t
	desc = nippon.9.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes
	option = { 
		name = nippon.9.a
		custom_effect_tooltip = nippon.9.a.tt
		hidden_effect =  {		
			if = {
				limit = {
					not = { has_dlc = "Man the Guns" }
				}	
				ZNP = {
					load_oob = "ZNP_antarktic_navy"	
				}	
			}
			if = {
				limit = {
					has_dlc = "Man the Guns" 
				}	
				ZNP = {
					load_oob = "ZNP_antarktik_mtg"	
				}	
			}
		}
	}		
}
#эвент для азиатских стран о том что император просит им помочь
country_event = {
	id = nippon.10
	title = nippon.10.t
	desc = nippon.10.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes
	option = {	#yes
		name = nippon.10.a
		trigger = {
			has_political_power > 5
		}
		ai_chance = {
			factor = 10	
			modifier = {
				factor = 20				
				is_major = yes				
			}
			modifier = {
				factor = 20
				has_government = democratic
			}
		}
		add_political_power = -5
		ZNP = {
			add_political_power = 5
		}
		add_to_variable = {
			var = global.znpdenejka
			value = 1
		}
		
	}	
	option = {	#no
		name = nippon.10.b
		ai_chance = {
			factor = 10
			modifier = {
				factor = 30
				has_war = yes
			}
			modifier = {
				factor = 0
				has_government = fascism
			}
		}
		add_to_variable = {
			var = global.znpnichego
			value = 1
		}
	}
	option = {	#send weapon
		name = nippon.10.c
		custom_effect_tooltip = nippon.10.c.tt
		trigger = {			
			has_equipment = {
				infantry_equipment > 160
			}			
		}
		ai_chance = {
			factor = 10	
			modifier = {
				factor = 20				
				is_major = yes				
			}
			modifier = {
				factor = 20
				has_government = neutrality
			}
			modifier = {
				factor = 10
				has_government = communism
			}
			modifier = {
				factor = 0
				has_government = democratic
			}
		}
		send_equipment = {
			target = ZNP
			type = infantry_equipment
			amount = 150
		}
		add_to_variable = {
			var = global.znpweapon
			value = 1
		}
	}	
}

#отчет о помощи от соседних государств
country_event = {
	id = nippon.11
	title = nippon.11.t
	desc = nippon.11.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes
	immediate = {
		set_variable = {
			var = global.allznpdenejka
			value = global.znpdenejka
		}
		multiply_variable = {
			var = global.allznpdenejka
			value = 5
		}
		set_variable = {
			var = global.allanpweapon
			value = global.znpweapon
		}
		multiply_variable = {
			var = global.allanpweapon
			value = 150
		}
		custom_effect_tooltip = nippon.11.dali.deneg
		custom_effect_tooltip = nippon.11.dali.weapon
		custom_effect_tooltip = nippon.11.nichegonedali
	}
	option = { 
		name = nippon.11.a
		custom_effect_tooltip = nippon.11.a.tt
		clear_variable = global.znpdenejka
		clear_variable = global.allznpdenejka
		clear_variable = global.znpweapon
		clear_variable = global.allanpweapon
		clear_variable = global.znpnichego		
	}		
}

#чит эвент на захват японии, проверить поведение ии
country_event = {
	id = nippon.12
	title = nippon.12.t
	desc = nippon.12.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes
	option = { 
		name = nippon.12.a
		ZNP = {
			load_oob = "ZNP_1936_test"	
		}		
	}		
}

#ЭВЕНТ НОВОЯПОНИИ О ПОЛНОЙ ПОБЕДЕ НАД СЕГУНАМИ И КОНТРОЛЕ ВСЕХ ТЕРРИТОРИЙ
country_event = {
	id = nippon.13
	title = nippon.13.t
	desc = nippon.13.d
	picture = GFX_report_event_generic_conference	
	trigger = {
		tag = ZNP
		has_global_flag = shogun_perevorot_flag
		ZNP = {
			has_government = neutrality
			has_war = no
			controls_state = 961 	#вписать основные стейты сегунатской японии, чтобы другие страны их не забрали		
		}		
		ZJA = {
			exists = no			
		}
	}
	mean_time_to_happen = { days = 1 }
	fire_only_once = yes
	option = { 
		name = nippon.13.a
		set_global_flag = imperator_is_wins
			
		hidden_effect = {
			news_event = { hours = 3 id = ar_news.745 }
		}
	}	
}

#эвент на выбор действия при полной победе над сегунами. япония наша марионетка!!!!
country_event = {
	id = nippon.14
	title = nippon.14.t
	desc = nippon.14.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes
	option = { 
		name = nippon.14.a
		custom_effect_tooltip = nippon.14.a.tt
		hidden_effect = {
			ZNP = {				
				drop_cosmetic_tag = yes
				set_cosmetic_tag = ZNP_MARIONE
				retire_country_leader = yes	
				add_country_leader_role = {
					character = "znp_wu_longjiang"
					country_leader = {
						ideology = despotism
						traits = {  }
						expire = "2020.3.1.1"
					}	
					promote_leader = yes 
				}
				# create_country_leader = {
					# name = "Ву Лунцзян"
					# desc = " "
					# picture = "vu_lutsian_nippon.tga"
					# expire = "2020.1.1"
					# ideology = despotism
					# traits = {
						# #
					# }
				# }
				hidden_effect = {
					end_puppet = ZJA
					country_event = { days = 1 id = nippon.17 }
				}
				if = {
					limit = {
						controls_state = 805
					}
					ZJA = {
						transfer_state = 805
					}
				}
				if = {
					limit = {
						controls_state = 794
					}
					ZJA = {
						transfer_state = 794
					}
				}
				if = {
					limit = {
						controls_state = 803
					}
					ZJA = {
						transfer_state = 803
					}
				}
			}
			ZJA = {
				drop_cosmetic_tag = yes
				set_politics = {										
					ruling_party = neutrality
				}
				set_popularities = {			
					neutrality = 100			
				}
				add_stability = -0.1
				add_war_support = -0.1
				kill_country_leader = yes
				ZJA_yoshiro = {					
					promote_character = yes					
					add_country_leader_role = {
						country_leader = {
							ideology=despotism
							traits = {
								znp_nash_imperator_tyta
							}
						}
					}
				}
				# create_country_leader = {
					# name = "Yoshiro"
					# desc = " "
					# picture = "sakatani_yosiro.tga"
					# expire = "2020.1.1"
					# ideology = despotism
					# traits = {
						# znp_nash_imperator_tyta
					# }
				# }				
				puppet = ZNP
				set_global_flag = zja_imperator_vernylsua_flag				
			}
		}
		if = {
			limit = {
				ZNP = {
					is_ai = no
				}
				ZJA = {
					is_ai = yes
				}
			}
			country_event = {
					id = nippon.15
			}
		}
	}		
}
#эвент о том что игрок может переехать сесть играть за японию обратно, или остаться за новояпонию сидеть
country_event = {
	id = nippon.15
	title = nippon.15.t
	desc = nippon.15.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes
	option = { 
		name = nippon.15.a	#go domoi
		ai_chance = { factor = 0 }
		custom_effect_tooltip = nippon.15.a.tt  
		ZJA = {
			change_tag_from = ZNP
			inherit_technology = ZNP			
		}
		ZNP = {
			transfer_navy = { target = ZJA }
			every_unit_leader = {
				set_nationality = ZJA
			}
		}
	}
	option = { 
		name = nippon.15.b	#nyet
		ai_chance = { factor = 100 }
		custom_effect_tooltip = nippon.15.b.tt  		
	}	
}
##эвент на выбор действия при полной победе ИМПЕРАТОРА над сегунами. япония под нашим полным контролем!
country_event = {
	id = nippon.16
	title = nippon.16.t
	desc = nippon.16.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes
	option = { 
		name = nippon.16.a	
		release_puppet = ZJA
		country_event = { hours = 2 id = nippon.14 }		
	}		
}
##скрытый эвент на нацидеи
country_event = {
	id = nippon.17	
	Hidden = yes
	is_triggered_only = yes
	immediate = {
		ZNP = {
			if = {
					limit = {
						has_idea = zja_imperator_v_nippon
					}
					remove_ideas = zja_imperator_v_nippon
				}
		}
		ZJA = {
			if = {
					limit = {
						has_idea = zja_shogunat
					}
					remove_ideas = zja_shogunat
				}
				if = {
					limit = {
						has_idea = zja_poradok_na_ulitsah
					}
					remove_ideas = zja_poradok_na_ulitsah
				}
				if = {
					limit = {
						has_idea = zja_chistki_v_armiiotvragov_segunata
					}
					remove_ideas = zja_chistki_v_armiiotvragov_segunata
				}
				if = {
					limit = {
						has_idea = zja_flot_predatelei
					}
					remove_ideas = zja_flot_predatelei
				}
				if = {
					limit = {
						has_idea = zja_plan_sakura_v_deistvii
					}
					remove_ideas = zja_plan_sakura_v_deistvii
				}
				if = {
					limit = {
						has_idea = zja_plan_katana_v_deistvii
					}
					remove_ideas = zja_plan_katana_v_deistvii
				}
		}
	}			
}
##эвент о том что на службу поступают новые генералы
country_event = {
	id = nippon.18
	title = nippon.18.t
	desc = nippon.18.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes
	option = { 
		name = nippon.18.a	
		army_experience = 10
		custom_effect_tooltip = nippon.18.tt
		hidden_effect = {
			# create_corps_commander = {
				# name = "Ацуши Нито"
				# portrait_path = "gfx/leaders/ZNP/Atsushi_nito.tga"
				# traits = {
					# trickster trait_engineer brilliant_strategist politically_connected
				# }
				# skill = 5
				# attack_skill = 4
				# defense_skill = 5
				# planning_skill = 3
				# logistics_skill = 4
			# }
			add_corps_commander_role = {
				character = znp_atsushi_nito
				traits = {
					trickster trait_engineer brilliant_strategist politically_connected
				}
				skill = 5
				attack_skill = 4
				defense_skill = 5
				planning_skill = 3
				logistics_skill = 4
			}
			# create_field_marshal = {
				# name = "Моригаке Дошо"
				# portrait_path = "gfx/leaders/ZNP/Morikage_dosho.tga"
				# traits = { 
					# offensive_doctrine
					# JAP_samurai_lineage   # hakushaku
					# politically_connected
				# }
				# skill = 4
				# attack_skill = 4
				# defense_skill = 4
				# planning_skill = 3
				# logistics_skill = 2
			# }
			add_field_marshal_role = {
				character = znp_morrige_dosho
				traits = { 
					offensive_doctrine
					JAP_samurai_lineage   # hakushaku
					politically_connected
				}
				skill = 4
				attack_skill = 4
				defense_skill = 4
				planning_skill = 3
				logistics_skill = 2
			}
			# create_field_marshal = {
				# name = "Арихаде Томаси"
					# portrait_path = "gfx/leaders/ZNP/Arihide_tomosue.tga"
				# traits = { offensive_doctrine JAP_samurai_lineage }
				# skill = 4
				# attack_skill = 3
				# defense_skill = 4
				# planning_skill = 2
				# logistics_skill = 4
			# }
			add_field_marshal_role = {
				character = znp_arihade_tomasi
				traits = { offensive_doctrine JAP_samurai_lineage }
				skill = 4
				attack_skill = 3
				defense_skill = 4
				planning_skill = 2
				logistics_skill = 4
			}
			# create_corps_commander = {
				# name = "Намиси Акиясу" 
					# portrait_path = "gfx/leaders/ZNP/Namishi_akiyasu.tga"
				# traits = { brilliant_strategist infantry_officer }
				# skill = 3
				# attack_skill = 3
				# defense_skill = 2
				# planning_skill = 3
				# logistics_skill = 2
			# }
			add_corps_commander_role = {
				character = znp_namishi_akiyasu
				traits = { brilliant_strategist infantry_officer }
				skill = 3
				attack_skill = 3
				defense_skill = 2
				planning_skill = 3
				logistics_skill = 2
			}
		}
	}		
}

##эвент на добавление техов торпедных катеров
country_event = {
	id = nippon.19
	title = nippon.19.t
	desc = nippon.19.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes
	option = { 
		name = nippon.19.a	
		if = {
				limit = {
					not = { has_dlc = "Man the Guns" }
				}
				set_technology = { torpedo_cruiser = 1 }
		}
		else = {
			set_technology = { torpedo_cruiser_mtg = 1 }
		}
	}		
}

#поддержка оружием от наших олигархов (и откуда оно у них?)
country_event = {
	id = nippon.20
	title = nippon.20.t
	desc = nippon.20.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes
	trigger = {
		tag = ZNP
		has_government = neutrality
		has_war_with = ZJA
		# has_country_leader = {
			# name = "Yoshiro"			
		# }
		has_country_leader = {
			character = ZJA_yoshiro
			ruling_only = yes
		}
	}
	option = { 
		name = nippon.20.a
			add_war_support = 0.01
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = 521
				producer = ZJA
			}	
		hidden_effect = {
			country_event = { id = nippon.21 days = 15 random = 8 }
		}
	}	
}

#поддержка денежкой от наших олигархов 
country_event = {
	id = nippon.21
	title = nippon.21.t
	desc = nippon.21.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes
	trigger = {
		tag = ZNP
		has_government = neutrality
		has_war_with = ZJA
		# has_country_leader = {
			# name = "Yoshiro"			
		# }
		has_country_leader = {
			character = ZJA_yoshiro
			ruling_only = yes
		}
	}
	option = { 
		name = nippon.21.a
			add_political_power = 100	
		hidden_effect = {
			country_event = { id = nippon.22 days = 15 random = 8 }
		}
	}	
}

#прибыли добровольцы хз откуда. Тоже хотят воевать
country_event = {
	id = nippon.22
	title = nippon.22.t
	desc = nippon.22.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes
	trigger = {
		tag = ZNP
		has_government = neutrality
		has_war_with = ZJA
		# has_country_leader = {
			# name = "Yoshiro"			
		# }
		has_country_leader = {
			character = ZJA_yoshiro
			ruling_only = yes
		}
	}
	option = { 
		name = nippon.22.a
			add_manpower = 5564			
		hidden_effect = {
			add_manpower = 14785
			country_event = { id = nippon.23 days = 15 random = 8 }
		}
	}	
}

#олигархи еще пушек подкинули
country_event = {
	id = nippon.23
	title = nippon.23.t
	desc = nippon.23.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes
	trigger = {
		tag = ZNP
		has_government = neutrality
		has_war_with = ZJA
		# has_country_leader = {
			# name = "Yoshiro"			
		# }
		has_country_leader = {
			character = ZJA_yoshiro
			ruling_only = yes
		}
	}
	option = { 
		name = nippon.23.a
		add_war_support = 0.01
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = 674
				producer = ZJA
			}	
	}	
}

#эвент для новояпонии када императора грохнули. Щто нам делать? Дальше воевать или хватит уже сопротивляться?
country_event = {
	id = nippon.24
	title = nippon.24.t
	desc = nippon.24.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	trigger = {
		tag = ZNP
		ZNP = {	
			has_war_with = ZJA
		}	
	}
	option = { 
		name = nippon.24.a	#smiritsya
		ai_chance = { factor = 80 }	
		custom_effect_tooltip = nippon.24.a.tt 	
		ZJA = {
			country_event = { days = 1 id = nippon.25 }
		}
	}
	option = { 
		name = nippon.24.b	#prodoljit voevat
		ai_chance = { factor = 2 }	
		custom_effect_tooltip = nippon.24.b.tt
		ZJA = {
			country_event = { days = 1 id = nippon.26 }
		}
		add_stability = 0.05
		add_war_support = 0.10
		activate_targeted_decision = { target = ROOT decision = znp_prodoljenie_voiny_s_segunami }
	}
	option = { 
		name = nippon.24.c	#belyi mir
		ai_chance = { factor = 200 }
		custom_effect_tooltip = nippon.24.c.tt
		trigger = {
			ZJA = {
				surrender_progress > 0.6
			}
		}
		ZJA = {
			country_event = { days = 1 id = nippon.28 }
		}
	}	
}

#новояпония перестает сопротивляться! Они хотят с нами мира и вновь стать марионетками!
country_event = {
	id = nippon.25
	title = nippon.25.t
	desc = nippon.25.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.25.a
		if = {
			limit = {	
				has_war_with = ZNP 
			}
			white_peace = {
				tag = ZNP 
				message = ZNP_ZJA_agree_peace 
			} 
		}	
		every_other_country = {
			limit = {
				has_war_with = ZNP
				is_in_faction_with = ZJA
			}
			white_peace = {
				tag = ZNP 
				message = ZNP_ZJA_agree_peace 
			}
		}
		ZJA = {
			puppet = ZNP
		}
		ZNP = {
			drop_cosmetic_tag = yes
			set_cosmetic_tag = ZNP_MARIONE
		}		
		add_stability = 0.05
		hidden_effect = {
			news_event = { hours = 3 id = ar_news.749 }
			set_global_flag = segunat_is_wins
		}
	}	
}

#эвент сёгунам о том что даже после смерти императора новояпония продолжает сопротивляться и воевать!
country_event = {
	id = nippon.26
	title = nippon.26.t
	desc = nippon.26.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.26.a
		add_stability = -0.05
		add_war_support = -0.10
	}	
}

#эвент новояпонии о том что ситуация там накалилась достаточно, 500 днйе прошло а победы и нет! Что делать?
country_event = {
	id = nippon.27
	title = nippon.27.t
	desc = nippon.27.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.27.a	
		ai_chance = { factor = 50 }
		activate_targeted_decision = { target = ROOT decision = znp_stanovitsya_jarko }
		set_country_flag = nippon_flag_rech_lidera
		unlock_decision_tooltip = znp_500pp_to_win
	}
	option = { 
		name = nippon.27.b
		ai_chance = { factor = 200 }
		trigger = {
			ZNP = {
				surrender_progress < 0.9
			}
			ZJA = {
				surrender_progress > 0.35
			}
		}
	}	
}

#эвент сёгунам о том что после смерти императора новояпонцы просят мира. Условия такие что мир без терриотриальных претензий и они становятся свободны. Учитывая нашу тяжелую ситуацию на войне (мы просираем) надо подумать
country_event = {
	id = nippon.28
	title = nippon.28.t
	desc = nippon.28.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.28.a
		ai_chance = { factor = 20 }
		if = {
			limit = {  has_war_with = ZNP  }
			white_peace = {
				tag = ZNP 
				message = ZNP_ZJA_agree_peace 
			} 
		}	
		every_other_country = {
			limit = {
				has_war_with = ZNP
				is_in_faction_with = ZJA
			}
			white_peace = {
				tag = ZNP 
				message = ZNP_ZJA_white_peace 
			}
		}
		ZNP = {
			country_event = { id = nippon.29 }			
		}
		every_state = {
			limit = {
				is_owned_by = ZNP
				is_claimed_by = ZJA
			}
			remove_claim_by = ZJA
		}
		hidden_effect = {
			news_event = { hours = 3 id = ar_news.750 }
			set_global_flag = segunat_is_wins
		}
	}	
	option = { 
		name = nippon.28.b
		ai_chance = { factor = 2 }
		ZNP = {
			country_event = { id = nippon.30 }
		}	
	}	
}

#эвент новояпонии о том что сегуны согласились на белый мир. мы свободны
country_event = {
	id = nippon.29
	title = nippon.29.t
	desc = nippon.29.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.29.a
		add_stability = 0.10
		add_political_power = 50
		every_state = {
			limit = {
				is_owned_by = ZJA
				is_claimed_by = ZNP
			}
			remove_claim_by = ZNP
		}
	}	
}
#эвент новояпонии о том что сегуны отказались принять белый мир. нам придется воевать
country_event = {
	id = nippon.30
	title = nippon.30.t
	desc = nippon.30.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.30.a
		add_war_support = 0.11
		add_political_power = 50		
		activate_targeted_decision = { target = ROOT decision = znp_prodoljenie_voiny_s_segunami }
	}	
}
#эвент новояпонии о том что доколе воевать незавшто? 500 дней пошло как императора нет, всё! гражданская война товарищи!
country_event = {
	id = nippon.31
	title = nippon.31.t
	desc = nippon.31.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	trigger = {
		tag = ZNP
		ZNP = {	
			has_civil_war = no
		}	
	}
	option = { 
		name = nippon.31.a
		if = {
			limit = {
				has_government = neutrality
			}
			start_civil_war = {
				ideology = communism
				size = 0.5				
			}
		}
		if = {
			limit = {
				has_government = fascism
			}
			start_civil_war = {
				ideology = communism
				size = 0.5				
			}
		}
		if = {
			limit = {
				has_government = democratic
			}
			start_civil_war = {
				ideology = communism
				size = 0.5				
			}
		}
		if = {
			limit = {
				has_government = communism
			}
			start_civil_war = {
				ideology = fascism
				size = 0.5				
			}
		}
		hidden_effect = {
			news_event = { hours = 3 id = ar_news.751 }
		}
	}	
}
#корея объявляет сегунату войну, мы не останемся в стороне
country_event = {
	id = nippon.32
	title = nippon.32.t
	desc = nippon.32.d
	picture = GFX_report_event_generic_conference	
	trigger = {
		tag = ZNP		
		ZNP = {
			has_war_with = ZJA
			is_subject = no
			NOT = {
				has_war_with = ZCS
				is_in_faction_with = ZCS
			}
		}		
		ZCS = {
			has_offensive_war_with = ZJA
		}
	}
	mean_time_to_happen = { days = 1 }
	fire_only_once = yes
	option = { 
		name = nippon.32.a
		declare_war_on = {
			target = ZCS
			type = puppet_wargoal_focus
		}
		hidden_effect = {
			news_event = { hours = 3 id = ar_news.765 }
		}
	}		
}

#речь императора новояпонии, возвание к народу, призыв бороться
country_event = {
	id = nippon.33
	title = nippon.33.t
	desc = nippon.33.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.33.a
		add_timed_idea = {
			idea = znp_vse_dlya_flota
			days = 270
		}		
		add_war_support = 0.03
		add_political_power = 30
		hidden_effect = {
			random_owned_controlled_state = {	
				limit = {
					is_controlled_by = ZNP							
				}
				add_manpower = 8564
			}
		}
	}	
}

#выведение активов из носурандо. денежки там, прочие ништяки. плюс еще беженцы приплыли оттуда
country_event = {
	id = nippon.34
	title = nippon.34.t
	desc = nippon.34.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.34.a
		random_owned_controlled_state = {
			limit = {
				free_building_slots = {
					building = industrial_complex
					size > 0
					include_locked = yes
				}
				OR = {
					is_in_home_area = yes
					NOT = {
						owner = {
							any_owned_state = {
								free_building_slots = {
									building = industrial_complex
									size > 0
									include_locked = yes
								}
								is_in_home_area = yes
							}
						}
					}
				}
			}
			add_extra_state_shared_building_slots = 1
			add_building_construction = {
				type = industrial_complex
				level = 1
				instant_build = yes
			}
		}
		random_owned_controlled_state = {	
				limit = {
					is_controlled_by = ZNP							
				}
				add_manpower = 4257
			}
		add_political_power = 80	
		hidden_effect = {
			random_owned_controlled_state = {	
				limit = {
					is_controlled_by = ZNP							
				}
				add_manpower = 8564
			}
		}
	}	
}

#прибывает гуманитарочка, там и куча продовольствия, медикаментов, ну и как без гуманитарочки оружием. Плюс в столичный порт прибыли ждва полных корабля чуваков из африки на помощь императору (мэнпауэр дает)
country_event = {
	id = nippon.35
	title = nippon.35.t
	desc = nippon.35.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.35.a
		add_stability = 0.03
		add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = 245
				producer = ZJA
			}
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = 321
				producer = ZMN
			}
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = 241
				producer = ZHA
			}
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = 228
				producer = ZRI
			}
		random_owned_controlled_state = {	
				limit = {
					is_controlled_by = ZNP							
				}
				add_manpower = 2417
			}
		add_political_power = 80	
		hidden_effect = {
			random_owned_controlled_state = {	
				limit = {
					is_controlled_by = ZNP							
				}
				add_manpower = 8564
			}
		}
	}	
}

#саботаж на фабрике. агенты сёгунов чтоли? или местные маори?
country_event = {
	id = nippon.36
	title = nippon.36.t
	desc = nippon.36.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.36.a
		random_owned_controlled_state = {
			limit = {
				industrial_complex > 1								
			}
			damage_building = { type = industrial_complex damage = 0.5 }
		}
	}	
}
#саботаж в порту. апять агенты сёгунов чтоли? или местные маори?
country_event = {
	id = nippon.37
	title = nippon.37.t
	desc = nippon.37.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.37.a
		random_owned_controlled_state = {
			limit = {
				naval_base > 1								
			}
			damage_building = { type = naval_base damage = 0.5 }
		}
	}	
}
#забастовки на фабриках. Рабочие басуют. Кое где даже какой то взры на заводе. это на путь омников
country_event = {
	id = nippon.38
	title = nippon.38.t
	desc = nippon.38.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.38.a
		add_stability = -0.05
		random_owned_controlled_state = {
			limit = {
				industrial_complex > 1								
			}
			damage_building = { type = industrial_complex damage = 0.5 }
		}
		add_popularity = {
			ideology = communism
			popularity = 0.05
		}
	}	
}
#мы подошли к зданию городской администрации. предлагаем властям сдаться, суд будет не строгий, немношк посудим только) 
country_event = {
	id = nippon.39
	title = nippon.39.t
	desc = nippon.39.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.39.a		
		random_list = {
			50 = {
				country_event = { id = nippon.40 }
			}
			50 = {
				country_event = { id = nippon.41 }	
			}
		}
	}		
}
#островная администрация сдалась. они приказали всем частям самообороны сложить оружие. мудро с их стороны. теперь мы тут власть.
country_event = {
	id = nippon.40
	title = nippon.40.t
	desc = nippon.40.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.40.a
		set_politics = {						
			ruling_party = communism
		}
		set_popularities = {			
			neutrality = 20
			fascism = 5
			communism = 75
		}
		add_timed_idea = {
			idea = znp_podavlenie_kontrrevoluts
			days = 250
		}
		add_timed_idea = {
			idea = omniparismdrift
			days = 300
		}
		hidden_effect = {
			drop_cosmetic_tag = yes
			news_event = { hours = 3 id = ar_news.773 }
		}
	}	
}
#островная администрация призвала армию сопротивляться нам, гражданочка го го
country_event = {
	id = nippon.41
	title = nippon.41.t
	desc = nippon.41.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.41.a
		set_politics = {			
			ruling_party = communism
		}
		set_popularities = {			
			neutrality = 20
			fascism = 5
			communism = 75
		}		
		add_timed_idea = {
			idea = omniparismdrift
			days = 300
		}
		start_civil_war = {			
			ideology = neutrality	
			size = 0.3
			army_ratio = 0.3
			navy_ratio = 0.7	
			states = { 
				800 723 799
			}
		}
		add_named_threat = { threat = 2 name = nippon.41.thtearr }
		hidden_effect = {
			drop_cosmetic_tag = yes
			news_event = { hours = 3 id = ar_news.774 }
		}
	}	
}		
#итоги переписи населения, нас оказывается больше чем мы думали
country_event = {
	id = nippon.42
	title = nippon.42.t
	desc = nippon.42.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.42.a
		random_owned_controlled_state = {
			limit = {
				is_controlled_by = ZNP						
			}
			add_manpower = 6541
		}
		random_owned_controlled_state = {
			limit = {
				is_controlled_by = ZNP						
			}
			add_manpower = 3247
		}
		random_owned_controlled_state = {
			limit = {
				is_controlled_by = ZNP						
			}
			add_manpower = 7452
		}
	}	
}

#новояпония бед императора, признание прав маори, сьрасываение оков рабства
country_event = {
	id = nippon.43
	title = nippon.43.t
	desc = nippon.43.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.43.a
		add_political_power = 30
		add_stability = 0.05
	}	
}
#по всей новояпонии сжигают портреты императора. отсровная администрация боится и не высовывается.
country_event = {
	id = nippon.44
	title = nippon.44.t
	desc = nippon.44.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.44.a
		add_popularity = {
			ideology = communism
			popularity = 0.05
		}	
		add_stability = -0.05
		add_war_support = -0.1
	}	
}
#эвент СПР о том что омники в новояпонии хотят дружить. они прислали свою делегацию\позвонили
country_event = {
	id = nippon.45
	title = nippon.45.t
	desc = nippon.45.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.45.a
		add_opinion_modifier = {
			target = ZNP
			modifier = diplomat_20
		}
		ZNP = {
			add_opinion_modifier = {
				target = ZIK
				modifier = diplomat_20
			}
		}
	}	
}

#эвент СПР о том что омники в новояпонии хотят вступить в наш альянс трудовой союз
country_event = {
	id = nippon.46
	title = nippon.46.t
	desc = nippon.46.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.46.a
		ai_chance = { factor = 200 }
		effect_tooltip = {
			add_to_faction = ZNP 
		}
		add_ai_strategy = {
			type = alliance
			id = "ZNP"
			value = 50
		}
		ZNP = {
			country_event = { id = nippon.47 }
		}
	}
	option = { 
		name = nippon.46.b
		ZNP = {
			country_event = { id = nippon.48 }
		}
	}	
}
#эвент о том что мы вступили в СПР
country_event = {
	id = nippon.47
	title = nippon.47.t
	desc = nippon.47.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.47.a
		ZIK = {
			add_to_faction = ZNP 
		}
		add_ai_strategy = {
			type = alliance
			id = "ZIK"
			value = 50
		}
		add_stability = 0.01
		hidden_effect = {
			news_event = { hours = 3 id = ar_news.775 }
		}
	}	
}
#эвент о том что мы НЕ вступили в СПР
country_event = {
	id = nippon.48
	title = nippon.48.t
	desc = nippon.48.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.48.a		
		add_stability = -0.03
	}	
}

#эвент для хуаномуро о том что к ним тут омники в гости из новояпонии приплыли. делегация, типа дружить хотим. Но что от них ждать? хз
country_event = {
	id = nippon.49
	title = nippon.49.t
	desc = nippon.49.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.49.a	
			add_popularity = {
				ideology = communism
				popularity = 0.05
			}
	}	
}

#эвент для СПР что новояпонские омники запилили свой альянс, а в наш не захотели
country_event = {
	id = nippon.50
	title = nippon.50.t
	desc = nippon.50.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.50.a	
		add_stability = -0.02
	}	
}

#эвент для победившей императорской новояпонии о том что император объявил о единении всего японского народа (дич какую то пишу же). крч, по итогу все сёгунатские земли становятся истиннояпонскими и столица новой японии улетает в осаку, на место. 
country_event = {
	id = nippon.51
	title = nippon.51.t
	desc = nippon.51.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.51.a	
		if = {
			limit = {
				controls_state = 961
			}			
			set_capital = {state = 961}
		}
		if = {
			limit = {
				NOT = {
					country_exists = ZJA
				}
			}
			every_state = {
				limit = { is_claimed_by = ZJA }
				remove_claim_by = ZJA
			}
			every_state = {
				limit = { is_core_of = ZJA }
				add_core_of = ZNP
				remove_core_of = ZJA
			}
		}
		hidden_effect = {
			news_event = { hours = 3 id = ar_news.795 }
		}
	}	
}

#эвент для хуаномору что южн префектуры проводят у нас агитацию за свою свободу и равентсво
country_event = {
	id = nippon.52
	title = nippon.52.t
	desc = nippon.52.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.52.a			
		effect_tooltip = {
			add_timed_idea = {
					idea = omniparismdrift
					days = 200
				}
		}
	}	
}

#эвент для хуаномору о том что в стране из за высокого уровня поддержки омников случилась реаолююция. Союз Южных Префектур открыто заявляет что поддерживает омников. Остальные пока воздержались от комментариев. Что нам делать? (либо становимся омниками и воюем в маленькой гражданке против старого правительства либо отвергаем омников и ловим норм такую гражданку против них, ии выбирает первое почти всегда)
country_event = {
	id = nippon.53
	title = nippon.53.t
	desc = nippon.53.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.53.a			
		ai_chance = { factor = 50 }
		set_politics = {			
			ruling_party = communism
		}
		set_popularities = {			
			neutrality = 35			
			communism = 75
		}
		start_civil_war = {			
			ideology = neutrality	
			size = 0.2						
		}
		add_ideas = znp_dobrovoltsy_omniki
		hidden_effect = {
			news_event = { hours = 5 id = ar_news.811 }
		}
	}
	option = { 
		name = nippon.53.b			
		if = {
			limit = {
				NOT = { has_government = communism }
			}
			start_civil_war = {			
				ideology = communism	
				size = 0.4						
			}
		}
	}	
}

#эвент для молодого омнипаристического хуаноморо что южные префектуры предлагают нам вступить в их альянс-нейм Организации Взаимной Обороны для создания общей обороны нашей свободы 
country_event = {
	id = nippon.54
	title = nippon.54.t
	desc = nippon.54.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.54.a			
		ai_chance = { factor = 50 }
		add_ai_strategy = {
			type = alliance
			id = "ZNP"
			value = 200
		}		
		ZNP = {
			add_to_faction = ZAN			
			add_ai_strategy = {
				type = alliance
				id = "ZAN"
				value = 200
			}
			country_event = { id = nippon.55 }
		}
		hidden_effect = {
			news_event = { hours = 3 id = ar_news.812 }
		}
	}
	option = { 
		name = nippon.54.b
		ai_chance = { factor = 1 }
		ZNP = {
			country_event = { id = nippon.56 }
		}
	}	
}

#эвент для эжных префектур что хуаномуро вступили в союз с нами. Организации Взаимной Обороны. ух, скоро они станут частью нас ухахахах, они еще не знают наш план +новость
country_event = {
	id = nippon.55
	title = nippon.55.t
	desc = nippon.55.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.55.a			
		effect_tooltip = {
			add_to_faction = ZAN
		}
	}	
}

#эвент для эжных префектур что хуаномуро НЕ вступили в союз с нами. жаль, такие планы были, может быть потом
country_event = {
	id = nippon.56
	title = nippon.56.t
	desc = nippon.56.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.56.a			
		
	}	
}

#эвент для молодого омнипаристического хуаноморо что южные префектуры предлагают нам помощь в реформировании госсапарата чтобы следать нашу страну более омнипаристической. Хм, мы же станем марионетками в таком случае? 
country_event = {
	id = nippon.57
	title = nippon.57.t
	desc = nippon.57.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.57.a			
		ai_chance = { factor = 25 }
		effect_tooltip = {
			ZNP = {
				puppet = ZAN
			}
		}
		add_stability = 0.05
		add_political_power = 120
	}
	option = { 
		name = nippon.57.b			
		ai_chance = { factor = 3 }
	}	
}

#эвент для эжных префектур что хуаномуро согласилось дать нам доступ к их политоте. они наша марионетка +новость
country_event = {
	id = nippon.58
	title = nippon.58.t
	desc = nippon.58.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.58.a			
		puppet = ZAN
		hidden_effect = {
			news_event = { hours = 3 id = ar_news.813 }
		}
	}	
}

#эвент для эжных префектур что хуаномуро НЕ согласилось дать нам доступ к их политоте. жаль
country_event = {
	id = nippon.59
	title = nippon.59.t
	desc = nippon.59.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.59.a			
	}	
}


#эвент для ланфанг о том что союз южных префектур что то говорят о том что хотят помочь нашим жителям скинуть какие то оковы рабства. Они явно скоро на нас нападут.
country_event = {
	id = nippon.60
	title = nippon.60.t
	desc = nippon.60.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = { 
		name = nippon.60.a
		add_war_support = 0.05		
	}	
}
