###########################
###########################

add_namespace = LSM_equipment

country_event = {
	id = LSM_equipment.1
	title = LSM_equipment.1.t
	desc = LSM_equipment.1.d
	picture = GFX_report_event_generic_train
	
	is_triggered_only = yes

	minor_flavor = yes
	
	option = {
		name = LSM_equipment.1.a
		effect_tooltip = {
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = 10000
				producer = FROM
			}
		}
	}
}
country_event = {
	id = LSM_equipment.2
	title = LSM_equipment.2.t
	desc = LSM_equipment.1.d
	picture = GFX_report_event_generic_train
	
	is_triggered_only = yes

	minor_flavor = yes
	
	option = {
		name = LSM_equipment.1.a
		effect_tooltip = {
			add_equipment_to_stockpile = {
				type = artillery_equipment
				amount = 2000
				producer = FROM
			}
		}
	}
}
country_event = {
	id = LSM_equipment.3
	title = LSM_equipment.3.t
	desc = LSM_equipment.1.d
	picture = GFX_report_event_generic_train
	
	is_triggered_only = yes

	minor_flavor = yes
	
	option = {
		name = LSM_equipment.1.a
		effect_tooltip = {
			add_equipment_to_stockpile = {
				type = support_equipment
				amount = 2000
				producer = FROM
			}
		}
	}
}
country_event = {
	id = LSM_equipment.4
	title = LSM_equipment.4.t
	desc = LSM_equipment.1.d
	picture = GFX_report_event_generic_train
	
	is_triggered_only = yes

	minor_flavor = yes
	
	option = {
		name = LSM_equipment.1.a
		effect_tooltip = {
			add_equipment_to_stockpile = {
				type = anti_tank_equipment
				amount = 2000
				producer = FROM
			}
		}
	}
}
country_event = {
	id = LSM_equipment.5
	title = LSM_equipment.5.t
	desc = LSM_equipment.1.d
	picture = GFX_report_event_generic_train
	
	is_triggered_only = yes

	minor_flavor = yes
	
	option = {
		name = LSM_equipment.1.a
		effect_tooltip = {
			add_equipment_to_stockpile = {
				type = anti_air_equipment
				amount = 2000
				producer = FROM
			}
		}
	}
}
country_event = {
	id = LSM_equipment.6
	title = LSM_equipment.6.t
	desc = LSM_equipment.1.d
	picture = GFX_report_event_generic_train
	
	is_triggered_only = yes

	minor_flavor = yes
	
	option = {
		name = LSM_equipment.1.a
		effect_tooltip = {
			add_equipment_to_stockpile = {
				type = motorized_equipment
				amount = 1000
				producer = FROM
			}
		}
	}
}
country_event = {
	id = LSM_equipment.7
	title = LSM_equipment.7.t
	desc = LSM_equipment.1.d
	picture = GFX_report_event_generic_train
	
	is_triggered_only = yes

	minor_flavor = yes
	
	option = {
		name = LSM_equipment.1.a
		effect_tooltip = {
			add_equipment_to_stockpile = {
				type = mechanized_equipment
				amount = 1000
				producer = FROM
			}
		}
	}
}
country_event = {
	id = LSM_equipment.8
	title = LSM_equipment.8.t
	desc = LSM_equipment.1.d
	picture = GFX_report_event_generic_train
	
	is_triggered_only = yes

	minor_flavor = yes
	
	option = {
		name = LSM_equipment.1.a
		custom_effect_tooltip = "We will receive a large quantity of equipment and machineries from [FROM.GetNameDef]"
	}
}
country_event = {
	id = LSM_equipment.9
	title = LSM_equipment.9.t
	desc = LSM_equipment.9.d
	picture = GFX_report_event_generic_train
	
	is_triggered_only = yes

	minor_flavor = yes
	
	option = {
		name = LSM_equipment.1.a
		effect_tooltip = {
			add_manpower = 50000
		}
	}
}
country_event = {
	id = LSM_equipment.10
	title = LSM_equipment.10.t
	desc = LSM_equipment.10.d
	
	is_triggered_only = yes

	minor_flavor = yes
	
	option = {
		name = LSM_equipment.10.a
		ai_chance = {
			base = 100
		}
		FROM = {
			if = {
				limit = {
					OR = { 
						has_government = democratic
						has_government = communism
						has_government = neutrality
					}
				}
				diplomatic_relation = {
					country = CHI
					relation = send_attache
					active = yes
				}
			}
			if = {
				limit = {
					OR = { 
						has_government = fascism
					}
				}
				diplomatic_relation = {
					country = JAP
					relation = send_attache
					active = yes
				}
			}
		}
		if = {
			limit = {
				tag = JAP 
			}
			add_political_power = 2
		}
		if = {
			limit = {
				tag = CHI 
			}
			add_political_power = 1
		}
	}
	
	option = {
		name = LSM_equipment.10.b
		ai_chance = {
			base = 0
		}
	}
}

country_event = {
	id = LSM_equipment.11
	title = LSM_equipment.11.t
	desc = LSM_equipment.11.d
	picture = GFX_report_event_generic_construction_site
	
	is_triggered_only = yes
	
	option = {
		name = LSM_equipment.11.a
	}
}

