Scripted effect · By God Alone files
grant_cardinal_title_effect
grant_cardinal_title_effect = { CARDINAL_COUNTY = … }game/common/scripted_effects/11_dlc_pam_scripted_effects.txt, line 106 (267 lines). Parameters: $CARDINAL_COUNTY$.
grant_cardinal_title_effect is a scripted effect in Crusader Kings III, in the By God Alone files, written at line 106 of its file. A call passes 1 parameter: CARDINAL_COUNTY. The game's script calls it in 6 places, among them Appoint Cardinal (interaction), Request Cardinalate (interaction) and Request Cardinalate for Court Chaplain (interaction). Patch 1.20.1.2, from game/common/scripted_effects/11_dlc_pam_scripted_effects.txt.
The comment above it in the file
Creates and immediately grants a landless cardinalate to ROOT.
What it does
If
pam_can_hold_cardinalate_trigger = yespam_can_receive_cardinalate_trigger = yespam_pope_is_head_of_faith_or_rite_trigger = yes- Any in global list:
None of these
exists = holderAll of these
this = title:d_cd_velletrigame_start_date >= 1178.1.1
Then
scope:cardinalate:If
scope:cardinal_recipient.faith:None of these
- Any clerical elector title:
scope:cardinalate = this
- Any clerical elector title:
Then
add_clerical_elector = scope:cardinal_recipient.faith
- Gains the … Title (cardinal recipient)
Else if
Then
create_dynamic_title = { … }scope:new_title:add_clerical_elector = scope:cardinal_recipient.faith
scope:new_title:If
a check the game hides
Then
- The coat of arms changes
set_color_from_title = scope:cardinal_temple_baronyset_capital_county = scope:cardinal_temple_barony.county
Else if
a check the game hides
Then
- The coat of arms changes
set_color_from_title = scope:capital_baronyset_capital_county = scope:capital_barony.county
Else if
a check the game hides
Then
- The coat of arms changes
set_color_from_title = scope:cardinal_countyset_capital_county = scope:cardinal_county
Otherwise
- The coat of arms changes
set_color_from_title = scope:cardinal_recipient.rite.head_of_rite.default_location.countyset_capital_county = scope:cardinal_recipient.rite.head_of_rite.default_location.county
set_landless_title = yesset_destroy_on_succession = yesset_no_automatic_claims = yesset_can_be_named_after_dynasty = noset_can_use_nomadic_naming = no- Gains the … Title (cardinal recipient)
If
a check the game hides
Then
scope:cardinal_recipient:- Adopts Ecclesiastical Government
If
- Any held title:
- Title tier exactly Duchy
- Is a Clerical Title
Then
set_primary_title_to = scope:clerical_region_title
- Any held title:
- The Christian Church:
add_manual_participant = prev
• 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)
grant_cardinal_title_effect = {
save_scope_as = cardinal_recipient
# Government is picked during the title transfer, before change_government below
# A theocratic government_base keeps a lowborn from founding a dynasty
if = {
limit = { rite.head_of_rite ?= { government_has_flag = government_is_theocracy } }
rite.head_of_rite = { save_scope_as = cardinal_government_base }
}
else_if = {
limit = { faith.religious_head ?= { government_has_flag = government_is_theocracy } }
faith.religious_head = { save_scope_as = cardinal_government_base }
}
else_if = {
limit = { title:k_papal_state.holder ?= { government_has_flag = government_is_theocracy } }
title:k_papal_state.holder = { save_scope_as = cardinal_government_base }
}
else = {
save_scope_as = cardinal_government_base
}
# Grant a vacant cardinalate
if = {
limit = {
pam_can_hold_cardinalate_trigger = yes
pam_can_receive_cardinalate_trigger = yes
pam_pope_is_head_of_faith_or_rite_trigger = yes
any_in_global_list = {
variable = roma_cardinalates
NOR = {
exists = holder
AND = {
this = title:d_cd_velletri
game_start_date >= 1178.1.1
}
}
}
}
random_in_global_list = {
variable = roma_cardinalates
limit = {
NOR = {
exists = holder
exists = var:suppressed_cardinalate
}
any_past_holder = {} # prefer titles which have been used before
}
alternative_limit = {
NOR = {
exists = holder
exists = var:suppressed_cardinalate
}
}
save_scope_as = cardinalate
}
scope:cardinalate ?= {
# Register before transfer so lay-clergy rites see a clerical elector during gov validation
if = {
limit = {
scope:cardinal_recipient.faith = {
NOT = {
any_clerical_elector_title = { scope:cardinalate = this }
}
}
}
add_clerical_elector = scope:cardinal_recipient.faith
}
create_title_and_vassal_change = {
type = granted
save_scope_as = change
add_claim_on_loss = no
}
change_title_holder = {
holder = scope:cardinal_recipient
change = scope:change
government_base = scope:cardinal_government_base
}
resolve_title_and_vassal_change = scope:change
}
}
# Create a new cardinalate
else_if = {
limit = {
pam_can_hold_cardinalate_trigger = yes
pam_can_receive_cardinalate_trigger = yes
pam_pope_is_head_of_faith_or_rite_trigger = yes
}
capital_barony ?= { save_scope_as = capital_barony }
$CARDINAL_COUNTY$ ?= { save_scope_as = cardinal_county }
if = {
limit = {
NOT = { exists = scope:cardinal_county }
exists = default_location.county
}
default_location.county = { save_scope_as = cardinal_county }
}
if = {
limit = { exists = scope:cardinal_county }
scope:cardinal_county = {
random_direct_de_jure_vassal_title = {
limit = {
title_province = { has_holding_type = church_holding }
save_temporary_scope_as = temple_barony
NOT = {
scope:cardinal_recipient.faith = {
any_clerical_elector_title = {
var:named_after ?= scope:temple_barony
}
}
}
}
save_scope_as = cardinal_temple_barony
}
}
}
create_dynamic_title = {
tier = duchy
name = {
first_valid = {
triggered_desc = {
trigger = { exists = scope:cardinal_temple_barony }
desc = CE3_CARDINAL_DYNAMIC_TITLE_NAME_TEMPLEAs written in game/common/scripted_effects/11_dlc_pam_scripted_effects.txt.
The first 120 of its 267 lines; the rest is in game/common/scripted_effects/11_dlc_pam_scripted_effects.txt from line 106.
Where it is used
Every place in common/, events/ and history/ that calls grant_cardinal_title_effect.
Character interactions (3)
Scripted effects (1)
Source: game/common/scripted_effects/11_dlc_pam_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.