Scripted effect · Roads to Power files
hasan_sabbah_end_war
hasan_sabbah_end_war = { HASAN = … SELJUK = … }game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt, line 9736 (159 lines). Parameters: $HASAN$, $SELJUK$.
hasan_sabbah_end_war is a scripted effect in Crusader Kings III, in the Roads to Power files, written at line 9736 of its file. A call passes 2 parameters: HASAN and SELJUK. The game's script calls it in 2 places, among them Assassin Dissolution (casus belli) and on_death (on action). Patch 1.20.1.2, from game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt.
What it does
$HASAN$ = { add_prestige = medium_prestige_value }$SELJUK$ = { … }- Every in list:
$HASAN$ = { destroy_title = prev }
faction_war_end_defeat_legitimacy_effect = yes
• 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)
hasan_sabbah_end_war = {
# Offer Hasan the opportunity to become landed
hidden_effect = {
if = {
limit = {
$SELJUK$ = {
any_sub_realm_barony = {
title_province = { has_building_or_higher = alamut_castle_01 }
}
}
}
$SELJUK$ = {
random_sub_realm_barony = {
limit = {
title_province = { has_building_or_higher = alamut_castle_01 }
}
county = {
save_scope_as = hasan_home
}
}
}
}
else_if = {
limit = {
$SELJUK$ = {
any_sub_realm_county = {
faith = $HASAN$.faith
holder = { is_ai = yes }
}
}
}
$SELJUK$ = {
random_sub_realm_county = {
limit = {
faith = $HASAN$.faith
holder = { is_ai = yes }
}
save_scope_as = hasan_home
}
}
}
else = {
$SELJUK$ = {
random_sub_realm_county = {
limit = {
holder = { is_ai = yes }
}
save_scope_as = hasan_home
}
}
}
$HASAN$ = {
if = {
limit = {
any_owned_story = {
type = story_hasan
exists = var:preferred_caliph
}
}
random_owned_story = {
type = story_hasan
var:preferred_caliph = { save_scope_as = caliph }
}
}
random_owned_story = {
type = story_hasan
var:assassins ?= { save_scope_as = assassins }
}
trigger_event = {
id = hasan_sabbah.1050
}
if = {
limit = {
is_ai = no
}
add_achievement_global_variable_effect = {
VARIABLE = finished_the_old_man_of_the_mountain_achievement
VALUE = yes
}
}
}
}
create_title_and_vassal_change = {
type = independency
save_scope_as = change
}
$HASAN$ = {
add_prestige = medium_prestige_value
}
$SELJUK$ = {
add_prestige = {
value = medium_prestige_value
multiply = -1
}
every_vassal = {
limit = {
highest_held_title_tier > tier_barony
}
change_liege_or_become_independent = {
CHANGE = scope:change
VASSAL = this
}
}
every_vassal = {
limit = { is_ai = no }
send_interface_toast = {
type = msg_gained_independence
title = liege_primary_title_dissolution
desc = liege_primary_title_dissolution_desc
left_icon = $SELJUK$
}
}
}
resolve_title_and_vassal_change = scope:change
$SELJUK$ = {
every_held_title = {
limit = {
tier >= tier_duchyAs written in game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt.
The first 120 of its 159 lines; the rest is in game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt from line 9736.
Where it is used
Every place in common/, events/ and history/ that calls hasan_sabbah_end_war.
Casus belli (1)
On actions (the game's own hooks) (1)
- on_death
Source: game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.