use std::sync::LazyLock;
use crate::effect::Effect;
use crate::effect_validation::*;
use crate::everything::Everything;
use crate::helpers::TigerHashMap;
use crate::item::Item;
use crate::scopes::*;
use crate::token::Token;
use crate::vic3::effect_validation::*;
use crate::vic3::tables::misc::STATE_TYPES;
use Effect::*;
pub fn scope_effect(name: &Token, _data: &Everything) -> Option<(Scopes, Effect)> {
let name_lc = name.as_str().to_ascii_lowercase();
SCOPE_EFFECT_MAP.get(&*name_lc).copied()
}
static SCOPE_EFFECT_MAP: LazyLock<TigerHashMap<&'static str, (Scopes, Effect)>> =
LazyLock::new(|| {
let mut hash = TigerHashMap::default();
for (from, s, effect) in SCOPE_EFFECT.iter().copied() {
hash.insert(s, (from, effect));
}
hash
});
const SCOPE_EFFECT: &[(Scopes, &str, Effect)] = &[
(Scopes::InterestGroup, "abandon_revolution", Boolean),
(Scopes::State, "activate_building", Vb(validate_activate_building)),
(Scopes::Country, "activate_law", Scope(Scopes::LawType)),
(
Scopes::Country.union(Scopes::State),
"activate_production_method",
Vb(validate_activate_production_method),
),
(Scopes::State, "add_acceptance", TargetValue("target", Scopes::Culture, "value")),
(Scopes::Law, "add_amendment", Vb(validate_add_amendment)),
(Scopes::StateRegion, "add_arable_land", ScriptValue),
(Scopes::Country, "add_banned_goods", Scope(Scopes::Goods)),
(Scopes::Country, "add_change_relations_progress", Vb(validate_country_value)), (Scopes::PoliticalMovement, "add_character_ideology", Item(Item::Ideology)),
(Scopes::Character, "add_character_role", Item(Item::CharacterRole)),
(Scopes::CivilWar, "add_civil_war_progress", ScriptValue),
(Scopes::StateRegion, "add_claim", Scope(Scopes::Country)),
(Scopes::PowerBloc, "add_cohesion_number", ScriptValue),
(Scopes::PowerBloc, "add_cohesion_percent", ScriptValue),
(Scopes::Character, "add_commander_rank", Integer),
(Scopes::Country, "add_company", Scope(Scopes::CompanyType)),
(Scopes::Company, "add_company_monopoly", Scope(Scopes::BuildingType)),
(Scopes::None, "add_contextless_journal_entry", Item(Item::JournalEntry)),
(Scopes::Country, "add_country_monopoly", Scope(Scopes::BuildingType)),
(Scopes::State, "add_cultural_community", Scope(Scopes::Culture)),
(Scopes::Culture, "add_cultural_community_in_state", Scope(Scopes::State)),
(Scopes::Culture, "add_cultural_obsession", Item(Item::Goods)),
(Scopes::Country, "add_culture_acceptance_modifier", Vb(validate_add_culture_modifier)),
(Scopes::State, "add_culture_standard_of_living_modifier", Vb(validate_add_culture_modifier)),
(Scopes::Country, "add_declared_interest", Item(Item::StrategicRegion)),
(Scopes::StateRegion.union(Scopes::State), "add_devastation", ScriptValue),
(
Scopes::DiplomaticPlay,
"add_diplomatic_play_war_support",
TargetValue("target", Scopes::Country, "value"),
),
(Scopes::Country, "add_electoral_confidence", ScriptValue),
(Scopes::Country, "add_enactment_modifier", Vb(validate_add_enactment_modifier)),
(Scopes::Country, "add_enactment_phase", ScriptValue),
(Scopes::Country, "add_enactment_setback", ScriptValue),
(Scopes::Country, "add_era_researched", Item(Item::TechnologyEra)),
(Scopes::DiplomaticPlay, "add_escalation", Integer),
(Scopes::Character, "add_experience", ScriptValue),
(Scopes::StateGoods, "add_exports", ScriptValue),
(Scopes::Culture, "add_fervor", ScriptValue),
(Scopes::Country, "add_fervor_target_modifier", Vb(validate_add_culture_modifier)),
(Scopes::StateRegion, "add_homeland", ScopeOrItem(Scopes::Culture, Item::Culture)),
(Scopes::InterestGroup, "add_ideology", Item(Item::Ideology)),
(Scopes::Party, "add_ig_to_party", Scope(Scopes::InterestGroup)),
(Scopes::StateGoods, "add_imports", ScriptValue),
(Scopes::DiplomaticPlay, "add_initiator_backers", Vb(validate_addremove_backers)),
(Scopes::Country, "add_investment_pool", ScriptValue),
(Scopes::JournalEntry, "add_involved_country", Scope(Scopes::Country)),
(Scopes::None, "add_journal_entry", Vb(validate_add_journalentry)),
(Scopes::Country, "add_law_progress", ScriptValue),
(Scopes::PowerBloc, "add_leverage", TargetValue("target", Scopes::Country, "value")),
(Scopes::Country, "add_liberty_desire", ScriptValue),
(Scopes::PoliticalLobby, "add_lobby_member", Scope(Scopes::InterestGroup)),
(Scopes::Country, "add_loyalists", Vb(validate_add_loyalists)),
(Scopes::State, "add_loyalists_in_state", Vb(validate_add_loyalists)),
(
Scopes::Country
.union(Scopes::Building)
.union(Scopes::Character)
.union(Scopes::Institution)
.union(Scopes::InterestGroup)
.union(Scopes::JournalEntry)
.union(Scopes::PoliticalMovement)
.union(Scopes::PowerBloc)
.union(Scopes::State),
"add_modifier",
Vbv(validate_add_modifier),
),
(Scopes::Party, "add_momentum", ScriptValue),
(Scopes::NewCombatUnit, "add_morale", ScriptValue),
(Scopes::MilitaryFormation, "add_organization", ScriptValue), (Scopes::Company, "add_owned_country", Scope(Scopes::Country)),
(Scopes::StateRegion, "add_pollution", ScriptValue),
(Scopes::Pop, "add_pop_wealth", Vb(validate_pop_wealth)),
(Scopes::Country, "add_primary_culture", Scope(Scopes::Culture)),
(Scopes::PowerBloc, "add_principle", Item(Item::Principle)),
(Scopes::JournalEntry, "add_progress", Vb(validate_progress)),
(Scopes::Country, "add_radicals", Vb(validate_add_loyalists)),
(Scopes::State, "add_radicals_in_state", Vb(validate_add_loyalists)),
(Scopes::Character, "add_random_trait", Choice(&["personality", "skill", "condition"])),
(
Scopes::State,
"add_religion_standard_of_living_modifier",
Vb(validate_add_religion_sol_modifier),
),
(Scopes::InterestGroup, "add_ruling_interest_group", Boolean),
(Scopes::StateRegion, "add_state_trait", Item(Item::StateTrait)),
(Scopes::DiplomaticPlay, "add_target_backers", Vb(validate_addremove_backers)),
(Scopes::Country, "add_taxed_goods", Scope(Scopes::Goods)),
(Scopes::Country, "add_technology_progress", Vb(validate_add_technology_progress)),
(Scopes::Country, "add_technology_researched", Item(Item::Technology)),
(Scopes::None, "add_to_global_variable_list", Vb(validate_add_to_variable_list)),
(Scopes::all(), "add_to_list", Vbv(validate_add_to_list)),
(Scopes::None, "add_to_local_variable_list", Vb(validate_add_to_variable_list)),
(Scopes::all(), "add_to_temporary_list", Vbv(validate_add_to_list)),
(Scopes::None, "add_to_variable_list", Vb(validate_add_to_variable_list)),
(Scopes::Culture, "add_tradition_trait", Item(Item::TraditionTrait)),
(Scopes::Character, "add_trait", Item(Item::CharacterTrait)),
(Scopes::Country, "add_treasury", ScriptValue),
(Scopes::War, "add_war_exhaustion", TargetValue("target", Scopes::Country, "value")),
(Scopes::DiplomaticPlay, "add_war_goal", Vb(validate_add_war_goal)),
(Scopes::War, "add_war_war_support", TargetValue("target", Scopes::Country, "value")),
(Scopes::Country, "annex", Scope(Scopes::Country)),
(Scopes::Country, "annex_as_civil_war", Scope(Scopes::Country)),
(Scopes::Country, "annex_with_incorporation", Scope(Scopes::Country)),
(Scopes::None, "assert_if", Unchecked),
(Scopes::None, "assert_read", Unchecked),
(Scopes::Country, "call_election", Vb(validate_call_election)),
(Scopes::Country, "cancel_enactment", Yes),
(Scopes::Law, "cancel_imposition", Yes),
(Scopes::State, "cede_treaty_port", Scope(Scopes::Country)),
(Scopes::PoliticalLobby, "change_appeasement", Vb(validate_change_appeasement)),
(Scopes::Character, "change_character_culture", Scope(Scopes::Culture)),
(Scopes::Character, "change_character_religion", Scope(Scopes::Religion)),
(Scopes::None, "change_global_variable", Vb(validate_change_variable)),
(Scopes::None, "change_infamy", ScriptValue),
(
Scopes::Country,
"change_institution_investment_level",
Vb(validate_change_institution_investment_level),
),
(Scopes::None, "change_local_variable", Vb(validate_change_variable)),
(Scopes::Pop, "change_pop_culture", TargetValue("target", Scopes::Culture, "value")),
(Scopes::Pop, "change_pop_religion", TargetValue("target", Scopes::Religion, "value")),
(Scopes::Pop, "change_poptype", Scope(Scopes::PopType)),
(Scopes::Country, "change_relations", Vb(validate_country_value)),
(Scopes::Country, "change_subject_type", Item(Item::SubjectType)),
(Scopes::Country, "change_tag", Item(Item::Country)),
(Scopes::Country, "change_tension", Vb(validate_country_value)),
(Scopes::None, "change_variable", Vb(validate_change_variable)),
(Scopes::None, "clamp_global_variable", Vb(validate_clamp_variable)),
(Scopes::None, "clamp_local_variable", Vb(validate_clamp_variable)),
(Scopes::None, "clamp_variable", Vb(validate_clamp_variable)),
(Scopes::Country, "clear_debt", Boolean),
(Scopes::Country, "clear_enactment_modifier", Yes),
(Scopes::None, "clear_global_variable_list", Identifier("list name")),
(Scopes::None, "clear_local_variable_list", Identifier("list name")),
(Scopes::None, "clear_saved_scope", Identifier("scope name")),
(Scopes::Country, "clear_scaled_debt", ScriptValue),
(Scopes::None, "clear_variable_list", Identifier("list name")),
(Scopes::Country, "complete_objective_subgoal", Item(Item::ObjectiveSubgoal)),
(Scopes::State, "convert_population", TargetValue("target", Scopes::Religion, "value")),
(Scopes::Country, "copy_laws", Scope(Scopes::Country)),
(Scopes::Country, "create_bidirectional_truce", Vb(validate_create_truce)),
(Scopes::State, "create_building", Vb(validate_create_building)),
(Scopes::Country, "create_character", Vb(validate_create_character)),
(Scopes::None, "create_country", Vb(validate_create_country)),
(Scopes::Country, "create_diplomatic_catalyst", Vb(validate_create_catalyst)),
(Scopes::Country, "create_diplomatic_pact", Vb(validate_diplomatic_pact)),
(Scopes::Country, "create_diplomatic_play", Vb(validate_create_diplomatic_play)),
(Scopes::None, "create_dynamic_country", Vb(validate_create_dynamic_country)),
(Scopes::Country, "create_incident", Vb(validate_country_value)),
(Scopes::State, "create_mass_migration", Vb(validate_create_mass_migration)),
(Scopes::Country, "create_military_formation", Vb(validate_create_military_formation)),
(Scopes::Country, "create_political_lobby", Vb(validate_create_lobby)),
(Scopes::Country, "create_political_movement", Vb(validate_create_movement)),
(Scopes::State, "create_pop", Vb(validate_create_pop)),
(Scopes::Country, "create_power_bloc", Vb(validate_create_power_bloc)),
(Scopes::StateRegion, "create_state", Vb(validate_create_state)),
(Scopes::Country, "create_trade_route", Removed("1.9", "replaced with world trade system")),
(Scopes::None, "create_treaty", Vb(validate_create_treaty)),
(
Scopes::Country,
"create_truce",
Removed("1.7", "replaced with create_bidirectional_truce and create_unidirectional_truce"),
),
(Scopes::Country, "create_unidirectional_truce", Vb(validate_create_truce)),
(Scopes::None, "custom_description", Control),
(Scopes::None, "custom_description_no_bullet", Control),
(Scopes::None, "custom_label", ControlOrLabel),
(Scopes::None, "custom_tooltip", ControlOrLabel),
(Scopes::State, "deactivate_building", Vb(validate_activate_building)),
(Scopes::Country, "deactivate_law", Scope(Scopes::LawType)),
(Scopes::Country, "deactivate_parties", Yes),
(Scopes::None, "debug_log", UncheckedTodo),
(Scopes::None, "debug_log_scopes", Boolean),
(Scopes::Country, "decrease_autonomy", Yes),
(Scopes::Character, "demobilize", Removed("1.6", "")),
(Scopes::MilitaryFormation, "deploy_to_front", Vbv(validate_teleport_to_front)),
(Scopes::Party, "disband_party", Yes),
(Scopes::PoliticalLobby, "disband_political_lobby", Yes),
(Scopes::Character, "disinherit_character", Yes),
(Scopes::None, "else", Control),
(Scopes::None, "else_if", Control),
(Scopes::Country, "end_national_awakening", Scope(Scopes::Culture)),
(Scopes::DiplomaticPlay, "end_play", Boolean),
(Scopes::Country, "end_truce", Scope(Scopes::Country)),
(Scopes::None, "error_log", UncheckedTodo),
(Scopes::None, "execute_event_option", Vb(validate_execute_event_option)),
(Scopes::Character, "exile_character", Yes),
(Scopes::StateRegion, "finish_harvest_condition", Item(Item::HarvestConditionType)),
(Scopes::InterestGroup, "finish_negotiation", Item(Item::Localization)),
(Scopes::State, "force_resource_depletion", Item(Item::BuildingType)),
(Scopes::State, "force_resource_discovery", Item(Item::BuildingType)),
(Scopes::Character, "free_character_from_void", Boolean),
(Scopes::MilitaryFormation, "fully_mobilize_army", Yes),
(Scopes::None, "hidden_effect", Control),
(Scopes::None, "if", Control),
(Scopes::InterestGroup, "improve_stance", Integer),
(Scopes::Country, "increase_autonomy", Yes),
(Scopes::Country, "join_power_bloc", Scope(Scopes::Country)),
(Scopes::InterestGroup, "join_revolution", Boolean),
(Scopes::War, "join_war", Vb(validate_join_war)),
(Scopes::Character, "kill_character", Vbv(validate_kill_character)),
(Scopes::Country, "kill_population", Vb(validate_kill_population)),
(Scopes::State, "kill_population_in_state", Vb(validate_kill_population)),
(Scopes::Country, "kill_population_percent", Vb(validate_kill_population)),
(Scopes::State, "kill_population_percent_in_state", Vb(validate_kill_population)),
(Scopes::Country.union(Scopes::State), "liberate_slaves", Yes),
(Scopes::Country, "liberate_slaves_in_incorporated_states", Yes),
(Scopes::Country, "liberate_slaves_in_unincorporated_states", Yes),
(Scopes::None, "lock_trade_route", Removed("1.9", "replaced with world trade system")),
(Scopes::Country, "make_independent", Boolean),
(Scopes::MilitaryFormation, "mobilize_army", Yes),
(Scopes::Pop, "move_partial_pop", Vb(validate_move_partial_pop)),
(Scopes::Pop, "move_pop", Scope(Scopes::State)),
(Scopes::Character, "place_character_in_void", ScriptValue),
(Scopes::Country, "play_as", Scope(Scopes::Country)),
(Scopes::None, "post_audio_event", Vb(validate_audio_event)),
(Scopes::None, "post_notification", Vv(validate_post_notification)),
(Scopes::None, "post_proposal", Item(Item::ProposalType)),
(Scopes::None, "random", Control),
(Scopes::None, "random_list", Vbc(validate_random_list)),
(Scopes::None, "random_log_scopes", Boolean),
(Scopes::Country, "recalculate_pop_ig_support", Boolean),
(Scopes::Country, "regime_change", Scope(Scopes::Country)),
(Scopes::Country, "remove_active_objective_subgoal", Item(Item::ObjectiveSubgoal)),
(Scopes::Amendment, "remove_amendment", Boolean),
(Scopes::Character, "remove_as_interest_group_leader", Yes),
(Scopes::Country, "remove_banned_goods", Scope(Scopes::Goods)),
(Scopes::State, "remove_building", Item(Item::BuildingType)),
(Scopes::PoliticalMovement, "remove_character_ideology", Item(Item::Ideology)),
(Scopes::Character, "remove_character_role", Item(Item::CharacterRole)),
(Scopes::StateRegion, "remove_claim", Scope(Scopes::Country)),
(Scopes::Country, "remove_company", Scope(Scopes::CompanyType)),
(Scopes::Culture, "remove_cultural_obsession", Item(Item::Goods)),
(Scopes::Country, "remove_diplomatic_pact", Vb(validate_diplomatic_pact)),
(Scopes::Country, "remove_enactment_modifier", UncheckedTodo), (Scopes::StateGoods, "remove_exports", ScriptValue),
(Scopes::all_but_none(), "remove_from_list", Vv(validate_remove_from_list)),
(Scopes::None, "remove_global_variable", Identifier("variable name")),
(Scopes::StateRegion, "remove_homeland", Scope(Scopes::Culture)),
(Scopes::InterestGroup, "remove_ideology", Item(Item::Ideology)),
(Scopes::Party, "remove_ig_from_party", Scope(Scopes::InterestGroup)),
(Scopes::StateGoods, "remove_imports", ScriptValue),
(Scopes::DiplomaticPlay, "remove_initiator_backers", Vb(validate_addremove_backers)),
(Scopes::JournalEntry, "remove_involved_country", Scope(Scopes::Country)),
(Scopes::None, "remove_list_global_variable", Vb(validate_add_to_variable_list)),
(Scopes::None, "remove_list_local_variable", Vb(validate_add_to_variable_list)),
(Scopes::None, "remove_list_variable", Vb(validate_add_to_variable_list)),
(Scopes::PoliticalLobby, "remove_lobby_member", Scope(Scopes::InterestGroup)),
(Scopes::None, "remove_local_variable", Identifier("variable name")),
(
Scopes::Country
.union(Scopes::Building)
.union(Scopes::Character)
.union(Scopes::Institution)
.union(Scopes::InterestGroup)
.union(Scopes::JournalEntry)
.union(Scopes::PoliticalMovement)
.union(Scopes::PowerBloc)
.union(Scopes::State),
"remove_modifier",
Item(Item::Modifier),
),
(Scopes::Country, "remove_monopoly", Scope(Scopes::BuildingType)),
(Scopes::Company, "remove_owned_country", Scope(Scopes::Country)),
(Scopes::Country, "remove_primary_culture", Scope(Scopes::Culture)),
(Scopes::PowerBloc, "remove_principle", Item(Item::Principle)),
(Scopes::InterestGroup, "remove_ruling_interest_group", Boolean),
(Scopes::StateRegion, "remove_state_trait", Item(Item::StateTrait)),
(Scopes::DiplomaticPlay, "remove_target_backers", Vb(validate_addremove_backers)),
(Scopes::Country, "remove_taxed_goods", Scope(Scopes::Goods)),
(Scopes::Culture, "remove_tradition_trait", Item(Item::TraditionTrait)),
(Scopes::Character, "remove_trait", Item(Item::CharacterTrait)),
(Scopes::None, "remove_variable", Identifier("variable name")),
(Scopes::DiplomaticPlay, "remove_war_goal", Vb(validate_remove_war_goal)),
(Scopes::State, "reset_hub_names", Yes),
(Scopes::State, "reset_state_name", Yes),
(Scopes::DiplomaticPlay, "resolve_play_for", Scope(Scopes::Country)),
(Scopes::Character, "retire_character", Vbv(validate_kill_character)),
(Scopes::None, "round_global_variable", Vb(validate_round_variable)),
(Scopes::None, "round_local_variable", Vb(validate_round_variable)),
(Scopes::None, "round_variable", Vb(validate_round_variable)),
(Scopes::all_but_none(), "save_scope_as", Vv(validate_save_scope)),
(Scopes::None, "save_scope_value_as", Vb(validate_save_scope_value)),
(Scopes::all_but_none(), "save_temporary_scope_as", Vv(validate_save_scope)),
(Scopes::None, "save_temporary_scope_value_as", Vb(validate_save_scope_value)),
(Scopes::Country, "seize_investment_pool", Boolean),
(Scopes::Character, "set_as_interest_group_leader", Boolean),
(Scopes::State, "set_available_for_autonomous_investment", Scope(Scopes::BuildingType)),
(Scopes::JournalEntry, "set_bar_progress", Vb(validate_progress)),
(Scopes::PoliticalMovement, "set_bolstering", Boolean),
(Scopes::Country, "set_capital", Item(Item::StateRegion)),
(Scopes::Character, "set_character_as_executive", Scope(Scopes::Company)),
(Scopes::Character, "set_character_as_ruler", Yes),
(
Scopes::Character,
"set_character_busy",
Removed("1.11", "replaced with set_character_busy_and_immortal"),
),
(Scopes::Character, "set_character_busy_and_immortal", Boolean),
(Scopes::Character, "set_character_immortal", Boolean),
(Scopes::Character, "set_commander_rank", Integer),
(Scopes::Company, "set_company_establishment_date", Date),
(Scopes::Company, "set_company_state_region", Scope(Scopes::StateRegion)),
(Scopes::PoliticalMovement, "set_core_ideology", Item(Item::Ideology)),
(Scopes::Country, "set_country_type", Item(Item::CountryType)),
(Scopes::StateRegion.union(Scopes::State), "set_devastation", ScriptValue),
(Scopes::Country, "set_diplomats_expelled", Scope(Scopes::Country)),
(Scopes::Country, "set_electoral_confidence", ScriptValue),
(Scopes::Country, "set_export_tariff_level", Vb(validate_tariff_level)),
(Scopes::StateGoods, "set_exports", ScriptValue),
(Scopes::Culture, "set_fervor", ScriptValue),
(Scopes::None, "set_global_variable", Vbv(validate_set_variable)),
(Scopes::Country, "set_government_wage_level", Item(Item::Level)),
(Scopes::InterestGroup, "set_has_negotiated", Boolean),
(Scopes::Country, "set_heir", Scope(Scopes::Character)),
(Scopes::Character, "set_home_country", Scope(Scopes::Country)),
(Scopes::Character, "set_home_country_definition", Scope(Scopes::CountryDefinition)),
(Scopes::State, "set_hub_name", Vb(validate_set_hub_name)),
(Scopes::State, "set_hub_names", UncheckedTodo),
(Scopes::Character, "set_ideology", Scope(Scopes::Ideology)),
(
Scopes::InterestGroup,
"set_ig_bolstering",
Removed("1.8", "see `set_bolstering` for political movements"),
),
(
Scopes::InterestGroup,
"set_ig_suppression",
Removed("1.8", "see `set_suppression` for political movements"),
),
(Scopes::InterestGroup, "set_ig_trait", Scope(Scopes::InterestGroupTrait)),
(Scopes::Country, "set_immune_to_revolutions", Boolean),
(Scopes::Country, "set_import_tariff_level", Vb(validate_tariff_level)),
(Scopes::StateGoods, "set_imports", ScriptValue),
(
Scopes::Country,
"set_institution_investment_level",
Vb(validate_set_institution_investment_level),
),
(Scopes::Character, "set_interest_group", Scope(Scopes::InterestGroup)),
(Scopes::InterestGroup, "set_interest_group_name", Item(Item::Localization)),
(Scopes::DiplomaticPlay, "set_key", Item(Item::Localization)),
(Scopes::None, "set_local_variable", Vbv(validate_set_variable)),
(Scopes::Country, "set_market_capital", Item(Item::StateRegion)),
(Scopes::Country, "set_military_wage_level", Item(Item::Level)),
(Scopes::Country, "set_mutual_secret_goal", Vb(validate_set_secret_goal)),
(Scopes::Country, "set_next_election_date", Date),
(Scopes::Country, "set_only_legal_party_from_ig", Scope(Scopes::InterestGroup)),
(Scopes::Country, "set_owes_obligation_to", Vb(validate_owes_obligation)),
(Scopes::StateRegion, "set_owner_of_provinces", Vb(validate_owner_of_provinces)),
(Scopes::Pop, "set_pop_literacy", Vb(validate_pop_literacy)),
(Scopes::Pop, "set_pop_qualifications", UncheckedTodo), (Scopes::Pop, "set_pop_wealth", Vb(validate_pop_wealth)),
(Scopes::Country, "set_relations", Vb(validate_country_value)),
(Scopes::Country, "set_ruling_interest_groups", Vb(validate_ruling_ig)),
(Scopes::Party, "set_ruling_party", Yes),
(Scopes::Country, "set_secret_goal", Vb(validate_set_secret_goal)),
(Scopes::Country, "set_social_hierarchy", Item(Item::SocialHierarchy)),
(Scopes::State, "set_state_name", Item(Item::Localization)),
(Scopes::State, "set_state_owner", Scope(Scopes::Country)),
(Scopes::Country, "set_state_religion", Scope(Scopes::Religion)),
(Scopes::State, "set_state_type", Choice(STATE_TYPES)),
(Scopes::Country, "set_strategy", Item(Item::AiStrategy)),
(Scopes::Building, "set_subsidized", Boolean),
(Scopes::PoliticalMovement, "set_suppression", Boolean),
(Scopes::JournalEntry, "set_target_technology", Scope(Scopes::Technology)),
(
Scopes::Country,
"set_tariffs_export_priority",
Removed("1.9", "replaced by world market system"),
),
(
Scopes::Country,
"set_tariffs_import_priority",
Removed("1.9", "replaced by world market system"),
),
(Scopes::Country, "set_tariffs_no_priority", Removed("1.9", "replaced by world market system")),
(Scopes::Country, "set_tax_level", Item(Item::Level)),
(Scopes::Country, "set_tension", Vb(validate_country_value)),
(Scopes::None, "set_variable", Vbv(validate_set_variable)),
(Scopes::DiplomaticPlay, "set_war", Boolean),
(Scopes::None, "show_as_tooltip", Control),
(Scopes::StateRegion, "spawn_entity_effect", Vb(validate_spawn_entity_effect)),
(Scopes::None, "sort_global_variable_list", Vb(validate_sort)),
(Scopes::None, "sort_local_variable_list", Vb(validate_sort)),
(Scopes::None, "sort_variable_list", Vb(validate_sort)),
(Scopes::State, "start_building_construction", Item(Item::BuildingType)),
(Scopes::StateRegion, "start_earthquake_effect", Yes),
(Scopes::Country, "start_enactment", Scope(Scopes::LawType)),
(Scopes::StateRegion, "start_harvest_condition", Item(Item::HarvestConditionType)),
(Scopes::Country, "start_national_awakening", Vb(validate_national_awakening)),
(Scopes::State, "start_privately_funded_building_construction", Item(Item::BuildingType)),
(Scopes::Country, "start_research_random_technology", Yes),
(Scopes::None, "start_tutorial_lesson", Vb(validate_start_tutorial)),
(Scopes::None, "switch", Vb(validate_switch)),
(Scopes::Country, "take_on_scaled_debt", TargetValue("who", Scopes::Country, "value")),
(Scopes::MilitaryFormation, "teleport_to_front", Vbv(validate_teleport_to_front)),
(Scopes::Character, "transfer_character", Scope(Scopes::Country)),
(Scopes::Country, "transfer_subject", Scope(Scopes::Country)),
(Scopes::Character, "transfer_to_formation", Scope(Scopes::MilitaryFormation)),
(Scopes::None, "trigger_event", Vbv(validate_trigger_event)),
(Scopes::Country, "try_form_government_with", Vb(validate_form_government)),
(Scopes::State, "unset_available_for_autonomous_investment", Scope(Scopes::BuildingType)),
(Scopes::Country, "unset_only_legal_party", Yes),
(Scopes::Country, "update_party_support", Yes),
(Scopes::Country, "validate_subsidies", Boolean),
(Scopes::Country, "violate_sovereignty_join", Vb(validate_violate_sovereignty_join)),
(Scopes::None, "while", Control),
(Scopes::Treaty, "withdraw", Vb(validate_withdraw)),
];