# For minor countries where advisors are not defined
# Generate them from a generic template

# Political advisors
#every_possible_country = {
#	limit = {
#		#NOT = { OR = { tag = GER tag = ENG tag = SOV original_tag = FRA tag = ITA tag = JAP tag = USA tag = AST tag = RAJ tag = CAN tag = SAF tag = CZE tag = ROM tag = CHI tag = MAN tag = MEX tag = HOL original_tag = SPR original_tag = POL } }
#		# avoid generic advisors in temporary countries
#		is_dynamic_country = no
#		NOT = {
#			has_allowed_idea_with_traits = { idea = communist_revolutionary characters = yes }
#		}
#	}
#	generate_character = {
#		token_base = generic_communist_revolutionary # token will be TAG_token_base
#		advisor = {
#			slot = political_advisor
#			traits = { communist_revolutionary }
#			available = {
#				has_government = ideology_radical_socialism
#			}
#			ai_will_do = {
#				factor = 0
#			}
#		}
#		portraits = { 
#			army = { small = GFX_idea_generic_communist_revolutionary }
#		}
#	}
#}

#every_possible_country = {
#	limit = {
#		#NOT = { OR = { tag = GER tag = ENG tag = SOV original_tag = FRA tag = ITA tag = JAP tag = USA tag = AST tag = RAJ tag = CAN tag = SAF tag = CZE tag = PRC tag = CHI tag = MAN tag = MEX tag = HOL original_tag = SPR original_tag = POL } }
#		is_dynamic_country = no
#		NOT = {
#			has_allowed_idea_with_traits = { idea = democratic_reformer characters = yes }
#		}
#	}
#	generate_character = {
#		token_base = generic_democratic_reformer # token will be TAG_token_base
#		advisor = {
#			slot = political_advisor
#			traits = { democratic_reformer }
#			available = {
#				OR = {
#					has_government = centrism
#					has_government = social_egalitarianism
#					has_government = traditional_conservatism
#					has_government = radical_democracy
#				}
#			}
#			ai_will_do = {
#				factor = 0
#			}
#		}
#		portraits = { 
#			army = { small = GFX_idea_generic_democratic_reformer }
#		}
#	}
#}

#every_possible_country = {
#	limit = {
#		#NOT = { OR = { tag = GER tag = ENG tag = SOV original_tag = FRA tag = ITA tag = JAP tag = USA tag = AST tag = RAJ tag = CAN tag = SAF tag = ROM tag = CZE tag = PRC tag = CHI tag = MAN tag = MEX tag = HOL original_tag = SPR original_tag = POR original_tag = POL original_tag=LAT } }
#		is_dynamic_country = no
#		NOT = {
#			has_allowed_idea_with_traits = { idea = fascist_demagogue characters = yes }
#		}
#	}
#	generate_character = {
#		token_base = generic_fascist_demagogue # token will be TAG_token_base
#		advisor = {
#			slot = political_advisor
#			traits = { fascist_demagogue }
#			available = {
#				OR = {
#					has_government = autocracy
#					has_government = radical_democracy
#					has_government = fundamentalism
#					has_government = chauvanist_populism
#				}
#			}
#			ai_will_do = {
#				factor = 0
#			}
#		}
#		portraits = { 
#			army = { small = GFX_idea_generic_fascist_demagogue }
#		}
#	}
#}

every_possible_country = {
	limit = {
		has_dlc = "La Resistance"
		# china gets a special one via focus
		NOT = {
			has_allowed_idea_with_traits = { idea = head_of_intelligence characters = yes }
		}
		NOT = { 
			OR = {
				tag = AUS tag = BAD tag = BAV tag = BEL tag = DEN tag = ENG tag = FRA tag = HAM tag = HAN tag = HES tag = HLS tag = HSD tag = HOL tag = MCK tag = OLD tag = PIE tag = PRS tag = RUS tag = SAX tag = SCH tag = SWE tag = TUS tag = WUR tag = USA tag = ROM tag = MNT tag = SER tag = RUS tag = FIN tag = QNG tag = TUN tag = MOR tag = OTO tag = PAP tag = POR tag = PER tag = MOD tag = LUX tag = NSC
			}
		}
		is_dynamic_country = no
	}
	generate_character = {
		token_base = generic_head_of_intelligence # token will be TAG_token_base
		advisor = {
			slot = political_advisor
			traits = { head_of_intelligence }
			available = {
				has_intelligence_agency = yes
			}
			ai_will_do = {
				factor = 1
				modifier = {
					has_intelligence_agency = no
					factor = 0
				}
			}
		}
		portraits = { 
			army = { small = GFX_idea_generic_head_of_intelligence }
		}
	}
}

