use std::sync::LazyLock;
use crate::helpers::{TigerHashMap, expand_scopes_hoi4};
use crate::item::Item;
use crate::scopes::Scopes;
pub static VARIABLES_MAP: LazyLock<TigerHashMap<&'static str, (Scopes, Scopes, Suffix)>> =
LazyLock::new(|| {
let mut hash = TigerHashMap::default();
for (from, s, to, suffix) in VARIABLES.iter().copied() {
let duplicate = hash.insert(s, (expand_scopes_hoi4(from), to, suffix)).is_some();
assert!(!duplicate, "duplicate variable key {s}");
}
hash
});
pub static ARRAYS_MAP: LazyLock<TigerHashMap<&'static str, (Scopes, Scopes, Suffix)>> =
LazyLock::new(|| {
let mut hash = TigerHashMap::default();
for (from, s, to, suffix) in ARRAYS.iter().copied() {
let duplicate = hash.insert(s, (expand_scopes_hoi4(from), to, suffix)).is_some();
assert!(!duplicate, "duplicate variable key {s}");
}
hash
});
#[derive(Debug, Clone, Copy)]
pub enum Suffix {
None,
Scope(Scopes),
Item(Item),
OptionalChoice(&'static [&'static str]),
Modif,
ShipTypes,
}
const VARIABLES: &[(Scopes, &str, Scopes, Suffix)] = &[
(Scopes::None, "date", Scopes::Value, Suffix::None),
(Scopes::None, "difficulty", Scopes::Value, Suffix::None),
(Scopes::None, "num_days", Scopes::Value, Suffix::None),
(Scopes::None, "num_of_career_profile_points", Scopes::Value, Suffix::None),
(Scopes::None, "pc_turn", Scopes::Value, Suffix::None),
(Scopes::None, "power_balance_daily_change", Scopes::Value, Suffix::Item(Item::PowerBalance)),
(
Scopes::None.union(Scopes::Country),
"power_balance_value",
Scopes::Value,
Suffix::Item(Item::PowerBalance),
),
(Scopes::None, "power_balance_weekly_change", Scopes::Value, Suffix::Item(Item::PowerBalance)),
(Scopes::None, "threat", Scopes::Value, Suffix::None),
(Scopes::None, "year", Scopes::Value, Suffix::None),
(Scopes::Country, "agency_upgrade_number", Scopes::Value, Suffix::None),
(Scopes::Country, "ai_attitude_allied_weight", Scopes::Value, Suffix::Scope(Scopes::Country)),
(Scopes::Country, "ai_attitude_friendly_weight", Scopes::Value, Suffix::Scope(Scopes::Country)),
(Scopes::Country, "ai_attitude_hostile_weight", Scopes::Value, Suffix::Scope(Scopes::Country)),
(Scopes::Country, "ai_attitude_is_threatened", Scopes::Value, Suffix::None),
(Scopes::Country, "ai_attitude_neutral_weight", Scopes::Value, Suffix::Scope(Scopes::Country)),
(Scopes::Country, "ai_attitude_outraged_weight", Scopes::Value, Suffix::Scope(Scopes::Country)),
(
Scopes::Country,
"ai_attitude_protective_weight",
Scopes::Value,
Suffix::Scope(Scopes::Country),
),
(
Scopes::Country,
"ai_attitude_threatened_weight",
Scopes::Value,
Suffix::Scope(Scopes::Country),
),
(Scopes::Country, "ai_attitude_wants_ally", Scopes::Value, Suffix::None),
(Scopes::Country, "ai_attitude_wants_antagonize", Scopes::Value, Suffix::None),
(Scopes::Country, "ai_attitude_wants_ignore", Scopes::Value, Suffix::None),
(Scopes::Country, "ai_attitude_wants_protect", Scopes::Value, Suffix::None),
(Scopes::Country, "ai_attitude_wants_weaken", Scopes::Value, Suffix::None),
(Scopes::Country, "ai_irrationality", Scopes::Value, Suffix::None),
(Scopes::Country, "ai_strategy_activate_crypto", Scopes::Value, Suffix::Scope(Scopes::Country)),
(Scopes::Country, "ai_strategy_alliance", Scopes::Value, Suffix::Scope(Scopes::Country)),
(Scopes::Country, "ai_strategy_antagonize", Scopes::Value, Suffix::Scope(Scopes::Country)),
(Scopes::Country, "ai_strategy_befriend", Scopes::Value, Suffix::Scope(Scopes::Country)),
(Scopes::Country, "ai_strategy_conquer", Scopes::Value, Suffix::Scope(Scopes::Country)),
(Scopes::Country, "ai_strategy_consider_weak", Scopes::Value, Suffix::Scope(Scopes::Country)),
(Scopes::Country, "ai_strategy_contain", Scopes::Value, Suffix::Scope(Scopes::Country)),
(Scopes::Country, "ai_strategy_declare_war", Scopes::Value, Suffix::Scope(Scopes::Country)),
(Scopes::Country, "ai_strategy_decrypt_target", Scopes::Value, Suffix::Scope(Scopes::Country)),
(
Scopes::Country,
"ai_strategy_dont_defend_ally_borders",
Scopes::Value,
Suffix::Scope(Scopes::Country),
),
(
Scopes::Country,
"ai_strategy_force_defend_ally_borders",
Scopes::Value,
Suffix::Scope(Scopes::Country),
),
(Scopes::Country, "ai_strategy_ignore", Scopes::Value, Suffix::Scope(Scopes::Country)),
(Scopes::Country, "ai_strategy_ignore_claim", Scopes::Value, Suffix::Scope(Scopes::Country)),
(Scopes::Country, "ai_strategy_influence", Scopes::Value, Suffix::Scope(Scopes::Country)),
(Scopes::Country, "ai_strategy_invade", Scopes::Value, Suffix::Scope(Scopes::Country)),
(
Scopes::Country,
"ai_strategy_occupation_policy",
Scopes::Value,
Suffix::Scope(Scopes::Country),
),
(Scopes::Country, "ai_strategy_prepare_for_war", Scopes::Value, Suffix::Scope(Scopes::Country)),
(Scopes::Country, "ai_strategy_protect", Scopes::Value, Suffix::Scope(Scopes::Country)),
(
Scopes::Country,
"ai_strategy_send_volunteers_desire",
Scopes::Value,
Suffix::Scope(Scopes::Country),
),
(Scopes::Country, "ai_strategy_support", Scopes::Value, Suffix::Scope(Scopes::Country)),
(Scopes::Country, "ai_wants_divisions", Scopes::Value, Suffix::None),
(Scopes::Country, "air_chief", Scopes::Character, Suffix::None),
(Scopes::Country, "air_experience", Scopes::Value, Suffix::None),
(Scopes::Country, "air_intel", Scopes::Value, Suffix::Scope(Scopes::Country)),
(Scopes::Country, "alliance_naval_strength_ratio", Scopes::Value, Suffix::None),
(Scopes::Country, "alliance_strength_ratio", Scopes::Value, Suffix::None),
(Scopes::Country, "amount_manpower_in_deployment_queue", Scopes::Value, Suffix::None),
(Scopes::Country, "amount_research_slots", Scopes::Value, Suffix::None),
(Scopes::Country, "any_war_score", Scopes::Value, Suffix::None),
(Scopes::Country, "army_chief", Scopes::Character, Suffix::None),
(Scopes::Country, "army_experience", Scopes::Value, Suffix::None),
(Scopes::Country, "army_intel", Scopes::Value, Suffix::Scope(Scopes::Country)),
(Scopes::Country, "autonomy_ratio", Scopes::Value, Suffix::None),
(Scopes::Country, "capital", Scopes::State, Suffix::None),
(Scopes::Country, "casualties", Scopes::Value, Suffix::None),
(Scopes::Country, "casualties_k", Scopes::Value, Suffix::None),
(Scopes::Country, "civilian_intel", Scopes::Value, Suffix::Scope(Scopes::Country)),
(Scopes::Country, "command_power", Scopes::Value, Suffix::None),
(Scopes::Country, "command_power_daily", Scopes::Value, Suffix::None),
(Scopes::Country, "compare_autonomy_progress_ratio", Scopes::Value, Suffix::None),
(Scopes::Country, "convoy_threat", Scopes::Value, Suffix::None),
(Scopes::Country, "core_compliance", Scopes::Value, Suffix::None),
(Scopes::Country, "core_resistance", Scopes::Value, Suffix::None),
(Scopes::Country, "country_leader", Scopes::Character, Suffix::None),
(Scopes::Country, "cryptology_defense_level", Scopes::Value, Suffix::None),
(Scopes::Country, "current_party_ideology_group", Scopes::Value, Suffix::None),
(Scopes::Country, "days_decision_timeout", Scopes::Value, Suffix::Item(Item::Decision)),
(Scopes::Country, "days_mission_timeout", Scopes::Value, Suffix::Item(Item::Decision)),
(Scopes::Country, "days_since_capitulated", Scopes::Value, Suffix::None),
(Scopes::Country, "decryption_progress", Scopes::Value, Suffix::Scope(Scopes::Country)),
(Scopes::Country, "decryption_speed", Scopes::Value, Suffix::None),
(Scopes::Country, "deployed_airforce_manpower_k", Scopes::Value, Suffix::None),
(Scopes::Country, "deployed_army_manpower_k", Scopes::Value, Suffix::None),
(Scopes::Country, "deployed_navy_manpower_k", Scopes::Value, Suffix::None),
(Scopes::Country, "deployed_total_manpower_k", Scopes::Value, Suffix::None),
(Scopes::Country, "encryption_strength", Scopes::Value, Suffix::None),
(Scopes::Country, "enemies_naval_strength_ratio", Scopes::Value, Suffix::None),
(Scopes::Country, "enemies_strength_ratio", Scopes::Value, Suffix::None),
(Scopes::Country, "faction_leader", Scopes::Country, Suffix::None),
(Scopes::Country, "foreign_manpower", Scopes::Country, Suffix::None),
(Scopes::Country, "fuel_k", Scopes::Value, Suffix::None),
(Scopes::Country, "fuel_ratio", Scopes::Value, Suffix::None),
(Scopes::Country, "garrison_manpower_need", Scopes::Value, Suffix::None),
(Scopes::Country, "has_added_tension_amount", Scopes::Value, Suffix::None),
(Scopes::Country, "has_collaboration", Scopes::Value, Suffix::Scope(Scopes::Country)),
(Scopes::Country, "has_convoys_war_support", Scopes::Value, Suffix::None),
(Scopes::Country, "has_legitimacy", Scopes::Value, Suffix::None),
(Scopes::Country, "has_manpower", Scopes::Value, Suffix::None),
(Scopes::Country, "has_political_power", Scopes::Value, Suffix::None),
(Scopes::Country, "has_stability", Scopes::Value, Suffix::None),
(Scopes::Country, "has_war_support", Scopes::Value, Suffix::None),
(
Scopes::Country,
"highest_party_ideology",
Scopes::Value,
Suffix::OptionalChoice(&["exclude_ruling_party"]),
),
(
Scopes::Country,
"highest_party_popularity",
Scopes::Value,
Suffix::OptionalChoice(&["exclude_ruling_party"]),
),
(Scopes::Country, "host", Scopes::Country, Suffix::None),
(Scopes::Country, "land_doctrine_level", Scopes::Value, Suffix::None),
(Scopes::Country, "legitimacy", Scopes::Value, Suffix::None),
(Scopes::Country, "longest_war_length", Scopes::Value, Suffix::None),
(Scopes::Country, "manpower", Scopes::Value, Suffix::None), (Scopes::Country, "manpower_k", Scopes::Value, Suffix::None),
(Scopes::Country, "manpower_per_military_factory", Scopes::Value, Suffix::None),
(Scopes::Country, "max_available_manpower", Scopes::Value, Suffix::None), (Scopes::Country, "max_available_manpower_k", Scopes::Value, Suffix::None),
(Scopes::Country, "mine_threat", Scopes::Value, Suffix::None),
(
Scopes::Country.union(Scopes::State).union(Scopes::IndustrialOrg),
"modifier",
Scopes::Value.union(Scopes::Bool),
Suffix::Modif,
),
(Scopes::Country, "navy_chief", Scopes::Character, Suffix::None),
(Scopes::Country, "navy_experience", Scopes::Value, Suffix::None),
(Scopes::Country, "navy_intel", Scopes::Value, Suffix::Scope(Scopes::Country)),
(Scopes::Country, "network_national_coverage", Scopes::Value, Suffix::Scope(Scopes::Country)),
(Scopes::Country, "num_armies", Scopes::Value, Suffix::None),
(Scopes::Country, "num_armies_in_state", Scopes::Value, Suffix::Scope(Scopes::State)),
(Scopes::Country, "num_armies_with_type", Scopes::Value, Suffix::Item(Item::Equipment)),
(Scopes::Country, "num_controlled_states", Scopes::Value, Suffix::None),
(Scopes::Country, "num_core_states", Scopes::Value, Suffix::None),
(Scopes::Country, "num_deployed_planes", Scopes::Value, Suffix::None),
(
Scopes::Country,
"num_deployed_planes_with_type",
Scopes::Value,
Suffix::Item(Item::Equipment),
),
(Scopes::Country, "num_divisions", Scopes::Value, Suffix::None),
(
Scopes::Country.union(Scopes::Character),
"num_equipment",
Scopes::Value,
Suffix::Item(Item::Equipment),
),
(Scopes::Country, "num_equipment_in_armies", Scopes::Value, Suffix::Item(Item::Equipment)),
(Scopes::Country, "num_equipment_in_armies_k", Scopes::Value, Suffix::Item(Item::Equipment)),
(Scopes::Country, "num_faction_members", Scopes::Value, Suffix::None),
(Scopes::Country, "num_fake_intel_divisions", Scopes::Value, Suffix::None),
(Scopes::Country, "num_free_operative_slots", Scopes::Value, Suffix::None),
(Scopes::Country, "num_nukes_being_dropped", Scopes::Value, Suffix::None),
(Scopes::Country, "num_nukes_left_to_drop", Scopes::Value, Suffix::None),
(Scopes::Country, "num_occupied_states", Scopes::Value, Suffix::None),
(Scopes::Country, "num_of_available_civilian_factories", Scopes::Value, Suffix::None),
(Scopes::Country, "num_of_available_military_factories", Scopes::Value, Suffix::None),
(Scopes::Country, "num_of_available_naval_factories", Scopes::Value, Suffix::None),
(Scopes::Country, "num_of_civilian_factories", Scopes::Value, Suffix::None),
(
Scopes::Country,
"num_of_civilian_factories_available_for_projects",
Scopes::Value,
Suffix::None,
),
(
Scopes::Country,
"num_of_civilian_factories_in_cores",
Scopes::Value,
Suffix::Scope(Scopes::Country),
),
(Scopes::Country, "num_of_controlled_factories", Scopes::Value, Suffix::None),
(Scopes::Country, "num_of_controlled_states", Scopes::Value, Suffix::None),
(Scopes::Country, "num_of_factories", Scopes::Value, Suffix::None),
(Scopes::Country, "num_of_military_factories", Scopes::Value, Suffix::None),
(
Scopes::Country,
"num_of_military_factories_in_cores",
Scopes::Value,
Suffix::Scope(Scopes::Country),
),
(Scopes::Country, "num_of_naval_factories", Scopes::Value, Suffix::None),
(
Scopes::Country,
"num_of_naval_factories_in_cores",
Scopes::Value,
Suffix::Scope(Scopes::Country),
),
(Scopes::Country, "num_of_nukes", Scopes::Value, Suffix::None),
(Scopes::Country, "num_of_operatives", Scopes::Value, Suffix::None),
(Scopes::Country, "num_of_owned_factories", Scopes::Value, Suffix::None),
(Scopes::Country, "num_of_supply_nodes", Scopes::Value, Suffix::None),
(Scopes::Country, "num_operative_slots", Scopes::Value, Suffix::None),
(Scopes::Country, "num_orders_groups", Scopes::Value, Suffix::None),
(Scopes::Country, "num_owned_controlled_states", Scopes::Value, Suffix::None),
(Scopes::Country, "num_owned_states", Scopes::Value, Suffix::None),
(Scopes::Country, "num_researched_technologies", Scopes::Value, Suffix::None),
(Scopes::Country.union(Scopes::Character), "num_ships", Scopes::Value, Suffix::None),
(
Scopes::Country.union(Scopes::Character),
"num_ships_with_type",
Scopes::Value,
Suffix::ShipTypes,
),
(Scopes::Country, "num_subjects", Scopes::Value, Suffix::None),
(
Scopes::Country,
"num_target_equipment_in_armies",
Scopes::Value,
Suffix::Item(Item::Equipment),
),
(
Scopes::Country,
"num_target_equipment_in_armies_k",
Scopes::Value,
Suffix::Item(Item::Equipment),
),
(Scopes::Country, "num_tech_sharing_groups", Scopes::Value, Suffix::None),
(Scopes::Country, "opinion", Scopes::Value, Suffix::Scope(Scopes::Country)),
(Scopes::Country, "original_research_slots", Scopes::Value, Suffix::Scope(Scopes::Country)),
(Scopes::Country, "original_tag", Scopes::Country, Suffix::None),
(Scopes::Country, "overlord", Scopes::Country, Suffix::None),
(Scopes::Country, "party_popularity", Scopes::Value, Suffix::Item(Item::IdeologyGroup)),
(Scopes::Country, "party_popularity_100", Scopes::Value, Suffix::Item(Item::IdeologyGroup)),
(Scopes::Country, "pc_current_score", Scopes::Value, Suffix::None),
(Scopes::Country, "pc_total_score", Scopes::Value, Suffix::None),
(Scopes::Country, "political_power", Scopes::Value, Suffix::None),
(Scopes::Country, "political_power_daily", Scopes::Value, Suffix::None),
(Scopes::Country, "political_power_growth", Scopes::Value, Suffix::None),
(Scopes::Country, "power_balance_daily", Scopes::Value, Suffix::None),
(Scopes::Country, "power_balance_weekly", Scopes::Value, Suffix::None),
(Scopes::Country.union(Scopes::State), "resource", Scopes::Value, Suffix::Item(Item::Resource)),
(Scopes::Country, "resource_consumed", Scopes::Value, Suffix::Item(Item::Resource)),
(Scopes::Country, "resource_exported", Scopes::Value, Suffix::Item(Item::Resource)),
(Scopes::Country, "resource_imported", Scopes::Value, Suffix::Item(Item::Resource)),
(Scopes::Country, "resource_produced", Scopes::Value, Suffix::Item(Item::Resource)),
(Scopes::Country, "stability", Scopes::Value, Suffix::None),
(Scopes::Country, "surrender_progress", Scopes::Value, Suffix::None),
(Scopes::Country, "theorist", Scopes::Character, Suffix::None),
(Scopes::Country, "total_constructed_air_base", Scopes::Value, Suffix::None),
(Scopes::Country, "total_constructed_anti_air", Scopes::Value, Suffix::None),
(Scopes::Country, "total_constructed_civilian_factory", Scopes::Value, Suffix::None),
(Scopes::Country, "total_constructed_dockyard", Scopes::Value, Suffix::None),
(Scopes::Country, "total_constructed_fuel_silo", Scopes::Value, Suffix::None),
(Scopes::Country, "total_constructed_gun_emplacement", Scopes::Value, Suffix::None),
(Scopes::Country, "total_constructed_infrastructure", Scopes::Value, Suffix::None),
(Scopes::Country, "total_constructed_land_fort", Scopes::Value, Suffix::None),
(Scopes::Country, "total_constructed_military_factory", Scopes::Value, Suffix::None),
(Scopes::Country, "total_constructed_naval_fort", Scopes::Value, Suffix::None),
(Scopes::Country, "total_constructed_nuclear_reactor", Scopes::Value, Suffix::None),
(Scopes::Country, "total_constructed_other", Scopes::Value, Suffix::None),
(Scopes::Country, "total_constructed_port", Scopes::Value, Suffix::None),
(Scopes::Country, "total_constructed_radar", Scopes::Value, Suffix::None),
(Scopes::Country, "total_constructed_refinery", Scopes::Value, Suffix::None),
(Scopes::Country, "total_constructed_rocket_site", Scopes::Value, Suffix::None),
(Scopes::Country, "total_constructed_supply_node", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_air_transport", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_amphibious", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_anti_air", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_anti_tank", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_armor", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_artillery", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_ballistic_missile", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_capital_ship", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_carrier", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_cas", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_convoy", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_emplacement_gun_ammo", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_fighter", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_flame", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_floating_harbor", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_heavy_fighter", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_infantry", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_interceptor", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_land_cruiser", Scopes::Value, Suffix::None),
(
Scopes::Country,
"total_equipment_produced_maritime_patrol_plane",
Scopes::Value,
Suffix::None,
),
(Scopes::Country, "total_equipment_produced_mechanized", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_missile", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_missile_launcher", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_motorized", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_naval_bomber", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_nuclear_missile", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_railway_gun", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_rocket", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_sam_missile", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_scout_plane", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_screen_ship", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_strategic_bomber", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_submarine", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_suicide", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_support", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_tactical_bomber", Scopes::Value, Suffix::None),
(Scopes::Country, "total_equipment_produced_train", Scopes::Value, Suffix::None),
(Scopes::State, "arms_factory_level", Scopes::Value, Suffix::None),
(Scopes::State, "building_level", Scopes::Value, Suffix::Item(Item::Building)),
(Scopes::State, "compliance", Scopes::Value, Suffix::None),
(Scopes::State, "compliance_speed", Scopes::Value, Suffix::None),
(Scopes::State, "controller", Scopes::Country, Suffix::None),
(Scopes::State, "damaged_building_level", Scopes::Value, Suffix::Item(Item::Building)),
(Scopes::State, "days_since_last_strategic_bombing", Scopes::Value, Suffix::None),
(Scopes::State, "distance_to", Scopes::Value, Suffix::Scope(Scopes::State)),
(Scopes::State, "industrial_complex_level", Scopes::Value, Suffix::None),
(Scopes::State, "infrastructure_level", Scopes::Value, Suffix::None),
(Scopes::State, "non_damaged_building_level", Scopes::Value, Suffix::Item(Item::Building)),
(Scopes::State, "owner", Scopes::Country, Suffix::None),
(Scopes::State, "resistance", Scopes::Value, Suffix::None),
(Scopes::State, "resistance_target", Scopes::Value, Suffix::None),
(Scopes::State, "state_and_terrain_strategic_value", Scopes::Value, Suffix::None),
(Scopes::State, "state_population", Scopes::Value, Suffix::None),
(Scopes::State, "state_population_k", Scopes::Value, Suffix::None),
(Scopes::State, "state_strategic_value", Scopes::Value, Suffix::None),
(Scopes::Character, "army_attack_level", Scopes::Value, Suffix::None),
(Scopes::Character, "army_defense_level", Scopes::Value, Suffix::None),
(Scopes::Character, "attack_level", Scopes::Value, Suffix::None),
(Scopes::Character, "attack_skill_level", Scopes::Value, Suffix::None),
(Scopes::Character, "average_stats", Scopes::Value, Suffix::None),
(Scopes::Character, "avg_combat_status", Scopes::Value, Suffix::None),
(Scopes::Character, "avg_defensive_combat_status", Scopes::Value, Suffix::None),
(Scopes::Character, "avg_offensive_combat_status", Scopes::Value, Suffix::None),
(Scopes::Character, "avg_unit_planning_ratio", Scopes::Value, Suffix::None),
(Scopes::Character, "avg_units_acclimation", Scopes::Value, Suffix::None),
(Scopes::Character, "coordination_level", Scopes::Value, Suffix::None),
(Scopes::Character, "defense_level", Scopes::Value, Suffix::None),
(Scopes::Character, "defense_skill_level", Scopes::Value, Suffix::None),
(Scopes::Character, "has_orders_group", Scopes::Value, Suffix::None),
(Scopes::Character, "intel_yield_factor_on_capture", Scopes::Value, Suffix::None),
(Scopes::Character, "logistics_level", Scopes::Value, Suffix::None),
(Scopes::Character, "logistics_skill_level", Scopes::Value, Suffix::None),
(Scopes::Character, "maneuvering_level", Scopes::Value, Suffix::None),
(Scopes::Character, "num_armored", Scopes::Value, Suffix::None),
(Scopes::Character, "num_artillery", Scopes::Value, Suffix::None),
(Scopes::Character, "num_assigned_traits", Scopes::Value, Suffix::None),
(Scopes::Character, "num_basic_traits", Scopes::Value, Suffix::None),
(Scopes::Character, "num_battalions", Scopes::Value, Suffix::None),
(Scopes::Character, "num_battalions_with_type", Scopes::Value, Suffix::Item(Item::Equipment)),
(Scopes::Character, "num_battle_plans", Scopes::Value, Suffix::None),
(Scopes::Character, "num_cavalry", Scopes::Value, Suffix::None),
(Scopes::Character, "num_infantry", Scopes::Value, Suffix::None),
(Scopes::Character, "num_max_traits", Scopes::Value, Suffix::None),
(Scopes::Character, "num_mechanized", Scopes::Value, Suffix::None),
(Scopes::Character, "num_motorized", Scopes::Value, Suffix::None),
(Scopes::Character, "num_personality_traits", Scopes::Value, Suffix::None),
(Scopes::Character, "num_rocket", Scopes::Value, Suffix::None),
(Scopes::Character, "num_special", Scopes::Value, Suffix::None),
(Scopes::Character, "num_status_traits", Scopes::Value, Suffix::None),
(Scopes::Character, "num_target_equipment", Scopes::Value, Suffix::Item(Item::Equipment)),
(Scopes::Character, "num_terrain_traits", Scopes::Value, Suffix::None),
(Scopes::Character, "num_traits", Scopes::Value, Suffix::None),
(Scopes::Character, "num_units", Scopes::Value, Suffix::None),
(Scopes::Character, "num_units_crossing_river", Scopes::Value, Suffix::None),
(Scopes::Character, "num_units_defensive_combats", Scopes::Value, Suffix::None),
(
Scopes::Character,
"num_units_defensive_combats_on",
Scopes::Value,
Suffix::Item(Item::Terrain),
),
(Scopes::Character, "num_units_in_combat", Scopes::Value, Suffix::None),
(Scopes::Character, "num_units_in_state", Scopes::Value, Suffix::Scope(Scopes::State)),
(Scopes::Character, "num_units_offensive_combats", Scopes::Value, Suffix::None),
(
Scopes::Character,
"num_units_offensive_combats_against",
Scopes::Value,
Suffix::Item(Item::Terrain),
),
(Scopes::Character, "num_units_on_climate", Scopes::Value, Suffix::Item(Item::Acclimatation)),
(Scopes::Character, "num_units_with_type", Scopes::Value, Suffix::Item(Item::Equipment)),
(Scopes::Character, "operation_country", Scopes::Country.union(Scopes::Value), Suffix::None),
(Scopes::Character, "operation_state", Scopes::State.union(Scopes::Value), Suffix::None),
(Scopes::Character, "operation_type", Scopes::Value, Suffix::None),
(Scopes::Character, "operative_captor", Scopes::Country, Suffix::None),
(Scopes::Character, "own_capture_chance_factor", Scopes::Value, Suffix::None),
(Scopes::Character, "own_forced_into_hiding_time_factor", Scopes::Value, Suffix::None),
(Scopes::Character, "own_harmed_time_factor", Scopes::Value, Suffix::None),
(Scopes::Character, "planning_level", Scopes::Value, Suffix::None),
(Scopes::Character, "planning_skill_level", Scopes::Value, Suffix::None),
(Scopes::Character, "skill", Scopes::Value, Suffix::None),
(Scopes::Character, "skill_level", Scopes::Value, Suffix::None),
(
Scopes::Character,
"sum_unit_terrain_modifier",
Scopes::Value.union(Scopes::Bool),
Suffix::Modif,
),
(Scopes::Character, "unit_modifier", Scopes::Value.union(Scopes::Bool), Suffix::Modif),
(Scopes::Character, "unit_ratio_ready_for_plan", Scopes::Value, Suffix::None),
(Scopes::IndustrialOrg, "funds", Scopes::Value, Suffix::None),
(Scopes::IndustrialOrg, "max_task_capacity", Scopes::Value, Suffix::None),
(Scopes::IndustrialOrg, "number_of_currently_assigned_tasks", Scopes::Value, Suffix::None),
(Scopes::IndustrialOrg, "number_of_unlocked_traits", Scopes::Value, Suffix::None),
(Scopes::IndustrialOrg, "number_of_unused_trait_points", Scopes::Value, Suffix::None),
(Scopes::IndustrialOrg, "research_bonus", Scopes::Value, Suffix::None),
(Scopes::IndustrialOrg, "size", Scopes::Value, Suffix::None),
(Scopes::SpecialProject, "facility_province_id", Scopes::Value, Suffix::None),
(Scopes::SpecialProject, "facility_state", Scopes::State, Suffix::None),
(Scopes::SpecialProject, "scientist", Scopes::Character, Suffix::None),
];
const ARRAYS: &[(Scopes, &str, Scopes, Suffix)] = &[
(Scopes::None, "countries", Scopes::Country, Suffix::None),
(Scopes::None, "ideology_groups", Scopes::Value, Suffix::None),
(Scopes::None, "majors", Scopes::Country, Suffix::None),
(Scopes::None, "operations", Scopes::Value, Suffix::None),
(Scopes::None, "province_controllers", Scopes::Country, Suffix::None),
(Scopes::None, "states", Scopes::Country, Suffix::None),
(Scopes::None, "technology", Scopes::Value, Suffix::None),
(Scopes::Country, "allies", Scopes::Country, Suffix::None),
(Scopes::Country, "army_leaders", Scopes::Character, Suffix::None),
(Scopes::Country, "controlled_states", Scopes::State, Suffix::None),
(Scopes::Country, "core_states", Scopes::State, Suffix::None),
(Scopes::Country, "enemies", Scopes::Country, Suffix::None),
(Scopes::Country, "enemies_of_allies", Scopes::Country, Suffix::None),
(Scopes::Country, "exiles", Scopes::Country, Suffix::None),
(Scopes::Country, "faction_members", Scopes::Country, Suffix::None),
(Scopes::Country, "high_command", Scopes::Character, Suffix::None),
(Scopes::Country, "navy_leaders", Scopes::Character, Suffix::None),
(Scopes::Country, "neighbors", Scopes::Country, Suffix::None),
(Scopes::Country, "neighbors_owned", Scopes::Country, Suffix::None),
(Scopes::Country, "occupied_countries", Scopes::Country, Suffix::None),
(Scopes::Country, "operatives", Scopes::Character, Suffix::None),
(Scopes::Country, "owned_controlled_states", Scopes::State, Suffix::None),
(Scopes::Country, "owned_states", Scopes::State, Suffix::None),
(Scopes::Country, "political_advisor", Scopes::Character, Suffix::None),
(Scopes::Country, "potential_and_current_enemies", Scopes::Country, Suffix::None),
(Scopes::Country, "researched_techs", Scopes::Value, Suffix::None),
(Scopes::Country, "subjects", Scopes::Country, Suffix::None),
(Scopes::State, "core_countries", Scopes::Country, Suffix::None),
];