political_actions = {
	eoanb_treaty_QNG_shattered_qing = {
    icon = revolt
  
    allowed = { always = no }
    
    available = {
      QNG = {
        OR ={
    			surrender_progress > 0.60
    			NOT={controls_state = 608}
    		}
      }
    }
    
    activation = { always = no }
    
    is_good = no
    
    days_mission_timeout = 10097
    
    complete_effect = {
      QNG = { country_event = qing_reb.17 }
    }
  }

	eoanb_decision_QNG_kick_out_GER = {
		
		icon = generic_break_treaty
        
        allowed = {
            tag = QNG
        }
		
		available = {
			has_idea = GER_idea_QNG_military_presence
		}
		
		visible = {
			OR = {
				PRS = { has_completed_focus = GER_focus_historical_military_in_china }
				has_idea = GER_idea_QNG_military_presence
			}
			NOT = { QNG = { is_subject_of = GER } }
		}
		
		fire_only_once = yes
		
		cost = 20
		
		complete_effect = {
			remove_ideas = GER_idea_QNG_military_presence
			add_stability = -0.02
			GER = { country_event = { id = germany.14 } }
		}
		
		ai_will_do = {
			base = 0
		}
	}
	
	eoanb_decision_QNG_buy_arms_black_market = {
		
		icon = generic_break_treaty
        
        allowed = {
            tag = TAI
        }
		
		available = {
			any_controlled_state = {
				is_coastal = yes
				# any_province_building_level = {
					# limit=1
					# province = {
						# id = 7014
						# limit_to_border = no
					# }
					# building = naval_base
					# level > 0
				# }
			}
		}
		
		visible = {
			has_war_with = QNG
		}
		fixed_random_seed = no
		
		cost = 25
		
		days_remove = 10
		
		remove_effect = {
			random_list = {
				20 = {
					add_equipment_to_stockpile = {
						type = infantry_equipment_rifle_1
						amount = 75
						producer = FRA
					}
				}
				20 = {
					add_equipment_to_stockpile = {
						type = infantry_equipment_rifle_1
						amount = 75
						producer = USA
					}
				}
				4={
					add_equipment_to_stockpile = {
						type = cannon_equipment_0
						amount = 25
						producer = USA
					}
				}
			}
		}
		
		ai_will_do = {
			base = 1000
		}
	}

		QNG_ban_the_opium_trade = {
		icon = generic_factory

		visible = {
			has_completed_focus = QNG_focus_victory_of_the_second_opium_war	
		}

		available  = {
			
		}
		
		highlight_states = {
			highlight_state_targets = {
				state = 613
			}
		}

		days_remove = 370
		fire_only_once = yes

		cancel_trigger = {
		
		}
		
		cost = 150

		modifier = {
			political_power_gain = -0.5
			stability_weekly_factor = 0.001
		}

		remove_effect = {
			remove_ideas = QNG_idea_opium_crissis
		}
	}


	eoanb_decision_QNG_receive_tribute_d = {
		allowed = { tag = QNG }

		icon = generic_political_discourse

		available = {
			# has_completed_focus = QNG_manage_tributaries
			custom_trigger_tooltip = {
				tooltip = eoanb_decision_QNG_receive_tribute_d_triggertooltip
				NOT = {
					any_country = {
							has_country_flag = tribute_payment_in_process 
					}
				}
			}
		}

		visible = {
			# has_completed_focus = QNG_manage_tributaries
		}
		
		target_trigger = {
			FROM = {
				OR={
					tag = KOR
					tag = RYU
					tag = LAN
					tag = VIN
					tag = KOK
				}
			}		
		}

		cost = 0
		days_remove = 60

		complete_effect = {
			FROM = {
				set_country_flag = tribute_payment_in_process
			}
		}
		
		remove_effect = {
			
			country_event = qing.710
			
		}
		modifier={
			political_power_gain = -0.1
		}

		ai_will_do = {
			base = 1
		}
	}
	
	eoanb_decision_QNG_invest_tributary = {
		allowed = { tag = QNG }

		icon = generic_political_discourse

		available = {
			always = no
		}

		visible = {
			always = no
		}
		
		target_trigger = {
			FROM = {
				OR={
					tag = KOR
					tag = RYU
					tag = LAN
					tag = VIN
					tag = KOK
				}
			}		
		}

		cost = 150
		days_remove = 150
		
		remove_effect = {
			FROM={
				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
					}
				}
			}
		}
		modifier={
			consumer_goods_expected_value = 0.05
		}

		ai_will_do = {
			base = 1
		}
	}

	eoanb_decision_QNG_ai_kill_banghui = {
		
		icon = generic_break_treaty
        
        allowed = {
            tag = QNG
        }
		
		available = {
			NOT={
				controls_state = 524
			}
			has_manpower > 10000
		}
		
		visible = {
			has_war_with = TAW
			is_ai = yes
		}
		fire_only_once = yes
		
		cost = 25
		
		days_remove = 10
		
		remove_effect = {
			add_manpower = -10000
			load_oob = QNG_TAI_invasion
		}
		
		ai_will_do = {
			base = 1000
		}
	}
	eoanb_decision_QNG_take_costal_east_taiwan = {
		
		icon = generic_break_treaty
        
        allowed = {
            tag = QNG
        }
		
		available = {
			controls_state = 524
			has_manpower > 10000
		}
		
		visible = {
			NOT={
				controls_state = 1228
			}
			date > 1885.1.1
		}
		
		cost = 25
		days_remove = 25
		
		fire_only_once = yes
		
		complete_effect = {
			add_manpower = -10000
		}
		
		remove_effect = {
			add_manpower = 10000
			transfer_state = 1228
		}
		
		ai_will_do = {
			base = 1000
		}
	}

}

