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

# Kaiping Mining Company
TRY_REPLACE:company_kaiping_mining = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/chinese_kaiping_mining_company.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_mining.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_BEIJING STATE_ZHILI }

	building_types = {
		building_coal_mine
		building_railway
	}

	extension_building_types = {
		building_iron_mine
		building_lead_mine
	}

	potential = {
		has_interest_marker_in_region = sr:region_north_china
	}

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

	possible = {
		has_technology_researched = steam_donkey
		has_technology_researched = railways
		any_scope_state = {
			OR = {
				state_region = s:STATE_BEIJING
				state_region = s:STATE_ZHILI
			}
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_coal_mine
				level >= 5
			}
		}
	}

	prosperity_modifier = {
		country_tech_spread_mult = 0.1
	}

	ai_will_do = {
		has_technology_researched = steam_donkey
		has_technology_researched = railways
		any_scope_state = {
			OR = {
				state_region = s:STATE_BEIJING
				state_region = s:STATE_ZHILI
			}
			is_incorporated = yes
		}
	}

	ai_construction_targets = {
		building_coal_mine = {
			level = 5
			state_trigger = {
				OR = {
					state_region = s:STATE_BEIJING
					state_region = s:STATE_ZHILI
				}
				is_incorporated = yes
			}
		}
	}

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

# Hanyang Arsenal
TRY_REPLACE:company_hanyang_arsenal = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/chinese_hanyang_arsenal.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_heavy.dds"

	category = bureaucrat_owned

	flavored_company = yes

	preferred_headquarters = { STATE_EASTERN_HUBEI }

	building_types = {
		building_arms_industry
		building_artillery_foundry
		building_munition_plant
	}

	extension_building_types = {
		building_explosives_factory
	}

	possible_prestige_goods = {
		prestige_good_generic_small_arms
	}

	prestige_goods_trigger = {
		custom_tooltip = {
			text = je_prestige_goods_small_arms_complete_tt
			has_variable = prestige_good_generic_small_arms_var
		}
	}

	potential = {
		has_interest_marker_in_region = sr:region_south_china
	}

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

	possible = {
		has_technology_researched = breech_loading_artillery
		any_scope_state = {
			state_region = s:STATE_EASTERN_HUBEI
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_arms_industry
				level >= 5
			}
		}
	}

	prosperity_modifier = {
		unit_combat_unit_type_shrapnel_artillery_offense_mult = 0.2
		unit_morale_recovery_mult = 0.15
	}

	ai_will_do = {
		has_technology_researched = breech_loading_artillery
		any_scope_state = {
			state_region = s:STATE_EASTERN_HUBEI
			is_incorporated = yes
		}
	}

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

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

# Foochow Arsenal
TRY_REPLACE:company_foochow_arsenal = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/chinese_foochow_arsenal.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_harbor_shipbuilding.dds"

	category = bureaucrat_owned

	flavored_company = yes

	preferred_headquarters = { STATE_FUJIAN }
    
	possible_prestige_goods = {
		#prestige_good_baochuan
	}
	
	building_types = {
		building_shipyard
		building_artillery_foundry
	}

	extension_building_types = {
		building_steel_mill
		building_logging_camp
		building_tooling_workshop
	}

	potential = {
		has_interest_marker_in_region = sr:region_south_china
	}

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

	possible = {
		has_technology_researched = ironclad_tech
		has_technology_researched = gantry_cranes
		any_scope_state = {
			state_region = s:STATE_FUJIAN
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_shipyard
				level >= 5
			}
		}
	}

	prosperity_modifier = {
		ship_hull_damage_mult = 0.025
		building_port_throughput_add = 0.10
	}

	ai_will_do = {
		has_technology_researched = ironclad_tech
		has_technology_researched = gantry_cranes
		any_scope_state = {
			state_region = s:STATE_FUJIAN
			is_incorporated = yes
		}
	}

	ai_construction_targets = {
		building_shipyard = {
			level = 5
			state_trigger = {
				state_region = s:STATE_FUJIAN
			}
		}
	}

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

# Jingdezhen Porcelain
TRY_REPLACE:company_jingdezhen = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/chinese_jingdezhen_kilns.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_light.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_JIANGXI }

	building_types = {
		building_glassworks
	}

	extension_building_types = {
		building_lead_mine
	}

	potential = {
		has_interest_marker_in_region = sr:region_south_china
	}

	possible_prestige_goods = {
		prestige_good_canton_porcelain
	}

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

	possible = {
		has_technology_researched = chemical_bleaching
		any_scope_state = {
			state_region = s:STATE_JIANGXI
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_glassworks
				level >= 5
			}
		}
	}

	prosperity_modifier = {
		country_prestige_mult = 0.15
		building_lead_mine_throughput_add = 0.05
	}

	ai_will_do = {
		has_technology_researched = chemical_bleaching
		any_scope_state = {
			state_region = s:STATE_JIANGXI
			is_incorporated = yes
		}
	}

	ai_construction_targets = {
		building_glassworks = {
			level = 5
			state_trigger = {
				state_region = s:STATE_JIANGXI
			}
		}
	}

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

##############################DLC-MP1##############################

