﻿# Russian-American Company Under the High Patronage of His Imperial Majesty
company_russian_american_company = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/company_russian_american_company.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_harbor_shipbuilding.dds"

	flavored_company = yes

	building_types = {
		building_whaling_station
		building_livestock_ranch
		building_fishing_wharf
		#building_port
	}

	extension_building_types = {
		building_logging_camp
		building_port
		building_railway
		building_oil_rig
		building_gold_mine
	}

	possible_prestige_goods = {
		prestige_good_generic_meat
		prestige_good_alaskan_salmon
		prestige_good_alaskan_furs
	}

	potential = {
		has_interest_marker_in_region = region_pacific_coast
		any_primary_culture = {
			has_discrimination_trait = east_slavic
		}
	}

	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
					region = sr:region_pacific_coast
			}
		}
	}

	possible = {
		OR = {
			any_subject_or_below = {
				any_scope_state = {
					region = sr:region_pacific_coast
					any_scope_building = {
						OR = {
							is_building_type = building_logging_camp
							is_building_type = building_whaling_station
							is_building_type = building_livestock_ranch
							is_building_type = building_fishing_wharf
						}
						level >= 5
					}
				}
			}

			any_scope_state = {
				region = sr:region_pacific_coast
				any_scope_building = {
					OR = {
							is_building_type = building_logging_camp
							is_building_type = building_whaling_station
							is_building_type = building_livestock_ranch
							is_building_type = building_fishing_wharf
					}
					level >= 5
				}
			}
		}
	}

	prosperity_modifier = {
		country_prestige_mult = 0.05
		state_trade_advantage_mult = 0.125
		building_livestock_ranch_throughput_add = 0.15
	}

	ai_will_do = {
		OR = {
			any_subject_or_below = {
				any_scope_state = {
					region = sr:region_pacific_coast
				}
			}

			any_scope_state = {
				region = sr:region_pacific_coast
			}
		}
	}

	ai_construction_targets = {
		building_port = {
			level = 5
			state_trigger = {
				region = sr:region_pacific_coast
				is_incorporated = yes
			}
		}
		building_logging_camp = {
			level = 5
			state_trigger = {
				region = sr:region_pacific_coast
				is_incorporated = yes
			}
		}
		building_whaling_station = {
			level = 5
			state_trigger = {
				region = sr:region_pacific_coast
				is_incorporated = yes
			}
		}
	}

	ai_weight = {
		value = 3 # Higher base value for flavored companies
	}
}

company_russian_african_company = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/company_russian_american_company.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_plantation.dds"

	flavored_company = yes
	
	preferred_headquarters = { STATE_INGRIA }

	building_types = {
		building_rubber_plantation
		building_dye_plantation
		building_coffee_plantation
		building_banana_plantation
		building_tea_plantation
	}

	extension_building_types = {
		building_tobacco_plantation
		building_port
		building_railway
		building_oil_rig
		building_gold_mine
	}

	possible_prestige_goods = {
		prestige_good_russia_rubber
		prestige_good_generic_coffee
		#prestige_good_african_bananas
	}

	potential = {
		OR = {
			has_interest_marker_in_region = region_nile_basin
			has_interest_marker_in_region = region_ethiopia
			has_interest_marker_in_region = region_north_africa
			has_interest_marker_in_region = region_senegal
			has_interest_marker_in_region = region_niger
			has_interest_marker_in_region = region_congo
			has_interest_marker_in_region = region_southern_africa
			has_interest_marker_in_region = region_zanj
		}
		any_primary_culture = {
			has_discrimination_trait = east_slavic
		}
	}

	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			has_technology_researched = colonization
			OR = {
				has_law = law_colonial_resettlement
				has_law = law_colonial_exploitation
				has_interest_marker_in_region = region_nile_basin
				has_interest_marker_in_region = region_ethiopia
				has_interest_marker_in_region = region_north_africa
				has_interest_marker_in_region = region_senegal
				has_interest_marker_in_region = region_niger
				has_interest_marker_in_region = region_congo
				has_interest_marker_in_region = region_southern_africa
				has_interest_marker_in_region = region_zanj
			}
		}
	}

	possible = {
		OR = {
			any_scope_state = {
				OR = {
					region = sr:region_nile_basin
					region = sr:region_ethiopia
					region = sr:region_north_africa
					region = sr:region_senegal
					region = sr:region_niger
					region = sr:region_congo
					region = sr:region_southern_africa
					region = sr:region_zanj
				}
				any_scope_building = {
				OR = {
					is_building_type = building_rubber_plantation
					is_building_type = building_coffee_plantation
					is_building_type = building_dye_plantation
				}
					level >= 5
				}
			}
		}
	}

	prosperity_modifier = {
		country_prestige_mult = 0.05
		state_colony_growth_creation_factor = 0.1
		state_trade_advantage_mult = 0.125
		building_rubber_plantation_throughput_add = 0.15
	}

	ai_will_do = {
		OR = {
			any_subject_or_below = {
				any_scope_state = {
					OR = {
						region = sr:region_nile_basin
						region = sr:region_ethiopia
						region = sr:region_north_africa
						region = sr:region_senegal
						region = sr:region_niger
						region = sr:region_congo
						region = sr:region_southern_africa
						region = sr:region_zanj
					}
				}
			}

			any_scope_state = {
				OR = {
					region = sr:region_nile_basin
					region = sr:region_ethiopia
					region = sr:region_north_africa
					region = sr:region_senegal
					region = sr:region_niger
					region = sr:region_congo
					region = sr:region_southern_africa
					region = sr:region_zanj
				}
			}
		}
	}

	ai_construction_targets = {
		building_rubber_plantation = {
			level = 5
			state_trigger = {
				OR = {
					region = sr:region_nile_basin
					region = sr:region_ethiopia
					region = sr:region_north_africa
					region = sr:region_senegal
					region = sr:region_niger
					region = sr:region_congo
					region = sr:region_southern_africa
					region = sr:region_zanj
				}
				is_incorporated = yes
			}
		}
		building_trade_center = {
			level = 5
			state_trigger = {
				OR = {
					region = sr:region_nile_basin
					region = sr:region_ethiopia
					region = sr:region_north_africa
					region = sr:region_senegal
					region = sr:region_niger
					region = sr:region_congo
					region = sr:region_southern_africa
					region = sr:region_zanj
				}
				is_incorporated = yes
			}
		}
	}

	ai_weight = {
		value = 3 # Higher base value for flavored companies
	}
}

