﻿# Fundidora de Fierro y Acero de Monterrey, S.A.
company_mex_fundidora_monterrey = {
    icon = "gfx/interface/icons/company_icons/historical_company_icons/fundidora_monterrey.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_heavy.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_RIO_GRANDE }

	building_types = {
		building_steel_mill
		building_coal_mine
	}

	extension_building_types = {
		building_iron_mine
	}

	possible_prestige_goods = {
		prestige_good_generic_steel
	}

	potential = {
		has_interest_marker_in_region = region_mexico
	}

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

	possible = {
		any_scope_state = {
			state_region = s:STATE_RIO_GRANDE
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_steel_mill
				level >= 5
			}
		}
		has_technology_researched = bessemer_process
	}

	prosperity_modifier = {
        building_motor_industry_throughput_add = 0.1
		state_construction_mult = 0.05
        building_iron_mine_throughput_add = 0.15
    }

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

	ai_construction_targets = {
		building_steel_mill = {
			level = 5
			state_trigger = {
				state_region = s:STATE_RIO_GRANDE
			}
		}
	}

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

company_mex_rio_blanco = {
    icon = "gfx/interface/icons/company_icons/historical_company_icons/rio_blanco.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_light.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_VERACRUZ }

	building_types = {
		building_textile_mill
		building_cotton_plantation
		building_dye_plantation
	}

	extension_building_types = {
		building_rubber_plantation
	}

	possible_prestige_goods = {
		prestige_good_ropa_charro
	}

	potential = {
		has_interest_marker_in_region = region_mexico
	}

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

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

	prosperity_modifier = {
        building_textile_mill_throughput_add = 0.15
		building_cotton_plantation_throughput_add = 0.2
		state_assimilation_mult = 0.2
	}

	ai_will_do = {
		has_technology_researched = cotton_gin
		any_scope_state = {
			state_region = s:STATE_VERACRUZ
			is_incorporated = yes
		}
	}

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

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

}

company_mex_real_del_monte = {
    icon = "gfx/interface/icons/company_icons/historical_company_icons/real_monte.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_mining.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_BAJIO }

	building_types = {
		building_gold_mine
		building_explosives_factory
	}

	extension_building_types = {
		building_lead_mine
	}

	possible_prestige_goods = {
		prestige_good_generic_explosives
	}

	potential = {
		OR = {
			c:MEX ?= this
		}
	}

	attainable = {
	}

	possible = {
		any_scope_state = {
			OR = {
				region = sr:region_mexico
				region = sr:region_pacific_coast
			}
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_gold_mine
				level >= 5
			}
			count >= 1
		}
	}

	prosperity_modifier = {
		country_minting_mult = 0.1
        country_prestige_mult = 0.1
		building_explosives_factory_throughput_add = 0.15
    }

    ai_will_do = {
		any_scope_state = {
			region = sr:region_mexico
		}
	}

	ai_construction_targets = {
		building_gold_mine = {
			level = 5
			state_trigger = {
				region = sr:region_mexico
			}
		}
	}

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

}

company_mex_ferrocarriles_nacionales = {
    icon = "gfx/interface/icons/company_icons/historical_company_icons/fnm.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_railways.dds"

	flavored_company = yes

	building_types = {
		building_railway
	}

	extension_building_types = {
		building_motor_industry
	}

	potential = {
		OR = {
			c:MEX ?= this
		}
	}

	possible = {
		has_technology_researched = railways
		any_scope_state = {
			OR = {
				region = sr:region_mexico
				region = sr:region_pacific_coast
			}
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_railway
				level >= 5
			}
			count >= 3
		}
	}

	prosperity_modifier = {
        state_infrastructure_mult = 0.15
        building_railway_throughput_add = 0.2
		interest_group_ig_industrialists_pol_str_mult = 0.15
		country_max_companies_add = 1
    }

    ai_will_do = {
		has_technology_researched = railways
		any_scope_state = {
			OR = {
				region = sr:region_mexico
				region = sr:region_pacific_coast
			}
			is_incorporated = yes
		}
	}

	ai_construction_targets = {
		building_railway = {
			level = 5
			state_trigger = {
				OR = {
					region = sr:region_mexico
				    region = sr:region_pacific_coast
				}
				is_incorporated = yes
			}
		}
	}

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

}

