ig_industrialists = {
	color = hsv{ 0.06 0.60 0.89 }
	texture = "gfx/interface/icons/ig_icons/industrialists.dds"
	layer = "revolution_dynamic_industrialists"
	index = 2

	ideologies = {
		ideology_plutocratic
		ideology_laissez_faire
		ideology_individualist
	}
	
	character_ideologies = {
		ideology_moderate
		ideology_market_liberal
		ideology_protectionist
		ideology_orleanist
		ideology_bonapartist
	}

	enable = {
		always = yes
	}

	# Deprecated; use on_enable effect to assign traits instead
	traits = {
		ig_trait_job_creators
		ig_trait_engines_of_progress
		ig_trait_tax_avoidance
	}
	
	on_enable = {
		ig:ig_industrialists = {
			if = {
				limit = {
					owner = { c:JAP ?= this }
				}
				set_ig_trait = ig_trait:ig_trait_zaibatsu_withdrawal
				set_ig_trait = ig_trait:ig_trait_engines_of_progress
				set_ig_trait = ig_trait:ig_trait_zaibatsu_cooperation
			}
			else_if = {
				limit = {
					owner = { c:SWE ?= this }
				}
				set_ig_trait = ig_trait:ig_trait_tax_avoidance
				set_ig_trait = ig_trait:ig_trait_engines_of_progress
				set_ig_trait = ig_trait:ig_trait_kommerskollegium
			}
			else_if = {
				limit = {
					has_dlc_feature = voice_of_the_people_content
					owner = { c:FRA ?= this }
				}
				set_ig_trait = ig_trait:ig_trait_tax_avoidance
				set_ig_trait = ig_trait:ig_trait_engines_of_progress
				set_ig_trait = ig_trait:ig_trait_ventilate_unify_beautify
			}
			else_if = {
				limit = {
					has_dlc_feature = rp1_content
					owner = { c:BRZ ?= this }
				}
				set_ig_trait = ig_trait:ig_trait_tax_avoidance
				set_ig_trait = ig_trait:ig_trait_the_goods_must_flow
				set_ig_trait = ig_trait:ig_trait_job_creators
			}
			# India
			else_if = {
				limit = {
					owner = {
						c:BIC ?= this
					}
				}
				set_interest_group_name = ig_east_india_company
				remove_ideology = ideology_laissez_faire
				add_ideology = ideology_colonialist
				remove_ideology = ideology_plutocratic
				add_ideology = ideology_enclavist
				remove_ideology = ideology_individualist
				add_ideology = ideology_malthusian

				set_ig_trait = ig_trait:ig_trait_wounded_honor
				set_ig_trait = ig_trait:ig_trait_stamped_and_signed
				set_ig_trait = ig_trait:ig_trait_responsible_government
			}
			else_if = {
				limit = {
					owner = {
						OR = {
							c:BIC ?= this
							c:ALK ?= this
						}
					}
				}
				remove_ideology = ideology_laissez_faire
				add_ideology = ideology_colonialist
			}
			else = {
				set_ig_trait = ig_trait:ig_trait_tax_avoidance
				set_ig_trait = ig_trait:ig_trait_engines_of_progress
				set_ig_trait = ig_trait:ig_trait_job_creators
			}
		}
	}

	on_disable = {}

	priority_cultures = { #Country scope
		rule = {
			trigger = {
				c:BIC ?= this
				any_primary_culture = { 
					cu:british = this
				}
			}
			cultures = {
				british scottish irish
			}
		}
	}

	on_character_ig_membership = {}

	pop_potential = {
		OR = {
			is_pop_type = capitalists
			is_pop_type = shopkeepers
			AND = {
				exists = c:BIC
				owner ?= c:BIC
				OR = {
					culture ?= {
						has_discrimination_trait = european_heritage
					}
					is_pop_type = bureaucrats
					is_pop_type = clerks
				}
			}
		}
	}

	pop_weight = {
		value = 0

		add = {
			desc = "POP_CAPITALISTS"
			if = {
				limit = {
					is_pop_type = capitalists
				}
				value = 250
				add = this.standard_of_living
			}
		}

		add = {
			desc = "POP_SHOPKEEPERS"
			if = {
				limit = {
					is_pop_type = shopkeepers
				}
				value = 50
				add = this.standard_of_living
			}
		}
		if = {
			limit = {
				owner = {
					c:BIC ?= this
				}
				culture = {
					has_discrimination_trait = european_heritage
				}
				OR = {
					strata = upper
					strata = middle
				}
				NOT = {
					is_pop_type = officers
				}
			}
			add = {
				desc = "POP_INDIA_EUROPEAN_ADMINISTRATORS"
				value = 250
			}
		}
		
		if = {
			limit = {
				owner = {
					c:BIC ?= this
				}
			}
			if = {
				limit = {
					NOT = {
						culture = {
							has_discrimination_trait = european_heritage
						}
					}
					OR = {
						is_pop_type = bureaucrats
						is_pop_type = clerks
					}
				}
				add = {
					desc = "POP_INDIA_NATIVE_ADMINISTRATORS"
					value = 25
				}
			}
			else_if = {
				limit = {
					NOT = {
						culture = {
							has_discrimination_trait = european_heritage
						}
					}
					NOR = {
						is_pop_type = bureaucrats
						is_pop_type = clerks
					}
				}
				multiply = {
					desc = "POP_INDIA_ADMINISTRATION_PRIVILEGES"
					value = 0.05
				}
			}
		}

		multiply = {
			desc = "LEADER_POPULARITY"
			scope:interest_group = {
				leader ?= {
					value = popularity
					multiply = 0.0025
					add = 1
					max = 1.25
					min = 0.75
				}
			}
		}

		multiply = {
			desc = "decentralized_power"
			value = 1.0

			if = {
				limit = {
					owner = {
						is_country_type = decentralized
					}
				}
				value = 0.0
			}
		}
		if = {
			limit = {
				scope:interest_group = {
					is_in_government = yes
				}
			}
			multiply = {
				desc = "IN_GOVERNMENT_ATTRACTION"
				value = 1
				add = scope:interest_group.modifier:interest_group_in_government_attraction_mult
				min = 0
			}
		}
		
		if = {
			limit = {
				scope:interest_group = {
					is_in_government = yes
				}
			}
			multiply = { # Multiplied by 1.25x max
				desc = "POP_LOYALISTS"
				value = pop_loyalist_fraction
				divide = 4
				add = 1
			}
		}
		if = {
			limit = {
				scope:interest_group = {
					is_in_government = no
				}
			}
			multiply = { # Multiplied by 1.25x max
				desc = "POP_RADICALS"
				value = pop_radical_fraction
				divide = 4
				add = 1
			}
		}
	}

	monarch_weight = {
		value = 1
		# Monarch is not likely to adopt a marginal IG
		if = {
			limit = {
				is_marginal = yes
			}
			multiply = {
				value = 0.1
			}
		}
		# Monarch is more likely to adopt a Powerful IG
		if = {
			limit = {
				is_powerful = yes
			}
			multiply = {
				value = 2
			}
		}
		# More likely with Wealth Voting or Oligarchy
		if = {
			limit = {
				owner = {
					OR = {
						has_law = law_type:law_oligarchy
						has_law = law_type:law_wealth_voting
					}
				}
			}
			multiply = {
				value = 2
			}
		}
		# Slightly more likely with LF
		if = {
			limit = {
				owner = {
					has_law = law_type:law_laissez_faire
				}
			}
			multiply = {
				value = 1.25
			}
		}
		# Less likely before researching Mutual Funds
		if = {
			limit = {
				owner = {
					NOT = { has_technology_researched = mutual_funds }
				}
			}
			multiply = {
				value = 0.5
			}
		}
		# Impossible without Currency Standards
		if = {
			limit = {
				owner = {
					NOT = { has_technology_researched = currency_standards }
				}
			}
			multiply = {
				value = 0
			}
		}
	}

	agitator_weight = {
		# Agitators more likely to come from populist IG's rather than elitist
		value = 0.25
		# Agitators will never be part of a marginalized IG
		if = {
			limit = {
				owner.ig:ig_industrialists = {
					is_marginal = yes
				}
			}
			multiply = {
				value = 0
			}
		}
	}

	commander_weight = {
		value = 0.5
	}

	noble_chance = {
		value = 0.3
	}

	female_commander_chance = {
		value = 0.0
	}

	female_politician_chance = {
		value = 0.0

		if = {
			limit = {
				owner = {
					has_law = law_type:law_womens_suffrage
				}

			}
			add = {
				value = 0.025
			}
		}
	}

	female_agitator_chance = {
		value = 0.025
		
		if = {
			limit = {
				owner = {
					has_law = law_type:law_women_own_property
				}

			}
			add = {
				value = 0.025
			}
		}	
		
		if = {
			limit = {
				owner = {
					has_law = law_type:law_women_in_the_workplace
				}

			}
			add = {
				value = 0.025
			}
		}

		if = {
			limit = {
				owner = {
					has_law = law_type:law_womens_suffrage
				}

			}
			add = {
				value = 0.025
			}
		}		
	}

	# The chance that a commander belonging to this IG takes over leadership when it changes
	# scope:character is the most popular commander in the IG
	commander_leader_chance = {
		value = 0.25
		multiply = ig_commander_leader_chance_mult
	}
}
