﻿##############################VANILLA##############################

# Imperial Tobacco Corporation of Persia, Limited
TRY_REPLACE:company_imperial_tobacco = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/imperial_tobacco.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_plantation.dds"

	flavored_company = yes

	building_types = {
		building_tobacco_plantation
	}

	extension_building_types = {
		building_opium_plantation
	}

	potential = {
		has_interest_marker_in_region = sr:region_greater_persia
	}

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

	possible = {
		has_technology_researched = corporate_charters
		any_scope_state = {
			region = sr:region_greater_persia
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_tobacco_plantation
				level >= 5
			}
			count >= 4
		}
	}

	prosperity_modifier = {
		country_tech_spread_mult = 0.2
		interest_group_ig_rural_folk_approval_add = -2
	}

	ai_will_do = {
		has_technology_researched = corporate_charters
		any_scope_state = {
			region = sr:region_greater_persia
			is_incorporated = yes
			has_potential_resource = building_tobacco_plantation
			count >= 4
		}
	}

	ai_construction_targets = {
		building_tobacco_plantation = {
			level = 5
			state_trigger = {
				region = sr:region_greater_persia
				is_incorporated = yes
			}
		}
	}

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

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

# Də Afḡān Nasājī Šerkat
TRY_REPLACE:company_da_afghan_nassaji_sherkat = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/da_afghan_nassaji_sherkat.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_light.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_BALKH }

	building_types = {
		building_textile_mill
	}

	extension_building_types = {
		building_cotton_plantation
	}

	possible_prestige_goods = {
		prestige_good_generic_clothes
	}

	prestige_goods_trigger = {
		custom_tooltip = {
			text = je_prestige_goods_clothes_complete_tt
			has_variable = prestige_good_generic_clothes_var
		}
	}

	potential = {
		has_dlc_feature = ep1_content
		has_interest_marker_in_region = sr:region_greater_persia
	}

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

	possible = {
		any_scope_state = {
			state_region = s:STATE_BALKH
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_textile_mill
				level >= 5
			}
		}
	}

	prosperity_modifier = {
		state_trade_capacity_mult = 0.05
		building_cotton_plantation_throughput_add = 0.1
	}

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

	ai_construction_targets = {
		building_textile_mill = {
			level = 5
			state_trigger = {
				state_region = s:STATE_BALKH
			}
		}
	}

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

# Iranian State Railway
TRY_REPLACE:company_iranian_state_railway = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/trans_iranian_railway.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_railways.dds"

	category = bureaucrat_owned

	flavored_company = yes

	building_types = {
		building_railway
	}

	extension_building_types = {
		building_motor_industry
	}

	potential = {
		has_interest_marker_in_region = sr:region_greater_persia
		country_has_primary_culture = cu:persian
	}

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

	possible = {
		has_technology_researched = railways
		any_scope_state = {
			region = sr:region_greater_persia
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_railway
				level >= 5
			}
			count >= 2
		}
	}

	prosperity_modifier = {
		state_assimilation_mult = 0.1
	}

	ai_will_do = {
		has_technology_researched = railways
		any_scope_state = {
			region = sr:region_greater_persia
			is_incorporated = yes
		}
	}

	ai_construction_targets = {
		building_railway = {
			level = 5
			state_trigger = {
				region = sr:region_greater_persia
				is_incorporated = yes
			}
		}
	}

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

# Tashkent Railroad
TRY_REPLACE:company_tashkent_railroad = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/tashkent_railroad.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_railways.dds"

	category = bureaucrat_owned

	flavored_company = yes

	preferred_headquarters = { STATE_FERGANA }

	building_types = {
		building_railway
	}

	extension_building_types = {
		building_motor_industry
	}

	potential = {
		has_dlc_feature = ep1_content
		has_interest_marker_in_region = sr:region_central_asia
	}

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

	possible = {
		has_technology_researched = railways
		any_scope_state = {
			state_region = s:STATE_FERGANA
			is_incorporated = yes
			has_building = building_railway
			any_scope_building = {
				is_building_type = building_railway
				level >= 5
			}
		}
		any_scope_state = {
			region = sr:region_central_asia
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_railway
				level >= 5
			}
			count >= 2
		}
	}

	prosperity_modifier = {
		building_cotton_plantation_throughput_add = 0.1
	}

	ai_will_do = {
		has_technology_researched = railways
		any_scope_state = {
			region = sr:region_central_asia
			is_incorporated = yes
		}
	}

	ai_construction_targets = {
		building_railway = {
			level = 5
			state_trigger = {
				region = sr:region_central_asia
				is_incorporated = yes
			}
		}
	}

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