CHI_industrialization_category = {

	QNG_construction_anqing_arsenal = {
		icon = generic_factory

		visible = {
			
		}

		available  = {
			has_completed_focus = QNG_focus_anqing_arsenal
			num_of_civilian_factories_available_for_projects > 1
		}
		
		highlight_states = {
			highlight_state_targets = {
				state = 1056
			}
		}

		fire_only_once = yes

		cancel_trigger = {
			NOT = { controls_state = 1056 }
		}
		
		modifier = {
			civilian_factory_use = 2
		}

		remove_effect = {
			1056 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
			add_tech_bonus = { bonus = 0.05 uses = 1 category = industry category = infantry_weapons }
			EOANBSYS_institutions_innovative_add_one = yes
		}
		days_remove = 400
	}

	QNG_jin_ling_arsenal_mission = {
		icon = generic_factory

		visible = {
			
		}

		available  = {
			has_completed_focus = QNG_focus_build_the_jingling_arsenal
			num_of_civilian_factories_available_for_projects > 2
		}
		
		highlight_states = {
			highlight_state_targets = {
				state = 1056
			}
		}

		fire_only_once = yes

		cancel_trigger = {
			NOT = { controls_state = 1056 }
		}
		
		modifier = {
			civilian_factory_use = 3
		}

		remove_effect = {
			1056 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
			add_tech_bonus = { bonus = 0.05 uses = 1 category = industry }
			EOANBSYS_institutions_innovative_add_one = yes
		}
		days_remove = 400
	}
	
	QNG_hanyang_arsenal_mission = {
		icon = generic_factory

		visible = {
			
		}

		available  = {
			has_completed_focus = QNG_focus_hanyang_arsenal
			num_of_civilian_factories_available_for_projects > 1
		}
		
		highlight_states = {
			highlight_state_targets = {
				state = 620
			}
		}

		fire_only_once = yes
		days_remove = 450

		cancel_trigger = {
			NOT = { controls_state = 620 }
		}
		
		modifier = {
			civilian_factory_use = 2
		}

		remove_effect = {
			620 = {
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
			add_tech_bonus = { bonus = 0.05 uses = 1 category = industry }
			EOANBSYS_institutions_innovative_add_one = yes
		}
	}

	QNG_jiangnan_arsenal_mission = {
		icon = generic_factory

		visible = {
			
		}

		available  = {
			has_completed_focus = QNG_focus_jiangnan_arsenal
			num_of_civilian_factories_available_for_projects > 1
		}
		
		highlight_states = {
			highlight_state_targets = {
				state = 1056
			}
		}

		fire_only_once = yes
		days_remove = 450

		cancel_trigger = {
			NOT = { controls_state = 1056 }
		}
		
		modifier = {
			civilian_factory_use = 2
		}

		remove_effect = {
			1056 = {
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
			add_tech_bonus = { bonus = 0.05 uses = 1 category = industry }
			EOANBSYS_institutions_innovative_add_one = yes
		}
	}
	
	QNG_jiangnan_arsenal_2_mission = {
		icon = generic_factory

		visible = {
			
		}

		available  = {
			has_completed_focus = QNG_focus_expand_the_jiangnan_arsenal
			num_of_civilian_factories_available_for_projects > 2
		}
		
		highlight_states = {
			highlight_state_targets = {
				state = 1056
			}
		}

		days_remove = 370
		fire_only_once = yes

		cancel_trigger = {
			NOT = { controls_state = 1056 }
		}
		
		modifier = {
			civilian_factory_use = 3
		}

		remove_effect = {
			1056 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
				  type = arms_factory
				  level = 2
				  instant_build = yes
				}
			}
			add_tech_bonus = { bonus = 0.05 uses = 1 category = industry }
			EOANBSYS_institutions_innovative_add_one = yes
		}
	}
	
	QNG_construction_shanghai_arsenal = {
		icon = generic_factory

		visible = {
			
		}

		available  = {
			#has_completed_focus = QNG_focus_shanghai_arsenal
			num_of_civilian_factories_available_for_projects > 1
		}
		
		highlight_states = {
			highlight_state_targets = {
				state = 613
			}
		}

		days_remove = 370
		fire_only_once = yes

		cancel_trigger = {
			NOT = { controls_state = 613 }
		}
		
		modifier = {
			civilian_factory_use = 2
		}

		remove_effect = {
			613 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
				  type = arms_factory
				  level = 1
				  instant_build = yes
				}
			}
			add_tech_bonus = { bonus = 0.05 uses = 1 category = industry }
			EOANBSYS_institutions_innovative_add_one = yes
		}
	}
	
	QNG_construction_tianjin_arsenal = {
		icon = generic_factory

		visible = {
			
		}

		available  = {
			has_completed_focus = QNG_focus_tianjin_arsenal
			num_of_civilian_factories_available_for_projects > 1
		}
		
		highlight_states = {
			highlight_state_targets = {
				state = 126
			}
		}

		days_remove = 370
		fire_only_once = yes

		cancel_trigger = {
			NOT = { controls_state = 126 }
		}
		
		modifier = {
			civilian_factory_use = 2
		}

		remove_effect = {
			126 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
				  type = arms_factory
				  level = 1
				  instant_build = yes
				}
			}
			add_tech_bonus = { bonus = 0.05 uses = 1 category = industry }
			EOANBSYS_institutions_innovative_add_one = yes
		}
	}
	
	QNG_decision_lanzhou_arsenal = {

		icon = generic_factory

		allowed = {  }
		
		available = {
			#has_completed_focus = QNG_focus_lanzhou_factory
			num_of_civilian_factories_available_for_projects > 1
		}

		visible = {
			
		}
		
		highlight_states = {
			highlight_state_targets = {
				state = 604
			}
		}

		fire_only_once = yes

		cost = 100
		
		days_remove = 365
		
		modifier = {
			civilian_factory_use = 2
		}
		
		cancel_trigger = {
			NOT = { controls_state = 604 }
		}
		
		complete_effect = {
	
		}
		
		remove_effect = {
			604 = {
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = 5000
				producer = QNG
			}
			add_tech_bonus = { bonus = 0.05 uses = 1 category = rifle_equipment_techs }
			EOANBSYS_institutions_innovative_add_one = yes
		}

		ai_will_do = {
			base = 1000
		}
	}
	
	QNG_decision_foreign_weapon_manuals = {
		icon = generic_research

		visible = {
			
		}
		
		available = {
			#has_completed_focus = QNG_focus_shanghai_arsenal
		}

		allowed = {  }

		fire_only_once = yes
		is_good = yes

		cost = 50
		days_remove = 180

		modifier = {
			political_power_gain = -0.05
		}

		remove_effect = {
			add_doctrine_cost_reduction = { cost_reduction = 0.5 uses = 1 category = land_doctrine }
			add_tech_bonus = { bonus = 0.2 uses = 1 category = infantry_weapons category = rifle_equipment_techs }
			EOANBSYS_institutions_humanitive_add_two = yes
		}

		ai_will_do = {
			base = 1000
		}
	}
	
	QNG_jiangnan_arsenal_naval_mission = {
		icon = naval_base

		visible = {
			
		}

		available  = {
			num_of_civilian_factories_available_for_projects > 1
			has_completed_focus = QNG_focus_expansion_of_the_jiangnan_dockyard
		}
		
		highlight_states = {
			highlight_state_targets = {
				state = 1056
			}
		}

		days_remove = 370
		fire_only_once = yes

		cancel_trigger = {
			NOT = { controls_state = 1056 }
		}
		
		modifier = {
			civilian_factory_use = 2
		}

		remove_effect = {
			1056 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
				  type = dockyard
				  level = 2
				  instant_build = yes
				}
			}
			add_tech_bonus = { bonus = 0.05 uses = 1 category = naval_equipment }
			EOANBSYS_institutions_innovative_add_one = yes
		}
	}
	
	QNG_fuzhou_navy_shipyard = {
		icon = naval_base

		visible = {
			
		}

		available  = {
			num_of_civilian_factories_available_for_projects > 2
			has_completed_focus = QNG_focus_construct_the_fuzhou_navy_shipyard
		}
		
		highlight_states = {
			highlight_state_targets = {
				state = 595
			}
		}

		days_remove = 370
		fire_only_once = yes

		cancel_trigger = {
			NOT = { controls_state = 595 }
		}
		
		modifier = {
			civilian_factory_use = 3
		}

		remove_effect = {
			595 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
				  type = dockyard
				  level = 1
				  instant_build = yes
				}
				add_building_construction = {
				  type = naval_base
				  level = 1
				  instant_build = yes
				  province = 13729
				}
			}
			add_tech_bonus = { bonus = 0.05 uses = 1 category = naval_equipment }
			EOANBSYS_institutions_innovative_add_one = yes
		}
	}
	
	QNG_fuzhou_navy_shipyard_expansion = {
		icon = naval_base

		visible = {
			
		}

		available  = {
			num_of_civilian_factories_available_for_projects > 2
			has_completed_focus = QNG_focus_expansion_of_the_fuzhou_navy_shipyard
			595 = {
				dockyard > 0
			}
		}
		
		highlight_states = {
			highlight_state_targets = {
				state = 595
			}
		}

		days_remove = 370
		fire_only_once = yes

		cancel_trigger = {
			NOT = { controls_state = 595 }
		}
		
		modifier = {
			civilian_factory_use = 3
		}

		remove_effect = {
			595 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
				  type = dockyard
				  level = 1
				  instant_build = yes
				}
				add_building_construction = {
				  type = naval_base
				  level = 1
				  instant_build = yes
				  province = 13729
				}
			}
			add_tech_bonus = { bonus = 0.05 uses = 1 category = naval_equipment }
			EOANBSYS_institutions_innovative_add_one = yes
		}
	}

	QNG_fuzhou_navy_shipyard_finish_expansion = {
		icon = naval_base

		visible = {
			
		}

		available  = {
			num_of_civilian_factories_available_for_projects > 2
			has_completed_focus = QNG_focus_finish_expansion_of_fuzhou_navy_shipyard
			595 = {
				dockyard > 0
			}
		}
		
		highlight_states = {
			highlight_state_targets = {
				state = 595
			}
		}

		days_remove = 370
		fire_only_once = yes

		cancel_trigger = {
			NOT = { controls_state = 595 }
		}
		
		modifier = {
			civilian_factory_use = 3
		}

		remove_effect = {
			595 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
				  type = dockyard
				  level = 1
				  instant_build = yes
				}
				add_building_construction = {
				  type = naval_base
				  level = 1
				  instant_build = yes
				  province = 13729
				}
			}
			add_tech_bonus = { bonus = 0.05 uses = 1 category = naval_equipment }
			EOANBSYS_institutions_innovative_add_one = yes
		}
	}
	
	QNG_beiyang_machine_factory_mission = {
		icon = generic_political_actions

		visible = {
			always = no
		}

		available  = {
			always = no
		}
		
		highlight_states = {
			highlight_state_targets = {
				state = 608
			}
		}

		days_remove = 520
		fire_only_once = yes

		cancel_trigger = {
			NOT={controls_state = 608}
		}
		
		modifier = {
			civilian_factory_use = 2
		}

		remove_effect = {
			608 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
				  type = industrial_complex
				  level = 1
				  instant_build = yes
				}
			}
		}
	}

	QNG_xian_machinery_bureau_mission = {
		icon = generic_political_actions

		visible = {
			
		}

		available  = {
			num_of_civilian_factories_available_for_projects > 2
			has_completed_focus = QNG_focus_zhejiang_machinery_bureau
		}
		
		highlight_states = {
			highlight_state_targets = {
				state = 1223
			}
		}

		days_remove = 520
		fire_only_once = yes

		cancel_trigger = {
			NOT={controls_state = 1223}
		}
		
		modifier = {
			civilian_factory_use = 2
		}

		remove_effect = {
			1223 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
				  type = arms_factory
				  level = 1
				  instant_build = yes
				}
			}
		}
	}

	QNG_kunming_machinery_bureau_mission = {
		icon = generic_political_actions

		visible = {
			
		}

		available  = {
			num_of_civilian_factories_available_for_projects > 2
			has_completed_focus = QNG_focus_kunming_machinery_bureau
		}
		
		highlight_states = {
			highlight_state_targets = {
				state = 325
			}
		}

		days_remove = 520
		fire_only_once = yes

		cancel_trigger = {
			NOT={controls_state = 325}
		}
		
		modifier = {
			civilian_factory_use = 2
		}

		remove_effect = {
			325 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
				  type = arms_factory
				  level = 1
				  instant_build = yes
				}
			}
		}
	}

	QNG_jinan_machinery_bureau_mission = {
		icon = generic_political_actions

		visible = {
			
		}

		available  = {
			num_of_civilian_factories_available_for_projects > 2
			has_completed_focus = QNG_focus_jinan_machinery_bureau
		}
		
		highlight_states = {
			highlight_state_targets = {
				state = 597
			}
		}

		days_remove = 520
		fire_only_once = yes

		cancel_trigger = {
			NOT={controls_state = 597}
		}
		
		modifier = {
			civilian_factory_use = 2
		}

		remove_effect = {
			597 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
				  type = arms_factory
				  level = 1
				  instant_build = yes
				}
			}
		}
	}

	QNG_changsha_machinery_bureau_mission = {
		icon = generic_political_actions

		visible = {
			
		}

		available  = {
			num_of_civilian_factories_available_for_projects > 2
			has_completed_focus = QNG_focus_changsha_machinery_bureau
		}
		
		highlight_states = {
			highlight_state_targets = {
				state = 602
			}
		}

		days_remove = 520
		fire_only_once = yes

		cancel_trigger = {
			NOT={controls_state = 602}
		}
		
		modifier = {
			civilian_factory_use = 2
		}

		remove_effect = {
			602 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
				  type = arms_factory
				  level = 1
				  instant_build = yes
				}
			}
		}
	}

	QNG_chengdu_machinery_bureau_mission = {
		icon = generic_political_actions

		visible = {
			
		}

		available  = {
			num_of_civilian_factories_available_for_projects > 2
			has_completed_focus = QNG_focus_chengdu_machinery_bureau
		}
		
		highlight_states = {
			highlight_state_targets = {
				state = 605
			}
		}

		days_remove = 520
		fire_only_once = yes

		cancel_trigger = {
			NOT={controls_state = 605}
		}
		
		modifier = {
			civilian_factory_use = 2
		}

		remove_effect = {
			605 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
				  type = arms_factory
				  level = 1
				  instant_build = yes
				}
			}
		}
	}
	
	QNG_beiyang_machine_factory_dockyard_mission = {
		icon = naval_base

		visible = {
			
		}

		available  = {
			num_of_civilian_factories_available_for_projects > 1
			has_completed_focus = QNG_focus_beiyang_navy_shipyard
		}
		
		highlight_states = {
			highlight_state_targets = {
				state = 609
			}
		}

		days_remove = 340
		fire_only_once = yes

		cancel_trigger = {
			NOT = { controls_state = 609 }
		}
		
		modifier = {
			civilian_factory_use = 2
		}

		remove_effect = {
			609 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
				  type = dockyard
				  level = 2
				  instant_build = yes
				}
			}
			add_tech_bonus = { bonus = 0.05 uses = 1 category = naval_equipment }
			EOANBSYS_institutions_innovative_add_one = yes
		}
	}
	
	QNG_decision_lanzhou_fabric_factory = { 
		icon = fabric

		allowed = {  }
		
		available = {
			has_completed_focus = QNG_focus_lanzhou_fabric_Factory
			num_of_civilian_factories_available_for_projects > 0
		}

		visible = {
			
		}
		
		highlight_states = {
			highlight_state_targets = {
				state = 1056
			}
		}

		fire_only_once = yes

		cost = 100
		
		days_remove = 365
		
		modifier = {
			civilian_factory_use = 1
		}
		
		cancel_trigger = {
			NOT = { controls_state = 1056 }
		}
		
		complete_effect = {
	
		}
		
		remove_effect = {
			1056 = {
				add_building_construction = {
					type = fabric_weavery
					level = 2
					instant_build = yes
				}
			}
			add_tech_bonus = { bonus = 0.05 uses = 1 category = mechanical_engineering_tech }
			EOANBSYS_institutions_innovative_add_one = yes
		}

		ai_will_do = {
			base = 1000
		}
	}

	QNG_decision_ningbo_arsenal = { 
		icon = fabric

		allowed = {  }
		
		available = {
			has_completed_focus = QNG_focus_ningbo_arsenal
			num_of_civilian_factories_available_for_projects > 0
		}

		visible = {
			
		}
		
		highlight_states = {
			highlight_state_targets = {
				state = 596
			}
		}

		fire_only_once = yes

		cost = 100
		
		days_remove = 365
		
		modifier = {
			civilian_factory_use = 1
		}
		
		cancel_trigger = {
			NOT = { controls_state = 596 }
		}
		
		complete_effect = {
	
		}
		
		remove_effect = {
			596 = {
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
			add_tech_bonus = { bonus = 1.75 uses = 1 category = infantry_weapons category = tech_category_uniforms }
			EOANBSYS_institutions_innovative_add_one = yes
		}

		ai_will_do = {
			base = 1000
		}
	}
	
	QNG_decision_taiyuan_arsenal = { 
		icon = fabric

		allowed = {  }
		
		available = {
			has_completed_focus = QNG_focus_taiyuan_arsenal
			num_of_civilian_factories_available_for_projects > 0
		}

		visible = {
			
		}
		
		highlight_states = {
			highlight_state_targets = {
				state = 615
			}
		}

		fire_only_once = yes

		cost = 100
		
		days_remove = 365
		
		modifier = {
			civilian_factory_use = 1
		}
		
		cancel_trigger = {
			NOT = { controls_state = 615 }
		}
		
		complete_effect = {
	
		}
		
		remove_effect = {
			615 = {
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
			add_tech_bonus = { bonus = 1.75 uses = 1 category = infantry_weapons category = tech_category_uniforms }
			EOANBSYS_institutions_innovative_add_one = yes
		}

		ai_will_do = {
			base = 1000
		}
	}

	QNG_decision_jiangnan_dockyard = { 
		icon = fabric

		allowed = {  }
		
		available = {
			has_completed_focus = QNG_focus_jiangnan_dockyard
			num_of_civilian_factories_available_for_projects > 0
		}

		visible = {
			
		}
		
		highlight_states = {
			highlight_state_targets = {
				state = 613
			}
		}

		fire_only_once = yes

		cost = 100
		
		days_remove = 365
		
		modifier = {
			civilian_factory_use = 1
		}
		
		cancel_trigger = {
			NOT = { controls_state = 613 }
		}
		
		complete_effect = {
	
		}
		
		remove_effect = {
			613 = {
				add_building_construction = {
					type = dockyard
					level = 2
					instant_build = yes
				}
			}
			EOANBSYS_institutions_innovative_add_one = yes
		}

		ai_will_do = {
			base = 1000
		}
	}

	QNG_decision_shanghai_cotton_mill = { 

		icon = fabric

		allowed = {  }
		
		available = {
			has_completed_focus = QNG_focus_shanghai_cotton_mill
			num_of_civilian_factories_available_for_projects > 0
		}

		visible = {
			
		}
		
		highlight_states = {
			highlight_state_targets = {
				state = 613
			}
		}

		fire_only_once = yes

		cost = 100
		
		days_remove = 365
		
		modifier = {
			civilian_factory_use = 1
		}
		
		cancel_trigger = {
			NOT = { controls_state = 613 }
		}
		
		complete_effect = {
	
		}
		
		remove_effect = {
			613 = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
				  type = cotton_farm
				  level = 2
				  instant_build = yes
				}
			}
			add_tech_bonus = { bonus = 0.05 uses = 1 category = mechanical_engineering_tech }
			EOANBSYS_institutions_innovative_add_one = yes
		}

		ai_will_do = {
			base = 1000
		}
	}
	
	QNG_decision_hubei_fabric_factory = { 

		icon = fabric

		allowed = {  }
		
		available = {
			has_completed_focus = QNG_focus_hubei_fabric_factory
			num_of_civilian_factories_available_for_projects > 0
		}

		visible = {
			
		}
		
		highlight_states = {
			highlight_state_targets = {
				state = 620
			}
		}

		fire_only_once = yes

		cost = 100
		
		days_remove = 365
		
		modifier = {
			civilian_factory_use = 1
		}
		
		cancel_trigger = {
			NOT = { controls_state = 620 }
		}
		
		complete_effect = {
	
		}
		
		remove_effect = {
			620 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
				  type = fabric_weavery
				  level = 2
				  instant_build = yes
				}
			}
			add_tech_bonus = { bonus = 0.05 uses = 1 category = mechanical_engineering_tech }
			EOANBSYS_institutions_innovative_add_one = yes
		}

		ai_will_do = {
			base = 1000
		}
	}
	
	QNG_decision_guizhou_ironworks = {
		icon = steel

		allowed = {  }

		available = {
			has_completed_focus = QNG_focus_guizhou_ironworks
			num_of_civilian_factories_available_for_projects > 0
		}

		visible = {

		}

		highlight_states = {
			highlight_state_targets = {
				state = 603
			}
		}

		fire_only_once = yes
		is_good = yes

		cost = 35

		days_remove = 180

		modifier = {
			civilian_factory_use = 1
		}
		
		cancel_trigger = {
			NOT = { controls_state = 603 }
		}

		complete_effect = {
			EOANBSYS_institutions_innovative_add_two = yes
			603 = {
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = steel_mill
					level = 3
					instant_build = yes
				}
			}
			add_victory_points = {
					province = 4504
					value = 1
			}
		}
	}
	
	QNG_decision_hanyang_ironworks = {
		icon = steel

		allowed = {  }

		available = {
			has_completed_focus = QNG_focus_hanyang_ironworks
			num_of_civilian_factories_available_for_projects > 0
		}

		visible = {

		}

		highlight_states = {
			highlight_state_targets = {
				state = 620
			}
		}

		fire_only_once = yes
		is_good = yes

		cost = 35

		days_remove = 180

		modifier = {
			civilian_factory_use = 1
		}
		
		cancel_trigger = {
			NOT = { controls_state = 620 }
		}

		complete_effect = {
			EOANBSYS_institutions_innovative_add_two = yes
			620 = {
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = steel_mill
					level = 3
					instant_build = yes
				}
			}
			add_victory_points = {
					province = 4619
					value = 1
			}
		}
	}
	
	QNG_decision_tianjin_yu_railway = {
		icon = coal

		allowed = { }

		available = {
			has_completed_focus = QNG_focus_tianjin_yu_railway
			num_of_civilian_factories_available_for_projects > 0
		}

		visible = {
			
		}

		highlight_states = {
			highlight_state_targets = {
				state = 1151
			}
		}

		fire_only_once = yes
		is_good = yes

		cost = 35

		days_remove = 180

		modifier = {
			civilian_factory_use = 1
		}
		
		cancel_trigger = {
			NOT = { controls_state = 1151 }
		}

		complete_effect = {
			country_event = qing.502
			add_resource = {
				type = coal
				amount = 10
				state = 126
			}
			add_resource = {
				type = coal
				amount = 10
				state = 1151
			}
		}
	}

	QNG_decision_kaiping_mines = {
		icon = coal

		allowed = { }

		available = {
			has_completed_focus = QNG_focus_kaiping_mines
			num_of_civilian_factories_available_for_projects > 0
		}

		visible = {
			
		}

		highlight_states = {
			highlight_state_targets = {
				state = 1151
			}
		}

		fire_only_once = yes
		is_good = yes

		cost = 35

		days_remove = 180

		modifier = {
			civilian_factory_use = 1
		}
		
		cancel_trigger = {
			NOT = { controls_state = 1151 }
		}

		complete_effect = {
			country_event = qing.502
			add_resource = {
				type = coal
				amount = 10
				state = 126
			}
			add_resource = {
				type = coal
				amount = 10
				state = 1151
			}
		}
	}

	QNG_decision_kaiping_railway = {
		icon = coal

		allowed = { }

		available = {
			has_completed_focus = QNG_focus_kaiping_railway
			num_of_civilian_factories_available_for_projects > 0
		}

		visible = {
			
		}

		highlight_states = {
			highlight_state_targets = {
				state = 609
			}
		}

		fire_only_once = yes
		is_good = yes

		cost = 35

		days_remove = 180

		modifier = {
			civilian_factory_use = 1
		}
		
		cancel_trigger = {
			NOT = { controls_state = 609 }
		}

		complete_effect = {
			609 = {
				add_building_construction = {
					type = infrastructure
					level = 2
					instant_build = yes
				}
			}	
		}
	}
	
	QNG_decision_keelung_coal_mine = {
		icon = coal

		allowed = {  }

		available = {
			has_completed_focus = QNG_focus_keelung_coal_mine
			num_of_civilian_factories_available_for_projects > 0
		}

		visible = {
			
		}

		highlight_states = {
			highlight_state_targets = {
				state = 524
			}
		}

		fire_only_once = yes
		is_good = yes

		cost = 35

		days_remove = 180

		modifier = {
			civilian_factory_use = 1
		}
		
		cancel_trigger = {
			NOT = { controls_state = 524 }
		}

		complete_effect = {
			country_event = qing.504
			add_resource = {
				type = coal
				amount = 10
				state = 524
			}
		}
	}
	
	QNG_decision_ping_hsiang_coal_mines = {
		icon = coal

		allowed = {  }

		available = {
			has_completed_focus = QNG_focus_ping_hsiang_coal_mines
			num_of_civilian_factories_available_for_projects > 0
		}

		visible = {
			
		}

		highlight_states = {
			highlight_state_targets = {
				state = 600
			}
		}

		fire_only_once = yes
		is_good = yes

		cost = 35

		days_remove = 180

		modifier = {
			civilian_factory_use = 1
		}
		
		cancel_trigger = {
			NOT = { controls_state = 600 }
		}

		complete_effect = {
			country_event = qing.503
			add_resource = {
				type = coal
				amount = 10
				state = 600
			}
		}
	}
	
	QNG_decision_ta_yeh_ironmines = {
		icon = coal

		allowed = {  }

		available = {
			has_completed_focus = QNG_focus_ta_yeh_ironmines
			num_of_civilian_factories_available_for_projects > 0
		}

		visible = {
			
		}

		highlight_states = {
			highlight_state_targets = {
				state = 609
			}
		}

		fire_only_once = yes
		is_good = yes

		cost = 35

		days_remove = 180

		modifier = {
			civilian_factory_use = 1
		}
		
		cancel_trigger = {
			NOT = { controls_state = 609 }
		}

		complete_effect = {
			country_event = qing.503
			609 = {
				add_building_construction = {
					type = steel_mill
					level = 3
					instant_build = yes
				}
			}
		}
	}
	
	QNG_decision_anqing_machine_factory = {

		icon = generic_factory

		allowed = {  }
		
		available = {
			has_completed_focus = QNG_focus_anqing_machine_factory
			num_of_civilian_factories_available_for_projects > 1
		}

		visible = {

		}

		highlight_states = {
			highlight_state_targets = {
				state = 1056
			}
		}

		fire_only_once = yes

		cost = 200
		
		days_remove = 365
		
		modifier = {
			civilian_factory_use = 2
		}
		
		complete_effect = {
			1056 = { add_extra_state_shared_building_slots = 1 }
			1056 = {
				if = {
					limit = {
						steel_mill > 0
					}
					add_building_construction = {
						type = 	machine_parts_factory
						level = 1
						instant_build = yes
					}
				}
				else = {
					add_building_construction = {
						type = 	steel_mill
						level = 1
						instant_build = yes
					}
				}
			}
		}

		ai_will_do = {
			base = 1000
		}

		cancel_trigger = {
			NOT = { controls_state = 606 }
		}
	}
	
	QNG_decision_xi_an_machine_factory = {

		icon = generic_factory

		allowed = {  }
		
		available = {
			has_completed_focus = QNG_focus_xi_an_machine_factory
			num_of_civilian_factories_available_for_projects > 1
		}

		visible = {

		}

		highlight_states = {
			highlight_state_targets = {
				state = 1223
			}
		}

		fire_only_once = yes

		cost = 200
		
		days_remove = 365
		
		modifier = {
			civilian_factory_use = 2
		}
		
		complete_effect = {
			1223 = { add_extra_state_shared_building_slots = 1 }
			1223 = {
				if = {
					limit = {
						steel_mill > 0
					}
					add_building_construction = {
						type = 	machine_parts_factory
						level = 1
						instant_build = yes
					}
				}
				else = {
					add_building_construction = {
						type = 	steel_mill
						level = 1
						instant_build = yes
					}
				}
			}
		}

		ai_will_do = {
			base = 1000
		}

		cancel_trigger = {
			NOT = { controls_state = 807 }
		}
	}

	QNG_decision_beiyang_machine_factory = {

		icon = generic_factory

		allowed = {  }
		
		available = {
			has_completed_focus = QNG_focus_beiyang_machine_factory
			num_of_civilian_factories_available_for_projects > 1
		}

		visible = {

		}

		highlight_states = {
			highlight_state_targets = {
				state = 1151
			}
		}

		fire_only_once = yes

		cost = 200
		
		days_remove = 365
		
		modifier = {
			civilian_factory_use = 2
		}
		
		complete_effect = {
			1151 = { add_extra_state_shared_building_slots = 1 }
			1151 = {
				if = {
					limit = {
						steel_mill > 0
					}
					add_building_construction = {
						type = 	machine_parts_factory
						level = 1
						instant_build = yes
					}
				}
				else = {
					add_building_construction = {
						type = 	steel_mill
						level = 1
						instant_build = yes
					}
				}
			}
			add_tech_bonus = { bonus = 0.5 uses = 1 category = mechanical_engineering_tech category = economics_tech }
		}

		ai_will_do = {
			base = 1000
		}

		cancel_trigger = {
			NOT = { controls_state = 807 }
		}
	}
	
	QNG_decision_jingling_machine_factory = {

		icon = generic_factory

		allowed = {  }
		
		available = {
			has_completed_focus = QNG_focus_jingling_machine_factory
			num_of_civilian_factories_available_for_projects > 1
		}

		visible = {

		}

		fire_only_once = yes

		cost = 200
		
		days_remove = 365
		
		modifier = {
			civilian_factory_use = 2
		}
		
		complete_effect = {
			1056 = { add_extra_state_shared_building_slots = 1 }
			1056 = {
				if = {
					limit = {
						steel_mill > 0
					}
					add_building_construction = {
						type = 	machine_parts_factory
						level = 1
						instant_build = yes
					}
				}
				else = {
					add_building_construction = {
						type = 	steel_mill
						level = 1
						instant_build = yes
					}
				}
			}
		}

		ai_will_do = {
			base = 1000
		}

		cancel_trigger = {
			NOT = { controls_state = 1056 }
		}
	}
	
	QNG_decision_restore_irrigation_networks = {

		icon = generic_factory

		allowed = {  }
		
		available = {
			has_completed_focus = QNG_focus_restore_irrigation_networks
			num_of_civilian_factories_available_for_projects > 2
		}

		visible = {

		}

		fire_only_once = yes

		cost = 200
		
		days_remove = 365
		
		modifier = {
			civilian_factory_use = 3
		}
		
		complete_effect = {
			EOANBSYS_institutions_innovative_add_five = yes
			random_owned_controlled_state = {
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
				add_extra_state_shared_building_slots = 1
			}
			random_owned_controlled_state = {
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
				add_extra_state_shared_building_slots = 1
			}
			random_owned_controlled_state = {
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
				add_extra_state_shared_building_slots = 1
			}
		}

		ai_will_do = {
			base = 1000
		}

		cancel_trigger = {
			
		}
	}
}

