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

# Ursus
TRY_REPLACE:company_ursus = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/polish_ursus.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_heavy.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_GREATER_POLAND }

	building_types = { #28
		building_motor_industry
	}

	extension_building_types = {
		building_automotive_industry
		building_steel_mill
	}

	potential = {
		has_interest_marker_in_region = sr:region_eastern_europe
	}

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

	possible = {
		has_technology_researched = combustion_engine
		any_scope_state = {
			state_region = s:STATE_GREATER_POLAND
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_motor_industry
				level >= 5
			}
		}
	}

	prosperity_modifier = {
		building_rye_farm_throughput_add = 0.2 #16
		interest_group_ig_rural_folk_approval_add = 3 #12
	}

	ai_will_do = {
		has_technology_researched = combustion_engine
		any_scope_state = {
			state_region = s:STATE_GREATER_POLAND
			is_incorporated = yes
		}
	}

	ai_construction_targets = {
		building_motor_industry = {
			level = 5
			state_trigger = {
				state_region = s:STATE_GREATER_POLAND
			}
		}
	}

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

# Lilpop, Rau i Loewenstein
TRY_REPLACE:company_lilpop = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/polish_lilpop.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_heavy.dds"

	flavored_company = yes

	preferred_headquarters = { STATE_MAZOVIA STATE_GREATER_POLAND }

	building_types = {
		building_steel_mill
		building_iron_mine
		building_tooling_workshop
	}

	extension_building_types = {
		building_motor_industry
	}

	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 = sr:region_eastern_europe
	}

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

	possible = {
		has_technology_researched = steelworking
		any_scope_state = {
			OR = {
				state_region = s:STATE_MAZOVIA
				state_region = s:STATE_GREATER_POLAND
			}
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_steel_mill
				level >= 5
			}
		}
	}

	prosperity_modifier = {
		building_motor_industry_throughput_add = 0.1
	}

	ai_will_do = {
		has_technology_researched = steelworking
		any_scope_state = {
			OR = {
				state_region = s:STATE_MAZOVIA
				state_region = s:STATE_GREATER_POLAND
			}
			is_incorporated = yes
		}
	}

	ai_construction_targets = {
		building_steel_mill = {
			level = 5
			state_trigger = {
				OR = {
					state_region = s:STATE_MAZOVIA
					state_region = s:STATE_GREATER_POLAND
				}
				is_incorporated = yes
			}
		}
	}

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

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

# Pudliszki
company_Pudliszki = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/pudliszki.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_farm_wheat.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_GREATER_POLAND }
	

	possible_prestige_goods = {
		prestige_good_generic_groceries
	}

	
	building_types = { #27
		building_food_industry
	}
	
	extension_building_types = {
		building_livestock_ranch
	}
	
	potential = {
		has_interest_marker_in_region = sr:region_eastern_europe
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_GREATER_POLAND
			}
		}
	}
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_GREATER_POLAND
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_food_industry
				level >= 3
			}
		}
		has_technology_researched = canneries
	}
	
	prosperity_modifier = {
		state_birth_rate_mult = 0.05 #20
		state_pop_qualifications_mult = 0.05 #6
	}	
	

	ai_will_do = {
		has_technology_researched = canneries
		any_scope_state = {
			state_region = s:STATE_GREATER_POLAND
			is_incorporated = yes
		}
	}

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

# K. Rudzki i S-ka
company_KRudzki = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/rudzki.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_heavy.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_GREATER_POLAND }


	possible_prestige_goods = {
		prestige_good_generic_machine_parts
	}

	
	building_types = { #18
		building_iron_mine
		building_steel_mill
	}
	
	extension_building_types = {
		building_coal_mine
		building_tooling_workshop
	}
	
	potential = {
		has_interest_marker_in_region = sr:region_eastern_europe
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_GREATER_POLAND
			}
		}
	}
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_GREATER_POLAND
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_steel_mill
				level >= 3
			}
		}
		has_technology_researched = steel_frame_buildings
	}
	
	prosperity_modifier = {
		building_construction_sector_throughput_add = 0.06 #8
		state_infrastructure_from_population_max_add = 15 #10
	}	
	

	ai_will_do = {
		has_technology_researched = steel_frame_buildings
		any_scope_state = {
			state_region = s:STATE_GREATER_POLAND
			is_incorporated = yes
		}
	}

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