# Ministry of Railways of the Russian Empire
company_ministry_of_railways = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/ministry_of_railways.png" 
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_railways.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_INGRIA }
	
	building_types = {
		building_railway
	}
	
	extension_building_types = {
		building_railway
	}
	
	potential = {
		country_has_primary_culture = cu:russian
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			country_has_primary_culture = cu:russian
		}
	}		
	
	possible = {
		any_scope_state = {
			any_scope_state = {
				region = sr:region_russia
			}
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_railway
				level >= 5
			}
		}
		has_technology_researched = railways
	}
	
	prosperity_modifier = {
		state_migration_pull_mult = 0.05
		building_railway_throughput_add = 0.1
		state_aristocrats_investment_pool_contribution_add = 0.05
		#interest_group_ig_landowners_pop_attraction_mult = 0.05
		interest_group_ig_landowners_approval_add = 2
		
		#country_max_companies_add = 1
	}
	

	ai_will_do = {
		has_technology_researched = railways
		any_scope_building = {
			is_building_type = building_railway
			level >= 3
		}
	}

	ai_construction_targets = {
		building_railway = {
			level = 5
			state_trigger = {
				state_region = s:STATE_INGRIA
			}
		}
	}
	ai_weight = {
		value = 3 # Higher base value for flavored companies
	}
}

# Grand Russian Railroad Company
company_grand_russian_railroad_company = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/grand_russian_railroad_company.png" 
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_railways.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_INGRIA }
	
	building_types = {
		building_railway
	}
	
	extension_building_types = {
		building_railway
	}
	
	potential = {
		country_has_primary_culture = cu:russian
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			country_has_primary_culture = cu:russian
		}
	}		
	
	possible = {
		any_scope_state = {
			any_scope_state = {
				region = sr:region_russia
			}
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_railway
				level >= 5
			}
		}
		has_technology_researched = railways
	}
	
	prosperity_modifier = {
		state_migration_pull_mult = 0.05
		building_railway_throughput_add = 0.1
		state_capitalists_investment_pool_contribution_add = 0.05
		#interest_group_ig_industrialists_pop_attraction_mult = 0.05
		interest_group_ig_industrialists_approval_add = 2
		
		#country_max_companies_add = 1
	}
	

	ai_will_do = {
		has_technology_researched = railways
		any_scope_building = {
			is_building_type = building_railway
			level >= 3
		}
	}

	ai_construction_targets = {
		building_railway = {
			level = 5
			state_trigger = {
				state_region = s:STATE_INGRIA
			}
		}
	}
	ai_weight = {
		value = 3 # Higher base value for flavored companies
	}
}