# Jiangnan Weaving Bureaus
TRY_REPLACE:company_jiangnan_weaving_bureaus= {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/company_jiangnan_weaving_bureaus.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_light.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_SUZHOU STATE_ZHEJIANG STATE_NANJING }

	building_types = {
		building_silk_plantation
		building_textile_mill
	}

	extension_building_types = {
		building_cotton_plantation
	}

	possible_prestige_goods = {
		prestige_good_suzhou_silk
	}

	potential = {
		has_dlc_feature = mp1_content
		has_interest_marker_in_region = sr:region_south_china
	}

	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				OR = {
					state_region = s:STATE_SUZHOU
					state_region = s:STATE_ZHEJIANG
					state_region = s:STATE_NANJING
				}
			}
		}
	}

	possible = {
		any_scope_state = {
			OR = {
				state_region = s:STATE_SUZHOU
				state_region = s:STATE_ZHEJIANG
				state_region = s:STATE_NANJING
			}
			is_incorporated = yes
			any_scope_building = {
				OR = {
					is_building_type = building_silk_plantation
					is_building_type = building_textile_mill
				}
				level >= 5
			}
		}
	}

	prosperity_modifier = {
		country_authority_mult = 0.10
		country_influence_mult = 0.10
	}

	ai_will_do = {
		has_technology_researched = chemical_bleaching
		any_scope_state = {
			OR = {
				state_region = s:STATE_SUZHOU
				state_region = s:STATE_ZHEJIANG
				state_region = s:STATE_NANJING
			}
			is_incorporated = yes
		}
	}

	ai_construction_targets = {
		building_silk_plantation = {
			level = 5
			state_trigger = {
				OR = {
					state_region = s:STATE_SUZHOU
					state_region = s:STATE_ZHEJIANG
					state_region = s:STATE_NANJING
				}
				is_incorporated = yes
			}
		}
		building_textile_mill = {
			level = 5
			state_trigger = {
				OR = {
					state_region = s:STATE_SUZHOU
					state_region = s:STATE_ZHEJIANG
					state_region = s:STATE_NANJING
				}
				is_incorporated = yes
			}
		}
	}

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

# Ong Lung Sheng Tea Company
TRY_REPLACE:company_ong_lung_sheng_tea_company = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/company_ong_lung_sheng_tea_company.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_plantation.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_ZHEJIANG }

	building_types = {
		building_tea_plantation
	}

	extension_building_types = {
		building_food_industry
	}

	possible_prestige_goods = {
		prestige_good_china_tea
	}

	potential = {
		has_dlc_feature = mp1_content
		has_interest_marker_in_region = sr:region_south_china
	}

	attainable = {
	}

	possible = {
		any_scope_state = {
			region = sr:region_south_china
			any_scope_building = {
				is_building_type = building_tea_plantation
				level >= 5
			}
			count >= 3
		}
	}

	prosperity_modifier = {
		country_bureaucracy_mult = 0.05
		country_loyalists_from_legitimacy_mult = 0.05
	}

	ai_will_do = {
		any_scope_state = {
			state_region = s:STATE_ZHEJIANG
		}
		any_scope_state = {
			region = sr:region_south_china
			count >= 3
		}
	}

	ai_construction_targets = {
		building_trade_center = {
			level = 1
			state_trigger = {
				state_region = s:STATE_ZHEJIANG
			}
		}
		building_tea_plantation = {
			level = 5
			state_trigger = {
				region = sr:region_south_china
			}
		}
	}

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

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

# Bianyifang
company_Bianyifang = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/bianyifang.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_light.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_BEIJING }
	
	category = shopkeeper_owned
	
	possible_prestige_goods = {
		prestige_good_generic_groceries
	}
	
	building_types = {  #25
		building_food_industry
		building_livestock_ranch
	}
	
	extension_building_types = {
		building_rice_farm
		building_wheat_farm
	}

	potential = {
		has_interest_marker_in_region = sr:region_south_china
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_BEIJING
			}
		}
	}	
	
	possible = { 
		any_scope_state = {
			state_region = s:STATE_BEIJING
			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_BEIJING
			is_incorporated = yes
		}
	}

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

# Chang'an Automobile / Shanghai Foreign Gun Bureau
company_Changan = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/changan.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_heavy.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_BEIJING }
	
	category = bureaucrat_owned
	
	possible_prestige_goods = {
		#prestige_good_saint_etienne_rifles
	}
	
	building_types = {  #22
		building_munition_plant
		building_arms_industry
		building_artillery_foundry
	}
	
	extension_building_types = {
		building_automotive_industry
	}
	
	potential = {
		has_interest_marker_in_region = sr:region_south_china
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_BEIJING
			}
		}
	}	
	
	possible = { 
		any_scope_state = {
			state_region = s:STATE_BEIJING
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_arms_industry
				level >= 3
			}
		}
	}
	
	prosperity_modifier = {
		interest_group_ig_armed_forces_approval_add = 3 #12
		goods_output_automobiles_mult = 0.13 #10
		
	}	
	

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

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

company_Arnhold = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/arnhold.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_heavy.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_BEIJING }
	
	possible_prestige_goods = {
		#prestige_good_saint_etienne_rifles
	}

	building_types = {  #16
		building_trade_center
		building_port
		building_logging_camp
	}
	
	extension_building_types = {
		building_arms_industry
		building_steel_mill
		building_iron_mine
	}

	potential = {
		has_interest_marker_in_region = sr:region_south_china
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_BEIJING
			}
		}
	}	
	
	possible = { 
		any_scope_state = {
			state_region = s:STATE_BEIJING
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_trade_center
				level >= 3
			}
		}
		has_technology_researched = modern_sewerage
	}
	
	prosperity_modifier = {
		country_private_construction_allocation_mult = 0.10 #10
		country_max_weekly_construction_progress_add = 5 #6
		country_leverage_resistance_mult = -0.10 # +5
		state_trade_advantage_mult = 0.09 #6
	}	
	

	ai_will_do = {
		has_technology_researched = modern_sewerage
		any_scope_state = {
			state_region = s:STATE_BEIJING
			is_incorporated = yes
		}
	}

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

