Scripted trigger · Tours and Tournaments files
valid_squire_for_accolade_trigger
valid_squire_for_accolade_trigger = { KNIGHT = … }game/common/scripted_triggers/04_ep2_accolade_triggers.txt, line 1318 (188 lines). Parameters: $KNIGHT$.
valid_squire_for_accolade_trigger is a scripted trigger in Crusader Kings III, in the Tours and Tournaments files, written at line 1318 of its file. A call passes 1 parameter: KNIGHT. The game's script calls it in 2 places, among them accolade_squire_training_effect (scripted effect) and accolade_can_train_squire_trigger (scripted trigger). Patch 1.20.1.2, from game/common/scripted_triggers/04_ep2_accolade_triggers.txt.
What it checks
is_courtier_of = $KNIGHT$.accolade.accolade_owner$KNIGHT$.liege ?= liege- Is at least 10 years old
- Age at most 20
If
$KNIGHT$.accolade.accolade_owner = { … }
Then
$KNIGHT$.accolade = { … }
None of these
If
$KNIGHT$.accolade = { accolade_squires_quality_value < accolade_squires_capable_minimum_value }
Then
- Has “acclaimed sq inexperienced” (a variable the game's script sets)
If
$KNIGHT$.accolade = { accolade_squires_quality_value < accolade_squires_accomplished_minimum_value }
Then
- Has “acclaimed sq capable” (a variable the game's script sets)
- Has “acclaimed sq maxed” (a variable the game's script sets)
- Any relation:
is_acclaimed = yesNOT = { this = $KNIGHT$ }
One of these
- Is played by the AI
or
has_relation_guardian = $KNIGHT$
One of these
can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = liege }or
Is played by a personor
All of these
- Any close family member: Is played by a person
has_relation_guardian = $KNIGHT$
- Is not imprisoned
- Is not incapable
- Does not have the Trait: Infirm
- Does not have the Trait: Feeble
- Does not have the Trait: Blind
- Does not have the Trait: Maimed
If
$KNIGHT$.accolade = { has_accolade_type = fanatic_attribute }
Then
faith = $KNIGHT$.accolade.accolade_owner.faith
If
NOT = { has_relation_guardian = $KNIGHT$ }NOT = { is_close_family_of = $KNIGHT$ }
Then
If
$KNIGHT$.accolade = { has_accolade_type = reeve_attribute }
Then
One of these
has_focus = education_stewardshipor
Has the Trait: Students of Stewardshipor
has_lifestyle = stewardship_lifestyleor
Stewardship more than 8
• 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)
valid_squire_for_accolade_trigger = {
save_temporary_scope_as = squire_temp
exists = $KNIGHT$.accolade.accolade_owner
is_courtier_of = $KNIGHT$.accolade.accolade_owner
exists = liege
$KNIGHT$.liege ?= liege
age >= 10
age <= 20
#If in an accolade's squire pool...
trigger_if = {
limit = {
$KNIGHT$.accolade.accolade_owner = {
any_accolade = {
has_variable_list = accolade_squire_chars
any_in_list = {
variable = accolade_squire_chars
this = scope:squire_temp
}
}
}
}
#...must be this accolade's squire pool
$KNIGHT$.accolade = {
has_variable_list = accolade_squire_chars
any_in_list = {
variable = accolade_squire_chars
this = scope:squire_temp
}
}
}
NOR = {
#Already has bonus commensurate with level
trigger_if = {
limit = {
$KNIGHT$.accolade = {
accolade_squires_quality_value < accolade_squires_capable_minimum_value
}
}
has_variable = acclaimed_sq_inexperienced
}
trigger_if = {
limit = {
$KNIGHT$.accolade = {
accolade_squires_quality_value < accolade_squires_accomplished_minimum_value
}
}
has_variable = acclaimed_sq_capable
}
#Accomplished-tier training
has_variable = acclaimed_sq_maxed
#Don't want to make it impossible to be trained by guardian
any_relation = {
type = guardian
is_acclaimed = yes
NOT = {
this = $KNIGHT$
}
}
}
#Must be knight's ward if player, implying that you intentionally signed up to be trained by them
OR = {
is_ai = yes
has_relation_guardian = $KNIGHT$
}
OR = {
can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = liege }
#Player can ignore gender triggers
is_ai = no
AND = {
any_close_family_member = {
is_ai = no
}
has_relation_guardian = $KNIGHT$
}
}
is_imprisoned = no
is_incapable = no
NOR = {
has_trait = infirm
has_trait = physique_bad_3
has_trait = blind
has_trait = maimed
}
NOT = {
this = $KNIGHT$
}
#fanatic accolade requires same faith
trigger_if = {
limit = {
$KNIGHT$.accolade = {
has_accolade_type = fanatic_attribute
}
}
faith = $KNIGHT$.accolade.accolade_owner.faith
}
#Limit random unrelated children who can be pulled in as squires
trigger_if = {
limit = {
NOR = {
has_relation_guardian = $KNIGHT$
is_close_family_of = $KNIGHT$
}
}
#Consider blocking personality trait accolades picking up kids with wrong personality/childhood traits
#revels accolade can't get temperate kid
trigger_if = {
limit = {
$KNIGHT$.accolade = {
has_accolade_type = master_of_revels_attribute
}
}
NOR = {
has_trait = temperate
has_trait = shy
}
}
#charmer accolade can't get chaste kid
trigger_if = {
limit = {As written in game/common/scripted_triggers/04_ep2_accolade_triggers.txt.
The first 120 of its 188 lines; the rest is in game/common/scripted_triggers/04_ep2_accolade_triggers.txt from line 1318.
Where it is used
Every place in common/, events/ and history/ that calls valid_squire_for_accolade_trigger.
Scripted effects (1)
Scripted triggers (1)
Source: game/common/scripted_triggers/04_ep2_accolade_triggers.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.