# ACTUAL LOCALISATION defined_text = { name = CPD_peace_deal_builder_selected_deal_type_title text = { trigger = { NOT = { ROOT = { has_country_flag = CPD_giving_concessions } } } localization_key = "CPD_peace_deal_builder_selected_deal_type_title_one" } text = { trigger = { ROOT = { has_country_flag = CPD_giving_concessions } } localization_key = "CPD_peace_deal_builder_selected_deal_type_title_two" } text = { localization_key = "Error in Scripted Localisation, Fix \"CPD_peace_deal_builder_selected_deal_type_title\"" } } # ANNEX STATE BUTTON defined_text = { name = CPD_ANNEX_STATE_TT_LOC text = { trigger = { NOT = { ROOT = { has_country_flag = CPD_giving_concessions } } } localization_key = "CPD_annex_state_button_TT_DEMAND" } text = { trigger = { ROOT = { has_country_flag = CPD_giving_concessions } } localization_key = "CPD_annex_state_button_TT_CONCESSION" } text = { localization_key = "Error in Scripted Localisation, Fix \"CPD_ANNEX_STATE_TT_LOC\"" } } defined_text = { name = CPD_ANNEX_STATE_TT_DELAYED_LOC text = { trigger = { NOT = { ROOT = { has_country_flag = CPD_giving_concessions } } } localization_key = "CPD_annex_state_button_TT_DELAYED_DEMAND" } text = { trigger = { ROOT = { has_country_flag = CPD_giving_concessions } } localization_key = "CPD_annex_state_button_TT_DELAYED_CONCESSION" } text = { localization_key = "Error in Scripted Localisation, Fix \"CPD_ANNEX_STATE_TT_DELAYED_LOC\"" } } # MAKE PUPPET BUTTON defined_text = { name = CPD_MAKE_PUPPET_TT_LOC text = { trigger = { NOT = { ROOT = { has_country_flag = CPD_giving_concessions } } } localization_key = "CPD_make_puppet_button_TT_DEMAND" } text = { trigger = { ROOT = { has_country_flag = CPD_giving_concessions } } localization_key = "CPD_make_puppet_button_TT_CONCESSION" } text = { localization_key = "Error in Scripted Localisation, Fix \"CPD_MAKE_PUPPET_TT_LOC\"" } } defined_text = { name = CPD_MAKE_PUPPET_TT_DELAYED_LOC text = { trigger = { NOT = { ROOT = { has_country_flag = CPD_giving_concessions } } } localization_key = "CPD_make_puppet_button_TT_DELAYED_DEMAND" } text = { trigger = { ROOT = { has_country_flag = CPD_giving_concessions } } localization_key = "CPD_make_puppet_button_TT_DELAYED_CONCESSION" } text = { localization_key = "Error in Scripted Localisation, Fix \"CPD_MAKE_PUPPET_TT_DELAYED_LOC\"" } } # DEMILITARISE STATE BUTTON defined_text = { name = CPD_DEMILITARISE_TT_LOC text = { trigger = { NOT = { ROOT = { has_country_flag = CPD_giving_concessions } } } localization_key = "CPD_demilitarise_state_button_TT_DEMAND" } text = { trigger = { ROOT = { has_country_flag = CPD_giving_concessions } } localization_key = "CPD_demilitarise_state_button_TT_CONCESSION" } text = { localization_key = "Error in Scripted Localisation, Fix \"CPD_DEMILITARISE_TT_LOC\"" } } defined_text = { name = CPD_DEMILITARISE_TT_DELAYED_LOC text = { trigger = { NOT = { ROOT = { has_country_flag = CPD_giving_concessions } } } localization_key = "CPD_demilitarise_state_button_TT__DELAYED_DEMAND" } text = { trigger = { ROOT = { has_country_flag = CPD_giving_concessions } } localization_key = "CPD_demilitarise_state_button_TT__DELAYED_CONCESSION" } text = { localization_key = "Error in Scripted Localisation, Fix \"CPD_DEMILITARISE_TT_DELAYED_LOC\"" } } # LIBERATE IN STATE BUTTON TOOLTIP defined_text = { name = CPD_LIBERATE_TT_LOC text = { trigger = { NOT = { ROOT = { has_country_flag = CPD_giving_concessions } } } localization_key = "CPD_liberate_in_state_button_TT_DEMAND" } text = { trigger = { ROOT = { has_country_flag = CPD_giving_concessions } } localization_key = "CPD_liberate_in_state_button_TT_CONCESSION" } text = { localization_key = "Error in Scripted Localisation, Fix \"CPD_LIBERATE_TT_LOC\"" } } defined_text = { name = CPD_LIBERATE_TT_DELAYED_LOC text = { trigger = { NOT = { ROOT = { has_country_flag = CPD_giving_concessions } } } localization_key = "CPD_liberate_in_state_button_TT_DELAYED_DEMAND" } text = { trigger = { ROOT = { has_country_flag = CPD_giving_concessions } } localization_key = "CPD_liberate_in_state_button_TT_DELAYED_CONCESSION" } text = { localization_key = "Error in Scripted Localisation, Fix \"CPD_LIBERATE_TT_DELAYED_LOC\"" } } # DEMAND/CONCESSION COST SWITCH defined_text = { name = CPD_DEMAND_CONCESSION_COST_SWITCH_LOC text = { # CONCESSIONS trigger = { ROOT = { has_country_flag = CPD_giving_concessions } CPD_calculate_province_cost_loc = yes } localization_key = "CPD_concessions_cost_value" } text = { # DEMANDS trigger = { ROOT = { NOT = { has_country_flag = CPD_giving_concessions } } CPD_calculate_province_cost_loc = yes } localization_key = "CPD_demand_cost_value" } } # DEAL ROW LABEL - single composite, handles both sentinels (country actions) # and states (action + state info) without the empty-string fallback dance. defined_text = { name = CPD_deal_row_label # Country action sentinels — full label is just the action name text = { trigger = { check_variable = { v = 10001 } } localization_key = "CPD_country_action_ceasefire" } text = { trigger = { check_variable = { v = 10002 } } localization_key = "CPD_country_action_war_reparations" } text = { trigger = { check_variable = { v = 10003 } } localization_key = "CPD_country_action_forced_neutrality" } text = { trigger = { check_variable = { v = 10004 } } localization_key = "CPD_country_action_regime_change" } text = { trigger = { check_variable = { v = 10005 } } localization_key = "CPD_country_action_military_basing" } text = { trigger = { check_variable = { v = 10006 } } localization_key = "CPD_country_action_full_puppet" } # States — "Annex Texas +5 VP" text = { trigger = { check_variable = { v < 10000 } } localization_key = "CPD_state_deal_row_format" } } # ENACTED ACTIONS ON STATE LIST — state actions only (sentinels handled by CPD_deal_row_label) defined_text = { name = CPD_enacted_action_on_state # State actions text = { trigger = { OR = { ROOT = { is_in_array = { CPD_annex_state_DEMANDS = PREV } } ROOT = { is_in_array = { CPD_annex_state_CONCESSIONS = PREV } } } } localization_key = "CPD_annexation_of_state" } text = { trigger = { OR = { ROOT = { is_in_array = { CPD_puppet_in_state_DEMANDS = PREV } } ROOT = { is_in_array = { CPD_puppet_in_state_CONCESSIONS = PREV } } } } localization_key = "CPD_puppeting_in_state" } text = { trigger = { OR = { ROOT = { is_in_array = { CPD_demilitarise_state_DEMANDS = PREV } } ROOT = { is_in_array = { CPD_demilitarise_state_CONCESSIONS = PREV } } } } localization_key = "CPD_demilitarisation_of_state" } text = { trigger = { OR = { ROOT = { is_in_array = { CPD_liberate_state_DEMANDS = PREV } } ROOT = { is_in_array = { CPD_liberate_state_CONCESSIONS = PREV } } } } localization_key = "CPD_liberation_of_state" } text = { trigger = { OR = { ROOT = { is_in_array = { CPD_resource_rights_DEMANDS = PREV } } ROOT = { is_in_array = { CPD_resource_rights_CONCESSIONS = PREV } } } } localization_key = "CPD_resource_rights_of_state" } } # ENACTED ACTIONS ON STATE LIST TOOLTIP defined_text = { name = CPD_enacted_action_on_state_TT # Country action sentinels text = { trigger = { check_variable = { v = 10001 } } localization_key = "CPD_country_action_ceasefire_TT" } text = { trigger = { check_variable = { v = 10002 } } localization_key = "CPD_country_action_war_reparations_TT" } text = { trigger = { check_variable = { v = 10003 } } localization_key = "CPD_country_action_forced_neutrality_TT" } text = { trigger = { check_variable = { v = 10004 } } localization_key = "CPD_country_action_regime_change_TT" } text = { trigger = { check_variable = { v = 10005 } } localization_key = "CPD_country_action_military_basing_TT" } text = { trigger = { check_variable = { v = 10006 } } localization_key = "CPD_country_action_full_puppet_TT" } # DEMANDS text = { trigger = { ROOT = { is_in_array = { CPD_annex_state_DEMANDS = PREV } } } localization_key = "CPD_demanding_annexation_of_state_TT" } text = { trigger = { ROOT = { is_in_array = { CPD_puppet_in_state_DEMANDS = PREV } } } localization_key = "CPD_demanding_puppeting_in_state_TT" } text = { trigger = { ROOT = { is_in_array = { CPD_demilitarise_state_DEMANDS = PREV } } } localization_key = "CPD_demanding_demilitarisation_of_state_TT" } text = { trigger = { ROOT = { is_in_array = { CPD_liberate_state_DEMANDS = PREV } } } localization_key = "CPD_demanding_liberation_of_state_TT" } # CONCESSIONS text = { trigger = { ROOT = { is_in_array = { CPD_annex_state_CONCESSIONS = PREV } } } localization_key = "CPD_conceding_annexation_of_state_TT" } text = { trigger = { ROOT = { is_in_array = { CPD_puppet_in_state_CONCESSIONS = PREV } } } localization_key = "CPD_conceding_puppeting_in_state_TT" } text = { trigger = { ROOT = { is_in_array = { CPD_demilitarise_state_CONCESSIONS = PREV } } } localization_key = "CPD_conceding_demilitarisation_of_state_TT" } text = { trigger = { ROOT = { is_in_array = { CPD_liberate_state_CONCESSIONS = PREV } } } localization_key = "CPD_conceding_liberation_of_state_TT" } # RESOURCE RIGHTS text = { trigger = { ROOT = { is_in_array = { CPD_resource_rights_DEMANDS = PREV } } } localization_key = "CPD_demanding_resource_rights_TT" } text = { trigger = { ROOT = { is_in_array = { CPD_resource_rights_CONCESSIONS = PREV } } } localization_key = "CPD_conceding_resource_rights_TT" } } # AI/PLAYER ACCEPTANCE defined_text = { name = CPD_AI_WILL_ACCEPT_LOC text = { trigger = { is_ai = yes CPD_AI_will_accept = yes } localization_key = "CPD_AIA_yes" } text = { trigger = { is_ai = no } localization_key = "CPD_AIA_player" } text = { localization_key = "CPD_AIA_no" } } # Send-Status Breakdown — exposes current months_at_war and VP vs the gate # requirements so the player sees the concrete numbers in the send tooltip. defined_text = { name = CPD_send_status_breakdown text = { trigger = { set_temp_variable = { CPD_send_vp_temp = ROOT.CPD_VP@THIS } set_temp_variable = { CPD_send_months_temp = ROOT.months_at_war } } localization_key = "CPD_send_status_breakdown_TT" } } # Deal Recap — surfaces the deal's current contents in the send-status tooltip. # Counts demands, concessions, and total VP cost via temp vars consumed by the # loc string. Updates live as the player toggles terms. defined_text = { name = CPD_deal_recap text = { trigger = { set_temp_variable = { CPD_recap_demands = ROOT.CPD_current_deal_list_DEMANDS^num } set_temp_variable = { CPD_recap_concessions = ROOT.CPD_current_deal_list_CONCESSIONS^num } set_temp_variable = { CPD_recap_total_cost = ROOT.CPD_total_cost_of_built_peace_deal } } localization_key = "CPD_deal_recap_TT" } } # Money-system breakdown line items — surface the reparations transfer in # the player's additional income / expense summary tooltip. defined_text = { name = additional_income_war_reparations text = { trigger = { has_idea = CPD_war_reparations_receiver } localization_key = additional_income_war_reparations_tt } } defined_text = { name = additional_expense_war_reparations text = { trigger = { has_idea = CPD_war_reparations_payer } localization_key = additional_expense_war_reparations_tt } } # War Reparations Live Preview — resolves to the projected weekly transfer # amount. Uses payer's GDP (target if we demand, self if we concede), the # 0.0005 multiplier, and the £15B/week clamp. Matches CPD_sign_peace_deal # exactly so the preview never disagrees with the actual transfer. defined_text = { name = CPD_reparations_preview text = { trigger = { if = { limit = { ROOT = { has_country_flag = CPD_giving_concessions } } set_temp_variable = { var = CPD_rep_preview_temp value = { value = ROOT.gdp_total multiply = 0.0005 clamp = { min = 0 max = 15 } } } } else = { set_temp_variable = { var = CPD_rep_preview_temp value = { value = THIS.gdp_total multiply = 0.0005 clamp = { min = 0 max = 15 } } } } set_temp_variable = { var = CPD_rep_preview_total_temp value = { value = CPD_rep_preview_temp multiply = 52 } } } localization_key = "CPD_reparations_preview_TT" } } # AI Acceptance Breakdown Scripted Loc defined_text = { name = CPD_ai_accept_economic_cost text = { trigger = { # Mirrors CPD_AI_will_accept_calculation in 00_peace_deal_triggers.txt. # Both must use CPD_IR_temp (additions to econ_temp would never init # and never roll up to the engine's acceptance score). set_temp_variable = { CPD_IR_temp = var:THIS.interest_rate } if = { limit = { THIS = { has_active_mission = debt_default_main_mission } } add_to_temp_variable = { CPD_IR_temp = 5 } } if = { limit = { check_variable = { CPD_IR_temp > 14.99 } } add_to_temp_variable = { CPD_IR_temp = 10 } } else_if = { limit = { check_variable = { CPD_IR_temp > 12.99 } } add_to_temp_variable = { CPD_IR_temp = 8 } } else_if = { limit = { check_variable = { CPD_IR_temp > 9.99 } } add_to_temp_variable = { CPD_IR_temp = 6 } } else_if = { limit = { check_variable = { CPD_IR_temp > 7.99 } } add_to_temp_variable = { CPD_IR_temp = 4 } } else_if = { limit = { check_variable = { CPD_IR_temp > 4.99 } } add_to_temp_variable = { CPD_IR_temp = 2 } } } localization_key = "CPD_ai_accept_economic_cost_tt" } } defined_text = { name = CPD_ai_accept_war_support text = { trigger = { set_temp_variable = { var = CPD_WS_temp value = { value = var:THIS.has_war_support multiply = -200 round = yes add = 101 } } } localization_key = "CPD_ai_accept_war_support_tt" } } defined_text = { name = CPD_ai_accept_relative_strength text = { trigger = { set_temp_variable = { var = CPD_RSB_temp value = { value = THIS.enemies_strength_ratio@ROOT multiply = 100 round = yes subtract = 100 clamp = { min = -500 max = 1000 } } } if = { limit = { ROOT = { NOT = { is_in_faction = yes } } } multiply_temp_variable = { CPD_RSB_temp = 0.25 } round_temp_variable = CPD_RSB_temp } } localization_key = "CPD_ai_accept_relative_strength_tt" } } defined_text = { name = CPD_ai_accept_surrender_progress text = { trigger = { set_temp_variable = { var = CPD_SP_temp value = { value = var:THIS.surrender_progress multiply = 200 round = yes subtract = 50 clamp = { min = 0 max = 100 } } } } localization_key = "CPD_ai_accept_surrender_progress_tt" } } defined_text = { name = CPD_ai_accept_battles_won text = { trigger = { set_temp_variable = { var = CPD_RBW_temp value = { value = ROOT.CPD_VP@PREV subtract = THIS.CPD_VP@ROOT round = yes clamp = { min = -150 max = 150 } } } } localization_key = "CPD_ai_accept_battles_won_tt" } } defined_text = { name = CPD_ai_accept_sender_contribution text = { trigger = { set_temp_variable = { CPD_SWC_temp = 0 } set_temp_variable = { CPD_cost_raw_temp = ROOT.CPD_total_cost_of_built_peace_deal } if = { limit = { NOT = { ROOT = { has_country_flag = CPD_giving_concessions } } check_variable = { CPD_cost_raw_temp > 0 } check_variable = { ROOT.CPD_VP@PREV < 1 } } set_temp_variable = { CPD_SWC_temp = -100 } } else_if = { limit = { NOT = { ROOT = { has_country_flag = CPD_giving_concessions } } check_variable = { CPD_cost_raw_temp > 5 } check_variable = { ROOT.CPD_VP@PREV < 10 } } set_temp_variable = { CPD_SWC_temp = -50 } } else_if = { limit = { NOT = { ROOT = { has_country_flag = CPD_giving_concessions } } check_variable = { CPD_cost_raw_temp > 10 } check_variable = { ROOT.CPD_VP@PREV < 25 } } set_temp_variable = { CPD_SWC_temp = -25 } } } localization_key = "CPD_ai_accept_sender_contribution_tt" } } defined_text = { name = CPD_ai_accept_deal_fairness text = { trigger = { set_temp_variable = { CPD_cost_raw_temp = ROOT.CPD_total_cost_of_built_peace_deal } set_temp_variable = { var = CPD_DF_temp value = { value = 0 if = { limit = { value = CPD_cost_raw_temp greater_than = 20 } subtract = 25 } if = { limit = { value = CPD_cost_raw_temp greater_than = 40 } subtract = 50 } if = { limit = { value = CPD_cost_raw_temp greater_than = 60 } subtract = 75 } if = { limit = { value = CPD_cost_raw_temp greater_than = 100 } subtract = 100 } } } } localization_key = "CPD_ai_accept_deal_fairness_tt" } } defined_text = { name = CPD_ai_accept_power_ranking text = { trigger = { set_temp_variable = { CPD_PR_temp = 0 } if = { limit = { THIS = { has_idea = super_power } } set_temp_variable = { CPD_PR_temp = -60 } } else_if = { limit = { THIS = { has_idea = great_power } } set_temp_variable = { CPD_PR_temp = -45 } } else_if = { limit = { THIS = { has_idea = large_power } } set_temp_variable = { CPD_PR_temp = -30 } } else_if = { limit = { THIS = { has_idea = regional_power } } set_temp_variable = { CPD_PR_temp = -15 } } else_if = { limit = { THIS = { has_idea = non_power } } set_temp_variable = { CPD_PR_temp = 15 } } } localization_key = "CPD_ai_accept_power_ranking_tt" } } defined_text = { name = CPD_ai_accept_faction_backing text = { trigger = { set_temp_variable = { CPD_FB_temp = 0 } if = { limit = { THIS = { has_idea = NATO_member } } add_to_temp_variable = { CPD_FB_temp = -25 } } if = { limit = { THIS = { has_idea = CSTO_member } } add_to_temp_variable = { CPD_FB_temp = -25 } } if = { limit = { THIS = { has_idea = faction_resistance_axis_member } } add_to_temp_variable = { CPD_FB_temp = -25 } } if = { limit = { THIS = { is_sco = yes } } add_to_temp_variable = { CPD_FB_temp = -25 } } } localization_key = "CPD_ai_accept_faction_backing_tt" } } defined_text = { name = CPD_ai_accept_months_at_war text = { trigger = { set_temp_variable = { var = months_at_war_tmp value = { value = THIS.months_at_war multiply = 2 clamp = { min = 0 max = 120 } } } } localization_key = "CPD_ai_accept_months_at_war_tt" } } defined_text = { name = CPD_ai_accept_war_weariness text = { trigger = { set_temp_variable = { var = CPD_WW_temp value = { value = 0 if = { limit = { value = THIS.months_at_war greater_than = 12 } subtract = 15 } if = { limit = { value = THIS.months_at_war greater_than = 24 } subtract = 15 } if = { limit = { value = THIS.months_at_war greater_than = 48 } subtract = 30 } } } if = { limit = { NOT = { surrender_progress < 0.5 } } set_temp_variable = { var = CPD_WW_temp value = 0 } } } localization_key = "CPD_ai_accept_war_weariness_tt" } } defined_text = { name = CPD_ai_accept_desperation text = { trigger = { set_temp_variable = { var = CPD_DESP_temp value = { value = 0 if = { limit = { value = var:THIS.surrender_progress greater_than = 0.5 } add = 25 } if = { limit = { value = var:THIS.surrender_progress greater_than = 0.75 } add = 25 } } } } localization_key = "CPD_ai_accept_desperation_tt" } } defined_text = { name = CPD_ai_accept_full_puppet_aversion text = { trigger = { set_temp_variable = { CPD_FP_aversion_temp = 0 } if = { limit = { ROOT = { has_country_flag = CPD_full_puppet_demand } } set_temp_variable = { CPD_FP_aversion_temp = -200 } if = { limit = { THIS = { is_subject = yes } } add_to_temp_variable = { CPD_FP_aversion_temp = 100 } } } } localization_key = "CPD_ai_accept_full_puppet_aversion_tt" } } defined_text = { name = CPD_ai_accept_regime_change_aversion text = { trigger = { set_temp_variable = { CPD_RC_aversion_temp = 0 } if = { limit = { ROOT = { has_country_flag = CPD_regime_change_demand } } set_temp_variable = { CPD_RC_aversion_temp = -80 } if = { limit = { THIS = { check_variable = { party_pop_array^ruling_party < 0.4 } } } add_to_temp_variable = { CPD_RC_aversion_temp = 30 } } } } localization_key = "CPD_ai_accept_regime_change_aversion_tt" } } defined_text = { name = CPD_ai_accept_forced_neutrality_aversion text = { trigger = { set_temp_variable = { CPD_FN_aversion_temp = 0 } if = { limit = { ROOT = { has_country_flag = CPD_forced_neutrality_demand } } if = { limit = { THIS = { is_in_faction = yes } } set_temp_variable = { CPD_FN_aversion_temp = -60 } } else = { set_temp_variable = { CPD_FN_aversion_temp = -20 } } } } localization_key = "CPD_ai_accept_forced_neutrality_aversion_tt" } } defined_text = { name = CPD_ai_accept_military_basing_aversion text = { trigger = { set_temp_variable = { CPD_MB_aversion_temp = 0 } if = { limit = { ROOT = { has_country_flag = CPD_military_basing_demand } } set_temp_variable = { CPD_MB_aversion_temp = -25 } } } localization_key = "CPD_ai_accept_military_basing_aversion_tt" } } defined_text = { name = CPD_ai_accept_resource_rights_aversion text = { trigger = { set_temp_variable = { var = CPD_RR_aversion_temp value = { value = 0 if = { limit = { value = ROOT.CPD_resource_rights_DEMANDS^num greater_than = 0 } subtract = 15 } if = { limit = { value = ROOT.CPD_resource_rights_DEMANDS^num greater_than = 3 } subtract = 25 } } } } localization_key = "CPD_ai_accept_resource_rights_aversion_tt" } } defined_text = { name = CPD_ai_accept_ceasefire_acceptance text = { trigger = { set_temp_variable = { CPD_CF_acceptance_temp = 0 } if = { limit = { ROOT = { has_country_flag = CPD_ceasefire_demand } THIS = { check_variable = { months_at_war > 18 } surrender_progress < 0.4 } } set_temp_variable = { CPD_CF_acceptance_temp = 40 } } } localization_key = "CPD_ai_accept_ceasefire_acceptance_tt" } } defined_text = { name = CPD_ai_accept_cost_of_peace text = { trigger = { set_temp_variable = { var = v value = { value = ROOT.CPD_total_cost_of_built_peace_deal multiply = -5 clamp = { min = -500 max = 50 } } } } localization_key = "CPD_ai_accept_cost_of_peace_tt" } } defined_text = { name = CPD_ai_acceptance_difficulty_setting text = { trigger = { set_temp_variable = { var = v value = { value = 0 if = { limit = { value = difficulty less_than = 1 } add = 15 } if = { limit = { value = difficulty greater_than = 2 } subtract = 15 } if = { limit = { value = difficulty greater_than = 1 } subtract = 15 } } } } localization_key = "CPD_ai_acceptance_difficulty_setting_tt" } } defined_text = { name = CPD_ai_acceptance_total text = { trigger = { CPD_AI_will_accept_calculation = yes } localization_key = "CPD_ai_acceptance_total_tt" } }