# Šerkat-e Etteḥādīya-ye Welāyat-e Šemālī
TRY_REPLACE:company_sherkat_shemali = {
	icon = "gfx/interface/icons/company_icons/basic_colonial_plantations_2.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_light.dds"

	category = aristocrat_owned

	flavored_company = yes

	preferred_headquarters = { STATE_BALKH }

	building_types = {
		building_cotton_plantation
	}

	extension_building_types = {
		building_textile_mill
	}

	potential = {
		has_interest_marker_in_region = sr:region_greater_persia
	}

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

	possible = {
		any_scope_state = {
			state_region = s:STATE_BALKH
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_cotton_plantation
				level >= 5
			}
		}
	}

	prosperity_modifier = {
		building_opium_plantation_throughput_add = 0.2
	}

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

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

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

# Bongāh-e Enḥeṣār-e Ṣāderāt-e Taryāk
TRY_REPLACE:company_opium_export_monopoly = {
	icon = "gfx/interface/icons/company_icons/basic_colonial_plantations_1.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_plantation.dds"

	category = aristocrat_owned

	flavored_company = yes

	preferred_headquarters = { STATE_ISFAHAN }

	building_types = {
		building_opium_plantation
	}

	extension_building_types = {
		building_tobacco_plantation
	}

	possible_prestige_goods = {
		prestige_good_generic_opium
	}

	prestige_goods_trigger = {
		custom_tooltip = {
			text = je_prestige_goods_opium_complete_tt
			has_variable = prestige_good_generic_opium_var
		}
	}

	potential = {
		has_interest_marker_in_region = sr:region_greater_persia
	}

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

	possible = {
		any_scope_state = {
			region = sr:region_greater_persia
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_opium_plantation
				level >= 5
			}
			count >= 2
		}
	}

	prosperity_modifier = {
		state_radicals_from_political_movements_mult = -0.1
		unit_morale_recovery_mult = 0.1
	}

	ai_will_do = {
		any_scope_state = {
			region = sr:region_greater_persia
			is_incorporated = yes
		}
	}

	ai_construction_targets = {
		building_opium_plantation = {
			level = 5
			state_trigger = {
				region = sr:region_greater_persia
				is_incorporated = yes
			}
		}
	}

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

# Šerkat-e Eslāmiya
TRY_REPLACE:company_sherkate_eslamiya = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/historical_serkat_e_eslamiya.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_light.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_ISFAHAN }

	building_types = {
		building_textile_mill
	}

	extension_building_types = {
		building_cotton_plantation
	}

	possible_prestige_goods = {
		prestige_good_generic_clothes
	}

	prestige_goods_trigger = {
		custom_tooltip = {
			text = je_prestige_goods_clothes_complete_tt
			has_variable = prestige_good_generic_clothes_var
		}
	}

	potential = {
		has_dlc_feature = ep1_content
		has_interest_marker_in_region = sr:region_greater_persia
	}

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

	possible = {
		any_scope_state = {
			state_region = s:STATE_ISFAHAN
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_textile_mill
				level >= 5
			}
		}
	}

	prosperity_modifier = {
		country_state_religion_wages_mult = 0.2
	}

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

	ai_construction_targets = {
		building_textile_mill = {
			level = 5
			state_trigger = {
				state_region = s:STATE_ISFAHAN
			}
		}
	}

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

