Scripted effect · By God Alone files
pam_sway_to_rite_on_accept_effect
pam_sway_to_rite_on_accept_effect = yesgame/common/scripted_effects/pam_effects.txt, line 11884 (106 lines). No parameters.
pam_sway_to_rite_on_accept_effect is a scripted effect in Crusader Kings III, in the By God Alone files, written at line 11884 of its file. It takes no parameters: pam_sway_to_rite_on_accept_effect = yes. The game's script calls it in 3 places, among them Sway to Rite (interaction), Sway to Rite (interaction) and Sway to Rite (interaction). Patch 1.20.1.2, from game/common/scripted_effects/pam_effects.txt.
The comment above it in the file
Shared on_accept for the three Sway to Rite interactions Option flags exist only on outreach, so the ?= checks do nothing elsewhere
What it does
If
scope:is_puppet_action ?= yes
Then
- scope:puppet_or_actor › If sway ruler to my rite cost more than 0:
add_piety = { … }
scope:puppet_or_actor:scope:recipient:set_character_rite = scope:puppet_or_actor.rite- If played by the AI: Opinion: Pious (+10)
If
- Is a ruler
- Is landed
- scope:puppet_or_actor.rite: Has “rite founding window” (a variable the game's script sets)
pam_rite_sway_connected_recipient_trigger = { ACTOR = scope:puppet_or_actor }
Then
pam_convert_domain_counties_to_rite_effect = { RITE = scope:puppet_or_actor.rite }pam_convert_court_to_rite_effect = { RITE = scope:puppet_or_actor.rite }
Else if
- Is a ruler
- Is landed
- Their capital county:
this.faith = scope:puppet_or_actor.faiththis.rite != scope:puppet_or_actor.rite- Any neighboring county:
One of these
this.holder.liege = prev.holder.liegeor
this.holder = prev.holder.liege
Then
- Their capital county:
set_county_rite = scope:puppet_or_actor.rite
If
scope:pam_sway_pledge_favor ?= yes
Then
add_hook = { target = scope:puppet_or_actor type = favor_hook }
If
scope:pam_sway_endowment ?= yes
Then
scope:puppet_or_actor:pay_treasury_or_gold = { target = scope:recipient value = pam_sway_to_rite_endowment_cost_value }
If
scope:puppet_or_actor.religion = religion:christianity_religion- The Christian Church: The current phase counts “Ruler is swayed to a different Rite”
Then
- The Christian Church: Counts toward the situation's next phase: “Ruler is swayed to a different Rite”
scope:puppet_or_actor:
• 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 (106 lines of game script)
pam_sway_to_rite_on_accept_effect = {
if = {
limit = { scope:is_puppet_action ?= yes }
scope:puppet_or_actor = {
if = {
limit = { pam_sway_ruler_to_my_rite_cost_value > 0 }
add_piety = {
value = {
add = pam_sway_ruler_to_my_rite_cost_value
max = piety
multiply = -1
}
}
}
}
}
scope:puppet_or_actor = {
send_interface_toast = {
type = event_toast_effect_good
title = sway_ruler_to_my_rite_interaction_toast
left_icon = scope:puppet_or_actor
right_icon = scope:recipient
scope:recipient = {
set_character_rite = scope:puppet_or_actor.rite
if = {
limit = { is_ai = yes }
add_opinion = {
target = scope:puppet_or_actor
modifier = pious_opinion
opinion = 10
}
}
if = { # Accepting the founding wave of a freshly created rite pulls the whole domain and court along, but only if they are actually tied to us
limit = {
is_ruler = yes
is_landed = yes
scope:puppet_or_actor.rite ?= {
has_variable = pam_rite_founding_window
}
pam_rite_sway_connected_recipient_trigger = { ACTOR = scope:puppet_or_actor }
}
pam_convert_domain_counties_to_rite_effect = { RITE = scope:puppet_or_actor.rite }
pam_convert_court_to_rite_effect = { RITE = scope:puppet_or_actor.rite }
}
else_if = { # We also convert their capital county
limit = {
is_ruler = yes
is_landed = yes
capital_county = {
this.faith = scope:puppet_or_actor.faith # set_county_rite would drag a foreign-faith capital across faiths
this.rite != scope:puppet_or_actor.rite
any_neighboring_county = { # only if a neighbor shares the same liege or IS the liege, aka I'm not surrounded by complete strangers
OR = {
this.holder.liege = prev.holder.liege
this.holder = prev.holder.liege
}
}
}
}
capital_county = { set_county_rite = scope:puppet_or_actor.rite }
}
if = {
limit = { scope:pam_sway_pledge_favor ?= yes }
add_hook = {
target = scope:puppet_or_actor
type = favor_hook
}
}
}
if = {
limit = { scope:pam_sway_endowment ?= yes }
scope:puppet_or_actor = {
pay_treasury_or_gold = {
target = scope:recipient
value = pam_sway_to_rite_endowment_cost_value
}
}
}
}
# Catalysts
if = {
limit = {
scope:puppet_or_actor.religion = religion:christianity_religion
situation:the_christian_church ?= { situation_top_has_catalyst = catalyst_the_christian_church_swayed_to_rite }
}
situation:the_christian_church = { trigger_situation_catalyst = catalyst_the_christian_church_swayed_to_rite }
}
}
if = {
limit = {
scope:is_puppet_action ?= yes
scope:actor != scope:recipient
}
scope:actor = {
send_interface_toast = {
type = event_toast_effect_good
title = sway_ruler_to_my_rite_interaction_toast_puppeteer
left_icon = scope:puppet_or_actor
right_icon = scope:recipient
}
}
}
scope:puppet_or_actor = {
pam_tax_nonbelievers_conversion_fulfillment_effect = yes
}
}As written in game/common/scripted_effects/pam_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls pam_sway_to_rite_on_accept_effect.
Character interactions (3)
Source: game/common/scripted_effects/pam_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.