Scripted effect · Legacy of Persia files
try_to_settle_the_seljuk_effect
try_to_settle_the_seljuk_effect = yesgame/common/scripted_effects/01_dlc_fp3_scripted_effects.txt, line 338 (73 lines). No parameters.
try_to_settle_the_seljuk_effect is a scripted effect in Crusader Kings III, in the Legacy of Persia files, written at line 338 of its file. It takes no parameters: try_to_settle_the_seljuk_effect = yes. The game's script calls it in 1 place, among them story_seljuk_invasion (story cycle). Patch 1.20.1.2, from game/common/scripted_effects/01_dlc_fp3_scripted_effects.txt.
What it does
If
- Any county in region:
region = world_persian_empire- Their de jure liege:
If
a check the game hides
Then
- Their holder: Is played by the AI
- Their holder’s top liege:
capital_county.de_jure_liege != scope:duchy_temp
Then
- One random county in region:
- Where:
- Their de jure liege:
If
a check the game hides
Then
- Their holder: Is played by the AI
- Their holder’s top liege:
capital_county.de_jure_liege != scope:duchy_temp
- Their de jure liege:
region = world_persian_empire- Their holder’s top liege: Event fp3_story_cycle_seljuks_invasion_events.0002
- Where:
Otherwise
- Any county in region:
• 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 (73 lines of game script)
try_to_settle_the_seljuk_effect = {
# Search for a character who can host the tribe
save_scope_as = lead_seljuk
if = { # # Attempt to settle them in a duchy within the d_nishapur region, where the conflict historically started. Starting here to save the Seljuks the trip from the Oghuz-Il region to Persia proper, then attempt to settle them in a suitable duchy title
limit = {
any_county_in_region = {
region = world_persian_empire
de_jure_liege = {
trigger_if = {
limit = { exists = holder }
holder = { is_ai = yes }
}
save_temporary_scope_as = duchy_temp
}
holder.top_liege = { capital_county.de_jure_liege != scope:duchy_temp }
}
}
random_county_in_region = {
region = world_persian_empire
limit = {
de_jure_liege = {
this = title:d_nishapur
trigger_if = {
limit = { exists = holder }
holder = { is_ai = yes }
}
save_temporary_scope_as = duchy_temp
}
holder.top_liege = { capital_county.de_jure_liege != scope:duchy_temp }
}
alternative_limit = {
de_jure_liege = {
de_jure_liege = title:k_khorasan
trigger_if = {
limit = { exists = holder }
holder = { is_ai = yes }
}
save_temporary_scope_as = duchy_temp
}
holder.top_liege = { capital_county.de_jure_liege != scope:duchy_temp }
}
alternative_limit = {
de_jure_liege = {
trigger_if = {
limit = { exists = holder }
holder = { is_ai = yes }
}
save_temporary_scope_as = duchy_temp
}
holder.top_liege = { capital_county.de_jure_liege != scope:duchy_temp }
}
weight = {
base = 1
modifier = {
holder.top_liege = { save_temporary_scope_as = top_liege_temp }
any_neighboring_county = {
holder.top_liege != scope:top_liege_temp
}
}
}
de_jure_liege = { save_scope_as = fp3_seljuk_settle_target }
debug_log = "Attempting to settle seljuk in random duchy"
holder.top_liege = { trigger_event = fp3_story_cycle_seljuks_invasion_events.0002 }
}
}
else = { # nobody to settle, then attack!
start_wars_for_seljuk_empire_effect = yes
debug_log = "Attempting to settle seljuk by force"
}
}As written in game/common/scripted_effects/01_dlc_fp3_scripted_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls try_to_settle_the_seljuk_effect.
Story cycles (1)
- story_seljuk_invasion
Source: game/common/scripted_effects/01_dlc_fp3_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.