# Persshelk
TRY_REPLACE:company_persshelk = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/historical_persshelk.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_plantation.dds"

	category = bureaucrat_owned

	flavored_company = yes

	building_types = {
		building_silk_plantation
	}

	extension_building_types = {
		building_textile_mill
	}

	potential = {
		has_dlc_feature = ep1_content
		has_interest_marker_in_region = sr:region_greater_persia
	}

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

	possible = {
		OR = {
			country_has_primary_culture = cu:russian
			any_scope_ally = {
				country_has_primary_culture = cu:russian
			}
		}
		any_scope_state = {
			region = sr:region_greater_persia
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_silk_plantation
				level >= 5
			}
			count >= 2
		}
	}

	prosperity_modifier = {
		country_prestige_mult = 0.05
		interest_group_ig_petty_bourgeoisie_pop_attraction_mult = 0.1
	}

	ai_will_do = {
		OR = {
			country_has_primary_culture = cu:russian
			any_scope_ally = {
				country_has_primary_culture = cu:russian
			}
		}
		any_scope_state = {
			region = sr:region_greater_persia
			is_incorporated = yes
		}
	}

	ai_construction_targets = {
		building_silk_plantation = {
			level = 5
			state_trigger = {
				region = sr:region_greater_persia
				is_incorporated = yes
			}
		}
	}

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

# Perskhlopok
TRY_REPLACE:company_perskhlopok = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/historical_perskhlopok.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_plantation.dds"

	category = bureaucrat_owned

	flavored_company = yes

	building_types = {
		building_cotton_plantation
	}

	extension_building_types = {
		building_textile_mill
	}

	potential = {
		has_dlc_feature = ep1_content
		has_interest_marker_in_region = sr:region_greater_persia
	}

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

	possible = {
		OR = {
			country_has_primary_culture = cu:russian
			any_scope_ally = {
				country_has_primary_culture = cu:russian
			}
		}
		any_scope_state = {
			region = sr:region_greater_persia
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_cotton_plantation
				level >= 5
			}
			count >= 2
		}
	}

	prosperity_modifier = {
		building_textile_mill_throughput_add = 0.05
		interest_group_ig_rural_folk_approval_add = 2
	}

	ai_will_do = {
		OR = {
			country_has_primary_culture = cu:russian
			any_scope_ally = {
				country_has_primary_culture = cu:russian
			}
		}
		any_scope_state = {
			region = sr:region_greater_persia
			is_incorporated = yes
		}
	}

	ai_construction_targets = {
		building_cotton_plantation = {
			level = 5
			state_trigger = {
				region = sr:region_greater_persia
				is_incorporated = yes
			}
		}
	}

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

# Anglo-Persian Oil Company
TRY_REPLACE:company_anglo_persian_oil = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/anglo_persian_oil_company.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_oil_drills.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_KHUZESTAN }

	building_types = {
		building_oil_rig
	}

	extension_building_types = {
		building_power_plant
	}

	potential = {
		has_dlc_feature = ep1_content
		has_interest_marker_in_region = sr:region_greater_persia
		OR = {
			country_has_primary_culture = cu:british
			country_has_primary_culture = cu:persian
		}
	}

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

	possible = {
		has_technology_researched = pumpjacks
		OR = {
			country_has_primary_culture = cu:british
			any_scope_ally = {
				country_has_primary_culture = cu:british
			}
		}
		custom_tooltip = {
			text = company_anglo_persian_oil_tt
			NOT = {
				has_company = company_type:company_national_iranian_oil
			}
		}
		any_scope_state = {
			state_region = s:STATE_KHUZESTAN
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_oil_rig
				level >= 5
			}
		}
	}

	prosperity_modifier = {
		building_group_bg_oil_extraction_throughput_add = 0.3
	}

	ai_will_do = {
		has_technology_researched = pumpjacks
		OR = {
			country_has_primary_culture = cu:british
			any_scope_ally = {
				country_has_primary_culture = cu:british
			}
		}
		NOT = {
			has_company = company_type:company_national_iranian_oil
		}
		any_scope_state = {
			state_region = s:STATE_KHUZESTAN
			is_incorporated = yes
		}
	}

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

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

