add_namespace = formable_buy # Offer received by holder of a formable core state # Vars on THIS (holder): formable_offer_buyer_id, formable_offer_state_id country_event = { id = formable_buy.1 title = formable_buy.1.t desc = formable_buy.1.d picture = GFX_message_signing is_triggered_only = yes option = { name = formable_buy.1.a log = "[GetDateText]: [This.GetName]: formable_buy.1.a executed" # Western/democratic governments will not sell away their own core territory trigger = { NOT = { OR = { has_government = democratic var:formable_offer_state_id = { is_core_of = ROOT } } } } ai_chance = { base = 30 modifier = { factor = 0 has_war = yes } modifier = { factor = 0 threat > 0.5 } modifier = { factor = 0.5 threat > 0.25 } modifier = { factor = 0.1 is_major = yes } modifier = { factor = 0.15 var:formable_offer_state_id = { is_core_of = ROOT } } } set_temp_variable = { treasury_change = 100 } modify_treasury_effect = yes set_temp_variable = { tmp_buyer_id = formable_offer_buyer_id } set_temp_variable = { tmp_state_id = formable_offer_state_id } var:tmp_buyer_id = { transfer_state = var:tmp_state_id country_event = { id = formable_buy.2 hours = 6 } } clr_country_flag = formable_purchase_offer_pending clear_variable = formable_offer_buyer_id clear_variable = formable_offer_state_id } option = { name = formable_buy.1.b log = "[GetDateText]: [This.GetName]: formable_buy.1.b executed" ai_chance = { base = 70 } set_temp_variable = { tmp_buyer_id = formable_offer_buyer_id } var:tmp_buyer_id = { set_temp_variable = { treasury_change = 100 } modify_treasury_effect = yes set_country_flag = { flag = formable_purchase_cooldown@PREV value = 1 days = 365 } country_event = { id = formable_buy.3 hours = 6 } } clr_country_flag = formable_purchase_offer_pending clear_variable = formable_offer_buyer_id clear_variable = formable_offer_state_id } # Player-facing shield against repeat offers; the AI never takes it and relies on the timed cooldown instead option = { name = formable_buy.1.c log = "[GetDateText]: [This.GetName]: formable_buy.1.c executed" ai_chance = { base = 0 } custom_effect_tooltip = formable_purchase_refuse_forever_tt set_temp_variable = { tmp_buyer_id = formable_offer_buyer_id } var:tmp_buyer_id = { set_temp_variable = { treasury_change = 100 } modify_treasury_effect = yes set_country_flag = formable_purchase_refused@PREV country_event = { id = formable_buy.5 hours = 6 } } clr_country_flag = formable_purchase_offer_pending clear_variable = formable_offer_buyer_id clear_variable = formable_offer_state_id } } # Acceptance notification sent to the buyer # Vars on THIS (buyer): formable_offer_holder_id, formable_offer_state_id country_event = { id = formable_buy.2 title = formable_buy.2.t desc = formable_buy.2.d picture = GFX_handshake_black is_triggered_only = yes option = { name = formable_buy.2.a log = "[GetDateText]: [This.GetName]: formable_buy.2.a executed" clear_variable = formable_offer_holder_id clear_variable = formable_offer_state_id } } # Rejection notification sent to the buyer (refund already issued in formable_buy.1.b) # Vars on THIS (buyer): formable_offer_holder_id, formable_offer_state_id country_event = { id = formable_buy.3 title = formable_buy.3.t desc = formable_buy.3.d picture = GFX_handshake_black is_triggered_only = yes option = { name = formable_buy.3.a log = "[GetDateText]: [This.GetName]: formable_buy.3.a executed" clear_variable = formable_offer_holder_id clear_variable = formable_offer_state_id } } # Lapse notification sent to the buyer (refund already issued in formable_purchase_cancel_offer). # Fires before the offer ever reaches a holder, so no holder or state is named. country_event = { id = formable_buy.4 title = formable_buy.4.t desc = formable_buy.4.d picture = GFX_handshake_black is_triggered_only = yes option = { name = formable_buy.4.a } } # Permanent-refusal notification sent to the buyer (refund already issued in formable_buy.1.c) # Vars on THIS (buyer): formable_offer_holder_id, formable_offer_state_id country_event = { id = formable_buy.5 title = formable_buy.5.t desc = formable_buy.5.d picture = GFX_handshake_black is_triggered_only = yes option = { name = formable_buy.5.a log = "[GetDateText]: [This.GetName]: formable_buy.5.a executed" clear_variable = formable_offer_holder_id clear_variable = formable_offer_state_id } }