country_event = {
	id = LSM_equipment.12
	title = election.3.t
	desc = election.3.d
	picture = GFX_report_event_tank_factory
	
	is_triggered_only = yes
	
	trigger = {
		tag = FRA
		FRA_1936_election_criteria = yes
		has_government = democratic
		is_historical_focus_on = yes
		has_war = no
		OR = {
			any_neighbor_country = {
				has_war = yes
			}
			any_allied_country = {
				has_war = yes
			}
		}
		OR = {
			has_idea = low_economic_mobilisation
			has_idea = civilian_economy
			has_idea = isolation
			has_idea = undisturbed_isolation
			has_idea = volunteer_only
			has_idea = disarmed_nation
		}
	}

	option = {
		name = election.3.a
		ai_chance = {
			base = 100
		}
		if = {
			limit = { has_idea = low_economic_mobilisation }
			add_ideas = partial_economic_mobilisation
		}
		if = {
			limit = { has_idea = civilian_economy }
			add_ideas = low_economic_mobilisation
		}
		if = {
			limit = { has_idea = isolation }
			add_ideas = civilian_economy
		}
		if = {
			limit = { has_idea = undisturbed_isolation }
			add_ideas = isolation
		}
		if = {
			limit = { has_idea = volunteer_only }
			add_ideas = limited_conscription
		}
		if = {
			limit = { has_idea = disarmed_nation }
			add_ideas = volunteer_only
		}
		add_war_support = 0.05
	}

	option = {
		name = election.3.b
		ai_chance = {
			base = 0
		}
		add_stability = -0.05
	}
}

country_event = {
	id = LSM_equipment.20
	title = LSM_equipment.20.t
	desc = LSM_equipment.20.d
	picture = GFX_report_event_japan_army_mountainside
	
	is_triggered_only = yes
	
	option = {
		name = LSM_equipment.20.b
		custom_effect_tooltip = "Artillery will be far more effective at the cost of infantry combat effectiveness"
		custom_effect_tooltip = equipment_20_tt_a
		hidden_effect = {
			set_technology = { USA_artillery_meta = 1 popup = no }
		}
	}
	
	option = {
		name = LSM_equipment.20.a
		custom_effect_tooltip = "Flamethrower vehicles will be far more effective at the cost of increased casualties"
		custom_effect_tooltip = equipment_20_tt_b
		hidden_effect = {
			set_technology = { USA_flame_tank_meta = 1 popup = no }
		}
	}
	
	option = {
		name = LSM_equipment.20.c
		custom_effect_tooltip = "Has no real effect smh. Now go research your nukes baka."
	}
}