company_ministry_of_railways_USSR = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/USSRBank.png" 
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_railways.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_INGRIA }
	
	building_types = {
		building_railway
	}
	
	extension_building_types = {
		building_railway
	}
	
	potential = {
		country_has_primary_culture = cu:russian
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			country_has_primary_culture = cu:russian
		}
	}		
	
	possible = {
		any_scope_state = {
			any_scope_state = {
				region = sr:region_russia
			}
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_railway
				level >= 5
			}
		}
		has_technology_researched = railways
		has_technology_researched = central_planning
		has_law = law_type:law_command_economy
	}
	
	prosperity_modifier = {
		state_migration_pull_mult = 0.05
		building_railway_throughput_add = 0.1
		interest_group_ig_trade_unions_approval_add = 2
		state_infrastructure_from_population_add = 1
		state_infrastructure_from_population_max_add = 20
		
		#country_max_companies_add = 1
	}
	

	ai_will_do = {
		has_technology_researched = railways
		any_scope_building = {
			is_building_type = building_railway
			level >= 3
		}
	}

	ai_construction_targets = {
		building_railway = {
			level = 5
			state_trigger = {
				state_region = s:STATE_INGRIA
			}
		}
	}
	ai_weight = {
		value = 3 # Higher base value for flavored companies
	}
}

# Vinnaia Monopoliia
company_vodka_monopoly = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/russian_vodka_monopoly.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_farm_wheat.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_INGRIA STATE_MOSCOW }

	building_types = {
		#building_food_industry
		building_rye_farm
		building_vineyard_plantation
	}

	extension_building_types = {
		building_food_industry
		building_wheat_farm
		building_livestock_ranch
	}

	possible_prestige_goods = {
		prestige_good_smirnoff_vodka
		#prestige_good_generic_groceries
	}

	potential = {
		country_has_primary_culture = cu:russian
	}

	possible = {
		NOT = { has_law = law_type:law_laissez_faire }
		any_scope_state = {
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_rye_farm
				level >= 5
			}
		}
	}

	prosperity_modifier = {
		state_radicals_from_political_movements_mult = -0.15
		state_lower_strata_expected_sol_add = -1
		state_middle_strata_expected_sol_add = -0.5
		
		#country_max_companies_add = 1
	}

	ai_will_do = {
		NOT = { has_law = law_type:law_laissez_faire }
		any_scope_state = {
			OR = {
				state_region = s:STATE_INGRIA
				state_region = s:STATE_MOSCOW
			}
		}
	}

	ai_construction_targets = {
		building_rye_farm = {
			level = 5
			state_trigger = {
				OR = {
					state_region = s:STATE_INGRIA
					state_region = s:STATE_MOSCOW
				}
			}
		}
	}

	ai_weight = {
		value = 3 # Higher base value for flavored companies
	}
}

# Society of Putilov Factories
company_putilov_company = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/russian_putilov.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_heavy.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_INGRIA }

	building_types = {
		building_steel_mills
		building_motor_industry
		building_artillery_foundries
		building_military_shipyards
	}

	extension_building_types = {
		building_iron_mine
		building_munition_plants
		building_railway
		building_port
	}

	possible_prestige_goods = {
		prestige_good_generic_steel
		prestige_good_putilov_engines
		prestige_good_generic_artillery
	}

	potential = {
		has_interest_marker_in_region = region_russia
	}

	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_INGRIA
			}
		}
	}

	possible = {
		any_scope_state = {
			state_region = s:STATE_INGRIA
			is_incorporated = yes
			any_scope_building = {
				OR = {
					is_building_type = building_steel_mills
					is_building_type = building_motor_industry
					is_building_type = building_artillery_foundries
					is_building_type = building_military_shipyards
				}
				level >= 5
			}
		}
	}

	prosperity_modifier = {
		state_infrastructure_mult = 0.05
		building_steel_mills_throughput_add = 0.1
		building_motor_industry_throughput_add = 0.1
	}

	ai_will_do = {
		any_scope_state = {
			state_region = s:STATE_INGRIA
			is_incorporated = yes
		}
	}

	ai_construction_targets = {
		building_steel_mills = {
			level = 5
			state_trigger = {
				state_region = s:STATE_INGRIA
			}
		}
		building_motor_industry = {
			level = 5
			state_trigger = {
				state_region = s:STATE_INGRIA
			}
		}
		building_artillery_foundries = {
			level = 5
			state_trigger = {
				state_region = s:STATE_INGRIA
			}
		}
		building_military_shipyards = {
			level = 5
			state_trigger = {
				state_region = s:STATE_INGRIA
			}
		}
	}

	ai_weight = {
		value = 6
	}
}

