Scripted effect
grant_great_yuan_effect
grant_great_yuan_effect = yesgame/common/scripted_effects/00_mongol_invasion_effects.txt, line 3686 (438 lines). No parameters.
grant_great_yuan_effect is a scripted effect in Crusader Kings III, written at line 3686 of its file. It takes no parameters: grant_great_yuan_effect = yes. The game's script calls it in 1 place, among them grant_suitable_title_to_candidate_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/00_mongol_invasion_effects.txt.
What it does
- scope:great_yuan_title: Gains the … Title (candidate)
If
scope:great_yuan_title:One of these
this = title:h_chinaor
this = title:e_great_yuan
- scope:old_mongol_emperor › Any sub realm county:
duchy = title:e_great_yuan.title_capital_county.duchyNone of these
holder = scope:candidate- Their holder: Is played by a person
- Their holder › Any liege or above: Is played by a person
Then
- Every in list: Gains the … Title (candidate)
Else if
- scope:old_mongol_emperor › Any sub realm county:
duchy = scope:great_yuan_title.title_capital_county.duchyNone of these
holder = scope:candidate- Their holder: Is played by a person
- Their holder › Any liege or above: Is played by a person
Then
- Every in list: Gains the … Title (candidate)
- Every character war:
end_war = white_peace
If
scope:great_yuan_title:One of these
this = title:h_chinaor
this = title:e_great_yuan
- Holds e great yuan.title capital county
Then
- e great yuan.title capital county becomes the realm capital
Else if
has_title = scope:great_yuan_title.title_capital_county
Then
- The realm capital moves
Else if
None of these
- Their capital county’s province: Is in the special mongol empire great yuan region region
- Any held title:
- Title tier exactly County
is_landless_type_title = no- Their province: Is in the special mongol empire great yuan region region
Then
- One random held title:
- Where:
is_landless_type_title = no- Their province: Is in the special mongol empire great yuan region region
title_tier = county- scope:candidate: The realm capital moves
- Where:
spawn_mongol_successor_state_troops_effect = yes- They gets +1,000
- Dread +100
If
scope:great_yuan_title = title:h_china
Then
title:h_china.holder:
• 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)
grant_great_yuan_effect = {
# If the character doesn't hold any titles in the relevant
if = {
limit = {
NOT = {
any_held_title = {
title_tier = county
is_landless_type_title = no
title_province = {
geographical_region = special_mongol_empire_great_yuan_region
}
}
}
}
#Prefer biggest available chinese empire
if = {
limit = {
scope:old_mongol_emperor = {
any_sub_realm_empire = {
any_this_title_or_de_jure_above = {
this = title:h_china
}
}
}
}
scope:old_mongol_emperor = {
#Prioritize Chinese empire they have the most titles in
ordered_sub_realm_empire = {
order_by = {
every_de_jure_county = {
limit = {
is_landless_type_title = no
holder.top_liege ?= scope:old_mongol_emperor
title_province ?= {
geographical_region = special_mongol_empire_great_yuan_region
}
}
add = 1
}
}
limit = {
any_this_title_or_de_jure_above = {
this = title:h_china
}
}
random_de_jure_county = {
limit = {
is_landless_type_title = no
title_province = {
geographical_region = special_mongol_empire_great_yuan_region
}
}
}
save_scope_as = county_to_transfer
}
}
}
#Or just any county in Great Yuan region
else = {
scope:old_mongol_emperor = {
random_sub_realm_county = {
limit = {
is_landless_type_title = no
title_province = {
geographical_region = special_mongol_empire_great_yuan_region
}
}
save_scope_as = county_to_transfer
}
}
}
create_title_and_vassal_change = {
type = granted
save_scope_as = title_change
add_claim_on_loss = no
}
scope:county_to_transfer = {
change_title_holder = {
holder = scope:candidate
change = scope:title_change
}
}
resolve_title_and_vassal_change = scope:title_change
}
#First - give Hegemony of China if it's empty and Mongols have enough China!
if = {
limit = {
has_tgp_dlc_trigger = yes
NOT = {
exists = title:h_china.holder
}
title:h_china ?= {
any_de_jure_county = {
percent >= claim_mandate_china_county_percentage_value
holder.top_liege = {
OR = {
this = scope:old_mongol_emperor
is_tributary_of_suzerain_or_above = scope:old_mongol_emperor
}
}
}
}
}
title:h_china = {
save_scope_as = great_yuan_title
}
}
#Give appropriate Chinese empire so that they aren't disturbed by a weird Yuan being created
else_if = {
limit = {
scope:old_mongol_emperor = {
any_realm_de_jure_empire = {
any_this_title_or_de_jure_above = {
this = title:h_china
}
OR = {
NOT = {
exists = holderAs written in game/common/scripted_effects/00_mongol_invasion_effects.txt.
The first 120 of its 438 lines; the rest is in game/common/scripted_effects/00_mongol_invasion_effects.txt from line 3686.
Where it is used
Every place in common/, events/ and history/ that calls grant_great_yuan_effect.
Scripted effects (1)
Source: game/common/scripted_effects/00_mongol_invasion_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.