QNG_category_naval_affairs = {

	QNG_decision_catalogue_naval_assets = {
		icon = generic

		allowed = { }

		available = {
			has_country_flag = naval_command_founded
		}
		
		visible = {
			has_completed_focus = QNG_focus_build_the_naval_fleet
		}

		fire_only_once = yes
		is_good = yes

		cost = 75 
		days_remove = 350

		remove_effect = {
			navy_experience = 35
			add_doctrine_cost_reduction = { cost_reduction = 0.1 uses = 1 category = naval_doctrine }
		}

		ai_will_do = {
			base = 1000
		}
	}
	
	QNG_decision_increase_navy_budget = {

		icon = money

		#allowed = { tag = QNG }

		available = {
			OR = {
				has_idea = navy_spending_level_1
				has_idea = navy_spending_level_2
				has_idea = navy_spending_level_3
			}
		}

		visible = {
			
		}

		fire_only_once = yes
		
		cost = 25

		days_remove = 150
		
		modifier = {
			political_power_gain = -0.05
		}
		
		complete_effect = {
			add_stability = -0.01
			add_war_support = -0.01
			hidden_effect = {
				
			}
		}
		
		remove_effect = {  
			
		}

		ai_will_do = {
			base = 1000
		}
	}
	
	QNG_decision_nanyang_fleet = {

		icon = generic_naval

		#allowed = {  }

		available = {
			num_of_civilian_factories_available_for_projects > 0
			has_completed_focus = QNG_focus_form_the_nanyang_fleet
			has_tech = tech_naval_mtg_gunboat_engineering_1
		}
		fire_only_once = yes

		custom_cost_trigger = {
			has_political_power > 24.9
			has_navy_experience > 24.9
			command_power > 49.99
		}
		custom_cost_text = eoanb_political_power_25_navy_experience_25_command_power_50
		
		days_remove = 120
		
		modifier = {
			civilian_factory_use = 1
			experience_gain_navy_factor = 0.05
		}
		
		complete_effect = {
			add_political_power = -25
			navy_experience = -25
			add_command_power = -50
		}

		remove_effect = {
			country_event = { id = qing.703 }
		}

		ai_will_do = {
			base = 1000
		}
	}
	
	QNG_decision_nanyang_fleet_expansion = {

		icon = generic_naval

		#allowed = {  }

		available = {
			num_of_civilian_factories_available_for_projects > 0
			has_completed_focus = QNG_focus_form_the_nanyang_fleet
			has_tech = tech_naval_mtg_gunboat_engineering_1
		}
		fire_only_once = yes

		custom_cost_trigger = {
			has_political_power > 24.9
			has_navy_experience > 24.9
			command_power > 49.99
		}
		custom_cost_text = eoanb_political_power_25_navy_experience_25_command_power_50
		
		days_remove = 120
		
		modifier = {
			civilian_factory_use = 1
			experience_gain_navy_factor = 0.05
		}
		
		complete_effect = {
			add_political_power = -25
			navy_experience = -25
			add_command_power = -50
		}

		remove_effect = {
			country_event = { id = qing.704 }
		}

		ai_will_do = {
			base = 1000
		}
	}
	
	QNG_decision_beiyang_fleet = {

		icon = generic_naval

		#allowed = {  }

		available = {
			num_of_civilian_factories_available_for_projects > 0
			has_completed_focus = QNG_focus_form_the_beiyang_fleet
			has_tech = tech_naval_mtg_gunboat_engineering_1
		}
		fire_only_once = yes

		custom_cost_trigger = {
			has_political_power > 24.9
			has_navy_experience > 24.9
			command_power > 49.99
		}
		custom_cost_text = eoanb_political_power_25_navy_experience_25_command_power_50
		
		days_remove = 120
		
		modifier = {
			civilian_factory_use = 1
			experience_gain_navy_factor = 0.05
		}
		
		complete_effect = {
			add_political_power = -25
			navy_experience = -25
			add_command_power = -50
		}

		remove_effect = {
			country_event = { id = qing.705 }
		}

		ai_will_do = {
			base = 1000
		}
	}
	
	QNG_decision_beiyang_fleet_expansion = {

		icon = generic_naval

		#allowed = {  }

		available = {
			num_of_civilian_factories_available_for_projects > 0
			has_completed_focus = QNG_focus_expand_the_beiyang_fleet
			has_tech = tech_naval_mtg_gunboat_engineering_1
		}
		fire_only_once = yes

		custom_cost_trigger = {
			has_political_power > 24.9
			has_navy_experience > 24.9
			command_power > 49.99
		}
		custom_cost_text = eoanb_political_power_25_navy_experience_25_command_power_50
		
		days_remove = 120
		
		modifier = {
			civilian_factory_use = 1
			experience_gain_navy_factor = 0.05
		}
		
		complete_effect = {
			add_political_power = -25
			navy_experience = -25
			add_command_power = -50
		}

		remove_effect = {
			country_event = { id = qing.706 }
		}

		ai_will_do = {
			base = 1000
		}
	}
}