# The Petroleum Production Company Nobel Brothers, Limited
company_branobel = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/russian_branobel.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_oil_drills.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_AZERBAIJAN }

	building_types = {
		building_oil_rig
	}

	extension_building_types = {
		building_power_plant
	}

	possible_prestige_goods = {
		prestige_good_baku_oil
	}

	potential = {
		has_interest_marker_in_region = region_caucasus
	}

	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_AZERBAIJAN
			}
		}
	}

	possible = {
		has_technology_researched = pumpjacks
		#any_scope_state = {
		#	state_region = s:STATE_AZERBAIJAN
		#	any_scope_building = {
		#		is_building_type = building_oil_rig
		#		level >= 5
		#	}
		#}
	}

	prosperity_modifier = {
		state_migration_pull_mult = 0.1
		building_railway_throughput_add = 0.05
	}

	ai_will_do = {
		has_technology_researched = pumpjacks
		any_scope_state = {
			state_region = s:STATE_AZERBAIJAN
		}
	}

	ai_construction_targets = {
		building_oil_rig = {
			level = 5
			state_trigger = {
				state_region = s:STATE_AZERBAIJAN
			}
		}
	}

	ai_weight = {
		value = 3 # Higher base value for flavored companies
	}
}

# Izhevsk Arms Plant
company_izhevsk_arms_plant = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/russian_izhevsk_arms_plant.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_heavy.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_PERM }

	building_types = {
		building_arms_industry
		building_munition_plants
	}

	extension_building_types = {
		building_artillery_foundries
		building_steel_mills
	}
	
	possible_prestige_goods = {
		prestige_good_mosin_rifles
	}

	potential = {
		has_interest_marker_in_region = region_west_siberia
	}

	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_PERM
			}
		}
	}

	possible = {
		has_technology_researched = bolt_action_rifles # corresponds roughly with the Izhevsk plant's incorporation as a private commercial enterprise, and not a state arsenal. #FUCK YOU ITS MOSIN TIME
		any_scope_state = {
			state_region = s:STATE_PERM
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_arms_industry
				level >= 5
			}
		}
	}

	prosperity_modifier = {
		building_arms_industry_throughput_add = 0.15
	}

	ai_will_do = {
		has_technology_researched = bolt_action_rifles
		any_scope_state = {
			state_region = s:STATE_PERM
		}
	}

	ai_construction_targets = {
		building_arms_industry = {
			level = 5
			state_trigger = {
				state_region = s:STATE_PERM
			}
		}
	}

	ai_weight = {
		value = 3 # Higher base value for flavored companies
	}
}

# Savva Morozov & Sons Cotton Textile Mfg. Co.
company_savva_morozov = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/russian_savva_morozov_and_sons.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_light.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_MOSCOW }

	building_types = {
		building_textile_mills
	}

	extension_building_types = {
		building_cotton_plantation
	}

	possible_prestige_goods = {
		prestige_good_generic_clothes
	}

	potential = {
		has_interest_marker_in_region = region_russia
	}

	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_MOSCOW
			}
		}
	}

	possible = {
		has_technology_researched = joint_stock_companies
		any_scope_state = {
			state_region = s:STATE_MOSCOW
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_textile_mills
				level >= 5
			}
		}
	}

	prosperity_modifier = {
		country_prestige_mult = 0.1
		interest_group_ig_industrialists_pop_attraction_mult = 0.1
	}

	ai_will_do = {
		has_technology_researched = joint_stock_companies
		any_scope_state = {
			state_region = s:STATE_MOSCOW
			is_incorporated = yes
		}
	}

	ai_construction_targets = {
		building_arms_industry = {
			level = 5
			state_trigger = {
				state_region = s:STATE_MOSCOW
			}
		}
	}

	ai_weight = {
		value = 3 # Higher base value for flavored companies
	}
}