company_Chongqing = {
	icon = "gfx/interface/icons/company_icons/basic_steel.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_heavy.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_BEIJING }
	
	possible_prestige_goods = {
		prestige_good_generic_steel
	}
	
	building_types = {  #14
		building_steel_mill
		building_iron_mine
	}
	
	extension_building_types = {
		building_tooling_workshop
	}

	potential = {
		has_interest_marker_in_region = sr:region_south_china
		
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_CHONGQING
			}
		}
	}	
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_CHONGQING
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_steel_mill
				level >= 3
			}
		}
	}
	
	prosperity_modifier = {
		building_tooling_workshop_throughput_add = 0.07 #14
	}	
	

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

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

company_Dalian = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/dalianshipbuilding.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_harbor_shipbuilding.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_BEIJING }
	
	category = bureaucrat_owned
	
	possible_prestige_goods = {
		#prestige_good_baochuan
	}

	building_types = {  #23
		building_shipyard
	}
	
	extension_building_types = {
		building_artillery_foundry
	}

	potential = {
		has_interest_marker_in_region = sr:region_south_china
		
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_BEIJING
			}
		}
	}	
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_BEIJING
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_shipyard
				level >= 3
			}
		}
	}
	
	prosperity_modifier = {
		building_shipyard_throughput_add = 0.1 #20
		ship_armor_mult = 0.01 #4		
	}		
	

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

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

company_DuoYunXuan = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/duoyunxuan.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_light.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_BEIJING }
	
	category = aristocrat_owned
	
	possible_prestige_goods = {
		#prestige_good_saint_etienne_rifles
	}

	building_types = {  #28
		building_art_academy
		building_trade_center
	}

	extension_building_types = {
		building_furniture_manufactory
		building_paper_mill
		building_glassworks
	}

	potential = {
		has_interest_marker_in_region = sr:region_south_china
		
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_SUZHOU
			}
		}
	}	
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_SUZHOU
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_art_academy
				level >= 3
			}
		}
	}
	
	prosperity_modifier = {
		country_prestige_mult = 0.12 #12
		interest_group_ig_petty_bourgeoisie_approval_add = 2 #8
		interest_group_ig_landowners_approval_add = 2 #8
	}		
	

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

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

# Li & Fung Limited
company_Li = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/li_fung.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_heavy.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_SHAOZHOU }
	
	possible_prestige_goods = {
		prestige_good_canton_porcelain
	}
	
	building_types = {  #23
		building_glassworks
		building_port
	}
	
	extension_building_types = {
		building_textile_mill
		building_synthetics_plant
		building_explosives_factory
	}

	potential = {
		has_interest_marker_in_region = sr:region_south_china
		
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_SHAOZHOU
			}
		}
	}	
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_SHAOZHOU
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_glassworks
				level >= 3
			}
		}
		has_technology_researched = art_silk
	}
	
	prosperity_modifier = {
		state_loyalists_from_political_movements_mult = 0.14 #18
		state_lower_strata_expected_sol_add = -0.45
		state_middle_strata_expected_sol_add = -0.9
		state_upper_strata_expected_sol_add = -1.35
		state_trade_advantage_mult = 0.08 #5
	}		
	

	ai_will_do = {
		has_technology_researched = art_silk
		any_scope_state = {
			state_region = s:STATE_SHAOZHOU
			is_incorporated = yes
		}
	}

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

# Xie Zhi Business Enterprise
company_Xie_Zhi = {
	icon = "gfx/interface/icons/company_icons/basic_steel.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_heavy.dds"
	
    flavored_company = yes
	preferred_headquarters = { STATE_FORMOSA }
	
	possible_prestige_goods = {
		#prestige_good_saint_etienne_rifles
	}

	building_types = {  #15
		building_logging_camp
		building_steel_mill
	}
	
	extension_building_types = {
		building_motor_industry
		building_electrics_industry
	}

	potential = {
		country_has_primary_culture = cu:min
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_FORMOSA
			}
		}
	}
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_FORMOSA
			is_incorporated = yes
			any_scope_building = {
			    is_building_type = building_steel_mill
				level >= 3
			}
		}
	}
	
	prosperity_modifier = {
		country_max_weekly_construction_progress_add = 10 #12
		state_infrastructure_mult = 0.02 #4
	}	
	

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

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

# Jian Hsin Corporation Limited
company_Jian_Hsin = {
	icon = "gfx/interface/icons/company_icons/basic_food.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_farm_rice.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_FORMOSA }
	
	possible_prestige_goods = {
		prestige_good_generic_groceries
	}
	
	building_types = {  #21
		building_food_industry #Soft drinks
		building_rice_farm
	}
	
	extension_building_types = {
		building_sugar_plantation
	}

	potential = {
		has_interest_marker_in_region = sr:region_south_china
		OR = {
			country_has_primary_culture = cu:japanese
			country_has_primary_culture = cu:min
		}
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_FORMOSA
			}
		}
	}
	
	possible = { 
		any_scope_state = {
			state_region = s:STATE_FORMOSA
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_food_industry
				level >= 3
		    }
		}
	}
	
	prosperity_modifier = {
		state_birth_rate_mult = 0.05 #20
		state_assimilation_mult = 0.02 #1
	}


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

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

# Imperial Telegraph Administration
company_ITA = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/ita.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_light.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_SUZHOU }
	
	category = bureaucrat_owned
	
	possible_prestige_goods = {
		#prestige_good_saint_etienne_rifles
	}

	building_types = {  #24
		building_electrics_industry
	}
	
	extension_building_types = {
		building_paper_mill
		building_lead_mine
	}

	potential = {
		OR = {
			has_interest_marker_in_region = sr:region_north_china
			has_interest_marker_in_region = sr:region_south_china
		}
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
			    OR = {
				   region = sr:region_north_china
				   region = sr:region_south_china
				}
			}
		}
	}		
	
	possible = { 
		any_scope_state = {
		    OR = {
				region = sr:region_north_china
				region = sr:region_south_china
			}
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_electrics_industry
				level >= 3
			}
		}
	}
	
	prosperity_modifier = {
		building_power_plant_throughput_add = 0.03 #4
		unit_supply_consumption_mult = -0.08 #20
	}	
	

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

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