# Cegielski – Poznań S.A.
company_Cegielski = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/cegielski.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_heavy.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_POSEN }

	possible_prestige_goods = {
		prestige_good_generic_tools
	}

	
	building_types = { #16
		building_tooling_workshop
		building_motor_industry
	}
	
	extension_building_types = {
		building_automotive_industry
		building_steel_mill
	}
	
	potential = {
		has_interest_marker_in_region = sr:region_eastern_europe
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_POSEN
			}
		}
	}
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_POSEN
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_tooling_workshop
				level >= 3
			}
		}
	}
	
	prosperity_modifier = {
		building_rye_farm_throughput_add = 0.20 #16
	}	
	

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

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

# ArcelorMittal Poland S.A. Oddział w Świętochłowicach / Huta Florian 
company_Arcelor = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/hutaflorian.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_heavy.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_UPPER_SILESIA }

	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
		}
	}
	
	building_types = { #14
		building_iron_mine
		building_steel_mill
	}
	
	extension_building_types = {
		building_coal_mine
		building_tooling_workshop
	}
	
	potential = {
		has_interest_marker_in_region = sr:region_eastern_europe
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_UPPER_SILESIA
			}
		}
	}
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_UPPER_SILESIA
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_iron_mine
				level >= 3
			}
		}
	}
	
	prosperity_modifier = {
		building_steel_mill_throughput_add = 0.09 #14
	}	
	

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

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

# Okręgowa Spółdzielnia Mleczarska
company_OSM = {
	icon = "gfx/interface/icons/company_icons/company_basic_agriculture_1.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_farm_wheat.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_MAZOVIA }

	possible_prestige_goods = {
		prestige_good_generic_meat
	}

	
	building_types = { #28
		building_rye_farm
		building_livestock_ranch
	}
	
	extension_building_types = {
		building_wheat_farm
		building_food_industry
	}
	
	potential = {
		has_interest_marker_in_region = sr:region_eastern_europe
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_MAZOVIA
			}
		}
	}
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_MAZOVIA
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_livestock_ranch
				level >= 3
			}
		}
		has_technology_researched = socialism
	}
	
	prosperity_modifier = {
		state_farmers_investment_pool_contribution_add = 0.05 #10
		interest_group_ig_trade_unions_approval_add = 2 #8
		interest_group_ig_trade_unions_pop_attraction_mult = 0.15 #10
	}	
	

	ai_will_do = {
		has_technology_researched = socialism
		any_scope_state = {
			state_region = s:STATE_MAZOVIA
			is_incorporated = yes
		}
	}

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

# Fabryka Broni „Łucznik” – Radom
company_FBLR = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/logo_fabryka_broni.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_heavy.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_GREATER_POLAND }

	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
		}
	}
	
	building_types = { #28
		building_arms_industry
		building_munition_plant
	}
	
	extension_building_types = {
		building_artillery_foundry
		building_steel_mill
	}
	
	potential = {
		has_interest_marker_in_region = sr:region_eastern_europe
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_GREATER_POLAND
			}
		}
	}	
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_GREATER_POLAND
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_arms_industry
				level >= 3
			}
		}
		has_technology_researched = bolt_action_rifles
	}
	
	prosperity_modifier = {
		unit_army_defense_mult = 0.08 #16
		unit_recovery_rate_add = 0.06 #12

	}	
	

	ai_will_do = {
		has_technology_researched = bolt_action_rifles
		any_scope_state = {
			state_region = s:STATE_GREATER_POLAND
			is_incorporated = yes
		}
	}

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

# Haberbusch i Schiele
company_Haberbusch = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/haberbusch.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_farm_wheat.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_GREATER_POLAND }

	possible_prestige_goods = {
		prestige_good_generic_beer
	}

	
	building_types = { #27 
		building_food_industry
	}
	
	extension_building_types = {
		building_livestock_ranch
	}
	
	potential = {
		has_interest_marker_in_region = sr:region_eastern_europe	
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_GREATER_POLAND
			}
		}
	}	
	
	possible = {
		any_scope_state = {
				state_region = s:STATE_GREATER_POLAND
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_food_industry
				level >= 3
			}
		}
	}
	
	prosperity_modifier = {
		state_assimilation_mult = 0.20 #10
		interest_group_ig_petty_bourgeoisie_approval_add = 2 #8
        state_radicals_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
	}	
	

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

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

