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

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

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

SWE_landsverk_organization = {
	include = generic_mobile_tank_organization
	icon = GFX_idea_SWE_landsverk
	
 	allowed = {	
 		always = no
 	}

	visible = {
		IF = {
			limit = { FROM = { original_tag = ETH } }
			FROM = { has_completed_focus = ETH_invite_foreign_industrialists }
		}
	}

	available = {
		# When in a Foreign MIO, countries need to be at peace with original country
		IF = {
			limit = {
				FROM = { NOT = { original_tag = SWE } }
			}
			FROM = { NOT = { has_war_with = SWE } }
		}

		IF = {
			limit = {
				FROM = { original_tag = ETH }
			}
			custom_trigger_tooltip = {
				tooltip = has_invited_mio_tt
				FROM = {
					has_country_flag = has_invited_SWE_landsverk_organization_flag
				}
			}
		}
		IF = {
			limit = { FROM = { original_tag = BRA } }
			custom_trigger_tooltip = {
				tooltip = has_invited_mio_tt
				FROM = {
					has_completed_focus = BRA_invite_foreign_companies
					has_country_flag = has_landsverk_mio_flag
				}
			}
		}
	}

	trait = {
		token = SWE_mio_trait_german_landsverk_tech_exchange
		name = SWE_mio_trait_german_landsverk_tech_exchange
		icon = GFX_generic_mio_department_icon_facilities
		relative_position_id = generic_mio_streamlined_production
		all_parents = { generic_mio_streamlined_production }
		special_trait_background  = yes
		position = { x=0 y=1 }
		available = { SWE = { has_completed_focus = SWE_allow_landsverk_to_operate } }
		production_bonus = {
			production_capacity_factor = 0.03
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.08
		
		}
	}
}

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

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

SWE_kockums_organization = {
	include = generic_raider_ship_organization
	icon = GFX_idea_SWE_kockums
 	allowed = {	
 		always = no
 	}
}

SWE_gotaverken_organization = {
	include = generic_battle_line_ship_organization
	icon = GFX_idea_SWE_gotaverken
 	allowed = {	
 		always = no
 	}
	available = {
		IF = {
			limit = {
				FROM = { NOT = { original_tag = SWE } }
			}
			FROM = { NOT = { has_war_with = SWE } }
		}
		IF = {
			limit = { FROM = { original_tag = BRA } }
			custom_trigger_tooltip = {
				tooltip = has_invited_mio_tt
				FROM = {
					has_completed_focus = BRA_invite_foreign_companies
					has_country_flag = has_gotaverken_mio_flag
				}
			}
		}
	}

	trait = {
		token = SWE_mio_trait_high_capacity_dockyard
		name = SWE_mio_trait_high_capacity_dockyard
		icon = GFX_generic_mio_department_icon_ship_general_production
		relative_position_id = generic_mio_trait_semi_armor_piercing_shells
		any_parent = { generic_mio_trait_semi_armor_piercing_shells generic_mio_trait_super_heavy_shells generic_mio_trait_high_velocity_guns }
		special_trait_background  = yes
		position = { x=0 y=2 }
		available = { SWE = { has_completed_focus = SWE_gotaverken } }
		production_bonus = {
			production_capacity_factor = 0.06
		}
	}
}


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

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

SWE_saab_organization = {
	include = generic_light_aircraft_organization
	icon = GFX_idea_SWE_saab
 	allowed = {	
 		always = no
 	}

	available = {
		IF = {
			limit = {
				FROM = { NOT = { original_tag = SWE } }
			}
			FROM = { NOT = { has_war_with = SWE } }
		}
		IF = {
			limit = { FROM = { original_tag = BRA } }
			custom_trigger_tooltip = {
				tooltip = has_invited_mio_tt
				FROM = {
					has_completed_focus = BRA_invite_foreign_companies
					has_country_flag = has_saab_mio_flag
				}
			}
		}
	}

	initial_trait = {
		name = generic_mio_initial_trait_standardized_production
		
		organization_modifier = {
			military_industrial_organization_research_bonus = 0.1
		}	
		production_bonus = {
			production_cost_factor = -0.1
		}
	}

	trait = {
		token = SWE_mio_trait_forefront_of_aeroplane_development
		name = SWE_mio_trait_forefront_of_aeroplane_development
		icon = GFX_generic_mio_department_icon_plane_fighter_quality

		relative_position_id = generic_mio_trait_removable_wings
		all_parents = { generic_mio_trait_removable_wings }
		special_trait_background  = yes
		position = { x=0 y=1 }

		production_bonus = {
			production_cost_factor = 0.03
			production_resource_need_factor = -0.1
		}
		equipment_bonus = {
			fuel_consumption = -0.03
			air_range = 0.08
			air_agility = 0.03
			air_defence = 0.05
		}
	}
}

SWE_husqvarna_organization = {
		include = generic_infantry_equipment_organization
		icon = GFX_idea_SWE_husqvarna
 	allowed = {	
 		always = no
 	}
}


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

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


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