# National Iranian Oil Company
TRY_REPLACE:company_national_iranian_oil = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/national_iranian_oil_company.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_oil_drills.dds"

	category = bureaucrat_owned

	flavored_company = yes

	preferred_headquarters = { STATE_KHUZESTAN }

	building_types = {
		building_oil_rig
	}

	extension_building_types = {
		building_power_plant
	}

	potential = {
		has_dlc_feature = ep1_content
		has_interest_marker_in_region = sr:region_greater_persia
		country_has_primary_culture = cu:persian
	}

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

	possible = {
		has_technology_researched = pumpjacks
		NOR = {
			country_has_primary_culture = cu:british
			any_scope_ally = {
				country_has_primary_culture = cu:british
			}
		}
		custom_tooltip = {
			text = company_national_iranian_oil_tt
			NOT = {
				has_company = company_type:company_anglo_persian_oil
			}
		}
		any_scope_state = {
			state_region = s:STATE_KHUZESTAN
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_oil_rig
				level >= 5
			}
		}
	}

	prosperity_modifier = {
		interest_group_ig_industrialists_pop_attraction_mult = 0.1
		country_loyalists_from_legitimacy_mult = 0.1
	}

	ai_will_do = {
		has_technology_researched = pumpjacks
		NOR = {
			country_has_primary_culture = cu:british
			any_scope_ally = {
				country_has_primary_culture = cu:british
			}
		}
		NOT = {
			has_company = company_type:company_anglo_persian_oil
		}
		any_scope_state = {
			state_region = s:STATE_KHUZESTAN
			is_incorporated = yes
		}
	}

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

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

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

# Darogar
company_Darogar = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/darugar.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_heavy.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_ISFAHAN }

	possible_prestige_goods = {
		prestige_good_generic_medicine
	}

	
	building_types = { #27
		building_chemical_plant
	}
	
	extension_building_types = {
		building_sulfur_mine
	}
	
	potential = {
		has_interest_marker_in_region = sr:region_greater_persia
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_ISFAHAN
			}
		}
	}
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_ISFAHAN
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_chemical_plant
				level >= 3
			}
		}
	}
	
	prosperity_modifier = {
		state_mortality_wealth_mult = -0.003 #14
		building_wheat_farm_throughput_add = 0.18 #14
	}	
	

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

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

# Tavakoli Match
company_Tavakoli = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/tavakoli.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_heavy.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_TABRIZ }

	possible_prestige_goods = {
		#prestige_good_saint_etienne_rifles
	}

	
	building_types = { #27
		building_logging_camp
	}
	
	extension_building_types = {
		building_sulfur_mine
		building_chemical_plant
	}
	
	potential = {
		has_interest_marker_in_region = sr:region_greater_persia
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_TABRIZ
			}
		}
	}
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_TABRIZ
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_chemical_plant
				level >= 3
			}
		}
		has_technology_researched = pneumatic_tools
	}
	
	prosperity_modifier = {
		building_sulfur_mine_throughput_add = 0.15 #20
		state_loyalists_from_political_movements_mult = 0.05 #6
		state_lower_strata_expected_sol_add = -0.15
		state_middle_strata_expected_sol_add = -0.3
		state_upper_strata_expected_sol_add = -0.45
	}	
	

	ai_will_do = {
		has_technology_researched = pneumatic_tools
		any_scope_state = {
			state_region = s:STATE_TABRIZ
			is_incorporated = yes
		}
	}

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

# Oghab Halva
company_Oghab = {
	icon = "gfx/interface/icons/company_icons/basic_food.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_farm_wheat.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_IRAKAJEMI }

	possible_prestige_goods = {
		prestige_good_generic_groceries
	}

	
	building_types = { #25
		building_wheat_farm
		building_food_industry
	}
	
	extension_building_types = {
		building_livestock_ranch
	}
	
	potential = {
		has_interest_marker_in_region = sr:region_greater_persia
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_IRAKAJEMI
			}
		}
	}
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_IRAKAJEMI
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_food_industry
				level >= 3
			}
		}
	}
	
	prosperity_modifier = {
		state_birth_rate_mult = 0.05 #20
		state_loyalists_from_political_movements_mult = 0.03 #4
		state_lower_strata_expected_sol_add = -0.1
		state_middle_strata_expected_sol_add = -0.2
		state_upper_strata_expected_sol_add = -0.3
	}	
	

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

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