# Jiangnan Arsenal
company_Jiangnan_Arsenal = {
	icon = "gfx/interface/icons/company_icons/basic_metalworks.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_heavy.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_SUZHOU }
	
	category = bureaucrat_owned
	
	possible_prestige_goods = {
		prestige_good_generic_machine_parts
	}

	building_types = {  #11
		building_arms_industry
		building_tooling_workshop
		building_shipyard
	}
	
	extension_building_types = {
		building_munition_plant
	}

	potential = {
		has_interest_marker_in_region = sr:region_south_china	
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_SUZHOU
			}
		}
	}	
	
	possible = { 
		any_scope_state = {
			state_region = s:STATE_SUZHOU
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_tooling_workshop
				level >= 3
			}
		}
	}
	
	prosperity_modifier = {
		unit_army_defense_mult = 0.05 #10
	}	
	

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

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

# China Merchants Steam Navigation Company
company_CMSNC = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/chinamerchants.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_harbor_shipbuilding.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_SUZHOU }
	
	category = bureaucrat_owned
	
	possible_prestige_goods = {
		prestige_good_generic_grain
	}

	building_types = {  #23
		building_trade_center
		building_port
	}
	
	extension_building_types = {
		building_shipyard
		building_wheat_farm
		building_rice_farm
	}

	potential = {
		has_interest_marker_in_region = sr:region_south_china	
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_SUZHOU
			}
		}
	}	
	
	possible = { 
		any_scope_state = {
			state_region = s:STATE_SUZHOU
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_port
				level >= 3
			}
		}
		has_technology_researched = screw_frigate
	}
	
	prosperity_modifier = {
		country_ship_group_supply_ships_construction_efficiency_add = 0.15 #10
		country_minting_mult = 0.03 #10
		building_port_throughput_add = 0.03 #3
	}	
	

	ai_will_do = {
		has_technology_researched = screw_frigate
		any_scope_state = {
			state_region = s:STATE_SUZHOU
			is_incorporated = yes
		}
	}

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

# Jardine Matheson & Co.
company_Jardine = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/jardine.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_harbor_shipbuilding.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_GUANGDONG }
	
	possible_prestige_goods = {
		prestige_good_generic_opium
		prestige_good_china_tea
		prestige_good_suzhou_silk
	}
	
	building_types = {  #23
		building_trade_center
		building_port
	}
	
	extension_building_types = {
		building_shipyard
		building_tea_plantation
		building_silk_plantation
		building_opium_plantation
	}

	potential = {
		has_interest_marker_in_region = sr:region_south_china	
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_GUANGDONG
			}
		}
	}	
	
	possible = { 
		any_scope_state = {
			state_region = s:STATE_GUANGDONG
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_port
				level >= 3
			}
		}
	}
	
	prosperity_modifier = {
		building_group_bg_plantations_throughput_add = 0.03 #14
		building_opium_plantation_throughput_add = 0.06 #8
	}	
	

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

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

# Hongkong Electric Company
company_Honkong_Electric = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/hkelectric.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_heavy.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_SHAOZHOU }
	
	category = bureaucrat_owned
	
	possible_prestige_goods = {
		#prestige_good_saint_etienne_rifles
	}

	building_types = {  #23
		building_power_plant
	}
	
	extension_building_types = {
		building_furniture_manufactory
	}

	potential = {
		OR = {
			country_has_primary_culture = cu:han
			country_has_primary_culture = cu:yue
			country_has_primary_culture = cu:british
		}
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_SHAOZHOU
			}
		}
	}	
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_SHAOZHOU
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_power_plant
				level >= 3
			}
		}
	}
	
	prosperity_modifier = {
		building_power_plant_throughput_add = 0.08 #10
		building_urban_center_throughput_add = 0.06 #8
		building_university_throughput_add = 0.08 #4
	}		
	

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

	ai_construction_targets = {
		building_power_plant = {
			level = 3
			state_trigger = {
				state_region = s:STATE_SHAOZHOU
			}
		}
	}
	ai_weight = {
		value = 3 # Higher base value for flavored companies
	}
}

# The Commercial Press
company_Commercial_Press = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/thecommercialpress.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_light.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_SUZHOU }
	
	category = bureaucrat_owned
	
	possible_prestige_goods = {
		#prestige_good_saint_etienne_rifles
	}

	building_types = {  #28
		building_paper_mill
	}
	
	extension_building_types = {
		building_art_academy
		building_logging_camp
		building_dye_plantation
	}

	potential = {
		has_interest_marker_in_region = sr:region_south_china
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_SUZHOU
			}
		}
	}	
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_SUZHOU
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_paper_mill
				level >= 3
			}
		}
		has_technology_researched = chemical_bleaching
	}
	
	prosperity_modifier = {
	    interest_group_ig_devout_pol_str_mult = 0.12 #+6 
		country_tech_spread_mult = 0.06 #10
		country_weekly_innovation_max_add = 6 #12
		interest_group_ig_devout_approval_add = 3 #12
	}		
	

	ai_will_do = {
		has_technology_researched = chemical_bleaching
		any_scope_state = {
			state_region = s:STATE_SUZHOU
			is_incorporated = yes
		}
	}

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