# New Russia Company Limited
company_john_hughes = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/russian_new_russia_company.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_mining.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_KHARKOV STATE_TAURIDA }

	building_types = {
		#building_steel_mills
		#building_coal_mine
		building_iron_mine
	}

	extension_building_types = {
		building_iron_mine
		building_coal_mine
		building_railway
	}

	possible_prestige_goods = {
		prestige_good_russia_iron
	}

	potential = {
		has_interest_marker_in_region = region_dnieper
	}

	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				OR = {
					state_region = s:STATE_KHARKOV
					state_region = s:STATE_TAURIDA
				}
			}
		}
	}

	possible = {
		any_scope_state = {
			OR = {
				state_region = s:STATE_KHARKOV
				state_region = s:STATE_TAURIDA
			}
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_iron_mine
				level >= 5
			}
		}
	}

	prosperity_modifier = {
		building_iron_mine_throughput_add = 0.1
		interest_group_ig_industrialists_approval_add = 2
		interest_group_ig_industrialists_pop_attraction_mult = 0.05
	}

	ai_will_do = {
		has_technology_researched = bessemer_process
		any_scope_state = {
			OR = {
				state_region = s:STATE_KHARKOV
				state_region = s:STATE_TAURIDA
			}
			is_incorporated = yes
		}
	}

	ai_construction_targets = {
		building_iron_mine = {
			level = 5
			state_trigger = {
				OR = {
					state_region = s:STATE_KHARKOV
					state_region = s:STATE_TAURIDA
				}
				is_incorporated = yes
			}
		}
	}

	ai_weight = {
		value = 3 # Higher base value for flavored companies
	}
}

######################Sphere of Influence#########################

# West Ural Petroleum Company, Limited
company_west_ural_petroleum = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/historical_west_ural_petroleum_company_limited.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_oil_drills.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_URALSK }

	building_types = {
		building_oil_rig
	}

	extension_building_types = {
		building_power_plant
		building_railway
	}
	
	possible_prestige_goods = {
		prestige_good_ural_oil
	}

	potential = {
		has_dlc_feature = ep1_content
		has_interest_marker_in_region = region_central_asia
	}

	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_URALSK
			}
		}
	}

	possible = {
		has_technology_researched = pumpjacks
		any_scope_state = {
			state_region = s:STATE_URALSK
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_oil_rig
				level >= 5
			}
		}
	}

	prosperity_modifier = {
		state_colony_growth_speed_mult = 0.1
		building_power_plant_throughput_add = 0.05
	}

	ai_will_do = {
		has_technology_researched = pumpjacks
		any_scope_state = {
			state_region = s:STATE_URALSK
			is_incorporated = yes
		}
	}

	ai_construction_targets = {
		building_oil_rig = {
			level = 5
			state_trigger = {
				state_region = s:STATE_URALSK
			}
		}
	}

	ai_weight = {
		value = 3 # Higher base value for flavored companies
	}
}

# Kirgizian Mining Joint Stock Company
company_kirgizian_mining_company= {
	icon = "gfx/interface/icons/company_icons/basic_metal_mining.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_mining.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_SEMIRECHE }

	building_types = {
		building_coal_mine
	}

	extension_building_types = {
		building_iron_mine
		building_power_plant
	}
	
	possible_prestige_goods = {
		prestige_good_kazakh_coal
	}

	potential = {
		has_dlc_feature = ep1_content
		has_interest_marker_in_region = region_central_asia
	}

	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			OR = {
				any_scope_state = {
					state_region = s:STATE_SEMIRECHE
				}
				any_subject_or_below = {
					any_scope_state = {
						state_region = s:STATE_SEMIRECHE
					}
				}
			}
		}
	}

	possible = {
		any_scope_state = {
			state_region = s:STATE_SEMIRECHE
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_coal_mine
				level >= 5
			}
		}

		has_technology_researched = joint_stock_companies
	}

	prosperity_modifier = {
		building_coal_mine_throughput_add = 0.1
		building_power_plant_throughput_add = 0.1
	}

	ai_will_do = {
		has_technology_researched = steam_donkey
		has_technology_researched = railways
		any_scope_state = {
			state_region = s:STATE_SEMIRECHE
			is_incorporated = yes
		}
	}

	ai_construction_targets = {
		building_coal_mine = {
			level = 5
			state_trigger = {
				state_region = s:STATE_SEMIRECHE
			}
		}
	}

	ai_weight = {
		value = 3 # Higher base value for flavored companies
	}
}