company_mex_la_cubana = {
    icon = "gfx/interface/icons/company_icons/historical_company_icons/cubana.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_farm_wheat.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_MEXICO }

	building_types = {
		building_food_industry
		building_sugar_plantation
		building_livestock_ranch
	}

	extension_building_types = {
		building_maize_farm
	}

	possible_prestige_goods = {
		prestige_good_mexican_chocolate
	}

    potential = {
		has_interest_marker_in_region = region_mexico
	}

    attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_MEXICO
			}
		}
	}
    
	possible = {
		any_scope_state = {
            state_region = s:STATE_MEXICO
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_food_industry
				level >= 5
			}
		}
	}

	prosperity_modifier = {
        state_radicals_from_political_movements_mult = -0.1
		state_standard_of_living_add = 1
        building_sugar_plantation_throughput_add = 0.2

    }

    ai_will_do = {
		has_technology_researched = corporate_charters
		any_scope_state = {
			region = s:STATE_MEXICO
			is_incorporated = yes
		}
	}

	ai_construction_targets = {
		building_food_industry = {
			level = 5
			state_trigger = {
				region = s:STATE_MEXICO
				is_incorporated = yes
			}
		}
	}

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

company_mex_fincas_cafeteras_chiapas = {
    icon = "gfx/interface/icons/company_icons/historical_company_icons/fincas_ch.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_plantation.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_CHIAPAS }

	building_types = {
		building_coffee_plantation
		building_chemical_plant
	}

	extension_building_types = {
		building_port
		building_food_industry
	}

	possible_prestige_goods = {
		prestige_good_chiapaneco_coffee
	}

	potential = {
		has_interest_marker_in_region = region_mexico
	}

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

	possible = {
		any_scope_state = {
			state_region = s:STATE_CHIAPAS
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_coffee_plantation
				level >= 5
			}
		}
	}

	prosperity_modifier = {
        building_coffee_plantation_throughput_add = 0.25
        state_trade_advantage_mult = 0.15
		state_migration_pull_mult = 0.15
    }
}

company_fabrica_nacional = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/fna.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_light.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_MEXICO }

	building_types = {
		building_arms_industry
		building_munition_plant
		building_tooling_workshop
	}

	extension_building_types = {
		building_artillery_foundry
	}

	possible_prestige_goods = {
		prestige_good_mondragon
	}

	potential = {
		has_interest_marker_in_region = region_mexico
	}

	attainable = {
	}

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

	prosperity_modifier = {
		country_military_goods_cost_mult = -0.1
		unit_kill_rate_add = 0.05
		unit_army_offense_mult = 0.05
		country_max_companies_add = 1
	}

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

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

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

company_mex_cuervo = {
    icon = "gfx/interface/icons/company_icons/historical_company_icons/cuervo.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_farm_wheat.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_JALISCO }

	building_types = {
		building_food_industry
		building_glassworks
		building_vineyard
	}

	extension_building_types = {
		building_maize_farm
		building_wheat_farm
	}

	possible_prestige_goods = {
		prestige_good_tequila
	}

    potential = {
		has_interest_marker_in_region = region_mexico
	}

    attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_JALISCO
			}
		}
	}
    
	possible = {
		any_scope_state = {
            state_region = s:STATE_JALISCO
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_food_industry
				level >= 5
			}
		}
	}

	prosperity_modifier = {
		state_migration_pull_mult = 0.3
        building_food_industry_throughput_add = 0.15
    }

    ai_will_do = {
		has_technology_researched = corporate_charters
		any_scope_state = {
			region = s:STATE_JALISCO
			is_incorporated = yes
		}
	}

	ai_construction_targets = {
		building_food_industry = {
			level = 5
			state_trigger = {
				region = s:STATE_JALISCO
				is_incorporated = yes
			}
		}
	}

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

company_mex_papel_rafael = {
    icon = "gfx/interface/icons/company_icons/historical_company_icons/papel_rafael.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_light.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_MEXICO }

	building_types = {
		building_paper_mill
		building_logging_camp
	}

	extension_building_types = {
		building_sulfur_mine
	}

	possible_prestige_goods = {
		prestige_good_generic_paper
	}

    potential = {
		has_interest_marker_in_region = region_mexico
	}

    attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_MEXICO
			}
		}
	}
    
	possible = {
		any_scope_state = {
            state_region = s:STATE_MEXICO
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_paper_mill
				level >= 5
			}
		}
	}

	prosperity_modifier = {
		building_group_bg_government_throughput_add = 0.2
		building_group_bg_logging_throughput_add = 0.15
    }

    ai_will_do = {
		any_scope_state = {
			region = s:STATE_MEXICO
			is_incorporated = yes
		}
	}

	ai_construction_targets = {
		building_paper_mill = {
			level = 5
			state_trigger = {
				region = s:STATE_MEXICO
				is_incorporated = yes
			}
		}
	}

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