# Political advisors
every_possible_country = {
	limit = {
		NOT = { 
			OR = {
				tag = AUS tag = BAD tag = BAV tag = BEL tag = DEN tag = ENG tag = FRA tag = GRE tag = HAM tag = HAN tag = HES tag = HLS tag = HSD tag = HOL tag = MCK tag = OLD tag = NOR tag = PIE tag = PRS tag = RUS tag = SAX tag = SCH tag = SWE tag = TUS tag = WUR tag = USA tag = ROM tag = MNT tag = SER tag = RUS tag = FIN tag = QNG tag = SWI tag = TUN tag = MOR tag = OTO tag = PAP tag = POR tag = PER tag = MOD tag = LUX tag = NSC
			}
		}
	}

	generate_character = {
		token_base = generic_captain_of_industry # token will be TAG_token_base
		advisor = {
			slot = political_advisor
			traits = { captain_of_industry }
			cost = 50
		}
		portraits = { 
			army = { small = GFX_idea_generic_captain_of_industry }
		}
	}
	generate_character = {
		token_base = generic_fortification_engineer # token will be TAG_token_base
		advisor = {
			slot = political_advisor
			traits = { fortification_engineer_1 }
			cost = 50
		}
		portraits = { 
			army = { small = GFX_idea_generic_fortification_engineer }
		}
	}
	generate_character = {
		token_base = generic_war_industrialist # token will be TAG_token_base
		advisor = {
			slot = political_advisor
			traits = { war_industrialist_1 }
			cost = 50
		}
		portraits = { 
			army = { small = GFX_idea_generic_war_industrialist }
		}
	}
}

# Theorists
every_possible_country = {
	limit = {
		NOT = { 
			OR = { 
				tag = AUS tag = BAD tag = BAV tag = BEL tag = DEN tag = ENG tag = FRA tag = HAM tag = NOR tag = PIE tag = PRS tag = SAX tag = SWE tag = WUR tag = TUS tag = USA tag = ROM tag = MNT tag = SER tag = RUS tag = FIN tag = QNG
				tag = OTO tag = TUN tag = MOR tag = PAP tag = POR tag = GRE tag = PER tag = MOD tag = LUX tag = NSC
			}
		}
	}

	generate_character = {
		token_base = generic_military_theorist # token will be TAG_token_base
		advisor = {
			slot = theorist
			traits = { military_theorist }
			ledger = army
			cost = 50
		}
		portraits = { 
			army = { small = GFX_idea_generic_military_theorist }
		}
	}
	generate_character = {
		token_base = generic_naval_theorist # token will be TAG_token_base
		advisor = {
			slot = theorist
			traits = { naval_theorist }
			ledger = navy
			cost = 50
		}
		portraits = { 
			army = { small = GFX_idea_generic_naval_theorist }
		}
	}
	generate_character = {
		token_base = generic_air_warfare_theorist # token will be TAG_token_base
		advisor = {
			slot = theorist
			traits = { air_warfare_theorist }
			ledger = air
			cost = 50
		}
		portraits = { 
			army = { small = GFX_idea_generic_air_warfare_theorist }
		}
	}
}

