Scripted effect · All Under Heaven files
tribute_mission_invalidation_effect
tribute_mission_invalidation_effect = yesgame/common/scripted_effects/tgp_tribute_mission_scripted_effects.txt, line 540 (120 lines). No parameters.
tribute_mission_invalidation_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 540 of its file. It takes no parameters: tribute_mission_invalidation_effect = yes. The game's script calls it in 1 place, among them travel_events_on_action (on action). Patch 1.20.1.2, from game/common/scripted_effects/tgp_tribute_mission_scripted_effects.txt.
What it does
- If has “tribute mission type” (a variable the game's script sets):
Else if
- Has “tribute mission type” (a variable the game's script sets)
One of these
All of these
- Has “offered concubine” (a variable the game's script sets)
One of these
var:offered_concubine:is_alive = no
or
var:offered_concubine: Is imprisoned
or
All of these
- Has “offered eunuch” (a variable the game's script sets)
One of these
var:offered_eunuch:is_alive = no
or
var:offered_eunuch: Is imprisoned
Then
- Event tribute_mission.9750
Else if
- Has “tribute mission target scope” (a variable the game's script sets)
Then
requested_tribute_mission_clean_up_variables_effect = yes- Else, if all of these hold:
- Conditions:
current_travel_plan.next_destination_province != scope:new_overlord.capital_province
- Then: Event tribute_mission.9800
- Conditions:
- Otherwise: Event tribute_mission.9800
• the game's own tooltip text · ◦ our reading of the script line · code the script where neither exists
“They” is whatever it runs on (the scope it is called in). The scripted triggers and effects it calls link to their own pages; $PARAMETERS$ stay as written: each call fills them in.
The script as written (120 lines of game script)
tribute_mission_invalidation_effect = {
if = {
limit = { has_variable = tribute_mission_type }
if = {
limit = { # sanity check to ensure we're still a valid tribute provider
OR = {
is_independent_ruler = no # if we have a liege we cannot also pay tribute to someone else
AND = { # if we're not a tributary we are only valid if we're paying tribute to a hegemony
is_tributary = no
OR = {
NOT = { exists = var:tribute_mission_target_scope }
var:tribute_mission_target_scope = { NOT = { highest_held_title_tier = tier_hegemony } }
}
}
}
}
#Return home and refund
trigger_event = tribute_mission.9800
}
else_if = { #If our offerings have perished or been imprisoned along the way, maybe swap to gold
limit = {
has_variable = tribute_mission_type
OR = {
AND = {
has_variable = offered_concubine
OR = {
var:offered_concubine = { is_alive = no }
var:offered_concubine = { is_imprisoned = yes }
}
}
AND = {
has_variable = offered_eunuch
OR = {
var:offered_eunuch = { is_alive = no }
var:offered_eunuch = { is_imprisoned = yes }
}
}
}
}
trigger_event = tribute_mission.9750
}
else_if = {
#We're still a tributary on our way to pay tribute, but our suzerain is not the person we were going to pay tribute to
limit = {
has_variable = tribute_mission_target_scope
OR = {
AND = {
is_tributary = yes
var:tribute_mission_target_scope != suzerain
}
AND = {
is_tributary = no
OR = {
NOT = { exists = var:tribute_mission_target_scope }
var:tribute_mission_target_scope = { NOT = { highest_held_title_tier = tier_hegemony } }
}
}
}
}
var:tribute_mission_target_scope = { save_scope_as = old_overlord }
suzerain = { save_scope_as = new_overlord }
#Clean up Requested Tribute Mission variables
requested_tribute_mission_clean_up_variables_effect = yes
#The new Overlord is in the same place and can accept the tribute
if = {
limit = {
#Make sure they can still accept our offerings; if so, just set the new target
current_travel_plan.next_destination_province = scope:new_overlord.capital_province
has_variable = tribute_mission_type
trigger_if = {
limit = {
has_variable = {
name = offered_concubine
name = offered_eunuch
}
}
OR = {
AND = {
has_variable = offered_concubine
var:offered_concubine = {
can_become_concubine_of_character_valid_trigger = { CHARACTER = scope:new_overlord }
}
}
AND = {
has_variable = offered_eunuch
scope:new_overlord = {
culture = { has_cultural_parameter = can_appoint_chief_eunuch }
}
}
}
}
}
send_interface_message = {
type = msg_mandala_neutral_text
title = tribute_mission_notification.new_overlord.title
left_icon = scope:new_overlord
desc = tribute_mission_notification.new_overlord.desc
}
set_variable = {
name = tribute_mission_target_scope
value = scope:new_overlord
}
}
#The Overlord is somewhere else; please try again
else_if = {
limit = {
current_travel_plan.next_destination_province != scope:new_overlord.capital_province
}
set_variable = new_overlord_somewhere_else
#Return home and refund
trigger_event = tribute_mission.9800
}
else = {
set_variable = new_overlord_unable_to_accept_tribute
#Return home and refund
trigger_event = tribute_mission.9800
}
}
}
}As written in game/common/scripted_effects/tgp_tribute_mission_scripted_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls tribute_mission_invalidation_effect.
On actions (the game's own hooks) (1)
- travel_events_on_action
Source: game/common/scripted_effects/tgp_tribute_mission_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.