company_mex_cm_transatlantica = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/cmt.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_harbor_shipbuilding.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_VERACRUZ }

	building_types = {
		building_port
		building_shipyard
	}

	extension_building_types = {
		building_military_shipyard
		building_coal_mine
	}

	possible_prestige_goods = {
		prestige_good_generic_merchant_marine
	}

	potential = {
		has_interest_marker_in_region = region_mexico
	}

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

	possible = {
		any_scope_state = {
			state_region = s:STATE_VERACRUZ
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_port
				level >= 5
			}
		}
	}

	prosperity_modifier = {
		country_convoys_capacity_mult = 0.2
		state_trade_capacity_mult = 0.15
		building_shipyard_throughput_add = 0.2
		state_trade_advantage_mult = 0.25
	}

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

	ai_construction_targets = {
		building_port = {
			level = 5
			state_trigger = {
				state_region = s:STATE_VERACRUZ
			}
		}
	}

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

company_mex_cm_luz = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/lf.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_heavy.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_MEXICO }

	building_types = {
		building_power_plant
		building_electrics_industry
	}

	extension_building_types = {
		building_motor_industry
		building_coal_mine
	}

	possible_prestige_goods = {
		prestige_good_luxury_telephones
	}

	potential = {
		has_interest_marker_in_region = region_mexico
	}

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

	possible = {
		any_scope_state = {
			state_region = s:STATE_MEXICO
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_power_plant
				level >= 5
			}
		}
	}

	prosperity_modifier = {
		building_power_plant_throughput_add = 0.15
		building_electrics_industry_throughput_add = 0.15
		state_construction_mult = 0.05
	}

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

	ai_construction_targets = {
		building_power_plant = {
			level = 5
			state_trigger = {
				state_region = s:STATE_MEXICO
			}
		}
	}

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

company_mex_garaje_fernandez = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/somellera.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_heavy.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_JALISCO }

	building_types = {
		building_oil_rig
		building_automotive_industry
	}

	extension_building_types = {
		building_motor_industry
		building_rubber_plantation
	}

	possible_prestige_goods = {
		prestige_good_luxury_automobiles
	}

	potential = {
		has_interest_marker_in_region = region_mexico
	}

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

	possible = {
		any_scope_state = {
			state_region = s:STATE_JALISCO
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_automotive_industry
				level >= 5
			}
		}
	}

	prosperity_modifier = {
		building_motor_industry_throughput_add = 0.1
		building_automotive_industry_throughput_add = 0.2
	}

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

	ai_construction_targets = {
		building_automotive_industry = {
			level = 5
			state_trigger = {
				state_region = s:STATE_JALISCO
			}
		}
	}

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

# Compañía Mexicana de Petróleo El Águila SA
company_el_aguila = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/el_aguila.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_oil_drills.dds"

	flavored_company = yes

	building_types = {
		building_oil_rig
	}

	extension_building_types = {
		building_power_plant
	}

	potential = {
		has_interest_marker_in_region = region_mexico
	}

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

	possible = {
		has_technology_researched = pumpjacks
		any_scope_state = {
			region = sr:region_mexico
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_oil_rig
				level >= 5
			}
			is_coastal = yes
		}
	}

	prosperity_modifier = {
		country_convoys_capacity_mult = 0.15
		interest_group_ig_industrialists_approval_add = 3
		building_group_bg_oil_extraction_throughput_add = 0.3
	}

	ai_will_do = {
		has_technology_researched = pumpjacks
		any_scope_state = {
			region = sr:region_mexico
			is_incorporated = yes
			is_coastal = yes
			has_potential_resource = building_oil_rig
		}
	}

	ai_construction_targets = {
		building_oil_rig = {
			level = 5
			state_trigger = {
				region = sr:region_mexico
				is_incorporated = yes
				is_coastal = yes
			}
		}
	}

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

# Compañía de Salitres y Ferrocarril de Antofagasta
company_csfa = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/bolivia_csfa.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_railways.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_ANTOFAGASTA }

	building_types = {
		building_sulfur_mine
		building_railway
	}

	extension_building_types = {
		building_iron_mine
	}

	potential = {
		has_interest_marker_in_region = region_andes
	}

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

	possible = {
		has_technology_researched = railways
		any_scope_state = {
			state_region = s:STATE_ANTOFAGASTA
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_sulfur_mine
				level >= 5
			}
		}
	}

	prosperity_modifier = {
		state_infrastructure_mult = 0.05
		interest_group_ig_industrialists_approval_add = 3
	}

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

	ai_construction_targets = {
		building_sulfur_mine = {
			level = 5
			state_trigger = {
				state_region = s:STATE_ANTOFAGASTA
			}
		}
	}

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