country_event = {
	id = LSM_equipment.21
	title = LSM_equipment.21.t
	desc = LSM_equipment.21.d
	picture = GFX_report_event_canadian_soldiers
	
	is_triggered_only = yes
	
	option = {
		name = LSM_equipment.21.a
		ai_chance = {
			base = 100
		}
	}
	
	option = {
		name = LSM_equipment.21.b
		ai_chance = {
			base = 0
		}
		create_wargoal = { target = CAN type = annex_everything }
	}
}
country_event = {
	id = LSM_equipment.22
	title = LSM_equipment.22.t
	desc = LSM_equipment.22.d
	picture = GFX_report_event_canadian_soldiers
	
	is_triggered_only = yes
	
	option = {
		name = LSM_equipment.22.a
		add_timed_idea = { idea = a_society_at_war days = 1095 }
		ai_chance = {
			base = 0
		}
	}
	
	option = {
		name = LSM_equipment.22.b
		add_timed_idea = { idea = every_man_a_soldier days = 1095 }
		ai_chance = {
			base = 100
		}
	}
}
country_event = {
	id = LSM_equipment.23
	title = LSM_equipment.23.t
	desc = LSM_equipment.23.d
	picture = GFX_report_event_generic_rifles
	
	is_triggered_only = yes
	
	option = {
		name = LSM_equipment.23.a
		add_equipment_to_stockpile = {
			type = infantry_equipment_0
			amount = 50000
			producer = USA
		}
		add_equipment_to_stockpile = {
			type = infantry_equipment_1
			amount = 2000
			producer = USA
		}
		add_equipment_to_stockpile = {
			type = support_equipment_1
			amount = 200
			producer = USA
		}
		if = {
			limit = {
				USA = { has_equipment = { infantry_equipment > 50000 } }
			}
			add_equipment_to_stockpile = {
				type = infantry_equipment_2
				amount = 5000
				producer = USA
			}
			add_equipment_to_stockpile = {
				type = infantry_equipment_1
				amount = 8000
				producer = USA
			}
			add_equipment_to_stockpile = {
				type = support_equipment_1
				amount = 500
				producer = USA
			}
		}
		ai_chance = {
			base = 100
		}
	}
	
	option = {
		name = LSM_equipment.23.b
		set_global_flag = SOV_declined_US_support
		ai_chance = {
			base = 0
		}
	}
}
country_event = {
	id = LSM_equipment.24
	title = LSM_equipment.24.t
	desc = LSM_equipment.24.d
	picture = GFX_report_event_generic_sign_treaty2
	
	is_triggered_only = yes
	
	option = {
		name = LSM_equipment.24.a
		effect_tooltip = {
			ROM = {
				give_resource_rights = { receiver = GER state = 46 }
				GER = { add_timed_idea = { idea = ROM_GER_economic_development days = 180 } }
				ROM = { add_timed_idea = { idea = ROM_ROM_economic_development days = 730 } }
				ROM = {
					random_owned_controlled_state = {
						prioritize = { 46 }
						limit = {
							free_building_slots = {
								building = infrastructure
								size > 0
							}
						}
						add_building_construction = {
							type = infrastructure
							level = 1
							instant_build = yes
						}
						set_state_flag = ROM_danubian_transport_network_Inf
					}
					random_owned_controlled_state = {
						prioritize = { 81 }
						limit = {
							free_building_slots = {
								building = infrastructure
								size > 0
							}
						}
						add_building_construction = {
							type = infrastructure
							level = 1
							instant_build = yes
						}
						set_state_flag = ROM_danubian_transport_network_Inf_2
					}
					custom_effect_tooltip = GER_ROM_dev_tt
				}	
			}
		}
		hidden_effect = { ROM = { country_event = { id = LSM_equipment.25 days = 1 } } }
		ai_chance = {
			base = 100
		}
	}
	
	option = {
		name = LSM_equipment.24.b
		add_political_power = 50
		hidden_effect = { ROM = { country_event = { id = LSM_equipment.26 days = 1 } } }
		ai_chance = {
			base = 0
		}
	}
}
country_event = {
	id = LSM_equipment.25
	title = LSM_equipment.25.t
	desc = LSM_equipment.25.d
	picture = GFX_report_event_generic_sign_treaty2
	
	is_triggered_only = yes
	
	option = {
			ROM = {
				give_resource_rights = { receiver = GER state = 46 }
				GER = { add_timed_idea = { idea = ROM_GER_economic_development days = 180 } }
				ROM = { add_timed_idea = { idea = ROM_ROM_economic_development days = 730 } }
				ROM = {
					random_owned_controlled_state = {
						prioritize = { 46 }
						limit = {
							free_building_slots = {
								building = infrastructure
								size > 0
							}
						}
						add_building_construction = {
							type = infrastructure
							level = 1
							instant_build = yes
						}
						set_state_flag = ROM_danubian_transport_network_Inf
					}
					random_owned_controlled_state = {
						prioritize = { 81 }
						limit = {
							free_building_slots = {
								building = infrastructure
								size > 0
							}
						}
						add_building_construction = {
							type = infrastructure
							level = 1
							instant_build = yes
						}
						set_state_flag = ROM_danubian_transport_network_Inf_2
					}
					custom_effect_tooltip = GER_ROM_dev_tt
				}	
			}
		name = LSM_equipment.25.a
	}
}
country_event = {
	id = LSM_equipment.26
	title = LSM_equipment.26.t
	desc = LSM_equipment.26.d
	picture = GFX_report_event_generic_sign_treaty2
	
	is_triggered_only = yes
	
	option = {
		name = LSM_equipment.26.a
		add_political_power = -5
	}
}
country_event = {
	id = LSM_equipment.27
	title = LSM_equipment.27.t
	desc = LSM_equipment.27.d
	picture = GFX_report_event_generic_sign_treaty2
	
	is_triggered_only = yes
	
	option = {
			random_owned_controlled_state = {
				prioritize = { 46 81 }
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 1
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				prioritize = { 46 81 }
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 1
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				prioritize = { 79 81 }
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 1
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				prioritize = { 79 81 }
				limit = {
					free_building_slots = {
						building = industrial_complex
						size > 1
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
		name = LSM_equipment.27.a
	}
}
country_event = {
	id = LSM_equipment.28
	title = LSM_equipment.28.t
	desc = LSM_equipment.28.d
	picture = GFX_report_event_generic_rifles

	minor_flavor = yes
	
	trigger = {
		tag = USA
		has_war = yes
		OR = {
			has_equipment = { infantry_equipment < 100000 }
			AND = {
				has_equipment = { infantry_equipment < 150000 }
				any_country = {
					is_in_faction_with = ROOT
					is_major = yes
					has_equipment = { infantry_equipment < 25000 }
				}
			}
		}
	}

	mean_time_to_happen = {
		days = 730
		modifier = {
			factor = 0.5
			has_war_support > 0.9
		}
		modifier = {
			factor = 0.5
			has_war_support > 0.7
		}
		modifier = {
			factor = 0.5
			has_war_support > 0.5
		}
		modifier = {
			factor = 2
			has_war_support < 0.5
		}
		modifier = {
			factor = 0.5
			has_defensive_war = yes
		}
		modifier = {
			factor = 0.5
			has_equipment = { infantry_equipment < 50000 }
		}
		modifier = {
			factor = 0.5
			has_equipment = { infantry_equipment < 10000 }
		}
		modifier = {
			factor = 0.5
			surrender_progress > 0.25
		}
		modifier = {
			factor = 20
			has_equipment = { infantry_equipment > 150000 }
		}
	}
	
	option = {
		name = LSM_equipment.28.a
		add_equipment_to_stockpile = {
			type = infantry_equipment_0
			amount = 6000
			producer = USA
		}
		add_equipment_to_stockpile = {
			type = infantry_equipment_1
			amount = 350
			producer = USA
		}
	}
}

country_event = {
	id = LSM_equipment.29
	title = LSM_equipment.29.t
	desc = LSM_equipment.29.d
	picture = GFX_report_event_manchukuo_army_2
	
	is_triggered_only = yes
	
	option = {
		name = LSM_equipment.29.a
		ai_chance = { 
			factor = 80 
			modifier = {
				factor = 0
				check_variable = { japan_has_demanded_our_conscription > 5 }
			}
		}
		add_manpower = -20000
		JAP = { add_manpower = 20000 }
	}
	
	option = {
		name = LSM_equipment.29.b
		ai_chance = { 
			factor = 20  
			modifier = {
				factor = 0
				check_variable = { japan_has_demanded_our_conscription < 3 }
			}  
			modifier = {
				factor = 0
				check_variable = { japan_has_demanded_our_conscription > 15 }
			}
		}
		add_manpower = -20000
		JAP = { add_manpower = 20000 }
		every_state = {
			limit = {
				is_core_of = CHI
				is_owned_by = JAP
			}
			add_resistance = 4
			add_compliance = -2
		}
	}
	
	option = {
		name = LSM_equipment.29.c
		ai_chance = { 
			factor = 20  
			modifier = {
				factor = 0
				check_variable = { japan_has_demanded_our_conscription < 15 }
			}
		}
		add_manpower = -20000
		JAP = { add_manpower = 20000 }
		every_state = {
			limit = {
				is_core_of = CHI
				is_owned_by = JAP
			}
			add_resistance = 10
			add_compliance = -5
		}
	}

	option = {
		name = LSM_equipment.29.e
		trigger = {
			check_variable = { japan_has_demanded_our_conscription > 20 }
		}
		ai_chance = { 
			factor = 100 
		}
		
		hidden_effect = { set_variable = { CN_independence_target = OVERLORD } }
		OVERLORD = { set_autonomy = { target = ROOT autonomy_state = autonomy_free } }
		
		every_country = {
			limit = { has_war_with = ROOT }
			white_peace = ROOT
		}
				
		if = {
			limit = {
				is_in_faction_with = var:CN_independence_target
			}
			leave_faction = yes
		}
		declare_war_on = {
			target = var:CN_independence_target
			type = topple_government
		}
		hidden_effect = {
			if = { 
				limit = { 
					NOT = { has_country_flag = template_given_lsm }
				}
				set_country_flag = template_given_lsm
				division_template = {
					name = "Militia Division"
					division_names_group = CHI_INF_01
					priority = 0
					regiments = {
						militia = { x = 0 y = 0 }
						militia = { x = 0 y = 1 }
						militia = { x = 0 y = 2 }
						militia = { x = 1 y = 0 }
						militia = { x = 1 y = 1 }
						militia = { x = 1 y = 2 }
					}
					support = {
				
					}
				}
			}

			every_state = {
				limit = {
					is_core_of = ROOT
					is_controlled_by = JAP
					OR = {
						AND = {
							resistance > 0.20
							compliance < 0.20
						}
						resistance > 0.50
					}
				}
				create_unit = {
					division = "name = \"Militia\" division_template = \"Militia Division\" start_experience_factor = 0 start_equipment_factor = 0.5"  
					owner = ROOT
					allow_spawning_on_enemy_provs = yes  
					count = 5  
				}
			}
		}	
	}

}
country_event = {
	id = LSM_equipment.30
	
	trigger = {
		tag = RAJ
		has_war_with = GER
		is_historical_focus_on = yes
		FRA = { has_capitulated = yes }
		NOT = { has_country_flag = has_received_new_factory_spawn }
	}

	fire_only_once = yes
	
	mean_time_to_happen = { days = 1 }

	hidden = yes

	immediate = {
		set_country_flag = has_received_new_factory_spawn
		if = {
			limit = { is_ai = no }
			random_owned_controlled_state = {
				limit = { 
					NOT = { has_state_flag = state_received_factory }
					free_building_slots = {
						building = arms_factory
						size > 0
						include_locked = yes
					}
				}
				set_state_flag = state_received_factory
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = { 
					NOT = { has_state_flag = state_received_factory }
					free_building_slots = {
						building = arms_factory
						size > 0
						include_locked = yes
					}
				}
				set_state_flag = state_received_factory
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = { 
					NOT = { has_state_flag = state_received_factory }
					free_building_slots = {
						building = industrial_complex
						size > 0
						include_locked = yes
					}
				}
				set_state_flag = state_received_factory
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = { 
					NOT = { has_state_flag = state_received_factory }
					free_building_slots = {
						building = industrial_complex
						size > 0
						include_locked = yes
					}
				}
				set_state_flag = state_received_factory
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
		}	
	}
}
country_event = {
	id = LSM_equipment.31
	title = LSM_equipment.31.t
	desc = LSM_equipment.31.d
	picture = GFX_report_event_canadian_soldiers
	
	is_triggered_only = yes
	
	option = {
		name = LSM_equipment.31.a
		custom_effect_tooltip = LSM_setting_tt_CHI_1
		CHI = {
			set_country_flag = CHI_buff_level_1
		}
		ai_chance = {
			base = 0
		}
	}
	
	option = {
		name = LSM_equipment.31.b
		custom_effect_tooltip = LSM_setting_tt_CHI_2
		CHI = {
			set_country_flag = CHI_buff_level_2
		}
		clr_global_flag = china_giga
		ai_chance = {
			base = 0
		}
	}
	
	option = {
		name = LSM_equipment.31.c
		ai_chance = {
			base = 0
		}
	}
}

country_event = {
	id = LSM_equipment.32
	
	trigger = {
		is_ai = yes
		date > 1940.1.1
		has_global_flag = is_done
	}

	fire_only_once = yes
	
	mean_time_to_happen = { days = 1 }

	hidden = yes

	immediate = {
		load_oob = "baseline_loading"	
	}
}
country_event = {
	id = LSM_equipment.33

	fire_only_once = no
	
	is_triggered_only = yes

	hidden = yes

	immediate = {
		set_country_flag = air_MIO_level_up	
	}
}
country_event = {
	id = LSM_equipment.34

	fire_only_once = no
	
	is_triggered_only = yes

	hidden = yes

	immediate = {
		if = {
			limit = {
				has_tech = interwar_antitank
			}
			create_equipment_variant = {
				type = anti_tank_equipment_1
				design_team = mio:BEL_fonderie_royale_de_canons_liege_organization
				mark_older_equipment_obsolete = yes
			}
		}
		if = {
			limit = {
				has_tech = antitank2
			}
			create_equipment_variant = {
				type = anti_tank_equipment_2
				design_team = mio:BEL_fonderie_royale_de_canons_liege_organization
				mark_older_equipment_obsolete = yes
			}
		}
		if = {
			limit = {
				has_tech = antitank5
			}
			create_equipment_variant = {
				type = anti_tank_equipment_3
				design_team = mio:BEL_fonderie_royale_de_canons_liege_organization
				mark_older_equipment_obsolete = yes
			}
		}
	}
}
country_event = {
	id = LSM_equipment.35

	fire_only_once = no
	
	is_triggered_only = yes

	hidden = yes

	immediate = {
		if = {
			limit = {
				tag = JAP
			}
			if = {
				limit = {
					has_tech = advanced_infantry_weapons
				}
				create_equipment_variant = {
					type = infantry_equipment_3
					design_team = mio:JAP_tokyo_arsenal_organization
					mark_older_equipment_obsolete = yes
				}
			}
			else_if = {
				limit = {
					has_tech = improved_infantry_weapons
				}
				create_equipment_variant = {
					type = infantry_equipment_2
					design_team = mio:JAP_tokyo_arsenal_organization
					mark_older_equipment_obsolete = yes
				}
			}
			else_if = {
				limit = {
					has_tech = infantry_weapons1
				}
				create_equipment_variant = {
					type = infantry_equipment_1
					design_team = mio:JAP_tokyo_arsenal_organization
					mark_older_equipment_obsolete = yes
				}
			}
		}
		if = {
			limit = {
				tag = SOV
			}
			if = {
				limit = {
					has_tech = advanced_infantry_weapons
				}
				create_equipment_variant = {
					type = infantry_equipment_3
					design_team = mio:SOV_tula_arms_plant_organization
					mark_older_equipment_obsolete = yes
				}
			}
			else_if = {
				limit = {
					has_tech = improved_infantry_weapons
				}
				create_equipment_variant = {
					type = infantry_equipment_2
					design_team = mio:SOV_tula_arms_plant_organization
					mark_older_equipment_obsolete = yes
				}
			}
			else_if = {
				limit = {
					has_tech = infantry_weapons1
				}
				create_equipment_variant = {
					type = infantry_equipment_1
					design_team = mio:SOV_tula_arms_plant_organization
					mark_older_equipment_obsolete = yes
				}
			}
		}
		if = {
			limit = {
				tag = ITA
			}
			if = {
				limit = {
					has_tech = advanced_infantry_weapons
				}
				create_equipment_variant = {
					type = infantry_equipment_3
					design_team = mio:ITA_beretta_organization
					mark_older_equipment_obsolete = yes
				}
			}
			else_if = {
				limit = {
					has_tech = improved_infantry_weapons
				}
				create_equipment_variant = {
					type = infantry_equipment_2
					design_team = mio:ITA_beretta_organization
					mark_older_equipment_obsolete = yes
				}
			}
			else_if = {
				limit = {
					has_tech = infantry_weapons1
				}
				create_equipment_variant = {
					type = infantry_equipment_1
					design_team = mio:ITA_beretta_organization
					mark_older_equipment_obsolete = yes
				}
			}
		}
		if = {
			limit = {
				tag = GER
			}
			if = {
				limit = {
					has_tech = advanced_infantry_weapons
				}
				create_equipment_variant = {
					type = infantry_equipment_3
					design_team = mio:GER_mauser_organization
					mark_older_equipment_obsolete = yes
				}
			}
			else_if = {
				limit = {
					has_tech = improved_infantry_weapons
				}
				create_equipment_variant = {
					type = infantry_equipment_2
					design_team = mio:GER_mauser_organization
					mark_older_equipment_obsolete = yes
				}
			}
			else_if = {
				limit = {
					has_tech = infantry_weapons1
				}
				create_equipment_variant = {
					type = infantry_equipment_1
					design_team = mio:GER_mauser_organization
					mark_older_equipment_obsolete = yes
				}
			}
		}
		if = {
			limit = {
				tag = USA
			}
			if = {
				limit = {
					has_tech = advanced_infantry_weapons
				}
				create_equipment_variant = {
					type = infantry_equipment_3
					design_team = mio:USA_springfield_armory_organization
					mark_older_equipment_obsolete = yes
				}
			}
			else_if = {
				limit = {
					has_tech = improved_infantry_weapons
				}
				create_equipment_variant = {
					type = infantry_equipment_2
					design_team = mio:USA_springfield_armory_organization
					mark_older_equipment_obsolete = yes
				}
			}
			else_if = {
				limit = {
					has_tech = infantry_weapons1
				}
				create_equipment_variant = {
					type = infantry_equipment_1
					design_team = mio:USA_springfield_armory_organization
					mark_older_equipment_obsolete = yes
				}
			}
		}
		if = {
			limit = {
				tag = FRA
			}
			if = {
				limit = {
					has_tech = advanced_infantry_weapons
				}
				create_equipment_variant = {
					type = infantry_equipment_3
					design_team = mio:FRA_mas_organization
					mark_older_equipment_obsolete = yes
				}
			}
			else_if = {
				limit = {
					has_tech = improved_infantry_weapons
				}
				create_equipment_variant = {
					type = infantry_equipment_2
					design_team = mio:FRA_mas_organization
					mark_older_equipment_obsolete = yes
				}
			}
			else_if = {
				limit = {
					has_tech = infantry_weapons1
				}
				create_equipment_variant = {
					type = infantry_equipment_1
					design_team = mio:FRA_mas_organization
					mark_older_equipment_obsolete = yes
				}
			}
		}
		if = {
			limit = {
				tag = ENG
			}
			if = {
				limit = {
					has_tech = advanced_infantry_weapons
				}
				create_equipment_variant = {
					type = infantry_equipment_3
					design_team = mio:ENG_rsaf_enfield_organization
					mark_older_equipment_obsolete = yes
				}
			}
			else_if = {
				limit = {
					has_tech = improved_infantry_weapons
				}
				create_equipment_variant = {
					type = infantry_equipment_2
					design_team = mio:ENG_rsaf_enfield_organization
					mark_older_equipment_obsolete = yes
				}
			}
			else_if = {
				limit = {
					has_tech = infantry_weapons1
				}
				create_equipment_variant = {
					type = infantry_equipment_1
					design_team = mio:ENG_rsaf_enfield_organization
					mark_older_equipment_obsolete = yes
				}
			}
		}
		if = {
			limit = {
				tag = BEL
			}
			if = {
				limit = {
					has_tech = advanced_infantry_weapons
				}
				create_equipment_variant = {
					type = infantry_equipment_3
					design_team = mio:BEL_fn_herstal_organization
					mark_older_equipment_obsolete = yes
				}
			}
			else_if = {
				limit = {
					has_tech = improved_infantry_weapons
				}
				create_equipment_variant = {
					type = infantry_equipment_2
					design_team = mio:BEL_fn_herstal_organization
					mark_older_equipment_obsolete = yes
				}
			}
			else_if = {
				limit = {
					has_tech = infantry_weapons1
				}
				create_equipment_variant = {
					type = infantry_equipment_1
					design_team = mio:BEL_fn_herstal_organization
					mark_older_equipment_obsolete = yes
				}
			}
		}
		if = {
			limit = {
				tag = MEX
			}
			if = {
				limit = {
					has_tech = advanced_infantry_weapons
				}
				create_equipment_variant = {
					type = infantry_equipment_3
					design_team = mio:MEX_fabrica_nacional_armas_organization
					mark_older_equipment_obsolete = yes
				}
			}
			else_if = {
				limit = {
					has_tech = improved_infantry_weapons
				}
				create_equipment_variant = {
					type = infantry_equipment_2
					design_team = mio:MEX_fabrica_nacional_armas_organization
					mark_older_equipment_obsolete = yes
				}
			}
			else_if = {
				limit = {
					has_tech = infantry_weapons1
				}
				create_equipment_variant = {
					type = infantry_equipment_1
					design_team = mio:MEX_fabrica_nacional_armas_organization
					mark_older_equipment_obsolete = yes
				}
			}
		}
		if = {
			limit = {
				tag = FIN
			}
			if = {
				limit = {
					has_tech = advanced_infantry_weapons
				}
				create_equipment_variant = {
					type = infantry_equipment_3
					design_team = mio:FIN_valtion_kivaaritehdas_organization
					mark_older_equipment_obsolete = yes
				}
			}
			else_if = {
				limit = {
					has_tech = improved_infantry_weapons
				}
				create_equipment_variant = {
					type = infantry_equipment_2
					design_team = mio:FIN_valtion_kivaaritehdas_organization
					mark_older_equipment_obsolete = yes
				}
			}
			else_if = {
				limit = {
					has_tech = infantry_weapons1
				}
				create_equipment_variant = {
					type = infantry_equipment_1
					design_team = mio:FIN_valtion_kivaaritehdas_organization
					mark_older_equipment_obsolete = yes
				}
			}
		}
		if = {
			limit = {
				tag = RAJ
			}
			if = {
				limit = {
					has_tech = advanced_infantry_weapons
				}
				create_equipment_variant = {
					type = infantry_equipment_3
					design_team = mio:RAJ_ammunition_factory_khadki_organization
					mark_older_equipment_obsolete = yes
				}
			}
			else_if = {
				limit = {
					has_tech = improved_infantry_weapons
				}
				create_equipment_variant = {
					type = infantry_equipment_2
					design_team = mio:RAJ_ammunition_factory_khadki_organization
					mark_older_equipment_obsolete = yes
				}
			}
			else_if = {
				limit = {
					has_tech = infantry_weapons1
				}
				create_equipment_variant = {
					type = infantry_equipment_1
					design_team = mio:RAJ_ammunition_factory_khadki_organization
					mark_older_equipment_obsolete = yes
				}
			}
		}
	}
}
country_event = {
	id = LSM_equipment.36

	fire_only_once = no
	
	is_triggered_only = yes

	hidden = yes

	immediate = {
		if = {
			limit = {
				has_tech = antitank5
				has_tech = tech_maintenance_company2
			}
			create_equipment_variant = { 
				name = "Tiger I"
				type = heavy_tank_chassis_1
				modules = {
					main_armament_slot = tank_heavy_cannon_3
					turret_type_slot = tank_heavy_three_man_tank_turret
					suspension_type_slot = tank_christie_suspension
					armor_type_slot = tank_riveted_armor
					engine_type_slot = tank_diesel_engine
					special_type_slot_1 = secondary_turret_small_cannon
					special_type_slot_2 = secondary_turret_small_cannon
					special_type_slot_3 = easy_maintenance
					special_type_slot_4 = tank_radio_1
				}
				upgrades = {
					tank_nsb_engine_upgrade = 0
					tank_nsb_armor_upgrade = 4
				}
				design_team = mio:GER_henschel_organization
				mark_older_equipment_obsolete = yes
			}
		}
		else_if = {
			limit = {
				has_tech = antitank5
				NOT = { has_tech = tech_maintenance_company2 }
			}
			create_equipment_variant = { 
				name = "Tiger I"
				type = heavy_tank_chassis_1
				modules = {
					main_armament_slot = tank_heavy_cannon_3
					turret_type_slot = tank_heavy_three_man_tank_turret
					suspension_type_slot = tank_christie_suspension
					armor_type_slot = tank_riveted_armor
					engine_type_slot = tank_diesel_engine
					special_type_slot_1 = secondary_turret_small_cannon
					special_type_slot_2 = secondary_turret_small_cannon
					special_type_slot_3 = empty
					special_type_slot_4 = tank_radio_1
				}
				upgrades = {
					tank_nsb_engine_upgrade = 0
					tank_nsb_armor_upgrade = 4
				}
				design_team = mio:GER_henschel_organization
				mark_older_equipment_obsolete = yes
			}
		}
		else_if = {
			limit = {
				has_tech = antitank2
				has_tech = tech_maintenance_company2
			}
			create_equipment_variant = { 
				name = "Tiger I"
				type = heavy_tank_chassis_1
				modules = {
					main_armament_slot = tank_heavy_cannon_2
					turret_type_slot = tank_heavy_three_man_tank_turret
					suspension_type_slot = tank_christie_suspension
					armor_type_slot = tank_riveted_armor
					engine_type_slot = tank_diesel_engine
					special_type_slot_1 = secondary_turret_small_cannon
					special_type_slot_2 = secondary_turret_small_cannon
					special_type_slot_3 = easy_maintenance
					special_type_slot_4 = tank_radio_1
				}
				upgrades = {
					tank_nsb_engine_upgrade = 0
					tank_nsb_armor_upgrade = 4
				}
				design_team = mio:GER_henschel_organization
				mark_older_equipment_obsolete = yes
			}
		}
		else_if = {
			limit = {
				has_tech = antitank2
				NOT = { has_tech = tech_maintenance_company2 }
			}
			create_equipment_variant = { 
				name = "Tiger I"
				type = heavy_tank_chassis_1
				modules = {
					main_armament_slot = tank_heavy_cannon_2
					turret_type_slot = tank_heavy_three_man_tank_turret
					suspension_type_slot = tank_christie_suspension
					armor_type_slot = tank_riveted_armor
					engine_type_slot = tank_diesel_engine
					special_type_slot_1 = secondary_turret_small_cannon
					special_type_slot_2 = secondary_turret_small_cannon
					special_type_slot_3 = empty
					special_type_slot_4 = tank_radio_1
				}
				upgrades = {
					tank_nsb_engine_upgrade = 0
					tank_nsb_armor_upgrade = 4
				}
				design_team = mio:GER_henschel_organization
				mark_older_equipment_obsolete = yes
			}
		}
		else_if = {
			limit = {
				has_tech = interwar_antitank
				has_tech = tech_maintenance_company2
			}
			create_equipment_variant = { 
				name = "Tiger I"
				type = heavy_tank_chassis_1
				modules = {
					main_armament_slot = tank_heavy_cannon
					turret_type_slot = tank_heavy_three_man_tank_turret
					suspension_type_slot = tank_christie_suspension
					armor_type_slot = tank_riveted_armor
					engine_type_slot = tank_diesel_engine
					special_type_slot_1 = secondary_turret_small_cannon
					special_type_slot_2 = secondary_turret_small_cannon
					special_type_slot_3 = easy_maintenance
					special_type_slot_4 = tank_radio_1
				}
				upgrades = {
					tank_nsb_engine_upgrade = 0
					tank_nsb_armor_upgrade = 4
				}
				design_team = mio:GER_henschel_organization
				mark_older_equipment_obsolete = yes
			}
		}
		else_if = {
			limit = {
				has_tech = interwar_antitank
				NOT = { has_tech = tech_maintenance_company2 }
			}
			create_equipment_variant = { 
				name = "Tiger I"
				type = heavy_tank_chassis_1
				modules = {
					main_armament_slot = tank_heavy_cannon
					turret_type_slot = tank_heavy_three_man_tank_turret
					suspension_type_slot = tank_christie_suspension
					armor_type_slot = tank_riveted_armor
					engine_type_slot = tank_diesel_engine
					special_type_slot_1 = secondary_turret_small_cannon
					special_type_slot_2 = secondary_turret_small_cannon
					special_type_slot_3 = empty
					special_type_slot_4 = tank_radio_1
				}
				upgrades = {
					tank_nsb_engine_upgrade = 0
					tank_nsb_armor_upgrade = 4
				}
				design_team = mio:GER_henschel_organization
				mark_older_equipment_obsolete = yes
			}
		}
	}
}
country_event = {
	id = LSM_equipment.37

	fire_only_once = no
	
	is_triggered_only = yes

	hidden = yes

	immediate = {
		if = {
			limit = {
				has_tech = antitank5
			}
			create_equipment_variant = { 
				name = "Tiger I"
				type = heavy_tank_chassis_2
				modules = {
					main_armament_slot = tank_heavy_cannon_3
					turret_type_slot = tank_heavy_three_man_tank_turret
					suspension_type_slot = tank_christie_suspension
					armor_type_slot = tank_riveted_armor
					engine_type_slot = tank_diesel_engine
					special_type_slot_1 = secondary_turret_small_cannon
					special_type_slot_2 = secondary_turret_small_cannon
					special_type_slot_3 = easy_maintenance
					special_type_slot_4 = tank_radio_2
				}
				upgrades = {
					tank_nsb_engine_upgrade = 0
					tank_nsb_armor_upgrade = 4
				}
				design_team = mio:GER_henschel_organization
				mark_older_equipment_obsolete = yes
			}
		}
		else_if = {
			limit = {
				has_tech = antitank2
			}
			create_equipment_variant = { 
				name = "Tiger I"
				type = heavy_tank_chassis_2
				modules = {
					main_armament_slot = tank_heavy_cannon_2
					turret_type_slot = tank_heavy_three_man_tank_turret
					suspension_type_slot = tank_christie_suspension
					armor_type_slot = tank_riveted_armor
					engine_type_slot = tank_diesel_engine
					special_type_slot_1 = secondary_turret_small_cannon
					special_type_slot_2 = secondary_turret_small_cannon
					special_type_slot_3 = easy_maintenance
					special_type_slot_4 = tank_radio_2
				}
				upgrades = {
					tank_nsb_engine_upgrade = 0
					tank_nsb_armor_upgrade = 4
				}
				design_team = mio:GER_henschel_organization
				mark_older_equipment_obsolete = yes
			}
		}
		else_if = {
			limit = {
				has_tech = interwar_antitank
			}
			create_equipment_variant = { 
				name = "Tiger I"
				type = heavy_tank_chassis_2
				modules = {
					main_armament_slot = tank_heavy_cannon
					turret_type_slot = tank_heavy_three_man_tank_turret
					suspension_type_slot = tank_christie_suspension
					armor_type_slot = tank_riveted_armor
					engine_type_slot = tank_diesel_engine
					special_type_slot_1 = secondary_turret_small_cannon
					special_type_slot_2 = secondary_turret_small_cannon
					special_type_slot_3 = easy_maintenance
					special_type_slot_4 = tank_radio_2
				}
				upgrades = {
					tank_nsb_engine_upgrade = 0
					tank_nsb_armor_upgrade = 4
				}
				design_team = mio:GER_henschel_organization
				mark_older_equipment_obsolete = yes
			}
		}
	}
}