﻿ig_armed_forces = {
	color = hsv{ 0.09 0.29 0.39 }
	texture = "gfx/interface/icons/ig_icons/armed_forces.dds"
	
	ideologies = {
		ideology_jingoist
		ideology_loyalist
		ideology_patriotic
	}
	
	enable = {
		always = yes
	}
	
	traits = {
		ig_trait_patriotic_fervor
		ig_trait_veteran_consultation
		ig_trait_materiel_waste
	}	
	
	on_enable = {}
	on_disable = {}
	on_character_ig_membership = {}
	
	pop_potential = {
		OR = {
			is_pop_type = soldiers
			is_pop_type = officers
			is_pop_type = aristocrats
			is_pop_type = capitalists
			pop_is_discriminated = no
		}		
	}
	
	pop_weight = {
		value = 0
		
		add = {
			desc = "POP_NOT_DISCRIMINATED"
			if = {
				limit = { 
					pop_is_discriminated = no
				}
				value = 25
			}
		}		
		
		add = {
			desc = "POP_SOLDIERS"
			if = {
				limit = { 
					is_pop_type = soldiers
				}
				value = 100
			}
		}
		
		add = {
			desc = "POP_ARISTOCRATS"
			if = {
				limit = { 
					is_pop_type = aristocrats
				}
				value = 50
			}
		}		
	
		add = {
			desc = "POP_OFFICERS"
			if = {
				limit = { 
					is_pop_type = officers
				}
				value = 200
			}
		}
		
		add = {
			desc = "POP_CAPITALISTS"
			if = {
				limit = { 
					is_pop_type = capitalists
				}
				value = 25
			}
		}
					
		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
			}
		}
	
	monarch_weight = {
		value = 0.25
	}
	
	commander_weight = {
		value = 5.0
	}
	
	noble_chance = {
		value = 0.5
	}
	
	female_commander_chance = {	
		value = 0.0
	}
	
	female_politician_chance = {
		value = 0.0
	}	
	
	# 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.75
		if = {
			limit = {
				exists = scope:character
			}
			multiply = {
				value = 1
				add = scope:character.popularity
				min = 0
			}
		}
	}
}