# Caribbean Petroleum Company
company_caribbean_petroleum = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/venezuela_caribbean_petroleum_company.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_oil_drills.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_ZULIA STATE_MIRANDA }

	building_types = {
		building_oil_rig
	}

	extension_building_types = {
		building_power_plant
	}

	potential = {
		has_interest_marker_in_region = region_gran_colombia
	}

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

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

	prosperity_modifier = {
		country_convoys_capacity_mult = 0.1
		interest_group_ig_industrialists_approval_add = 3
	}

	ai_will_do = {
		has_technology_researched = pumpjacks
		any_scope_state = {
			OR = {
				state_region = s:STATE_ZULIA
				state_region = s:STATE_MIRANDA
			}
			is_incorporated = yes
		}
	}

	ai_construction_targets = {
		building_oil_rig = {
			level = 5
			state_trigger = {
				OR = {
					state_region = s:STATE_ZULIA
					state_region = s:STATE_MIRANDA
				}
			}
		}
	}

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

# Bunge & Born
company_bunge_born = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/argentina_bunge_y_born.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_farm_wheat.dds"

	flavored_company = yes

	building_types = {
		building_wheat_farm
		building_maize_farm
		building_food_industry
	}

	extension_building_types = {
		building_chemical_plant
	}

	possible_prestige_goods = {
		prestige_good_generic_groceries
	}

	prestige_goods_trigger = {
		custom_tooltip = {
			text = je_prestige_goods_groceries_complete_tt
			has_variable = prestige_good_generic_groceries_var
		}
	}

	potential = {
		has_interest_marker_in_region = region_la_plata
	}

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

	possible = {
		any_scope_state = {
			region = sr:region_la_plata
			is_incorporated = yes
			any_scope_building = {
				OR = {
					is_building_type = building_wheat_farm
					is_building_type = building_maize_farm
				}
				level >= 5
			}
			count >= 3
		}
	}

	prosperity_modifier = {
		interest_group_ig_rural_folk_pop_attraction_mult = 0.2
		building_tooling_workshop_throughput_add = 0.1
	}

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

	ai_construction_targets = {
		building_wheat_farm = {
			level = 5
			state_trigger = {
				region = sr:region_la_plata
				is_incorporated = yes
			}
		}
		building_maize_farm = {
			level = 5
			state_trigger = {
				region = sr:region_la_plata
				is_incorporated = yes
			}
		}
	}

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

# La Rosada
company_la_rosada = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/paraguay_la_rosada.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_heavy.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_BAJO_PARAGUAY }

	building_types = {
		building_steel_mill
		building_arms_industry
		building_artillery_foundry
	}

	extension_building_types = {
		building_iron_mine
	}

	possible_prestige_goods = {
		prestige_good_generic_steel
	}

	prestige_goods_trigger = {
		custom_tooltip = {
			text = je_prestige_goods_steel_complete_tt
			has_variable = prestige_good_generic_steel_var
		}
	}

	potential = {
		has_interest_marker_in_region = region_la_plata
	}

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

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

	prosperity_modifier = {
		unit_defense_mult = 0.05
		building_iron_mine_throughput_add = 0.1
	}

	ai_will_do = {
		has_technology_researched = shell_gun
		any_scope_state = {
			state_region = s:STATE_BAJO_PARAGUAY
			is_incorporated = yes
		}
	}

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

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

# Fábrica de Armas de la Nación
company_famae = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/chile_fabrica_de_armas_de_la_nacion.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_heavy.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_SANTIAGO }

	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 = region_la_plata
	}

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

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

	prosperity_modifier = {
		unit_offense_mult = 0.1
		building_steel_mill_throughput_add = 0.05
	}

	ai_will_do = {
		has_technology_researched = gunsmithing
		any_scope_state = {
			state_region = s:STATE_SANTIAGO
			is_incorporated = yes
		}
	}

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

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