# Ta Kung Pao / L'Impartial
company_Ta_Kung_Pao = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/Ta_Kung_Pao_logo.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_light.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_BEIJING }
	
	category = academic_owned
	
	possible_prestige_goods = {
		prestige_good_generic_newspaper
	}

	building_types = {  #26
		building_paper_mill
	}
	
	extension_building_types = {
		building_logging_camp
	}

	potential = {
		has_interest_marker_in_region = sr:region_north_china
		has_game_rule = newspapers_enabled
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_BEIJING
			}
		}
	}	
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_BEIJING
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_paper_mill
				level >= 3
			}
		}
		has_technology_researched = egalitarianism
	}
	
	prosperity_modifier = {
		interest_group_ig_intelligentsia_pol_str_mult = 0.08 #4 
		interest_group_ig_intelligentsia_approval_add = 3 #12
		country_weekly_innovation_max_add = 5 #10 
	}		
	

	ai_will_do = {
		has_technology_researched = egalitarianism
		any_scope_state = {
			state_region = s:STATE_BEIJING
			is_incorporated = yes
		}
	}

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

# Shen Bao
company_ShenBao = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/shen_bao.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_light.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_SUZHOU }
	
	category = bureaucrat_owned
	
	possible_prestige_goods = {
		prestige_good_generic_newspaper
	}
	
	building_types = {  #26
		building_paper_mill
	}
	
	extension_building_types = {
		building_opium_plantation
	}

	potential = {
		has_interest_marker_in_region = sr:region_south_china
		has_game_rule = newspapers_enabled
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_SUZHOU
			}
		}
	}	
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_BEIJING
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_paper_mill
				level >= 3
			}
		}
		has_technology_researched = egalitarianism
	}
	
	prosperity_modifier = {
		interest_group_in_government_approval_add = 1 #8
		interest_group_in_opposition_approval_add = 1 #8
		country_bureaucracy_mult = 0.08 #10
	}		
	

	ai_will_do = {
		has_technology_researched = egalitarianism
		any_scope_state = {
			state_region = s:STATE_SUZHOU
			is_incorporated = yes
		}
	}

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

# Zhonghua Book Company
company_Zhonghua = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/zhonghua.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_light.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_SUZHOU }
	
	category = shopkeeper_owned
	
	possible_prestige_goods = {
		prestige_good_generic_paper
	}

	building_types = {  #28
		building_paper_mill
	}
	
	extension_building_types = {
		building_furniture_manufactory
		building_logging_camp
	}

	potential = {
		has_interest_marker_in_region = sr:region_south_china
		
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_SUZHOU
			}
		}
	}	
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_BEIJING
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_paper_mill
				level >= 3
			}
		}
		has_technology_researched = investment_banks
	}
	
	prosperity_modifier = {
		country_society_tech_spread_mult = 0.10 #10
		country_bureaucracy_mult = 0.08 #10
		interest_group_ig_petty_bourgeoisie_approval_add = 2 #8
	}		
	

	ai_will_do = {
		has_technology_researched = investment_banks
		any_scope_state = {
			state_region = s:STATE_SUZHOU
			is_incorporated = yes
		}
	}

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

# Rong Bao Zhai
company_Rong_Bao_Zhai = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/rong_bao_zhai.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_light.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_BEIJING }
	
	category = aristocrat_owned
	
	possible_prestige_goods = {
		prestige_good_generic_paper
	}

	building_types = {  #24
		building_paper_mill
		building_art_academy
	}
	
	extension_building_types = {
		building_furniture_manufactory
	}

	potential = {
		has_interest_marker_in_region = sr:region_south_china
		
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_BEIJING
			}
		}
	}	
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_BEIJING
			is_incorporated = yes
			any_scope_building = {
			    OR = {
				   is_building_type = building_paper_mill
				   is_building_type = building_art_academy
				}
				level >= 3
			}
		}
	}
	
	prosperity_modifier = {
		state_loyalists_from_political_movements_mult = 0.11 #14
		state_lower_strata_expected_sol_add = -0.35
		state_middle_strata_expected_sol_add = -0.7
		state_upper_strata_expected_sol_add = -1.05
		building_chemical_plant_throughput_add = 0.1 #10
	}		
	
    ai_will_do = {
		any_scope_state = {
			state_region = s:STATE_BEIJING
			is_incorporated = yes
		}
	}

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

# Churin & Co.
company_Churin = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/churin.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_light.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_AMUR }
	
	category = shopkeeper_owned
	
	possible_prestige_goods = {
		prestige_good_generic_groceries
	}
	
	building_types = { #29
		building_food_industry
	}
	
	extension_building_types = {
		building_rye_farm
		building_wheat_farm
	}

	potential = {
		has_interest_marker_in_region = sr:region_northeast_asia
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_AMUR
			}
		}
	}		
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_AMUR
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_food_industry
				level >= 3
			}
		}
		has_technology_researched = vacuum_canning
	}
	
	prosperity_modifier = {
		state_assimilation_mult = 0.2 #10
		state_radicals_from_political_movements_mult = -0.15 #20
		state_lower_strata_expected_sol_add = -0.5
		state_middle_strata_expected_sol_add = -1
		state_upper_strata_expected_sol_add = -1.5	
	}	
	

	ai_will_do = {
		has_technology_researched = vacuum_canning
		any_scope_state = {
			state_region = s:STATE_AMUR
			is_incorporated = yes
		}
	}

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

# Lee Kum Kee
company_LeeKumKee = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/lkk.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_light.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_GUANGDONG }
	
	possible_prestige_goods = {
		prestige_good_generic_groceries
	}
	
	building_types = { #24
		building_food_industry
		building_fishing_wharf
	}
	
	extension_building_types = {
		building_rice_farm
	}

	potential = {
		has_interest_marker_in_region = sr:region_south_china
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_GUANGDONG
			}
		}
	}		
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_GUANGDONG
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_food_industry
				level >= 3
			}
		}
		has_technology_researched = baking_powder
	}
	
	prosperity_modifier = {
		state_birth_rate_mult = 0.05 #20
		state_trade_advantage_mult = 0.06 #4
	}	
	

	ai_will_do = {
		has_technology_researched = baking_powder
		any_scope_state = {
			state_region = s:STATE_GUANGDONG
			is_incorporated = yes
		}
	}

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

