Scripted effect
monastic_lease_swapping_effect
monastic_lease_swapping_effect = yesgame/common/scripted_effects/00_holy_order_effects.txt, line 6401 (304 lines). No parameters.
monastic_lease_swapping_effect is a scripted effect in Crusader Kings III, written at line 6401 of its file. It takes no parameters: monastic_lease_swapping_effect = yes. The game's script calls it in 1 place, among them yearly_holy_order_pulse (on action). Its body carries 6 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/00_holy_order_effects.txt.
The comment above it in the file
Get monasteries where Rite and ruler tenet matches theirs Increase development in matching-rite duchies they lease in improve monk courtiers of leader Inform their lease holders of what happened Inform lease holders of other monasteries they had monasteries switched
What it does
If
a check the game hides
Then
holy_order = { … }- Every in list:
- Where: Is played by a person
If
- scope:target_order: Any leased title:
Then
- … assumed the Lease of … from …
If
scope:target_order.leader.rite:One of these
NOT = { scope:taken_monastery.county.clerical_region_title.holder.rite ?= scope:target_order.leader.rite }or
NOT = { scope:taken_monastery.county.holder.rite ?= this }
Then
- This … monastery now belongs to …
Else if
scope:taken_monastery.county:One of these
- Their clerical region’s holder:
One of these
scope:holy_order.holy_order_patron ?= thisor
scope:holy_order_leader.puppeteer ?= thisor
Any personal tenet:this = scope:order_tenet
or
Their holder:One of these
scope:holy_order.holy_order_patron ?= thisor
scope:holy_order_leader.puppeteer ?= thisor
Any personal tenet:this = scope:order_tenet
- Their clerical region’s holder:
Then
- … influence caused this transfer
Otherwise
- … assumed the Lease of …, absorbing the last of …
If
scope:target_order.leader.rite:One of these
NOT = { scope:taken_monastery.county.clerical_region_title.holder.rite ?= scope:target_order.leader.rite }or
NOT = { scope:taken_monastery.county.holder.rite ?= this }
Then
- This … monastery now belongs to …
Else if
scope:taken_monastery.county:One of these
- Their clerical region’s holder:
One of these
scope:holy_order.holy_order_patron ?= thisor
scope:holy_order_leader.puppeteer ?= thisor
Any personal tenet:this = scope:order_tenet
or
Their holder:One of these
scope:holy_order.holy_order_patron ?= thisor
scope:holy_order_leader.puppeteer ?= thisor
Any personal tenet:this = scope:order_tenet
- Their clerical region’s holder:
Then
- … influence caused this transfer
scope:taken_monastery:revoke_lease = yeslease_out_to_holy_order = scope:holy_order
- Monk experience +10
- Every Courtier:
• 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)
monastic_lease_swapping_effect = {
add_character_flag = {
flag = mon_monastery_gain_cooldown
years = 3
}
add_character_flag = {
flag = just_swapped_lease
days = 10
}
save_scope_as = holy_order_leader
holy_order = {
save_scope_as = holy_order
}
holy_order.order_tenet = {
save_scope_as = order_tenet
}
rite = {
save_scope_as = order_rite
}
faith = {
random_faith_holy_order = {
limit = {
NOT = {
this = scope:holy_order
}
any_leased_title = {
monastic_lease_can_be_suborned_trigger = { ORDER = scope:holy_order }
}
scope:holy_order_leader.var:old_order ?= this
}
alternative_limit = {
NOT = {
this = scope:holy_order
}
any_leased_title = {
monastic_lease_can_be_suborned_trigger = { ORDER = scope:holy_order }
}
}
save_scope_as = target_order
ordered_leased_title = {
order_by = {
value = county.development_level
multiply = -1
}
limit = {
monastic_lease_can_be_suborned_trigger = { ORDER = scope:holy_order }
NOT = {
county = scope:target_order.leader.capital_county
}
}
save_scope_as = taken_monastery
}
#Capital monastery if only available
if = {
limit = {
NOT = {
exists = scope:taken_monastery
}
}
ordered_leased_title = {
order_by = {
value = county.development_level
multiply = -1
}
limit = {
monastic_lease_can_be_suborned_trigger = { ORDER = scope:holy_order }
}
save_scope_as = taken_monastery
}
}
}
}
if = {
limit = {
exists = scope:taken_monastery
}
#Inform their lease holders of what is happening
holy_order = {
every_leased_title = {
county.holder ?= {
add_to_list = rulers_to_notify
}
}
}
faith.religious_head ?= {
add_to_list = rulers_to_notify
}
rite.head_of_rite ?= {
add_to_list = rulers_to_notify
}
scope:target_order = {
every_leased_title = {
county.holder ?= {
add_to_list = rulers_to_notify
}
}
leader.rite.head_of_rite ?= {
add_to_list = rulers_to_notify
}
}
scope:taken_monastery.county = {
holder ?= {
add_to_list = rulers_to_notify
}
clerical_region_title.holder ?= {
add_to_list = rulers_to_notify
}
}
every_in_list = {
list = rulers_to_notify
limit = {
is_ai = no
}
save_scope_as = msg_receiver
#Normal message
if = {
limit = {
scope:target_order = {
any_leased_title = {As written in game/common/scripted_effects/00_holy_order_effects.txt.
The first 120 of its 304 lines; the rest is in game/common/scripted_effects/00_holy_order_effects.txt from line 6401.
Where it is used
Every place in common/, events/ and history/ that calls monastic_lease_swapping_effect.
On actions (the game's own hooks) (1)
- yearly_holy_order_pulse
Source: game/common/scripted_effects/00_holy_order_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.