SWE_volvo_organization = {
	include = generic_motorized_mechanized_organization
	icon = GFX_idea_SWE_volvo
	
 	allowed = {	
 		always = no
 	}
	visible = {
		IF = {
			limit = { FROM = { original_tag = ETH } }
			FROM = { has_completed_focus = ETH_invite_foreign_industrialists }
		}
	}

	available = {
		# When in a Foreign MIO, countries need to be at peace with original country
		IF = {
			limit = {
				FROM = { NOT = { original_tag = SWE } }
			}
			FROM = { NOT = { has_war_with = SWE } }
		}

		IF = {
			limit = {
				FROM = { original_tag = ETH }
			}
			custom_trigger_tooltip = {
				tooltip = has_invited_mio_tt
				FROM = {
					has_country_flag = has_invited_SWE_volvo_organization_flag
				}
			}
		}
	}
}

SWE_scania_vabis_organization = {
	include = generic_armored_car_organization
	icon = GFX_idea_scania
 	allowed = {	
 		always = no
 	}
	available = {
		IF = {
			limit = {
				FROM = { NOT = { original_tag = SWE } }
			}
			FROM = { NOT = { has_war_with = SWE } }
		}
		IF = {
			limit = { FROM = { original_tag = BRA } }
			custom_trigger_tooltip = {
				tooltip = has_invited_mio_tt
				FROM = {
					has_completed_focus = BRA_invite_foreign_companies
					has_country_flag = has_scania_vabis_mio_flag
				}
			}
		}
	}	
}


SWE_bofors_organization = {
	include = generic_artillery_organization
	icon = GFX_idea_SWE_bofors
 	allowed = {	
 		always = no
 	}

	visible = {
		IF = {
			limit = { FROM = { original_tag = ETH } }
			FROM = { has_completed_focus = ETH_invite_foreign_industrialists }
		}
	}

	available = {
		# When in a Foreign MIO, countries need to be at peace with original country
		IF = {
			limit = {
				FROM = { NOT = { original_tag = SWE } }
			}
			FROM = { NOT = { has_war_with = SWE } }
		}

		IF = {
			limit = {
				FROM = { original_tag = ETH }
			}
			custom_trigger_tooltip = {
				tooltip = has_invited_mio_tt
				FROM = {
					has_country_flag = has_invited_SWE_bofors_organization_flag
				}
			}
		}
	}

	initial_trait = {
		name = generic_mio_initial_trait_artillery_manufacturer
		equipment_bonus = {
			air_attack = 0.03
		}
	}

	trait = { 
		token = SWE_bofors_fly_swatter
		name = SWE_bofors_fly_swatter
		icon = GFX_generic_mio_department_icon_anti_air
		special_trait_background  = yes
		position = { x=1 y=0 }
		relative_position_id = generic_mio_trait_improved_hydraulic_recoil_system

		all_parents = { generic_mio_trait_improved_hydraulic_recoil_system }
		available = {
			SWE = { has_completed_focus = SWE_bofors_fly_swatter }
		}

		limit_to_equipment_type = {
			anti_air_equipment
		}

		equipment_bonus = {
			air_attack = 0.1
			ap_attack = 0.05
		}
	}

	trait = { 
		token = SWE_bofors_anti_tank_gun
		name = SWE_bofors_anti_tank_gun
		icon = GFX_generic_mio_department_icon_anti_tank
		special_trait_background  = yes
		position = { x=-1 y=0 }
		relative_position_id = generic_mio_trait_improved_hydraulic_recoil_system

		all_parents = { generic_mio_trait_improved_hydraulic_recoil_system }
		available = {
			SWE = { has_completed_focus = SWE_bofors_anti_tank_gun }
		}

		limit_to_equipment_type = {
			anti_tank_equipment
		}

		equipment_bonus = {
			ap_attack = 0.05
			hard_attack = 0.05

		}

		production_bonus = {
			production_capacity_factor = 0.05 
		}
	}

	trait = { 
		token = SWE_mio_trait_defense_in_depth
		name = SWE_mio_trait_defense_in_depth
		icon = GFX_generic_mio_department_icon_tank_general_weapons
		special_trait_background  = yes
		position = { x=0 y=1 }
		relative_position_id = generic_mio_trait_sliding_breech_block

		all_parents = { generic_mio_trait_sliding_breech_block }
		available = {
			SWE = { has_completed_focus = SWE_defense_in_depth }
		}

		equipment_bonus = {
			defense = 0.08
			ap_attack = 0.05
			hard_attack = 0.05
		}
	}
}

	



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


### EQUIPMENT STATS ###


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

#maximum_speed
#reliability
#defense
#breakthrough
#armor_value
#soft_attack
#hard_attack
#ap_attack
#air_attack
#build_cost_ic
#fuel_consumption
#hardness
#armor_value
#build_cost_ic
#entrenchment - only if you have DLC NSB  and module dozer_blade
#fuel_capacity - only if you have DLC NSB  and module expanded_fuel_tank



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