# AS Watson
company_ASWatson = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/aswatson.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_light.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_GUANGDONG }
	
	possible_prestige_goods = {
		prestige_good_generic_medicine
	}
	
	building_types = { #27
		building_chemical_plant
	}
	
	extension_building_types = {
		building_food_industry
		building_furniture_manufactory
	}

	potential = {
		has_interest_marker_in_region = sr:region_south_china
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_GUANGDONG
			}
		}
	}		
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_GUANGDONG
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_chemical_plant
				level >= 3
			}
		}
		has_technology_researched = medical_degrees
	}
	
	prosperity_modifier = {
		state_radicals_from_political_movements_mult = -0.11 #14
		state_lower_strata_expected_sol_add = -0.35
		state_middle_strata_expected_sol_add = -0.7
		state_upper_strata_expected_sol_add = -1.05
		state_mortality_wealth_mult = -0.003 #14
	}	
	

	ai_will_do = {
		has_technology_researched = medical_degrees
		any_scope_state = {
			state_region = s:STATE_GUANGDONG
			is_incorporated = yes
		}
	}

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

# Tsingtao Brewery
company_Tsingtao = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/tsingtao.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_farm_rice.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_SHANDONG }
	
	category = shopkeeper_owned
	
	possible_prestige_goods = {
		prestige_good_generic_beer
	}
	
	building_types = {  #27
		building_food_industry
		building_wheat_farm
	}
	
	extension_building_types = {
		building_rice_farm
	}

	potential = {
		OR = {
			has_interest_marker_in_region = sr:region_north_china
			has_interest_marker_in_region = sr:region_south_china
		}
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_SHANDONG
			}
		}
	}		
	
	possible = { 
		any_scope_state = {
			state_region = s:STATE_SHANDONG
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_food_industry
				level >= 3
			}
		}
		has_technology_researched = fractional_distillation
		NOT = { has_law_or_variant = law_type:law_closed_borders }
	}
	
	prosperity_modifier = {
		country_prestige_mult = 0.1 #10
		state_radicals_from_political_movements_mult = -0.14 #18
		state_lower_strata_expected_sol_add = -0.45
		state_middle_strata_expected_sol_add = -0.9
		state_upper_strata_expected_sol_add = -1.35
	}	
	

	ai_will_do = {
		NOT = { has_law_or_variant = law_type:law_isolationism }
		has_technology_researched = fractional_distillation
		any_scope_state = {
			state_region = s:STATE_SHANDONG
			is_incorporated = yes
		}
	}

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

# Tong Ren Tang
company_TongRenTang = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/tongrentang.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_farm_rice.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_BEIJING }
	
	category = aristocrat_owned
	
	possible_prestige_goods = {
		prestige_good_generic_medicine
	}

	building_types = { #27
		building_chemical_plant
	}
	
	extension_building_types = {
		building_wheat_farm
		building_food_industry
	}

	potential = {
		has_interest_marker_in_region = sr:region_north_china
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_BEIJING
			}
		}
	}		
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_BEIJING
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_chemical_plant
				level >= 3
			}
		}
	}
	
	prosperity_modifier = {
		state_mortality_wealth_mult = -0.003 #14
		interest_group_ig_landowners_approval_add = 3 #12
	}	
	

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

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

# Yanchang Petroleum
company_Yanchang = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/yanchang.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_heavy.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_SHANXI }
	

	possible_prestige_goods = {
		#prestige_good_saint_etienne_rifles
	}
	
	building_types = { #22
		building_oil_rig
	}
	
	extension_building_types = {
		building_chemical_plant
	}
	
	potential = {
		has_interest_marker_in_region = sr:region_north_china
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_SHANXI
			}
		}
	}		
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_SHANXI
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_oil_rig
				level >= 3
			}
		}
	}
	
	prosperity_modifier = {
		building_urban_center_throughput_add = 0.05 #6
		building_automotive_industry_throughput_add = 0.10 #8
		building_chemical_plant_throughput_add = 0.08 #8
	}	
	

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

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

#HongkongBank
company_Bank_HSBC = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/hsbc.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_light.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_SHAOZHOU }
	
	possible_prestige_goods = {
		#prestige_good_generic_currency_paper
	}
	
	building_types = {
		building_paper_mill
		building_opium_plantation
		building_trade_center
	}
	
	extension_building_types = {	
		building_steel_mill
		building_rice_farm
		building_logging_camp
		building_livestock_ranch
	}
	
	potential = {
		has_game_rule = banks_enabled
		has_interest_marker_in_region = sr:region_south_china
		OR = {
			country_has_primary_culture = cu:british
			AND = {
				NOT = { country_has_primary_culture = cu:british }
				any_scope_state = {
					state_region = s:STATE_SHAOZHOU
					is_split_state = no
				}
			}
		}
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_SHAOZHOU
			}
		}
	}	
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_SHAOZHOU
			any_scope_building = {
				is_building_type = building_financial_district
				level >= 15
			}
		}
		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.02 #<--
		state_shopkeepers_investment_pool_contribution_add = 0.02 #<--
		state_clergymen_investment_pool_contribution_add = 0.04
		state_aristocrats_investment_pool_contribution_add = 0.04
		state_capitalists_investment_pool_contribution_add = 0.065
		
		building_nationalization_investment_return_add = 0.05
		country_government_dividends_reinvestment_add = 0.05
		country_government_dividends_efficiency_add = 0.05
		
		country_max_companies_add = 1
	}
	
	ai_will_do = {
		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_SHAOZHOU
			is_incorporated = yes
		}
		unique_companies_has_bank = no
	}

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

