faction_goal_member_metrics_needed = { OR = { has_faction_goal = faction_goal_transform_nato_forces has_faction_goal = faction_goal_transform_eap_forces has_faction_goal = faction_goal_an_armored_fist has_faction_goal = faction_goal_an_infantry_army has_faction_goal = faction_goal_joint_military_exercises has_faction_goal = faction_goal_high_seas_fleet has_faction_goal = faction_goal_marine_corps has_faction_goal = faction_goal_airborne_corps has_faction_goal = faction_goal_submarine_force has_faction_goal = faction_goal_convoy_escort_force has_faction_goal = faction_goal_air_superiority has_faction_goal = faction_goal_unlock_research has_faction_goal = faction_goal_unlock_military has_faction_goal = faction_goal_nato_gdp_per_capita has_faction_goal = faction_goal_crush_the_democracy has_faction_goal = faction_goal_defeat_of_communism has_faction_goal = faction_goal_defeat_of_fascism has_faction_goal = faction_goal_defeat_of_anti_communists has_faction_goal = faction_goal_long_live_the_revolution } } is_available_to_collaboration_government = { # occupied_countries.1 should be updated along with this NOT = { any_country_with_original_tag = { original_tag_to_check = FROM is_subject_of = PREV # if already created one do not create another #has_autonomy_state = autonomy_collaboration_government } } } controls_a_coastal_state = { any_controlled_state = { is_coastal = yes } } controls_a_state_with_hydroelectric = { any_controlled_state = { has_dynamic_modifier = { modifier = hydroelectric_infrastructure_in_state } } } controls_a_state_with_geothermal = { any_controlled_state = { has_dynamic_modifier = { modifier = geothermal_infrastructure_in_state } } } no_building_slots = { custom_trigger_tooltip = { tooltip = TT_NO_BUILDING_SLOTS NOT = { OR = { any_owned_state = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } any_owned_state = { free_building_slots = { building = arms_factory size > 0 include_locked = no } } any_owned_state = { free_building_slots = { building = dockyard size > 0 include_locked = no } } any_owned_state = { free_building_slots = { building = renewable_energy_infra size > 0 include_locked = no } } #any_owned_state = { # free_building_slots = { # building = fuel_silo # size > 0 # include_locked = no # } #} any_owned_state = { free_building_slots = { building = nuclear_reactor size > 0 include_locked = no } } } } } } max_1_building_slots = { custom_trigger_tooltip = { tooltip = TT_MAX_1_BUILDING_SLOTS NOT = { OR = { any_owned_state = { free_building_slots = { building = industrial_complex size > 1 include_locked = no } } any_owned_state = { free_building_slots = { building = arms_factory size > 1 include_locked = no } } any_owned_state = { free_building_slots = { building = dockyard size > 1 include_locked = no } } any_owned_state = { free_building_slots = { building = renewable_energy_infra size > 1 include_locked = no } } #any_owned_state = { # free_building_slots = { # building = fuel_silo # size > 1 # include_locked = no # } #} any_owned_state = { free_building_slots = { building = nuclear_reactor size > 1 include_locked = no } } } } } } # Actively Signed Trade Agreements has_more_than_num_trade_agreement = { custom_trigger_tooltip = { tooltip = more_than_1_signed_trade_agreement check_variable = { signed_trade_agreements > num_agreement } } } # Power Ranking has_at_least_regional_power_status = { custom_trigger_tooltip = { tooltip = has_at_least_regional_power_status_tt OR = { has_idea = regional_power has_idea = large_power has_idea = great_power has_idea = super_power } } } has_at_least_major_power_status = { custom_trigger_tooltip = { tooltip = has_at_least_major_power_status_tt OR = { has_idea = large_power has_idea = super_power has_idea = great_power } } } has_at_least_great_power_status = { custom_trigger_tooltip = { tooltip = has_at_least_great_power_status_tt OR = { has_idea = super_power has_idea = great_power } } } #State scope is_controlled_by_ROOT_or_subject = { custom_trigger_tooltip = { tooltip = is_controlled_by_ROOT_or_subject CONTROLLER = { OR = { tag = ROOT is_subject_of = ROOT } } } } is_not_controlled_by_ROOT_or_subject = { custom_trigger_tooltip = { tooltip = is_not_controlled_by_ROOT_or_subject CONTROLLER = { NOT = { OR = { tag = ROOT is_subject_of = ROOT } } } } } #Country scope is_free_or_subject_of_root = { OR = { is_subject = no is_subject_of = ROOT } } #State scope is_controlled_by_ROOT_or_ally = { custom_trigger_tooltip = { tooltip = is_controlled_by_ROOT_or_ally CONTROLLER = { OR = { tag = ROOT is_subject_of = ROOT is_in_faction_with = ROOT } } } } has_large_ally_not_pick_closed_economy = { any_of_scopes = { array = faction_members NOT = { tag = PREV } num_of_military_factories > 30 } } owns_or_subject_of = { custom_trigger_tooltip = { tooltip = owns_or_subject_of_tt owner = { OR = { tag = ROOT is_subject_of = ROOT } } } } controls_or_subject_of = { custom_trigger_tooltip = { tooltip = controls_or_subject_of_tt controller = { OR = { tag = ROOT is_subject_of = ROOT } } } } is_major_not_original_tag_root = { is_major = yes hidden_trigger = { NOT = { original_tag = ROOT } } } has_war_with_non_exiled_country = { custom_trigger_tooltip = { tooltip = has_war_with_non_exiled_country_tt has_war = yes any_enemy_country = { is_government_in_exile = no } } } is_at_peace_exiled_countries_excluded = { custom_trigger_tooltip = { tooltip = is_at_peace_exiled_countries_excluded_tt NOT = { any_enemy_country = { is_government_in_exile = no } } } } #State scope state_is_fully_controlled_by_ROOT_or_subject = { custom_trigger_tooltip = { tooltip = state_is_fully_controlled_by_ROOT_or_subject_tt OR = { is_fully_controlled_by = ROOT controller = { is_subject_of = ROOT has_full_control_of_state = PREV } } } } #State scope state_is_fully_controlled_by_ROOT_subject_or_faction_member = { custom_trigger_tooltip = { tooltip = state_is_fully_controlled_by_ROOT_subject_or_faction_member_tt OR = { is_fully_controlled_by = ROOT controller = { OR = { is_subject_of = ROOT is_in_faction_with = ROOT } has_full_control_of_state = PREV } } } } can_ROOT_get_wargoal_on_THIS = { exists = yes NOT = { is_in_faction_with = ROOT } NOT = { is_subject_of = ROOT } } state_has_any_resource = { OR = { has_resources_amount = { resource = oil amount > 0 } has_resources_amount = { resource = aluminium amount > 0 } has_resources_amount = { resource = rubber amount > 0 } has_resources_amount = { resource = tungsten amount > 0 } has_resources_amount = { resource = steel amount > 0 } has_resources_amount = { resource = chromium amount > 0 } has_resources_amount = { resource = microchips amount > 0 } has_resources_amount = { resource = composites amount > 0 } } } #Expected scopes: Target country is THIS, country getting wargoal is PREV country_can_be_reasonable_target_of_wargoal = { NOT = { OR = { has_war_with = ROOT is_in_faction_with = PREV has_guaranteed = PREV is_guaranteed_by = PREV has_non_aggression_pact_with = PREV is_subject_of = PREV } } } # Effect: calculate_ai_interest # Purpose: Calculate the interest rate for the AI once they accept whatever cost they are given # Expected scopes: Country is THIS # Inputs: # - input_cost: The additional cost to incur # - interest_rate_check: The interest rate to check against calculate_ai_interest = { # Even if the country has treasury, we want to add the input cost to the debt to ensure we are getting the right end interest rate set_temp_variable = { debt_temp = { value = debt add = input_cost } } check_expr = { value = 0 add = debt_temp divide = gdp_total multiply = 10 add = modifier@interest_rate_multiplier_modifier greater_than = { value = interest_rate_check } } } STATE_productivity_higher_than_999 = { custom_trigger_tooltip = { tooltip = STATE_productivity_higher_than_999_tt check_variable = { ROOT.productivity_state_var > 999 } } } is_locked_faction = { custom_trigger_tooltip = { tooltip = is_locked_faction_tt OR = { has_idea = NATO_member has_idea = CSTO_member has_idea = UNASUL_member has_idea = faction_resistance_axis_member } } } currently_has_a_5_year_plan_selected = { custom_override_tooltip = { tooltip = TT_CURRENT_HAS_A_5_YEAR_PLAN OR = { has_decision = generic_initiate_primary_sector_5_year_plan has_decision = generic_initiate_secondary_sector_5_year_plan has_decision = generic_initiate_tertiary_sector_5_year_plan has_decision = generic_initiate_infrastructure_5_year_plan has_decision = generic_initiate_military_5_year_plan has_decision = generic_initiate_naval_5_year_plan has_decision = generic_initiate_technology_5_year_plan has_decision = generic_initiate_energy_5_year_plan } } } election_notification_scripted_trigger = { OR = { AND = { PREV = { has_country_flag = north_america_nation_flag } has_country_flag = north_america_nation_flag } AND = { PREV = { has_country_flag = south_america_nation_flag } has_country_flag = south_america_nation_flag } AND = { PREV = { has_country_flag = middle_east_nation_flag } has_country_flag = middle_east_nation_flag } AND = { PREV = { has_country_flag = african_nation_flag } has_country_flag = african_nation_flag } AND = { PREV = { has_country_flag = european_nation_flag } has_country_flag = european_nation_flag } AND = { PREV = { has_country_flag = asian_nation_flag } has_country_flag = asian_nation_flag } AND = { PREV = { has_country_flag = oceania_nation_flag } has_country_flag = oceania_nation_flag } } } we_are_the_only_superpower = { all_of_scopes = { array = global.PR_superpowers tooltip = TT_NO_OTHER_SUPERPOWER_EXISTS tag = PREV } } we_are_being_justified_against_or_wargoal_against_us = { any_of_scopes = { array = potential_and_current_enemies OR = { is_justifying_wargoal_against = PREV has_wargoal_against = PREV } } } is_currently_importing_any_resources = { custom_trigger_tooltip = { tooltip = is_currently_importing_any_resources_tt OR = { check_variable = { resource_imported@oil > 0 } check_variable = { resource_imported@aluminium > 0 } check_variable = { resource_imported@rubber > 0 } check_variable = { resource_imported@steel > 0 } check_variable = { resource_imported@tungsten > 0 } check_variable = { resource_imported@chromium > 0 } } } } ai_is_threatened = { OR = { has_war = yes threat > 0.30 check_variable = { potential_and_current_enemies^num > 0 } } } # UAR GDP Share Check # Checks if ROOT's UAR GDP share exceeds the threshold (40%) # Uses total_uar_gdp and global.total_arabic_gdp variables; denominator floored at 1 to prevent division by zero uar_has_required_gdp_share = { custom_trigger_tooltip = { tooltip = UAR_unite_uar_tt check_expr = { value = total_uar_gdp divide = { value = global.total_arabic_gdp max = 1 } greater_than = { value = 0.40 } } } } # Random construction location triggers # Shared by the one_/two_/three_/four_ random building helpers in 00_scripted_effects.txt. # Each gates a state as a valid drop spot for a random instant-build: owned by the builder, # has a free slot, and is in the home area (or no home-area state has a free slot, so any owned state qualifies). # All shared-slot buildings (arms factory, civilian factory, offices, refineries, plants, agriculture, etc.) # draw from the same pooled state building slots, so one slot check covers them all. free_shared_building_slots = { is_owned_by = PREV free_building_slots = { building = industrial_complex size > 0 include_locked = yes } OR = { is_in_home_area = yes NOT = { owner = { any_owned_state = { free_building_slots = { building = industrial_complex size > 0 include_locked = yes } is_in_home_area = yes } } } } } dockyard_random_build_loc = { is_owned_by = PREV is_coastal = yes free_building_slots = { building = dockyard size > 0 include_locked = yes } OR = { is_in_home_area = yes NOT = { owner = { any_owned_state = { free_building_slots = { building = dockyard size > 0 include_locked = yes } is_coastal = yes is_in_home_area = yes } } } } } infrastructure_random_build_loc = { is_owned_by = PREV free_building_slots = { building = infrastructure size > 0 } OR = { is_in_home_area = yes NOT = { owner = { any_owned_state = { free_building_slots = { building = infrastructure size > 0 } is_in_home_area = yes } } } } } nuclear_reactor_random_build_loc = { is_owned_by = PREV free_building_slots = { building = nuclear_reactor size > 0 } OR = { is_in_home_area = yes NOT = { owner = { any_owned_state = { free_building_slots = { building = nuclear_reactor size > 0 } is_in_home_area = yes } } } } } renewable_energy_infra_random_build_loc = { is_owned_by = PREV free_building_slots = { building = renewable_energy_infra size > 0 } OR = { is_in_home_area = yes NOT = { owner = { any_owned_state = { free_building_slots = { building = renewable_energy_infra size > 0 } is_in_home_area = yes } } } } } air_base_random_build_loc = { is_owned_by = PREV free_building_slots = { building = air_base size > 0 } OR = { is_in_home_area = yes NOT = { owner = { any_owned_state = { free_building_slots = { building = air_base size > 0 } is_in_home_area = yes } } } } } radar_station_random_build_loc = { is_owned_by = PREV free_building_slots = { building = radar_station size > 0 } OR = { is_in_home_area = yes NOT = { owner = { any_owned_state = { free_building_slots = { building = radar_station size > 0 } is_in_home_area = yes } } } } } anti_air_random_build_loc = { is_owned_by = PREV free_building_slots = { building = anti_air_building size > 0 } OR = { is_in_home_area = yes NOT = { owner = { any_owned_state = { free_building_slots = { building = anti_air_building size > 0 } is_in_home_area = yes } } } } } network_infrastructure_random_build_loc = { is_owned_by = PREV free_building_slots = { building = internet_station size > 0 } OR = { is_in_home_area = yes NOT = { owner = { any_owned_state = { free_building_slots = { building = internet_station size > 0 } is_in_home_area = yes } } } } } fuel_reserve_random_build_loc = { is_owned_by = PREV free_building_slots = { building = fuel_silo size > 0 } OR = { is_in_home_area = yes NOT = { owner = { any_owned_state = { free_building_slots = { building = fuel_silo size > 0 } is_in_home_area = yes } } } } } fossil_powerplant_random_build_loc = { is_owned_by = PREV free_building_slots = { building = fossil_powerplant size > 0 } OR = { is_in_home_area = yes NOT = { owner = { any_owned_state = { free_building_slots = { building = fossil_powerplant size > 0 } is_in_home_area = yes } } } } }