Scripted effect
court_position_vacated_event_effect
court_position_vacated_event_effect = { COURT_POSITION_TYPE = … }game/common/scripted_effects/00_court_position_effects.txt, line 3414 (60 lines). Parameters: $COURT_POSITION_TYPE$.
court_position_vacated_event_effect is a scripted effect in Crusader Kings III, written at line 3414 of its file. A call passes 1 parameter: COURT_POSITION_TYPE. The game's script calls it in 71 places, among them Akolouthos (court position), Antiquarian (court position) and Archer Captain (court position). Patch 1.20.1.2, from game/common/scripted_effects/00_court_position_effects.txt.
What it does
scope:liege:If
- Is played by a person
NOT = { has_player_court_position_automation_none = court_position_type:$COURT_POSITION_TYPE$ }
Then
- One court position candidate, picked in order:
court_position_type = scope:court_position_type
If
One of these
has_player_court_position_automation_assign_best = scope:court_position_typeor
has_player_court_position_automation_assign_best_or_event = scope:court_position_type
Then
appoint_court_position = { recipient = scope:candidate_1 court_position = scope:court_position_type }
Otherwise
• 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 (60 lines of game script)
court_position_vacated_event_effect = {
scope:liege = {
if = {
limit = {
is_ai = no
NOT = { has_player_court_position_automation_none = court_position_type:$COURT_POSITION_TYPE$ }
}
court_position_type:$COURT_POSITION_TYPE$ = {
save_scope_as = court_position_type
}
ordered_court_position_candidate = {
court_position_type = scope:court_position_type
order_by = aptitude_score:$COURT_POSITION_TYPE$
# Previous holder might still be in the court/alive - lets not include them
limit = { NOT = { this = scope:employee } }
max = 2
check_range_bounds = no
if = {
limit = { NOT = { exists = scope:candidate_1 } }
save_scope_as = candidate_1
}
else_if = {
limit = { NOT = { exists = scope:candidate_2 } }
save_scope_as = candidate_2
}
}
if = {
limit = {
OR = {
has_player_court_position_automation_assign_best = scope:court_position_type
has_player_court_position_automation_assign_best_or_event = scope:court_position_type
}
exists = scope:candidate_1
}
appoint_court_position = {
recipient = scope:candidate_1
court_position = scope:court_position_type
}
}
else_if = {
limit = {
has_player_court_position_automation_assign_best = scope:court_position_type
}
# Do nothing, the player does not want an event
}
else_if = {
limit = { is_landless_adventurer = yes }
trigger_event = court_position_management_event.0002
}
else = {
trigger_event = court_position_management_event.0001
}
}
}
}As written in game/common/scripted_effects/00_court_position_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls court_position_vacated_event_effect.
Court positions (71)
65 more
- Camelry Captain
- Camp Priest
- Caravan Master
- Champion Charioteer
- Chief Cook
- Chief Engineer
- Chief Eunuch
- Chief Forager
- Chief Qadi
- Court Artificer
- Court Brahmin
- Court Brewmaster
- Court Chronicler
- Court Gardener
- Court Jester
- Court Musician
- Court Poet
- Court Scholar
- Cultural Emissary
- Cup-Bearer
- Department Aide
- Elephantry Captain
- Executioner
- Favored Minister
- Food Taster
- Garden Hermit
- Garuda
- Grand Guardian
- Grand Mentor
- Grand Preceptor
- Guru
- Head Groom
- Head Porter
- Heavy Cavalry Captain
- Heavy Infantry Captain
- High Almoner
- Horse Archer Captain
- Huntsman
- Keeper of the Harem
- Keeper of the Swans
- Kenneler
- Khlon Glan
- Lady-in-waiting
- Laureate
- Light Cavalry Captain
- Light Infantry Captain
- Man-Haggler
- Master Assassin
- Master Bard
- Master of Arms
- Master of Spoils
- Master of the Horse
- Master of the Hunt
- Master Thief
- Personal Champion
- Personal Physician
- Pike Captain
- Quartermaster
- Royal Architect
- Second
- Seneschal
- Stooge
- Tutor
- Wet Nurse
- Witness
Source: game/common/scripted_effects/00_court_position_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.