eoanb_category_war_measures={
	eoanb_decision_QNG_retake_dali = {
		
		icon = generic_break_treaty
        
        allowed = {
            tag = QNG
        }
		
		available = {
			NOT={
				controls_state = 974
			}
			has_war = no
			date > 1872.1.1
		}
		
		visible = {
			PTH={
				exists = yes
				has_war = no
			}
		}
		fire_only_once = yes
		
		cost = 25
		
		days_remove = 10
		war_with_on_remove = PTH
		
		remove_effect = {
			declare_war_on = {
				target = PTH
				type = annex_everything
			}
			hidden_effect={
				increase_ps_by_one = yes
			}
		}
		
		ai_will_do = {
			base = 1000
		}
	}
}

###Balance of Power
QNG_BOP_category = {

	#Promote Competent Officials
	QNG_decision_promote_competent_officials = {

		icon = generic

		#allowed = { tag = QNG }

		
		available = {
			has_completed_focus = QNG_focus_self_strenthening_movement
		}

		visible = {
			always = yes
		}

		fire_only_once = yes

		cost = 30
		days_re_enable = 1095

		modifier = {
			
		}

		complete_effect = {
			add_power_balance_value = {
				id = QNG_Balance_of_Power_Qing_Establishment
				value = 0.03
			}
		}

		ai_will_do = {
			base = 200
		}
	}

	#Appoint competent officials
	QNG_decision_appoint_competent_ministers = {

		icon = generic

		#allowed = { tag = QNG }

		
		available = {
			has_completed_focus = QNG_focus_self_strenthening_movement	
		}

		visible = {
			always = yes
		}

		fire_only_once = yes

		cost = 30
		days_remove = 100
		days_re_enable = 1095

		modifier = {

		}
		complete_effect = {
			add_power_balance_modifier = {
				id = QNG_Balance_of_Power_Qing_Establishment
				modifier = QNG_Balance_of_Power_Yangwu
			}
		}
		remove_effect = {
			remove_power_balance_modifier = {
				id = QNG_Balance_of_Power_Qing_Establishment
				modifier = QNG_Balance_of_Power_Yangwu
			}
		}

		ai_will_do = {
			base = 200
		}
	}	

	#Contain Western Influence
	QNG_decision_contain_barbarian_influence = {

		icon = generic

		#allowed = { tag = QNG }

		
		available = {
			has_completed_focus = QNG_focus_self_strenthening_movement
		}

		visible = {
			always = yes
		}

		fire_only_once = yes

		cost = 30
		days_re_enable = 1095

		modifier = {
			
		}

		complete_effect = {
			add_power_balance_value = {
				id = QNG_Balance_of_Power_Qing_Establishment
				value = -0.03
			}
		}

		ai_will_do = {
			base = 200
		}
	}	
	#Appoint Loyalist Ministers
	QNG_decision_appoint_loyal_ministers = {

		icon = generic

		#allowed = { tag = QNG }

		
		available = {
			has_completed_focus = QNG_focus_self_strenthening_movement
		}

		visible = {
			always = yes
		}

		fire_only_once = yes

		cost = 30
		days_remove = 100
		days_re_enable = 1095

		modifier = {

		}
		complete_effect = {
			add_power_balance_modifier = {
				id = QNG_Balance_of_Power_Qing_Establishment
				modifier = QNG_Balance_of_power_Conservative
			}
		}
		remove_effect = {
			remove_power_balance_modifier = {
				id = QNG_Balance_of_Power_Qing_Establishment
				modifier = QNG_Balance_of_power_Conservative
			}
		}

		ai_will_do = {
			base = 200
		}
	}		
}