Scripted effect · Legends of the Dead files
give_legendary_building_location_standard_effect
give_legendary_building_location_standard_effect = yesgame/common/scripted_effects/06_dlc_ce1_legend_effects.txt, line 2233 (149 lines). No parameters.
give_legendary_building_location_standard_effect is a scripted effect in Crusader Kings III, in the Legends of the Dead files, written at line 2233 of its file. It takes no parameters: give_legendary_building_location_standard_effect = yes. The game's script calls it in 3 places, among them give_legendary_building_location_heroic_effect (scripted effect), give_legendary_building_location_holy_effect (scripted effect) and give_legendary_building_location_legitimizing_effect (scripted effect). Its body carries 2 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/06_dlc_ce1_legend_effects.txt.
What it does
- Else, if all of these hold:
- Conditions › Any held title:
- Title tier exactly County
- Their province: Does not have a Special Building slot
- Then › One random held title:
- Where › Their province: Does not have a Special Building slot
title_tier = county
- Conditions › Any held title:
- Else, if all of these hold:
- Conditions › Any held title:
- Title tier exactly Barony
- Their province: Does not have a Special Building slot
- Then › One random held title:
- Where › Their province: Does not have a Special Building slot
title_tier = barony
- Conditions › Any held title:
- Else, if all of these hold:
- Conditions › Any held title:
- Title tier exactly County
- Any county province: Does not have a Special Building slot
- Then › One random held title:
- Where › Any county province: Does not have a Special Building slot
title_tier = county
- Conditions › Any held title:
If
Then
• 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)
give_legendary_building_location_standard_effect = {
if = { # Prioritize the location of the legend if possible
limit = {
root = {
locale_valid_for_legendary_buildings = yes
}
}
scope:location = { save_scope_as = legendary_locale }
}
else_if = { # Otherwise, get the capital
limit = {
capital_province = { has_special_building_slot = no }
}
capital_province = { save_scope_as = legendary_locale }
}
else_if = { # Otherwise, prioritize a title you hold directly
limit = {
any_held_title = {
title_tier = county
title_province = { has_special_building_slot = no }
}
}
random_held_title = {
title_tier = county
limit = {
title_province = { has_special_building_slot = no }
}
title_province = { save_scope_as = legendary_locale }
}
}
else_if = { #Otherwise, prioritize a barony that you hold directly
limit = {
any_held_title = {
title_tier = barony
title_province = {
has_special_building_slot = no
}
}
}
random_held_title = {
title_tier = barony
limit = {
title_province = {
has_special_building_slot = no
}
}
title_province = {
save_scope_as = legendary_locale
}
}
}
else_if = { # Otherwise, prioritize a barony within a title you hold
limit = {
any_held_title = {
title_tier = county
any_county_province = { has_special_building_slot = no }
}
}
random_held_title = {
title_tier = county
limit = {
any_county_province = { has_special_building_slot = no }
}
random_county_province = {
limit = {
has_special_building_slot = no
}
save_scope_as = legendary_locale
}
}
}
else_if = { # Find a feudal barony...
limit = {
any_sub_realm_barony = {
title_province = {
has_special_building_slot = no
has_holding_type = castle_holding
}
}
}
random_sub_realm_barony = {
limit = {
title_province = {
has_special_building_slot = no
has_holding_type = castle_holding
}
}
title_province = { save_scope_as = legendary_locale }
}
}
else_if = { # Find a province with a holding
limit = {
any_sub_realm_barony = {
title_province = {
has_special_building_slot = no
has_holding = yes
}
}
}
random_sub_realm_barony = {
limit = {
title_province = {
has_special_building_slot = no
has_holding = yes
}
}
title_province = { save_scope_as = legendary_locale }
}
}
else = { # Final fallback, just any barony in your realm
random_sub_realm_barony = {
title_province = { save_scope_as = legendary_locale }
}
}
if = {
limit = {
OR = {
exists = scope:beast
has_trait_xp = {As written in game/common/scripted_effects/06_dlc_ce1_legend_effects.txt.
The first 120 of its 149 lines; the rest is in game/common/scripted_effects/06_dlc_ce1_legend_effects.txt from line 2233.
Where it is used
Every place in common/, events/ and history/ that calls give_legendary_building_location_standard_effect.
Source: game/common/scripted_effects/06_dlc_ce1_legend_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.