# Moscow Irrigation Company
company_moscow_irrigation_company = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/historical_moscow_irrigation_company.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_plantation.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_FERGANA }

	building_types = {
		building_cotton_plantation
		building_rice_farm
	}

	extension_building_types = {
		building_wheat_farm
		building_opium_plantation
	}

	possible_prestige_goods = {
		prestige_good_generic_grain
	}

	potential = {
		has_dlc_feature = ep1_content
		has_interest_marker_in_region = region_persia
	}

	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_FERGANA
			}

			OR = {
				any_scope_state = {
					state_region = s:STATE_MOSCOW
				}
				any_scope_ally = {
					any_scope_state = {
						state_region = s:STATE_MOSCOW
					}
				}
			}
		}
	}

	possible = {
		OR = {
			any_scope_state = {
				state_region = s:STATE_MOSCOW
			}
			any_scope_ally = {
				any_scope_state = {
					state_region = s:STATE_MOSCOW
				}
			}
		}
		any_scope_state = {
			state_region = s:STATE_FERGANA
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_cotton_plantation
				level >= 5
			}
		}
	}

	prosperity_modifier = {
		building_cotton_plantation_throughput_add = 0.2
		interest_group_ig_industrialists_pop_attraction_mult = 0.05
	}

	ai_will_do = {
		OR = {
			any_scope_state = {
				state_region = s:STATE_MOSCOW
			}
			any_scope_ally = {
				any_scope_state = {
					state_region = s:STATE_MOSCOW
				}
			}
		}
		any_scope_state = {
			state_region = s:STATE_FERGANA
			is_incorporated = yes
		}
	}

	ai_construction_targets = {
		building_cotton_plantation = {
			level = 5
			state_trigger = {
				state_region = s:STATE_FERGANA
			}
		}
	}

	ai_weight = {
		value = 3 # Higher base value for flavored companies
	}
}
##############################DLC-MP1##############################

##############################MODDED##############################

# Rosneft
company_Rosneft = {
icon = "gfx/interface/icons/company_icons/historical_company_icons/Rosneft.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_oil_drills.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_SAKHALIN }

	possible_prestige_goods = {
		#prestige_good_saint_etienne_rifles
	}

	
	building_types = { #22
		building_oil_rig
	}
	
	extension_building_types = {
		building_coal_mine
		building_gold_mine
	}
	
	potential = {
		has_interest_marker_in_region = region_east_siberia
		country_has_primary_culture = cu:russian
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_SAKHALIN
			}
		}
	}
	
	possible = {
		any_scope_state = {
		    OR = {
			region = sr:region_east_siberia
			region = sr:region_west_siberia
			}
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_oil_rig
				level >= 3
			}
			count >= 3
		}
	}
	
	prosperity_modifier = {
		state_migration_pull_mult = 0.1 #14
		interest_group_ig_industrialists_approval_add = 2 #8
	}	
	

	ai_will_do = {
		any_scope_building = {
			is_building_type = building_oil_rig
			level >= 3
		}
	}

	ai_construction_targets = {
		building_oil_rig = {
			level = 5
			state_trigger = {
				state_region = s:STATE_SAKHALIN
			}
		}
	}
	ai_weight = {
		value = 3 # Higher base value for flavored companies
	}
}

# The Caucasus and Mercury shipping company
company_TCaM = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/Caucasus.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_harbor_shipbuilding.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_AZERBAIJAN }
	

	possible_prestige_goods = {
		prestige_good_generic_merchant_marine
	}

	
	building_types = { #26
		building_trade_center
		building_port
	}
	
	extension_building_types = {
		building_paper_mills
		building_shipyards
	}
	
	potential = {
		has_interest_marker_in_region = region_caucasus
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_AZERBAIJAN
			}
		}
	}
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_AZERBAIJAN
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_trade_center
				level >= 5
			}
		}
	}
	
	prosperity_modifier = {
		country_convoys_capacity_mult = 0.15 #10
		state_trade_advantage_mult = 0.24 #16
	}


	ai_will_do = {
		any_scope_building = {
			is_building_type = building_urban_center
			level >= 3
		}
	}

	ai_construction_targets = {
		building_urban_center = {
			level = 5
			state_trigger = {
				state_region = s:STATE_AZERBAIJAN
			}
		}
	}
	ai_weight = {
		value = 3 # Higher base value for flavored companies
	}	
}

# Alivaria Brewery
company_Alivaria = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/Alivaria.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_farm_wheat.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_MINSK }

	possible_prestige_goods = {
		prestige_good_generic_groceries
		#prestige_good_generic_meat
		#prestige_good_smirnoff_vodka
	}

	
	building_types = { #27
		building_food_industry
		#building_livestock_ranch
	}
	
	extension_building_types = {
		building_rye_farm
		building_wheat_farm
		building_livestock_ranch
	}
	
	potential = {
		has_interest_marker_in_region = region_dnieper
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_MINSK
			}
		}
	}		
	
	possible = { 
		any_scope_state = {
			state_region = s:STATE_MINSK
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_food_industry
				level >= 3
			}
		}
	}
	
	prosperity_modifier = {
		state_birth_rate_mult = 0.05
		state_lower_strata_expected_sol_add = -0.2
		state_middle_strata_expected_sol_add = -0.4
		state_upper_strata_expected_sol_add = -0.6
		building_group_bg_agriculture_throughput_add = 0.05 #18
	}	
	

	ai_will_do = {
		any_scope_building = {
			is_building_type = building_food_industry
			level >= 3
		}
	}

	ai_construction_targets = {
		building_food_industry = {
			level = 5
			state_trigger = {
				state_region = s:STATE_MINSK
			}
		}
	}
	ai_weight = {
		value = 3 # Higher base value for flavored companies
	}
}

