Scripted effect · By God Alone files
pam_clerical_court_recruit_effect
pam_clerical_court_recruit_effect = yesgame/common/scripted_effects/pam_effects.txt, line 9030 (73 lines). No parameters.
pam_clerical_court_recruit_effect is a scripted effect in Crusader Kings III, in the By God Alone files, written at line 9030 of its file. It takes no parameters: pam_clerical_court_recruit_effect = yes. The game's script calls it in 1 place, among them Tending the Flock (event pam_decision_events.0032). Patch 1.20.1.2, from game/common/scripted_effects/pam_effects.txt.
The comment above it in the file
Recruiting rulers run this, and it expects scope:pam_clerical_patron
What it does
If
a check the game hides
Then
clear_saved_scope = pam_clerical_novice_current
Else if
- Any pool character:
province = scope:pam_clerical_patron.locationpam_clerical_court_novice_trigger = { RULER = scope:pam_clerical_patron }- Their faith is the same as that of pam clerical patron
Then
- One random pool character:
- Where:
pam_clerical_court_novice_trigger = { RULER = scope:pam_clerical_patron }- Their faith is the same as that of pam clerical patron
province = scope:pam_clerical_patron.location
- Where:
Else if
- Any pool character:
province = scope:pam_clerical_patron.locationpam_clerical_court_novice_trigger = { RULER = scope:pam_clerical_patron }
Then
- One random pool character:
- Where:
pam_clerical_court_novice_trigger = { RULER = scope:pam_clerical_patron }
province = scope:pam_clerical_patron.location
- Where:
If
a check the game hides
Then
add_courtier = scope:pam_clerical_novice_currentIf
NOT = { scope:pam_clerical_novice_current.faith = scope:pam_clerical_patron.faith }
Then
scope:pam_clerical_novice_current:set_character_faith = scope:pam_clerical_patron.faith
If
scope:pam_clerical_novice_current:NOT = { rite = scope:pam_clerical_patron.rite }
Then
scope:pam_clerical_novice_current:set_character_rite = scope:pam_clerical_patron.rite
• 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)
pam_clerical_court_recruit_effect = {
if = {
limit = { exists = scope:pam_clerical_novice_current }
clear_saved_scope = pam_clerical_novice_current
}
if = {
limit = {
exists = scope:pam_clerical_novice
# Can cease to be in the pool between the event firing and the option executing
scope:pam_clerical_novice = { is_pool_character = yes }
}
scope:pam_clerical_novice = { save_scope_as = pam_clerical_novice_current }
}
else_if = {
limit = {
any_pool_character = {
province = scope:pam_clerical_patron.location
pam_clerical_court_novice_trigger = { RULER = scope:pam_clerical_patron }
faith = scope:pam_clerical_patron.faith
}
}
random_pool_character = {
province = scope:pam_clerical_patron.location
limit = {
pam_clerical_court_novice_trigger = { RULER = scope:pam_clerical_patron }
faith = scope:pam_clerical_patron.faith
}
save_scope_as = pam_clerical_novice_current
}
}
else_if = {
limit = {
any_pool_character = {
province = scope:pam_clerical_patron.location
pam_clerical_court_novice_trigger = { RULER = scope:pam_clerical_patron }
}
}
random_pool_character = {
province = scope:pam_clerical_patron.location
limit = { pam_clerical_court_novice_trigger = { RULER = scope:pam_clerical_patron } }
save_scope_as = pam_clerical_novice_current
}
}
if = {
limit = { exists = scope:pam_clerical_novice_current }
add_courtier = scope:pam_clerical_novice_current
send_interface_toast = {
type = event_toast_effect_good
title = pam_clerical_court_recruit_toast
left_icon = scope:pam_clerical_novice_current
if = {
limit = {
NOT = { scope:pam_clerical_novice_current.faith = scope:pam_clerical_patron.faith }
}
scope:pam_clerical_novice_current = {
set_character_faith = scope:pam_clerical_patron.faith
}
}
if = {
limit = { scope:pam_clerical_novice_current = { NOT = { rite = scope:pam_clerical_patron.rite } } }
scope:pam_clerical_novice_current = {
set_character_rite = scope:pam_clerical_patron.rite
}
}
if = {
limit = { scope:pam_clerical_novice_current = { NOT = { has_trait = cleric } } }
scope:pam_clerical_novice_current = {
add_trait = cleric
}
}
}
}
}As written in game/common/scripted_effects/pam_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls pam_clerical_court_recruit_effect.
Events (1)
- Tending the Flock
pam_decision_events.0032
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.