﻿ig_landowners = {
	color = hsv{ 0.63 0.40 0.69 }
	texture = "gfx/interface/icons/ig_icons/landowners.dds"
	layer = "revolution_dynamic_landowners"
	index = 4

	ideologies = {
		ideology_paternalistic
		ideology_hierarchic
		ideology_patriarchal
	}

	character_ideologies = {
		ideology_moderate
		ideology_traditionalist
	}

	enable = {
		always = yes
	}

	# Deprecated; use on_enable effect to assign traits instead
	traits = {
		ig_trait_noblesse_oblige
		ig_trait_family_ties
		ig_trait_noble_privileges
	}

	on_enable = {
		ig:ig_landowners ?= {
			if = {
				limit = {
					owner = { c:RUS ?= this}
				}
				set_ig_trait = ig_trait:ig_trait_profitable_estates
				set_ig_trait = ig_trait:ig_trait_the_velvet_book
				set_ig_trait = ig_trait:ig_trait_bad_boyars
			}
			else_if = {
				limit = {
					has_dlc_feature = rp1_content
					owner = { c:BRZ ?= this}
				}
				set_ig_trait = ig_trait:ig_trait_noble_privileges
				set_ig_trait = ig_trait:ig_trait_fazenda_ibicaba
				set_ig_trait = ig_trait:ig_trait_latifundios
			}
			else_if = {
				limit = {
					OR = {
						owner = { c:PRU ?= this}
						AND = {
							owner = { c:NGF ?= this}
							c:NGF ?= { was_formed_from = PRU }
						}
						AND = {
							owner = { c:GER ?= this }
							c:GER ?= { was_formed_from = PRU }
						}
					}
				}
				set_ig_trait = ig_trait:ig_trait_noble_privileges
				set_ig_trait = ig_trait:ig_trait_family_ties
				set_ig_trait = ig_trait:ig_trait_junkerdom
			}
			else_if = {
				limit = {
					OR = {
						owner = { c:AUS ?= this}
						AND = {
							owner = { c:GER ?= this }
							c:GER ?= { was_formed_from = AUS }
						}
					}
				}
				set_ig_trait = ig_trait:ig_trait_noble_privileges
				set_ig_trait = ig_trait:ig_trait_family_ties
				set_ig_trait = ig_trait:ig_trait_wiener_walzer
			}
			else_if = {
				limit = {
					owner = {
						OR = {
							country_has_primary_culture = cu:yankee
							country_has_primary_culture = cu:dixie
						}
					}
				}
				set_ig_trait = ig_trait:ig_trait_noble_privileges
				set_ig_trait = ig_trait:ig_trait_family_ties
				set_ig_trait = ig_trait:ig_trait_patrician_philanthropy
			}
			else_if = {
				limit = {
					owner = {
						country_has_primary_culture = cu:romanian
					}
				}
				set_ig_trait = ig_trait:ig_trait_bad_boyars
				set_ig_trait = ig_trait:ig_trait_family_ties
				set_ig_trait = ig_trait:ig_trait_noblesse_oblige
			}
			else = {
				set_ig_trait = ig_trait:ig_trait_noble_privileges
				set_ig_trait = ig_trait:ig_trait_family_ties
				set_ig_trait = ig_trait:ig_trait_noblesse_oblige
			}
		}

		# Squattocracy
		if = {
			limit = {
				country_has_primary_culture = cu:australian
			}
			ig:ig_landowners ?= {
				set_interest_group_name = ig_squattocracy
			}
		}
		# Local Governors
		else_if = {
			limit = {
				c:TUR ?= this
			}
			ig:ig_landowners ?= {
				set_interest_group_name = ig_local_governors
			}
		}
		# Junkers
		else_if = {
			limit = {
				c:PRU ?= this
			}
			ig:ig_landowners ?= {
				set_interest_group_name = ig_junkers
				remove_ideology = ideology_paternalistic
				add_ideology = ideology_junker_paternalistic
			}
		}
		# Gentry Assembly
		else_if = {
			limit = {
				c:RUS ?= this
			}
			ig:ig_landowners ?= {
				set_interest_group_name = ig_gentry_assembly
			}
		}
		# Roman Landowners
		else_if = {
			limit = {
				c:PAP ?= this
			}
			ig:ig_landowners ?= {
				set_interest_group_name = ig_roman_landowners
				remove_ideology = ideology_paternalistic
				add_ideology = ideology_papal_paternalistic
			}
		}
		# Ali'i
		else_if = {
			limit = {
				country_has_primary_culture = cu:hawaiian
			}
			ig:ig_landowners ?= {
				set_interest_group_name = ig_alii
				add_ideology = ideology_loyalist
			}
		}
		# Landed Gentry
		else_if = {
			limit = {
				c:GBR ?= this
			}
			ig:ig_landowners ?= {
				set_interest_group_name = ig_landed_gentry
				remove_ideology = ideology_paternalistic
				add_ideology = ideology_magnatial
			}
		}
		# Polish Landowners
		else_if = {
			limit = {
				country_has_primary_culture = cu:polish
			}
			ig:ig_landowners ?= {
				remove_ideology = ideology_paternalistic
				add_ideology = ideology_magnatial
			}
		}
		# Yangban Officials
		else_if = {
			limit = {
				c:KOR ?= this
			}
			ig:ig_landowners ?= {
				set_interest_group_name = ig_yangban
			}
		}
		# Scholar Officials
		else_if = {
			limit = {
				c:CHI ?= this
			}
			ig:ig_landowners ?= {
				set_interest_group_name = ig_scholar_officials
				remove_ideology = ideology_paternalistic
				add_ideology = ideology_scholar_paternalistic
			}
		}
		# Pious Spanish Landowners (and Magnatial Liberal Landowners)
		else_if = {
			limit = {
				country_has_primary_culture = cu:spanish
			}
			if = {
				limit = {
					OR = {
						c:SPC ?= this
						has_variable = spain_carlist_victory
					}
				}
				ig:ig_landowners ?= {
					remove_ideology = ideology_paternalistic
					add_ideology = ideology_carlist_ig
				}
			}
			if = {
				limit = {
					c:SPA ?= this # Only liberal Spain
					NOT = { has_variable = spain_carlist_victory }
				}
				ig:ig_landowners ?= {
					remove_ideology = ideology_paternalistic
					add_ideology = ideology_moderantist
				}
			}
		}
		# Aristocracy of Officials
		else_if = {
			limit = {
				country_has_primary_culture = cu:norwegian
			}
			ig:ig_landowners ?= {
				set_interest_group_name = ig_aristocracy_of_officials
			}
		}
		# Southern Planters
		else_if = {
			limit = {
				OR = {
					AND = {
						c:USA ?= this
						NOT = { exists = c:CSA }
					}
					country_has_primary_culture = cu:dixie
				}
			}
			ig:ig_landowners ?= {
				set_interest_group_name = ig_southern_planters
				remove_ideology = ideology_paternalistic
				add_ideology = ideology_republican_paternalistic
			}
		}
		# South American Caudillos/republicans
		else_if = {
			limit = {
				any_primary_culture = {
					has_discrimination_trait = language_hispanophone
					has_discrimination_trait_group = heritage_group_european
					NOT = { has_discrimination_trait = heritage_iberian }
					NOT = { cu:caribeno = this }
				}
			}
			ig:ig_landowners ?= {
				remove_ideology = ideology_paternalistic
				add_ideology = ideology_republican_paternalistic
			}
		}
		# Boer republicanism, but only for states that are only Boer
		else_if = {
			limit = {
				country_has_primary_culture = cu:boer
				NOT = {
					NOT = { any_primary_culture = { cu:boer = this } }
				}
			}
			ig:ig_landowners ?= {
				remove_ideology = ideology_paternalistic
				add_ideology = ideology_republican_paternalistic
			}
		}
		# India
		else_if = {
			limit = {
				OR = {
					c:BIC ?= this
					any_primary_culture = {
						has_discrimination_trait_group = heritage_group_south_asian
					}
				}
			}
			ig:ig_landowners ?= {
				set_interest_group_name = ig_zamindars
				if = {
					limit = {
						owner = {
							c:BIC ?= this
						}
					}
					set_ig_trait = ig_trait:ig_trait_summon_no_zamindars
				}
				set_ig_trait = ig_trait:ig_trait_famine_reserves
				set_ig_trait = ig_trait:ig_trait_profitable_estates
			}
		}
		else_if = {
			limit = {
				c:ZAN ?= this
				any_primary_culture = { cu:bedouin = this }
				NOT = { any_primary_culture = { cu:swahili = this } }
			}
			ig:ig_landowners ?= {
				set_interest_group_name = ig_wamanga
			}
		}
		# Magnates
		else_if = {
			limit = {
				has_dlc_feature = ip3_content
				any_primary_culture = {
					OR = {
						cu:polish = this
						cu:lithuanian = this
						cu:hungarian = this
					}
				}
			}
			ig:ig_landowners ?= {
				set_interest_group_name = ig_magnates
			}
		}
		# Daimyo
		else_if = {
			limit = {
				country_has_primary_culture = cu:japanese
			}
			ig:ig_landowners ?= {
				set_interest_group_name = ig_daimyo
				set_ig_trait = ig_trait:ig_trait_fudai_support
				set_ig_trait = ig_trait:ig_trait_outspoken_tozama
				remove_ideology = ideology_hierarchic
				add_ideology = ideology_japan_hierarchic
				remove_ideology = ideology_paternalistic
				add_ideology = ideology_japan_paternalistic
			}
		}
		# Boyars
		else_if = {
			limit = {
				has_dlc_feature = ip3_content
				country_has_primary_culture = cu:romanian
			}
			ig:ig_landowners ?= {
				set_interest_group_name = ig_boyars
			}
		}
	}
	on_disable = {}

	priority_cultures = { #Country scope
		rule = {
			trigger = {
				c:BIC ?= this
				any_primary_culture = {
					cu:british = this
				}
			}
			cultures = {
				assamese avadhi baluchi bengali bihari gujarati kannada malayalam marathi oriya panjabi pathan rajput sindi tamil telegu hindustani bundeli pahari gondi bageli chhattisgarhi deccani
			}
		}
		rule = {
			trigger = {
				c:ZAN ?= this
				any_primary_culture = { cu:bedouin = this }
				NOT = { any_primary_culture = { cu:swahili = this } }
			}
			cultures = {
				bedouin
			}
		}
		rule = {
			trigger = {
				c:PHI ?= this
				NOT = { has_variable = je_philippines_main_reliance_happened }
				NOT = { any_primary_culture = { cu:filipino = this } }
				NOT = { any_primary_culture = { cu:filipino_hispanophone = this } }
				any_primary_culture = { cu:spanish = this }
			}
			cultures = {
				spanish filipino_mestizo
			}
		}
		rule = {
			trigger = {
				c:PHI ?= this
				any_primary_culture = {
					AND = {
						cu:spanish = this
						cu:filipino_hispanophone = this
					}
				}
			}
			cultures = {
				spanish filipino_hispanophone
			}
		}
	}

	on_character_ig_membership = {}

	pop_potential = {
		OR = {
			is_pop_type = aristocrats
			is_pop_type = clergymen
			is_pop_type = officers
			is_pop_type = farmers
			is_pop_type = capitalists
		}
	}

	pop_weight = {
		value = 0

		add = {
			desc = "POP_ARISTOCRATS"
			if = {
				limit = {
					is_pop_type = aristocrats
					owner = {
						ig:ig_rural_folk = {
							leader = {
								NOT = {has_ideology = ideology:ideology_jacksonian_democrat}
							}
						}
					}
				}
				value = 250
			}
		}

		add = {
			desc = "POP_ARISTOCRATS"
			if = {
				limit = {
					is_pop_type = aristocrats
					owner = {
						ig:ig_rural_folk = {
							leader = {
								has_ideology = ideology:ideology_jacksonian_democrat
							}
						}
					}
				}
				value = 100
			}
		}

		add = {
			desc = "POP_CLERGYMEN"
			if = {
				limit = {
					is_pop_type = clergymen
					rural_employment = yes
				}
				value = 50
			}
		}

		add = {
			desc = "POP_OFFICERS"
			if = {
				limit = {
					is_pop_type = officers
				}
				value = 100
			}
		}

		add = {
			desc = "POP_FARMERS"
			if = {
				limit = {
					is_pop_type = farmers
				}
				value = 50
				add = this.standard_of_living
				multiply = 2

				if = {
					limit = { owner = { has_law_or_variant = law_type:law_peasant_proprietorship } }
					multiply = 1.25
				}

				if = {
					limit = {
						state = {
							is_slave_state = yes
						}
						owner = {
							ig:ig_rural_folk = {
								leader = {
									NOT = { has_ideology = ideology:ideology_jacksonian_democrat }
								}
							}
						}
					}
					multiply = 4
				}
			}
		}


		if = {
			limit = {
				c:BIC ?= owner
				culture = {
					has_discrimination_trait_group = heritage_group_european
				}
			}
			multiply = {
				desc = "POP_INDIA_COLONIAL_RULE"
				value = 0.1
			}
		}
		
		add = {
			desc = "POP_CAPITALISTS"
			if = {
				limit = { 
					is_pop_type = capitalists
				}
				value = 25
			}
		}
		


		multiply = { #Pops are less attracted to radical ideologies if they're not poor
			desc = "RADICAL_LEADER"
			value = 1.0
			if = {
				limit = {
					owner = {					
						ig:ig_landowners = {
							leader = {
								has_ideology = ideology:ideology_fascist
							}
						}
						NAND = {
							has_law = law_type:law_autocracy
							ig:ig_landowners = {
								is_in_government = yes
							}
						}						
					}
					NOT = {
						standard_of_living <= 20
					}
				}
				value = 0.75
			}
		}

		add = {
			desc = "RURAL_POP"
			if = {
				limit = { 
					is_pop_type = capitalists
					rural_employment = yes
				}
				value = 25
			}
		}

		add = {
			desc = "ideology_junker_paternalistic"
			if = {
				limit = { 
					is_pop_type = capitalists
					has_state_religion = yes
					religion = rel:protestant
					culture = cu:north_german
					owner = {
						ig:ig_landowners = {
							has_ideology = ideology:ideology_junker_paternalistic
						}
					}
				}
				value = 250
			}
		}

		add = {
			desc = "ideology_junker_paternalistic"
			if = {
				limit = { 
					is_pop_type = farmers
					has_state_religion = yes
					religion = rel:protestant
					culture = cu:north_german
					owner = {
						ig:ig_landowners = {
							has_ideology = ideology:ideology_junker_paternalistic
						}
					}
				}
				value = 150
			}
		}

		add = {
			desc = "ideology_junker_paternalistic"
			if = {
				limit = { 
					is_pop_type = bureaucrats
					has_state_religion = yes
					religion = rel:protestant
					owner = {
						ig:ig_landowners = {
							has_ideology = ideology:ideology_junker_paternalistic
						}
					}
				}
				value = 100
			}
		}

		add = {
			desc = "ideology_junker_paternalistic"
			if = {
				limit = { 
					is_pop_type = aristocrats
					has_state_religion = yes
					religion = rel:protestant
					owner = {
						ig:ig_landowners = {
							has_ideology = ideology:ideology_junker_paternalistic
						}
					}
				}
				value = 100
			}
		}

		add = {
			desc = "ideology_orleanist"
			if = {
				limit = { 
					wealth > 30
					is_pop_type = capitalists
					pop_acceptance >= acceptance_status_4
					owner = {
						ig:ig_landowners = {
							leader = {
								has_ideology = ideology:ideology_orleanist
							}
						}
						has_law = law_type:law_monarchy
					}
				}

				value = wealth
				subtract = 25
				multiply = 4
				max = 100

			}	
		}

		add = {
			desc = "ideology_legitimist"
			if = {
				limit = { 
					is_pop_type = aristocrats
					owner = {
						ig:ig_devout = {
							leader = {
								has_ideology = ideology:ideology_legitimist
							}
						}
					}
				}
				value = -50
			}
		}

		add = {
			desc = "WEALTH"
			if = {
				limit = { 
					wealth > 30
					OR = {
						is_pop_type = aristocrats
						is_pop_type = capitalists
					}
					has_state_religion = yes
					religion = rel:protestant
					culture = cu:north_german
					owner = {
						ig:ig_landowners = {
							has_ideology = ideology:ideology_junker_paternalistic
						}
					}
				}

				value = wealth
				subtract = 20
				multiply = 4
				max = 250

			}	
		}

		add = {
			desc = "WEALTH"
			if = {
				limit = { 
					wealth > 30
					NOR = {
						is_pop_type = aristocrats
						is_pop_type = capitalists
					}
					owner = {
						ig:ig_landowners = {
							NOR = {
								has_ideology = ideology:ideology_junker_paternalistic
								has_ideology = ideology:ideology_orleanist
							}
						}
					}
				}
				value = wealth
				subtract = 30
				multiply = 2
				max = 100
			}
		}

		add = {
			desc = "ideology_magnatial"
			if = {
				limit = { 
					OR = {
						is_pop_type = aristocrats
						is_pop_type = capitalists
					}				
					owner = {
						ig:ig_landowners = {
							has_ideology = ideology:ideology_magnatial
						}
					}
				}
				value = 100
			}
		}

		add = {
			desc = "ideology_scholar_paternalistic"
			if = {
				limit = { 
					is_pop_type = aristocrats
					owner = {
						ig:ig_landowners = {
							has_ideology = ideology:ideology_scholar_paternalistic
						}
					}
				}
				value = 100
			}
		}

		add = {
			desc = "ideology_papal_paternalistic"
			if = {
				limit = { 
					is_pop_type = aristocrats
					owner = {
						ig:ig_landowners = {
							has_ideology = ideology:ideology_papal_paternalistic
						}
					}
				}
				value = 100
			}
		}

		add = {
			desc = "ideology_austrian_hegemony"
			if = {
				limit = { 
					is_pop_type = aristocrats
					has_state_religion = yes
					culture = cu:south_german
					owner = {
						ig:ig_landowners = {
							has_ideology = ideology:ideology_austrian_hegemony
						}
					}
				}
				value = 50
			}
		}

		multiply = {
			desc = "NOTPROTESTANT"
			value = 1.0

			if = {
				limit = {
					owner = { ig:ig_landowners = { has_ideology = ideology:ideology_junker_paternalistic }}
					has_state_religion = no
				}
				value = 0.25
			}
		}


		multiply = {
			desc = "SMALL_URBAN_CENTER"
			value = 1.0
			if = {
				limit = {
					state = {
						any_scope_building = {
							is_building_type = building_urban_center
							level < 5
						}
					}
				}
				value = 1.25
			}
		}	

		multiply = {
			desc = "NO_URBAN_CENTER"
			value = 1.0
			if = {
				limit = {
					state = {
						NOT = {
							any_scope_building = {
								is_building_type = building_urban_center
							}
						}
					}
				}
				value = 1.5
			}
		}

		add = {
			desc = "SLAVE_STATE"
			if = {
				limit = {
					state = { 
						is_slave_state = yes
					}
					rural_employment = yes
					owner = {
						ig:ig_rural_folk = {
							leader = {
								NOT = { has_ideology = ideology:ideology_jacksonian_democrat }
							}
						}
					}
				}
				value = 100
			}
		}

		add = {
			desc = "SLAVE_STATE"
			if = {
				limit = {
					state = { 
						is_slave_state = yes
					}
					NOT = {
						rural_employment = yes				
					}
					owner = {
						ig:ig_rural_folk = {
							leader = {
								NOT = { has_ideology = ideology:ideology_jacksonian_democrat }
							}
						}
					}
				}
				value = 50 #rest of the society is also affected
			}
		}

		add = {
			desc = "MONARCHIST"
			if = {
				limit = {
					owner = {
						has_law = law_type:law_monarchy 
						NOT = { c:JAP = THIS }
					}
					OR = {
						rural_employment = yes
						is_pop_type = peasants
					}
					strata = poor
					pop_acceptance >= acceptance_status_3
					has_state_religion = yes
					NOT = {
						owner = {
							ig:ig_petty_bourgeoisie = {
								leader = {
									has_ideology = ideology:ideology_bonapartist
								}
							}
						}
					}
					NOT = { #orleanists are too economicaly liberals
						owner = {
							ig:ig_landowners = {
								leader = {
									has_ideology = ideology:ideology_orleanist
								}
							}
						}
					}
				}
				value = 50
			}
		}

		add = { #WTF french farmers supports orleanists that much?
			desc = "ideology_orleanist"
			if = {
				limit = { 
					is_pop_type = farmers
					owner = {
						ig:ig_landowners = {
							leader = {
								has_ideology = ideology:ideology_orleanist
							}
						}
					}
				}
				value = -100
			}
		}

		multiply = {
			desc = "ideology_bonapartist"
			value = 1.0

			if = {
				limit = {
					owner = {
						NOT = { has_law = law_type:law_monarchy }
						ig:ig_petty_bourgeoisie = {
							leader = {
								has_ideology = ideology:ideology_bonapartist
							}
						}
					}
					pop_acceptance >= acceptance_status_3
				}
				value = 0.75
			}
		}

		multiply = {
			desc = "NON_SLAVE_STATE"
			value = 1.0
			if = {
				limit = {
					owner = {
						THIS = c:USA
						ig:ig_landowners = {
							has_ideology = ideology:ideology_pro_slavery
						}
					}
					state = { 
						is_slave_state = no
					}
				}
				value = 0.05
			}
		}

		multiply = {
			desc = "ideology_jacksonian_democrat"
			value = 1.0
			if = {
				limit = {
					owner = {
						ig:ig_rural_folk = {
							leader = {
								has_ideology = ideology:ideology_jacksonian_democrat
							}
						}
					}
					state = { 
						is_slave_state = yes
					}
				}
				value = 0.75
			}
		}

		add = {
			desc = "PLANTATION_EMPLOYMENT"
			if = {
				limit = {
					pop_employment_building_group = bg_plantations
					owner = {
						ig:ig_rural_folk = {
							leader = {
								NOT = { has_ideology = ideology:ideology_jacksonian_democrat }
							}
						}
					}
					state = { 
						is_slave_state = yes
					}
				}
				value = 100
			}
		}
		
		add = {
			desc = "DIXIE"
			if = {
				limit = { 
					owner = {
						c:USA = THIS
					}
					owner = {
						ig:ig_rural_folk = {
							leader = {
								has_ideology = ideology:ideology_jacksonian_democrat
							}
						}
					}
					rural_employment = yes
					culture = cu:dixie
				}
				value = 50
			}
		}

		add = {
			desc = "DIXIE"
			if = {
				limit = { 
					owner = {
						c:USA = THIS
					}
					owner = {
						ig:ig_rural_folk = {
							leader = {
								NOT = {has_ideology = ideology:ideology_jacksonian_democrat}
							}
						}
					}
					rural_employment = yes
					culture = cu:dixie
				}
				value = 200
			}
		}

		add = {
			desc = "DIXIE"
			if = {
				limit = { 
					owner = {
						c:USA = THIS
						ig:ig_rural_folk = {
							leader = {
								NOT = {has_ideology = ideology:ideology_jacksonian_democrat}
							}
						}
					}
					NOT = {
						rural_employment = yes
					}
					culture = cu:dixie
				}
				value = 100
			}
		}

		multiply = {
			desc = "YANKEE"
			value = 1.0

			if = {
				limit = {
					owner = {
						c:USA = THIS
					}
					culture = cu:yankee
				}
				value = 0.75
			}
		}		

		multiply = {
			desc = "AFROAMERICAN"
			value = 1.0

			if = {
				limit = {
					owner = {
						c:USA = THIS
					}
					culture = cu:afro_american
				}
				value = 0.1
			}
		}
		

		multiply = {
			desc = "WOMENVOTE"
			value = 1.0

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

		multiply = {
			desc = "IG_IS_MARGINALIZED"
			value = 1.0
			
			scope:interest_group = {
				if = {
					limit = {
						ig_counts_as_marginal = yes
					}
					value = 0.75
				}
			}
		}

		multiply = {
			desc = "IG_COUNCIL_REPUBLIC"
			value = 1.0

			if = {
				limit = {
					owner = {
						has_law = law_type:law_council_republic
					}
					NOT = {
						is_pop_type = aristocrats
					}
				}
				value = 0
			}
		}
	
		multiply = {
			desc = "LEADER_POPULARITY"
			scope:interest_group ?= {
				leader ?= {
					value = popularity
					multiply = 0.0025
					add = 1
					max = 1.25
					min = 0.75
				}
			}
		}
		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.5 # inherently likely
		# Monarch is not likely to adopt a marginal IG
		if = {
			limit = {
				ig_counts_as_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 Serfdom or Slavery
		if = {
			limit = {
				owner = {
					OR = {
						has_law_or_variant = law_type:law_serfdom
						has_law_or_variant = law_type:law_slave_trade
						has_law_or_variant = law_type:law_legacy_slavery
					}
				}
			}
			multiply = {
				value = 2
			}
		}
		# More likely with Autocracy, Oligarchy, or Landed Voting
		if = {
			limit = {
				owner = {
					OR = {
						has_law_or_variant = law_type:law_oligarchy
						has_law_or_variant = law_type:law_autocracy
						has_law_or_variant = law_type:law_landed_voting
					}
				}
			}
			multiply = {
				value = 2
			}
		}
	}

	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_landowners ?= {
					ig_counts_as_marginal = yes
				}
			}
			multiply = {
				value = 0
			}
		}
	}

	commander_weight = {
		value = 2.0
	}
	
	magnate_weight = {
		value = 2.0
		
		if = {
			limit = {
				owner = { has_law_or_variant = law_type:law_traditionalism }
			}
		
			add = 10.0
		}
		else_if = {
			limit = {
				owner = { has_law_or_variant = law_type:law_agrarianism }
			}

			add = 3.0
		}
	}	

	executive_weight = {
		value = 0.25

		# The company owning BIC should not get non-industrialist executives
		if = {
			limit = {
				exists = scope:company
				exists = c:BIC
				c:BIC ?= {
					exists = owning_company
					owning_company = scope:company
				}
			}
			multiply = {
				value = 0
			}
		}
	}

	noble_chance = {
		value = 1.0
	}

	female_commander_chance = {
		value = 0.0
	}

	female_executive_chance = {
		value = 0.0
	}

	female_monarch_chance = {
		value = 0.05
	}

	female_politician_chance = {
		value = 0.0


		if = {
			limit = {
				owner = {
					has_law_or_variant = law_type:law_womens_suffrage
				}
				law_stance = {
					law = law_type:law_womens_suffrage
					value >= approve
				}
			}
			add = {
				value = 0.02
			}
		}
	}

	female_agitator_chance = {
		value = 0.01

		if = {
			limit = {
				owner = {
					has_law_or_variant = law_type:law_women_own_property
				}

			}
			add = {
				value = 0.01
			}
		}

		if = {
			limit = {
				owner = {
					has_law_or_variant = law_type:law_women_in_the_workplace
				}

			}
			add = {
				value = 0.01
			}
		}

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

			}
			add = {
				value = 0.01
			}
		}
	}

	# Multiplier applied to the weight for an appropriate commander will be selected from the character pool to lead the IG
	# root = interest group
	commander_leader_weight = {
		value = 1.5
	}
	
	# Multiplier applied to the weight for an appropriate magnate will be selected from the character pool to lead the IG
	# root = interest group
	magnate_leader_weight = {
		value = 5.0
		if = {
			limit = {
				c:JAP ?= owner
				NOT = {
					has_variable = japan_restoration_complete
				}
			}
			add = 5
		}
	}	

	# Multiplier applied to the weight for an appropriate executive will be selected from the character pool to lead the IG
	# root = interest group
	executive_leader_weight = {
		value = 0.5
	}
}