# Tangshan Locomotive and Rolling Stock Works
company_Tangshan_LRSW = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/tangshan.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_heavy.dds"

	flavored_company = yes
	preferred_headquarters = { STATE_BEIJING }
	
	category = bureaucrat_owned
	
	possible_prestige_goods = {
		#prestige_good_saint_etienne_rifles
	}

    building_types = { #25
		building_railway
    }
	
	extension_building_types = {
		building_steel_mill
		building_motor_industry
	}
	
    potential = {
		has_interest_marker_in_region = sr:region_north_china
    }

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

    possible = { 
      any_scope_state = {
      state_region = s:STATE_BEIJING
      is_incorporated = yes
		any_scope_building = {
			is_building_type = building_railway
			level >= 3
          }
      }
      has_technology_researched = steel_railway_cars
    }

    prosperity_modifier = {
		state_infrastructure_mult = 0.1 #20
		state_trade_advantage_mult = 0.08 #5
    }

	ai_will_do = {
	    has_technology_researched = steel_railway_cars
		any_scope_state = {
			state_region = s:STATE_SHANXI
			is_incorporated = yes
		}
	}

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

#Imperial Bank of China
company_Bank_IBC = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/imperial_bank_of_china.png" 
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_light.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_SUZHOU }
	
	category = aristocrat_owned
	
	possible_prestige_goods = {
		#prestige_good_generic_currency_paper
	}
	
	building_types = {
		building_paper_mill
		building_gold_mine
		building_shipyard
	}
	
	extension_building_types = {
		building_silk_plantation
		building_textile_mill
		building_logging_camp
		building_tooling_workshop
	}
	
	potential = {
		has_game_rule = banks_enabled
		has_interest_marker_in_region = sr:region_south_china	
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_SUZHOU
			}
		}
	}	
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_SUZHOU
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_financial_district
				level >= 20
			}
		}
		has_technology_researched = investment_banks
		unique_companies_has_bank = no
	}
	
	prosperity_modifier = {
		state_education_access_wealth_add = 0.003 #the bank was based on the HongkongBank, many foreigners have been employed. The founder created many banks and universities
		state_pop_qualifications_mult = 0.05
	
		country_loan_interest_rate_mult = -0.025
        country_private_construction_allocation_mult = 0.1		
		
		state_farmers_investment_pool_contribution_add = 0.03 #<-- based on HongkongBank
		state_shopkeepers_investment_pool_contribution_add = 0.04 #<-- based on HongkongBank
		state_clergymen_investment_pool_contribution_add = 0.025 #<-- In the year 1901 73% of the loan portfolio of the IBC was advanced to foreign firms
		state_aristocrats_investment_pool_contribution_add = 0.025 #<-- ""
		state_capitalists_investment_pool_contribution_add = 0.075 #<-- ""
		
		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
	    has_technology_researched = investment_banks
		any_scope_state = {
			state_region = s:STATE_SUZHOU
			is_incorporated = yes
		}
	}

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

#Bank of Communications
company_Bank_BOCOM = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/bankcommunications.png" 
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_light.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_SUZHOU }
	
	category = bureaucrat_owned
	
	possible_prestige_goods = {
		#prestige_good_generic_currency_paper
	}
	
	building_types = {
		building_paper_mill
		building_railway
		building_motor_industry
	}
	
	extension_building_types = {		
		building_coal_mine
		building_electrics_industry
		building_power_plant
	}
	
	potential = {
		has_game_rule = banks_enabled
		has_interest_marker_in_region = sr:region_south_china	
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_SUZHOU
			}
		}
	}	
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_SUZHOU
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_financial_district
				level >= 20
			}
		}
		has_technology_researched = international_exchange_standards
		unique_companies_has_bank = no
	}
	
	prosperity_modifier = {
		building_railway_throughput_add = 0.05
		building_urban_center_throughput_add = 0.1
		
		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.05 #<--
		state_capitalists_investment_pool_contribution_add = 0.065
		
		building_nationalization_investment_return_add = 0.05
		country_government_dividends_reinvestment_add = 0.05
		country_government_dividends_efficiency_add = 0.05
		
		country_max_companies_add = 1
	}
	
	ai_will_do = {
	    unique_companies_has_bank = no
	    has_technology_researched = international_exchange_standards
		any_scope_state = {
			state_region = s:STATE_SUZHOU
			is_incorporated = yes
		}
	}

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

#Da-Qing Bank / Bank of China
company_Da_Qing_Bank = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/da_qingbank.png" 
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_light.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_BEIJING }
	
	category = aristocrat_owned
	
	possible_prestige_goods = {
		#prestige_good_generic_currency_paper
	}
	
	building_types = {
		building_paper_mill
		building_rice_farm
		building_livestock_ranch
	}
	
	extension_building_types = {	
		building_arms_industry
		building_railway
		building_munition_plant
		building_steel_mill		
	}
	
	potential = {
		has_game_rule = banks_enabled
		has_interest_marker_in_region = sr:region_north_china	
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_BEIJING
			}
		}
	}	
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_BEIJING
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_financial_district
				level >= 25
			}
		}
		has_technology_researched = international_exchange_standards
		unique_companies_has_bank = no
	}
	
	prosperity_modifier = {
		state_trade_advantage_mult = 0.1

		country_loan_interest_rate_mult = -0.025
        country_private_construction_allocation_mult = 0.1		
		
		state_farmers_investment_pool_contribution_add = 0.02 #<--
		state_shopkeepers_investment_pool_contribution_add = 0.02 #<--
		state_clergymen_investment_pool_contribution_add = 0.04
		state_aristocrats_investment_pool_contribution_add = 0.04
		state_capitalists_investment_pool_contribution_add = 0.065
		
		building_nationalization_investment_return_add = 0.075 #<--
		country_government_dividends_reinvestment_add = 0.075 #<--
		country_government_dividends_efficiency_add = 0.075 #<--
		
		country_max_companies_add = 1
	}
	
	ai_will_do = {
	    unique_companies_has_bank = no
	    has_technology_researched = international_exchange_standards
		any_scope_state = {
			state_region = s:STATE_BEIJING
			is_incorporated = yes
		}
	}

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