# Peruvian Amazon Company
company_peruvian_amazon = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/peru_peruvian_amazon_company.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_plantation.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_PASTAZA }

	building_types = {
		building_rubber_plantation
	}

	extension_building_types = {
		building_logging_camp
	}

	potential = {
		has_interest_marker_in_region = region_andes
	}

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

	possible = {
		has_technology_researched = rubber_mastication
		any_scope_state = {
			state_region = s:STATE_PASTAZA
			any_scope_building = {
				is_building_type = building_rubber_plantation
				level >= 5
			}
		}
	}

	prosperity_modifier = {
		state_loyalists_from_political_movements_mult = 0.1
		building_group_bg_rubber_mortality_mult = 0.1
	}

	ai_will_do = {
		has_technology_researched = rubber_mastication
		any_scope_state = {
			state_region = s:STATE_PASTAZA
			is_incorporated = yes
		}
	}

	ai_construction_targets = {
		building_rubber_plantation = {
			level = 5
			state_trigger = {
				state_region = s:STATE_PASTAZA
			}
		}
	}

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

# Kablin Irmãos & Cia.
company_kablin = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/brazil_kablin_irmaos_and_cia.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_plantation.dds"

	flavored_company = yes

	building_types = {
		building_paper_mill
		building_logging_camp
	}

	extension_building_types = {
		building_sulfur_mine
	}

	possible_prestige_goods = {
		prestige_good_rosewood
	}

	potential = {
		has_interest_marker_in_region = region_brazil
	}

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

	possible = {
		has_technology_researched = mechanical_tools
		any_scope_state = {
			region = sr:region_brazil
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_paper_mill
				level >= 5
			}
		}
	}

	prosperity_modifier = {
		building_tooling_workshop_throughput_add = 0.1
		state_infrastructure_from_population_max_add = 15
	}

	ai_will_do = {
		has_technology_researched = mechanical_tools
		any_scope_state = {
			region = sr:region_brazil
			is_incorporated = yes
		}
	}

	ai_construction_targets = {
		building_paper_mill = {
			level = 5
			state_trigger = {
				region = sr:region_brazil
				is_incorporated = yes
			}
		}
	}

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

# Hudson Bay Company
company_hbc = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/hbc.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_light.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_MANITOBA }

	building_types = {
		building_fishing_wharf
		building_logging_camp
	}

	extension_building_types = {
		building_port
		building_food_industry
	}

	possible_prestige_goods = {
		prestige_good_generic_fish
	}

	prestige_goods_trigger = {
		custom_tooltip = {
			text = je_prestige_goods_fish_complete_tt
			has_variable = prestige_good_generic_fish_var
		}
	}

	potential = {
		has_interest_marker_in_region = region_canada
	}

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

	possible = {
		any_scope_state = {
			state_region = s:STATE_MANITOBA
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_food_industry
				level >= 5
			}
		}
	}

	prosperity_modifier = {
		state_colony_growth_creation_factor = 0.1
		building_textile_mill_throughput_add = 0.05
	}

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

	ai_construction_targets = {
		building_food_industry = {
			level = 5
			state_trigger = {
				state_region = s:STATE_MANITOBA
			}
		}
	}

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

# Panama Canal Company
company_panama_company = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/panama_company.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_harbor_shipbuilding.dds"

	category = bureaucrat_owned

	flavored_company = yes

	preferred_headquarters = { STATE_PANAMA }

	building_types = {
		building_trade_center
		building_port
	}

	extension_building_types = {
		building_shipyard
	}

	possible_prestige_goods = {
		prestige_good_generic_merchant_marine
	}

	prestige_goods_trigger = {
		custom_tooltip = {
			text = je_prestige_goods_merchant_marine_complete_tt
			has_variable = prestige_good_generic_merchant_marine_var
		}
	}

	potential = {
		has_interest_marker_in_region = region_central_america
	}

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

	possible = {
		any_scope_state = {
			state_region = s:STATE_PANAMA
			any_scope_building = {
				is_building_type = building_panama_canal
				occupancy >= 0.5
			}
		}
		any_scope_state = {
			any_scope_building = {
				OR = {
					is_building_type = building_trade_center
					is_building_type = building_port
				}
				level >= 5
			}
		}
	}

	ai_will_do = {
		any_scope_state = {
			state_region = s:STATE_PANAMA
			any_scope_building = {
				is_building_type = building_panama_canal
			}
		}
	}

	ai_construction_targets = {
		building_trade_center = {
			level = 5
			state_trigger = {
				state_region = s:STATE_PANAMA
			}
		}
		building_port = {
			level = 5
			state_trigger = {
				state_region = s:STATE_PANAMA
			}
		}
	}

	prosperity_modifier = {
		state_trade_advantage_mult = 0.25
		country_tax_income_add = 50000
		country_free_charters_add = 1
	}

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