# Izhorskiye Zavody
company_Izhorskiye_Zavody = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/Izhorskiye.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_heavy.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_INGRIA }

	possible_prestige_goods = {
		prestige_good_russia_wood
		prestige_good_generic_tools
	}

	
	building_types = { #11
		building_logging_camp
		building_tooling_workshops
		building_shipyards
	}
	
	extension_building_types = {
		building_shipyards
		building_military_shipyards
		building_steel_mills
		building_motor_industry
	}
	
	potential = {
		has_interest_marker_in_region = region_russia
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_INGRIA
			}
		}
	}		
	
	possible = { 
		any_scope_state = {
			state_region = s:STATE_INGRIA
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_logging_camp
				level >= 3
			}
		}
		has_technology_researched = paddle_steamer 
	}
	
	prosperity_modifier = {
		unit_navy_defense_mult = 0.05 #6
		interest_group_ig_landowners_approval_add = 2 #4
	}	
	

	ai_will_do = {
		any_scope_building = {
			is_building_type = building_logging_camp
			level >= 3
		}
	}

	ai_construction_targets = {
		building_logging_camp = {
			level = 5
			state_trigger = {
				state_region = s:STATE_INGRIA
			}
		}
	}
	ai_weight = {
		value = 3 # Higher base value for flavored companies
	}
}

#State Bank of the Russian Empire
company_Bank_SBRE = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/Russian_EmpireBank.png" 
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufactering_light.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_INGRIA }
	
	possible_prestige_goods = {
		prestige_good_generic_paper
	}
	
	building_types = {
		building_paper_mills
		building_gold_mine
		#building_rye_farm
	}
	
	extension_building_types = {	
		building_paper_mills
		building_power_plant
		building_military_shipyards
		#building_gold_mine
		building_railway
	}
	
	potential = {
		has_interest_marker_in_region = region_russia
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_INGRIA
			}
		}
	}	
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_INGRIA
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_financial_district
				level >= 15
			}
		}
		#has_technology_researched = investment_banks
		unique_companies_has_bank = no
	}
	
	prosperity_modifier = {
		country_loyalists_from_legitimacy_mult = 0.1 #(first) state owned bank, it was used to finance their current needs
		building_cash_reserves_mult = 0.05
		
		country_minting_mult = 0.025
		country_loan_interest_rate_mult = -0.025
        country_private_construction_allocation_mult = 0.1		
		
		state_farmers_investment_pool_contribution_add = 0.015
		state_shopkeepers_investment_pool_contribution_add = 0.015
		state_clergymen_investment_pool_contribution_add = 0.065
		state_aristocrats_investment_pool_contribution_add = 0.065
		state_capitalists_investment_pool_contribution_add = 0.04
		
		building_nationalization_investment_return_add = 0.05
		country_government_dividends_reinvestment_add = 0.075
		country_government_dividends_efficiency_add = 0.075
		
		country_max_companies_add = 1
	}
	
	ai_will_do = {
		has_technology_researched = investment_banks
		any_scope_building = {
			is_building_type = building_paper_mills
			level >= 3
		}
	}

	ai_construction_targets = {
		building_paper_mills = {
			level = 5
			state_trigger = {
				state_region = s:STATE_INGRIA
			}
		}
	}
	ai_weight = {
		value = 5 # Higher base value for flavored companies
	}
}

#State Bank of the USSR
company_Gosbank = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/USSRBank.png"  
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufactering_light.dds"
		
	flavored_company = yes
	preferred_headquarters = { STATE_MOSCOW }
	
	possible_prestige_goods = {
		prestige_good_generic_paper
	}	
	
	building_types = {
		building_paper_mills
		building_gold_mine
		#building_automotive_industry
	}
	
	extension_building_types = {	
		building_power_plant
		building_steel_mills
		building_railway
		building_coal_mine
	}
	
	potential = {
		has_interest_marker_in_region = region_russia
	}	
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_MOSCOW
			}
		}
	}	
	
	possible = {
		any_scope_state = {
		    state_region = s:STATE_MOSCOW
			is_incorporated = yes
			any_scope_building = {
				OR = {
					is_building_type = building_power_plant
					is_building_type = building_steel_mills
				}
				level >= 5
			}
		}
		has_technology_researched = central_planning
		has_law = law_type:law_command_economy
		unique_companies_has_bank = no
	}
	
	prosperity_modifier = {
		country_minting_mult = 0.025
		
		country_loyalists_from_legitimacy_mult = 0.1
		country_legitimacy_base_add = 5
		country_authority_mult = 0.1
		
		state_farmers_investment_pool_contribution_add = 0.04
		state_shopkeepers_investment_pool_contribution_add = 0.06
		state_clergymen_investment_pool_contribution_add = 0.02
		
		building_nationalization_investment_return_add = 0.05
		
		country_max_companies_add = 1
	}
	
	ai_will_do = {
		has_technology_researched = central_planning
		has_law = law_type:law_command_economy
		any_scope_building = {
			is_building_type = building_paper_mills
			level >= 3
		}
	}

	ai_construction_targets = {
		building_paper_mills = {
			level = 5
			state_trigger = {
				state_region = s:STATE_MOSCOW
			}
		}
	}
	ai_weight = {
		value = 5 # Higher base value for flavored companies
	}
}