# Ma Yu Ching
company_Ma_Yu_Ching = {
	icon = "gfx/interface/icons/company_icons/basic_food.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_light.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_NANJING }
	
	category = shopkeeper_owned
	
	possible_prestige_goods = {
		prestige_good_generic_groceries
	}

	building_types = {  #25
		building_food_industry
		building_livestock_ranch
	}
	
	extension_building_types = {
		building_rice_farm
	}

	potential = {
		has_interest_marker_in_region = sr:region_south_china
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				OR = {
					state_region = s:STATE_NANJING
					state_region = s:STATE_HENAN
				}
			}
		}
	}	
	
	possible = { 
		any_scope_state = {
			OR = {
				state_region = s:STATE_NANJING
				state_region = s:STATE_HENAN
			}
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_food_industry
				level >= 3
			}
		}
	}
	
	prosperity_modifier = {
		state_loyalists_from_political_movements_mult = 0.06 #8
		state_lower_strata_expected_sol_add = -0.2
		state_middle_strata_expected_sol_add = -0.4
		state_upper_strata_expected_sol_add = -0.6
		interest_group_ig_rural_folk_pop_attraction_mult = 0.10 #+5
		interest_group_ig_rural_folk_approval_add = 3 #12
		country_prestige_mult = 0.1 #10
	}	
	

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

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

#Rui Fu Xiang
company_Rui_Fu_Xiang = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/ruifu.png" 
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_light.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_NANJING }
	
	category = shopkeeper_owned
	
	possible_prestige_goods = {
		prestige_good_suzhou_silk
	}
	
	building_types = {  #20
		building_cotton_plantation
		building_textile_mill
	}
	
	extension_building_types = {
		building_silk_plantation
		building_tea_plantation
	}

	potential = {
		OR = {
			has_interest_marker_in_region = sr:region_north_china
			has_interest_marker_in_region = sr:region_south_china
		}
	}
		
	
	possible = {
		any_scope_state = {
			OR = {
				region = sr:region_north_china
				region = sr:region_south_china
			}
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_cotton_plantation
				level >= 3
			}
			count >=3
		}
	}
	
	prosperity_modifier = {
		building_group_bg_plantations_throughput_add = 0.05 #18
		country_prestige_mult = 0.02 #2
	}	
	

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

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

# Anheuser-BuschInBev Brewery Co. Ltd.
company_Harbin_Brewery = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/harbinbeer.png" 
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_farm_wheat.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_NORTHERN_MANCHURIA }
	
	category = shopkeeper_owned
	
	possible_prestige_goods = {
		prestige_good_generic_beer
	}
	
	building_types = {  #33
		building_food_industry
		building_wheat_farm
	}
	
	extension_building_types = {
		building_rye_farm
		building_rice_farm
	}
	
	potential = {
		has_interest_marker_in_region = sr:region_northeast_asia
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_NORTHERN_MANCHURIA
			}		
		}
	}		
	
	possible = { 
		any_scope_state = {
			state_region = s:STATE_NORTHERN_MANCHURIA
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_food_industry
				level >= 3
			}
		}
		NOR = {
			has_law_or_variant = law_type:law_isolationism
			has_law_or_variant = law_type:law_closed_borders
		}
		has_technology_researched = vacuum_canning
		has_technology_researched = steel_railway_cars
	}
	
	prosperity_modifier = {
		state_assimilation_mult = 0.2 #10
		building_railway_throughput_add = 0.11 #14
		interest_group_ig_petty_bourgeoisie_approval_add = 2 #8
	}


	ai_will_do = {
		NOR = {
			has_law_or_variant = law_type:law_isolationism
			has_law_or_variant = law_type:law_closed_borders
		}
		has_technology_researched = vacuum_canning
		has_technology_researched = steel_railway_cars
		any_scope_state = {
			state_region = s:STATE_NORTHERN_MANCHURIA
			is_incorporated = yes
		}
	}

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

#Thirteen Factories / Canton Factories
company_canton_factories = {
	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_SHAOZHOU STATE_GUANGDONG }
	
	category = bureaucrat_owned
	
	possible_prestige_goods = {
		prestige_good_canton_porcelain
		prestige_good_china_tea
		prestige_good_suzhou_silk
	}
	
	building_types = {  #20
		building_trade_center
		building_port
	}
	
	extension_building_types = {
		building_silk_plantation
		building_tea_plantation
		building_glassworks
	}

	potential = {
		has_interest_marker_in_region = sr:region_south_china
	}
		
	
	possible = {
		any_scope_state = {
			OR = {
				state_region = s:STATE_SHAOZHOU
				state_region = s:STATE_GUANGDONG
			}
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_port
				level >= 4
			}
		}
	}
	
	prosperity_modifier = {
		state_trade_advantage_mult = 0.15 #10
		building_port_throughput_add = 0.1 #10
	}	
	

	ai_will_do = {
		any_scope_state = {
			OR = {
				state_region = s:STATE_SHAOZHOU
				state_region = s:STATE_GUANGDONG
			}
			is_incorporated = yes
		}
	}

	ai_construction_targets = {
		building_port = {
			level = 4
			state_trigger = {
				OR = {
					state_region = s:STATE_SHAOZHOU
					state_region = s:STATE_GUANGDONG
				}
			}
		}
	}
	ai_weight = {
		value = 3 # Higher base value for flavored companies
	}
}