### Division Limits ###
defined_text = {
	name = unit_limit_count_loc
	text = {
		trigger = {
			check_variable = { num_actual_divisions > max_divisions }
		}
		localization_key = unit_limit_count_red
	}
	text = {
		trigger = {
			check_variable = { num_actual_divisions = max_divisions }
		}
		localization_key = unit_limit_count_yellow
	}
	text = {
		localization_key = unit_limit_count_green
	}
}

defined_text = {
	name = above_unit_limit_desc
	text = {
		trigger = {
			has_dynamic_modifier = { modifier = mobilisation_penalty_modifier }
		}
		localization_key = unit_limit_desc_above_limit
	}
	text = {
		localization_key = empty
	}
}

defined_text = {
	name = unit_limit_noncore_population
	text = {
		trigger = {
			has_variable = non_core_base
		}
		localization_key = unit_limit_noncore_population_desc
	}
	text = {
		localization_key = empty
	}
}

defined_text = {
	name = unit_limit_crownland_population_bonus
	text = {
		trigger = {
			has_variable = crownland_base_units
		}
		localization_key = unit_limit_crownland_population_bonus_desc
	}
	text = {
		localization_key = empty
	}
}

defined_text = {
	name = unit_limit_crownland_state_bonus
	text = {
		trigger = {
			has_variable = crownland_states
		}
		localization_key = unit_limit_crownland_state_bonus_desc
	}
	text = {
		localization_key = empty
	}
}

defined_text = {
	name = unit_limit_modifier_was_capped
	text = {
		trigger = {
			check_variable = { industry_factor = 0.5 }
		}
		localization_key = unit_limit_modifier_was_capped_desc
	}
	text = {
		localization_key = empty
	}
}

defined_text = {
	name = unit_limit_extra_modifier_line_break
	text = {
		trigger = {
			OR = {
				is_faction_leader = yes
				has_idea = low_economic_mobilisation
				has_idea = partial_economic_mobilisation
				has_idea = war_economy
				has_idea = tot_economic_mobilisation
			}
		}
		localization_key = tooltip_white_line
	}
	text = {
		localization_key = empty
	}
}

defined_text = {
	name = unit_limit_faction_leader
	text = {
		trigger = { is_faction_leader = yes }
		localization_key = unit_limit_faction_leader_desc
	}
	text = {
		localization_key = empty
	}
}

defined_text = {
	name = unit_limit_has_war
	text = {
		trigger = { has_war = yes }
		localization_key = unit_limit_has_war_desc
	}
	text = {
		localization_key = empty
	}
}

defined_text = {
	name = unit_limit_economy_law
	text = {
		trigger = { has_idea = low_economic_mobilisation }
		localization_key = unit_limit_low_economic_mobilisation
	}
	text = {
		trigger = { has_idea = partial_economic_mobilisation }
		localization_key = unit_limit_partial_economic_mobilisation
	}
	text = {
		trigger = { has_idea = war_economy }
		localization_key = unit_limit_war_economy
	}
	text = {
		trigger = { has_idea = tot_economic_mobilisation }
		localization_key = unit_limit_tot_economic_mobilisation
	}
	text = {
		localization_key = empty
	}
}

defined_text = {
	name = unit_limit_was_capped
	text = {
		trigger = {
			check_variable = { lower_limit > net_max_divisions }
		}
		localization_key = unit_limit_was_capped_desc
	}
	text = {
		localization_key = empty
	}
}

defined_text = {
	name = unit_limit_lower_limit_used
	text = {
		trigger = {
			check_variable = { lower_limit > net_max_divisions }
			check_variable = { lower_limit > 5 }
		}
		localization_key = unit_limit_num_states_used_desc
	}
	text = {
		trigger = {
			check_variable = { lower_limit > net_max_divisions }
		}
		localization_key = unit_limit_default_used_desc
	}
	text = {
		localization_key = empty
	}
}

defined_text = {
	name = unit_limit_bonus_used
	text = {
		trigger = {
			NOT = { check_variable = { additional_unit_limit = 0 } }
		}
		localization_key = unit_limit_bonus_used_desc
	}
	text = {
		localization_key = empty
	}
}

defined_text = {
	name = RankScriptedLoc
	text = {
		trigger = {
			has_idea = classified_rank_NO
		}
		localization_key = wia_rank_no
	}
	text = {
		trigger = {
			has_idea = classified_rank_D
		}
		localization_key = wia_rank_d
	}
	text = {
		trigger = {
			has_idea = classified_rank_C
		}
		localization_key = wia_rank_c
	}
	text = {
		trigger = {
			has_idea = classified_rank_B
		}
		localization_key = wia_rank_b
	}
	text = {
		trigger = {
			has_idea = classified_rank_A
		}
		localization_key = wia_rank_a
	}
	text = {
		trigger = {
			has_idea = classified_rank_S
		}
		localization_key = wia_rank_s
	}
}

defined_text = {
	name = RankInitializingLoc
	text = {
		trigger = {
			has_country_flag = rank_game_started
			has_country_flag = rank_game_started2
		}
		localization_key = rank_game_initializing_loc
	}
	text = {
		trigger = {
			NOT = {
				has_country_flag = rank_game_started
			}
			has_country_flag = rank_game_started2
		}
		localization_key = rank_game_initialized_loc
	}
}