# Military staff
every_possible_country = {
	limit = {
		NOT = { 
			OR = { 
				tag = AUS tag = BAD tag = BAV tag = BEL tag = BRA tag = DEN tag = ENG tag = FIN tag = FRA tag = GRE tag = MOR tag = NOR tag = OTO tag = PIE tag = PRS tag = QNG tag = ROM tag = RUS tag = SAX tag = SER tag = SWE tag = TUN tag = TUS tag = PAP tag = POR tag = PER tag = MOD tag = LUX tag = NSC
			}
		}
	}
	# generic army chiefs
	generate_character = {
		token_base = generic_army_chief_off # token will be TAG_token_base
		advisor = {
			slot = army_chief
			traits = { army_chief_offensive_1 }
			cost = 50
		}
		portraits = { 
			army = { small = GFX_idea_generic_army_chief_off }
		}
	}
	generate_character = {
		token_base = generic_army_chief_def # token will be TAG_token_base
		advisor = {
			slot = army_chief
			traits = { army_chief_defensive_1 }
			cost = 50
		}
		portraits = { 
			army = { small = GFX_idea_generic_army_chief_def }
		}
	}
	# generic navy chiefs
	generate_character = {
		token_base = generic_navy_chief_decisive_bat # token will be TAG_token_base
		advisor = {
			slot = navy_chief
			traits = { navy_chief_decisive_battle_2 }
			cost = 50
		}
		portraits = { 
			army = { small = GFX_idea_generic_navy_chief_decisive_bat }
		}
	}
	generate_character = {
		token_base = generic_navy_anti_submarine # token will be TAG_token_base
		advisor = {
			slot = navy_chief
			traits = { navy_anti_submarine_2 }
			cost = 50
		}
		portraits = { 
			army = { small = GFX_idea_generic_navy_anti_submarine }
		}
	}
	# generic air chiefs
	generate_character = {
		token_base = generic_air_close_air_sup # token will be TAG_token_base
		advisor = {
			slot = air_chief
			traits = { air_close_air_support_2 }
			cost = 50
		}
		portraits = { 
			army = { small = GFX_idea_generic_air_close_air_sup }
		}
	}
	generate_character = {
		token_base = generic_air_chief_all_weather # token will be TAG_token_base
		advisor = {
			slot = air_chief
			traits = { air_chief_all_weather_2 }
			cost = 50
		}
		portraits = { 
			army = { small = GFX_idea_generic_air_chief_all_weather }
		}
	}
	# generic high command
	generate_character = {
		token_base = generic_army_art # token will be TAG_token_base
		advisor = {
			slot = high_command
			traits = { army_artillery_1 }
			ledger = army
			cost = 50
		}
		portraits = { 
			army = { small = GFX_idea_generic_army_art }
		}
	}
	generate_character = {
		token_base = generic_army_log # token will be TAG_token_base
		advisor = {
			slot = high_command
			traits = { army_logistics_2 }
			ledger = army
			cost = 50
		}
		portraits = { 
			army = { small = GFX_idea_generic_army_log }
		}
	}
	generate_character = {
		token_base = generic_navy_fleet_log # token will be TAG_token_base
		advisor = {
			slot = high_command
			traits = { navy_fleet_logistics_1 }
			ledger = navy
			cost = 50
		}
		portraits = { 
			army = { small = GFX_idea_generic_navy_fleet_log }
		}
	}
	generate_character = {
		token_base = generic_air_air_combat_trainer # token will be TAG_token_base
		advisor = {
			slot = high_command
			traits = { air_air_combat_training_2 }
			ledger = air
			cost = 50
		}
		portraits = { 
			army = { small = GFX_idea_generic_air_air_combat_trainer }
		}
	}
}

# every_possible_country = {
# 	generate_character = {
# 		token_base = generic_captain_of_industry # token will be TAG_token_base
# 		advisor = {
# 			slot = political_advisor
# 			traits = { captain_of_industry }
# 		}
# 		portraits = {
# 			army = { small = GFX_idea_generic_captain_of_industry }
# 		}
# 	}
# 	generate_character = {
# 		token_base = generic_fortification_engineer # token will be TAG_token_base
# 		advisor = {
# 			slot = political_advisor
# 			traits = { fortification_engineer }
# 		}
# 		portraits = {
# 			army = { small = GFX_idea_generic_fortification_engineer }
# 		}
# 	}
# 	generate_character = {
# 		token_base = generic_war_industrialist # token will be TAG_token_base
# 		advisor = {
# 			slot = political_advisor
# 			traits = { war_industrialist }
# 		}
# 		portraits = {
# 			army = { small = GFX_idea_generic_war_industrialist }
# 		}
# 	}
# 	generate_character = { #Apparently MAN needs this to get an Illusive Gentleman with the new character sytem
# 		token_base = generic_head_of_intelligence # token will be TAG_token_base
# 		advisor = {
# 			slot = political_advisor
# 			traits = { head_of_intelligence }
# 			available = {
# 				has_intelligence_agency = yes
# 			}
# 			ai_will_do = {
# 				factor = 1
# 				modifier = {
# 					has_intelligence_agency = no
# 					factor = 0
# 				}
# 			}
# 		}
# 		portraits = {
# 			army = { small = GFX_idea_generic_head_of_intelligence }
# 		}
# 	}
# }