# Dux
company_Dux = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/Dux2.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_heavy.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_MOSCOW }

	#possible_prestige_goods = {
	#	prestige_good_french_aeroplanes
	#}

	building_types = { #24
		building_motor_industry
		building_automotive_industry
	}
	
	extension_building_types = {
		building_tooling_workshops
		building_steel_mills
	}
	
	potential = {
		has_interest_marker_in_region = region_russia
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_MOSCOW
			}
		}
	}		
	
	possible = { 
		any_scope_state = {
			state_region = s:STATE_MOSCOW
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_motor_industry
				level >= 5
			}
		}
		has_technology_researched = electrical_generation
		has_technology_researched = military_aviation
	}
	
	prosperity_modifier = {
		unit_occupation_mult = 0.16 #16
		unit_army_offense_mult = 0.04 #8
	}	
	

	ai_will_do = {
		has_technology_researched = electrical_generation
		any_scope_building = {
			is_building_type = building_motor_industry
			level >= 3
		}
	}

	ai_construction_targets = {
		building_motor_industry = {
			level = 5
			state_trigger = {
				state_region = s:STATE_MOSCOW
			}
		}
	}
	ai_weight = {
		value = 3 # Higher base value for flavored companies
	}
}

# Aksai Joint-Stock Company
company_Aksai = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/Aksai.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_heavy.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_ROSTOV }

	possible_prestige_goods = {
		#prestige_good_saint_etienne_rifles
	}

	
	building_types = { #28
		building_automotive_industry
	}
	
	extension_building_types = {
		building_motor_industry
	}
	
	potential = {
		has_interest_marker_in_region = region_russia
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_ROSTOV
			}
		}
	}		
	
	possible = { 
		any_scope_state = {
			state_region = s:STATE_ROSTOV
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_automotive_industry
				level >= 5
			}
		}
		has_technology_researched = combustion_engine
	}
	
	prosperity_modifier = {
		goods_output_automobiles_mult = 0.06 #4
		building_military_shipyards_throughput_add = 0.2 #20
		military_formation_movement_speed_mult = 0.04 #4
	}	
	

	ai_will_do = {
		has_technology_researched = combustion_engine
		any_scope_building = {
			is_building_type = building_motor_industry
			level >= 3
		}
	}

	ai_construction_targets = {
		building_motor_industry = {
			level = 5
			state_trigger = {
				state_region = s:STATE_ROSTOV
			}
		}
	}
	ai_weight = {
		value = 3 # Higher base value for flavored companies
	}
}

# Cherepovetsles
company_Cherepovetsles = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/Cherepo.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_harbor_shipbuilding.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_MOSCOW }
	

	possible_prestige_goods = {
		prestige_good_siberian_pine
	}

	
	building_types = { #27
		building_logging_camp
	}
	
	extension_building_types = {
		building_port
		building_tooling_workshops
	}
	
	potential = {
		has_interest_marker_in_region = region_russia
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_MOSCOW
			}
		}
	}
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_MOSCOW
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_logging_camp
				level >= 5
			}
		}
		has_technology_researched = combustion_engine
	}
	
	prosperity_modifier = {
		building_port_throughput_add = 0.1 #10
		state_infrastructure_mult = 0.02 #4
		state_pop_qualifications_mult = 0.07 #14
	}


	ai_will_do = {
		any_scope_state = {
			state_region = s:STATE_MOSCOW
			is_incorporated = yes
		}
	}

	ai_construction_targets = {
		building_logging_camp = {
			level = 5
			state_trigger = {
				state_region = s:STATE_MOSCOW
			}
		}
	}
	ai_weight = {
		value = 3 # Higher base value for flavored companies
	}	
}