#lg_armor_piercing (requires modules)
#lg_attack (requires modules)
#hg_armor_piercing (requires modules)
#hg_attack (requires modules)
#torpedo_attack (requires modules)
#sub_attack (requires modules)
#anti_air_attack (requires modules)
#armor_value (requires modules)
#surface_detection 
#sub_detection (requires modules)
#sub_visibility (sub only)
#surface_visibility (surface only)
#naval_speed 
#reliability
#naval_range
#max_strength
#fuel_consumption
#build_cost_ic
#manpower
#naval_supremacy_factor
#naval_torpedo_enemy_critical_chance_factor (if you have modules adding it)
#naval_torpedo_damage_reduction_factor (if you have modules adding it)
#carrier_size (this will get very bad for you I promise, equipment modifiers are a mistake)
#mines_sweeping (only MTG and with modules)
#mines_planting (only with MTG and modules)
#naval_torpedo_hit_chance_factor (requires modules)
#naval_light_gun_hit_chance_factor (requires modules)
#naval_heavy_gun_hit_chance_factor (requires modules)



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

#air_superiority
#reliability
#naval_strike_attack
#naval_strike_targetting
#manpower
#fuel_consumption
#build_cost_ic
#resources
#thrust - only if you have BBA DLC
#weight - only if you have BBA DLC
#maximum_speed
#air_range
#air_agility
#air_attack
#air_defence
#surface_detection
#sub_detection
#air_ground_attack
#air_bombing
#mines_planting - if you have MtG and BBA
#mines_sweeping - if you have MtG and BBA
#night_penalty - only if you have BBA DLC (you need to have module because base value is 0 - radio navigatio



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

##############################
##### INFANTRY EQUIPMENT #####
##############################
#reliability
#maximum_speed
#defense
#breakthrough
#hardness - it is in the script, but the value is set to 0 (in the game, the UI doesn't show this value)
#armor_value - it is in the script, but the value is set to 0 (in the game, the UI doesn't show this value)
#soft_attack
#hard_attack
#ap_attack
#air_attack - it is in the script but the value is set to 0 (in the game, the UI doesn't show this value)
#build_cost_ic

##############################
##### SUPPORT EQUIPMENT ######
##############################
#reliability
#build_cost_ic


#############################
#### ARTILLERY EQUIPMENT ####
#############################
#reliability
#defense
#breakthrough
#hardness
#armor_value
#soft_attack
#hard_attack
#ap_attack
#air_attack
#build_cost_ic

############################
#### ANTI-AIR EQUIPMENT ####
############################
#reliability
#defense
#breakthrough
#hardness
#armor_value
#soft_attack
#hard_attack
#ap_attack
#air_attack
#build_cost_ic

#############################
#### ANTI-TANK EQUIPMENT ####
#############################
#reliability
#defense
#breakthrough
#hardness
#armor_value
#soft_attack
#hard_attack
#ap_attack
#air_attack
#build_cost_ic

####################################
#### ROCKET ARTILLERY EQUIPMENT ####
####################################
#reliability
#defense
#breakthrough
#hardness
#armor_value
#soft_attack
#hard_attack
#ap_attack
#air_attack
#build_cost_ic


##############################
#### MOTORIZED EQUIPMENT #####
##############################
#maximum_speed
#reliability
#hardness
#breakthrough
#build_cost_ic
#fuel_consumption

####################################
#### MOTORIZED ROCKET EQUIPMENT ####
####################################
#reliability
#defense
#breakthrough
#hardness
#armor_value
#soft_attack
#hard_attack
#ap_attack
#air_attack
#build_cost_ic (edited)

###############################
#### MECHANIZED EQUIPMENT #####
###############################
#maximum_speed
#reliability
#defense
#breakthrough
#hardness
#armor_value
#ap_attack
#air_attack
#build_cost_ic
#fuel_consumption

#########################################
#### AMPHIBIOUS MECHANIZED EQUIPMENT ####
#########################################
#maximum_speed
#reliability
#defense
#breakthrough
#hardness
#armor_value
#ap_attack
#air_attack
#build_cost_ic
#fuel_consumption


################################
#### ARMORED CAR EQUIPMENT #####
################################
#maximum_speed
#reliability
#defense
#breakthrough
#hardness
#armor_value
#soft_attack
#hard_attack
#ap_attack
#air_attack
#build_cost_ic
#fuel_consumption


##########################
#### TRAIN EQUIPMENT #####
##########################
#armor_value
#build_cost_ic
#air_attack

################################
#### RAILWAY GUN EQUIPMENT #####
################################
#reliability
#maximum_speed
#railway_gun_attack
#build_cost_ic


### PRODUCTION MODIFIERS ###
#production_cost_factor
#production_capacity_factor
#production_efficiency_cap_factor
#production_efficiency_gain_factor
#production_resource_need_factor
#production_resource_penalty_factor
#production_conversion_speed_factor

### ORGANIZATION MODIFIERS ###
#military_industrial_organization_research_bonus
#military_industrial_organization_design_team_assign_cost
#military_industrial_organization_design_team_change_cost
#military_industrial_organization_industrial_manufacturer_assign_cost
#military_industrial_organization_task_capacity
#military_industrial_organization_size_up_requirement
#military_industrial_organization_funds_gain