Scripted effect
accolade_create_squire_effect
accolade_create_squire_effect = yesgame/common/scripted_effects/00_accolades_scripted_effects.txt, line 10140 (456 lines). No parameters.
accolade_create_squire_effect is a scripted effect in Crusader Kings III, written at line 10140 of its file. It takes no parameters: accolade_create_squire_effect = yes. The game's script calls it in 1 place, among them on_accolade_create_squire (on action). Patch 1.20.1.2, from game/common/scripted_effects/00_accolades_scripted_effects.txt.
The comment above it in the file
Accolade successor picking/creation/adjusting effect, run in on_accolade_create_squire on_action
What it does
If
a check the game hides
Then
- If played by a person:
If
a check the game hides
Then
- One pool character, picked in order:
- Where:
culture_matches_accolade_specialization_trigger = { ACCOLADE = scope:accolade_in_need }new_acclaimed_knight_search_trigger = yes
province = capital_province
- Where:
- One pool character, picked in order:
- Otherwise:
scope:chosen_knight:accolade_squires_boost_martial_tourney_effect = yesaccolade_squires_boost_prowess_effect = yes- If lowborn:
create_dynasty = { spread_to_descendants = yes }
If
a check the game hides
Then
If
can_recruit_character_to_court_trigger = { RECRUITER = scope:owner RECRUITEE = scope:chosen_knight }scope:chosen_knight:NOT = { is_courtier_of = scope:owner }- Is not a ruler
Then
add_courtier = scope:chosen_knight
scope:chosen_knight:If
is_potential_knight = yes
Then
set_knight_status = force
scope:accolade_in_need:set_accolade_successor = scope:chosen_knight
- If played by a person:
• 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)
accolade_create_squire_effect = {
if = {
limit = { exists = capital_province }
save_scope_as = owner
if = {
limit = {
is_ai = no
}
#try to find a descendant of the knight
if = {
limit = {
exists = scope:knight_in_need
}
ordered_courtier_or_guest = {
order_by = prowess
limit = {
is_child_of = scope:knight_in_need
new_acclaimed_knight_search_trigger = yes
save_temporary_scope_as = candidate_temp
scope:accolade_in_need = {
has_variable_list = accolade_squire_chars
any_in_list = {
variable = accolade_squire_chars
this = scope:candidate_temp
}
}
}
alternative_limit = {
is_child_of = scope:knight_in_need
new_acclaimed_knight_search_trigger = yes
}
save_scope_as = chosen_knight
}
if = {
limit = {
NOT = { exists = scope:chosen_knight }
}
#Try to find former ward of knight
ordered_courtier_or_guest = {
order_by = prowess
limit = {
OR = {
any_memory = {
has_memory_type = childhood_education_guardian
has_memory_participant = scope:knight_in_need
}
has_relation_disciple = scope:knight_in_need
has_relation_elder = scope:knight_in_need
}
#Just to be sure this char was the ward in the memory, not the guardian
age < scope:knight_in_need.age
new_acclaimed_knight_search_trigger = yes
save_temporary_scope_as = candidate_temp
scope:accolade_in_need = {
has_variable_list = accolade_squire_chars
any_in_list = {
variable = accolade_squire_chars
this = scope:candidate_temp
}
}
}
alternative_limit = {
OR = {
any_memory = {
has_memory_type = childhood_education_guardian
has_memory_participant = scope:knight_in_need
}
has_relation_disciple = scope:knight_in_need
has_relation_elder = scope:knight_in_need
}
#Just to be sure this char was the ward in the memory, not the guardian
age < scope:knight_in_need.age
new_acclaimed_knight_search_trigger = yes
}
save_scope_as = chosen_knight
}
}
if = {
limit = {
NOT = { exists = scope:chosen_knight }
}
#Positive relation or family member knight of knight
ordered_knight = {
order_by = prowess
limit = {
culture_matches_accolade_specialization_trigger = { ACCOLADE = scope:accolade_in_need }
OR = {
has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = scope:knight_in_need }
AND = {
exists = scope:knight_in_need.house
house ?= scope:knight_in_need.house
}
any_close_or_extended_family_member = {
this = scope:knight_in_need
}
}
new_acclaimed_knight_search_trigger = yes
save_temporary_scope_as = candidate_temp
scope:accolade_in_need = {
has_variable_list = accolade_squire_chars
any_in_list = {
variable = accolade_squire_chars
this = scope:candidate_temp
}
}
}
alternative_limit = {
culture_matches_accolade_specialization_trigger = { ACCOLADE = scope:accolade_in_need }
OR = {
has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = scope:knight_in_need }
AND = {
exists = scope:knight_in_need.house
house ?= scope:knight_in_need.house
}
any_close_or_extended_family_member = {As written in game/common/scripted_effects/00_accolades_scripted_effects.txt.
The first 120 of its 456 lines; the rest is in game/common/scripted_effects/00_accolades_scripted_effects.txt from line 10140.
Where it is used
Every place in common/, events/ and history/ that calls accolade_create_squire_effect.
On actions (the game's own hooks) (1)
- on_accolade_create_squire
Source: game/common/scripted_effects/00_accolades_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.