# Bydgoszcz Rolling Stock Repair Shops
company_Bydgoszcz_RSRS = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/german_kpev.dds" 
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_railways.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_POSEN }

	possible_prestige_goods = {
		#prestige_good_saint_etienne_rifles
	}

	
	building_types = { #23
		building_railway
	}
	
	extension_building_types = {
		building_tooling_workshop
	}
	
	potential = {
		country_has_primary_culture = cu:polish
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_POSEN
			}
		}
	}
	
	possible = {
		any_scope_state = {
			region = sr:region_eastern_europe
			is_incorporated = yes
			has_building = building_railway
			count >= 3
		}
	}
	
	prosperity_modifier = {
		building_railway_throughput_add = 0.07 #9
		unit_supply_consumption_mult = -0.05 #14
	}	
	

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

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

# Halemba Coal Mine 
company_Halemba_Coal = {
	icon = "gfx/interface/icons/company_icons/basic_mineral_mining.dds"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_mining.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_UPPER_SILESIA }
	

	possible_prestige_goods = {
		prestige_good_silesian_coal
	}

	
	building_types = { #26
		building_coal_mine
	}
	
	extension_building_types = {
		building_iron_mine
		building_motor_industry
	}
	
	potential = {
		country_has_primary_culture = cu:polish
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_UPPER_SILESIA
			}
		}
	}
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_UPPER_SILESIA
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_coal_mine
				level >= 3
			}
		}
		has_technology_researched = pneumatic_tools
	}
	
	prosperity_modifier = {
		building_coal_mine_throughput_add = 0.12 #20
		building_construction_sector_throughput_add = 0.05 #6
	}	
	

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

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

# Kabel Polski Spółka Akcyjna
company_Kabel_Polski = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/tfkable.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_heavy.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_POSEN }

	possible_prestige_goods = {
		prestige_good_power_cables
	}

	
	building_types = { #17
		building_electrics_industry
		building_power_plant
	}
	
	extension_building_types = {
		building_tooling_workshop
	}
	
	potential = {
		has_interest_marker_in_region = sr:region_eastern_europe	
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_POSEN
			}
		}
	}
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_POSEN
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_electrics_industry
				level >= 5
			}
		}
	}
	
	prosperity_modifier = {
		state_infrastructure_mult = 0.05 #10
		building_power_plant_throughput_add = 0.06 #8
	}	
	

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

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

# Carl Ecke
company_Carl_Ecke = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/carl_ecke.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_manufacturing_light.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_POSEN }

	possible_prestige_goods = {
		prestige_good_generic_furniture
	}

	
	building_types = { #26
		building_furniture_manufactory
	}
	
	extension_building_types = {
		building_logging_camp
	}
	
	potential = {
		has_interest_marker_in_region = sr:region_eastern_europe	
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_POSEN
			}
		}
	}
	
	possible = {
		any_scope_state = {
			state_region = s:STATE_POSEN
			is_incorporated = yes
			any_scope_building = {
				is_building_type = building_furniture_manufactory
				level >= 3
			}
		}
		has_technology_researched = mechanized_workshops
	}
	
	prosperity_modifier = {
		building_art_academy_throughput_add = 0.2 #18
		interest_group_ig_intelligentsia_approval_add = 2 #8
	}	
	

	ai_will_do = {
		has_technology_researched = mechanized_workshops
		any_scope_state = {
			state_region = s:STATE_TUNISIA
			is_incorporated = yes
		}
	}

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

# Fryderyk Smelting Works / Königliche Friedrichshütte
company_Fryderyk = {
	icon = "gfx/interface/icons/company_icons/historical_company_icons/fryderyk.png"
	background = "gfx/interface/icons/company_icons/company_backgrounds/comp_illu_mining.dds"
	
	flavored_company = yes
	preferred_headquarters = { STATE_UPPER_SILESIA }
	

	possible_prestige_goods = {
		#prestige_good_saint_etienne_rifles
	}

	
	building_types = { #18
		building_lead_mine
		building_gold_mine
	}
	
	extension_building_types = {
		building_steel_mill
	}
	
	potential = {
		has_interest_marker_in_region = sr:region_eastern_europe
	}
	
	attainable = {
		hidden_trigger = { # Hide attainable if it's always fulfilled by possible
			any_scope_state = {
				state_region = s:STATE_UPPER_SILESIA
			}
		}
	}
	
	possible = {
		any_scope_state = {
				state_region = s:STATE_UPPER_SILESIA
			    is_incorporated = yes
			    any_scope_building = {
					is_building_type = building_lead_mine
					level >= 3
			}
		}
	}
	
	prosperity_modifier = {
		country_minting_mult = 0.05 #14
		building_steel_mill_throughput_add = 0.03 #4
	}	
	

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

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