# Kahrizak Sugar Factory
company_Kahrizak = {
	icon = "gfx/interface/icons/company_icons/basic_food.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_farm_wheat.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_IRAKAJEMI }

	possible_prestige_goods = {
		prestige_good_generic_sugarcane
	}

	
	building_types = { #27
		building_sugar_plantation
	}
	
	extension_building_types = {
		building_food_industry
	}
	
	potential = {
		has_interest_marker_in_region = sr:region_greater_persia
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_IRAKAJEMI
			}
		}
	}
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_IRAKAJEMI
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_sugar_plantation
				level >= 3
			}
		}
	}
	
	prosperity_modifier = {
		state_radicals_from_political_movements_mult = -0.12 #16
		state_lower_strata_expected_sol_add = -0.4
		state_middle_strata_expected_sol_add = -0.8
		state_upper_strata_expected_sol_add = -1.2
		building_food_industry_throughput_add = 0.11 #10
	}	
	

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

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

# Naseri shipping company 
company_Naseri = {
	icon = "gfx/interface/icons/company_icons/basic_shipyards.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_harbor_shipbuilding.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_KHUZESTAN }

	possible_prestige_goods = {
		prestige_good_generic_merchant_marine
	}

	
	building_types = { #28
		building_trade_center
		building_port
	}
	
	extension_building_types = {
		building_motor_industry
		building_shipyard
	}
	
	potential = {
		has_interest_marker_in_region = sr:region_greater_persia
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_KHUZESTAN
			}
		}
	}
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_KHUZESTAN
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_trade_center
				level >= 3
			}
		}
		has_technology_researched = floating_harbor
	}
	
	prosperity_modifier = {
		country_ship_group_supply_ships_construction_efficiency_add = 0.15 #10
		building_group_bg_agriculture_throughput_add = 0.05 #18
	}	
	

	ai_will_do = {
		has_technology_researched = floating_harbor
		any_scope_state = {
			state_region = s:STATE_KHUZESTAN
			is_incorporated = yes
		}
	}

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

#Imperial Bank of Persia
company_Bank_IBP = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/persiaimperialbank.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_light.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_IRAKAJEMI }
	
	possible_prestige_goods = {
		#prestige_good_generic_currency_paper
	}
	
	building_types = {
		building_paper_mill
		building_opium_plantation
		building_railway
	}
	
	extension_building_types = {	
		building_tobacco_plantation
		building_oil_rig
		building_coal_mine
		building_textile_mill
	}
	
	potential = {
		has_game_rule = banks_enabled
		has_interest_marker_in_region = sr:region_greater_persia
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_IRAKAJEMI
			}
		}
	}
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_IRAKAJEMI
			any_scope_building = {
				is_building_type = building_financial_district
				level >= 20
			}
		}
		OR = {
			AND = { 
				exists = c:GBR
				c:GBR = { relations:root >= relations_threshold:amicable }
				has_technology_researched = central_banking
				has_technology_researched = joint_stock_companies
			}
			has_technology_researched = investment_banks
		}
		unique_companies_has_bank = no
	}
	
	prosperity_modifier = {
		state_trade_advantage_mult = 0.15
	
		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.04
		state_aristocrats_investment_pool_contribution_add = 0.04
		state_capitalists_investment_pool_contribution_add = 0.07 #<--
		
		building_nationalization_investment_return_add = 0.025 #<--
		country_government_dividends_reinvestment_add = 0.025 #<--
		country_government_dividends_efficiency_add = 0.025 #<--
		
		country_max_companies_add = 1
	}
	
	ai_will_do = {
		unique_companies_has_bank = no
		OR = {
			AND = {
				exists = c:GBR
				c:GBR = { relations:root >= relations_threshold:amicable }
				has_technology_researched = central_banking
				has_technology_researched = joint_stock_companies
			}
			has_technology_researched = investment_banks
		}
		any_scope_state = {
			state_region = s:STATE_IRAKAJEMI
			is_incorporated = yes
		}
	}

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