Scripted effect
court_position_generator_effect
court_position_generator_effect = { EMPLOYER = … ONLY_EMPTY = … VAR = … }game/common/scripted_effects/00_court_position_effects.txt, line 827 (707 lines). Parameters: $EMPLOYER$, $ONLY_EMPTY$, $VAR$.
court_position_generator_effect is a scripted effect in Crusader Kings III, written at line 827 of its file. A call passes 3 parameters: EMPLOYER, ONLY_EMPTY and VAR. The game's script calls it in 8 places, among them Offer Eunuch (interaction), … Rewards (event bp1_yearly.8191) and A Place at Court (event hold_court.8090). Patch 1.20.1.2, from game/common/scripted_effects/00_court_position_effects.txt.
The comment above it in the file
Sets variable of court position suitable to a character's skills Actual job is set with court_position_generator_assignment_effect after using this effect VAR - can be used to allow multiple event options: 'target', 'second', 'backup' EMPLOYER - should be the char hiring the position ROOT - should be the char taking the position ONLY_EMPTY - replace occupied position or not scope:allow_bad_position for allowing 'bad' position, since generally it's nonsense for someone to ask for such position Saves scope:old_holder as existing holder if they exist NOTE: candidates must be courtiers of the employer for this to work
What it does
- 1 of 48 things will happen:
- 2%:
court_position_generator_shared_modifier = { POS = royal_architect EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = royal_architect EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = seneschal EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = seneschal EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = court_tutor EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = court_tutor EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = high_almoner EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = high_almoner EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = court_physician EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = court_physician EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = antiquarian EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = antiquarian EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = master_of_horse EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = master_of_horse EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = bodyguard EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = bodyguard EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = master_of_hunt EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = master_of_hunt EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = champion EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = champion EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = court_poet EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = court_poet EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = court_musician EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = court_musician EMPLOYER = $EMPLOYER$ }
- 1%:
court_position_generator_shared_modifier = { POS = court_jester EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = court_jester EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = executioner EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = executioner EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = food_taster EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = food_taster EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = cupbearer EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = cupbearer EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = lady_in_waiting EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = lady_in_waiting EMPLOYER = $EMPLOYER$ }
- 4%:
court_position_generator_shared_modifier = { POS = chief_eunuch EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = chief_eunuch EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = court_gardener EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = court_gardener EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = court_artificer EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = court_artificer EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = cultural_emissary EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = cultural_emissary EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = chief_qadi EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = chief_qadi EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = garuda EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = garuda EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = keeper_of_swans EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = keeper_of_swans EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = travel_leader EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = travel_leader EMPLOYER = $EMPLOYER$ }
- 2% (base chance; changed in play):
court_position_generator_shared_modifier = { POS = wet_nurse EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = wet_nurse EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = cave_hermit EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = cave_hermit EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = master_assassin EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = master_assassin EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = court_scholar EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = court_scholar EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = chronicler EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = chronicler EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = akolouthos EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = akolouthos EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = court_astrologer EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = court_astrologer EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = grand_preceptor EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = grand_preceptor EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = grand_guardian EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = grand_guardian EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = grand_mentor EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = grand_mentor EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = fire_dragon_engineer EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = fire_dragon_engineer EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = keeper_of_the_harem EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = keeper_of_the_harem EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = boyan EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = boyan EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = siege_engineer EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = siege_engineer EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = yurtchi EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = yurtchi EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = cherbi EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = cherbi EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = yeke_jarquchi EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = yeke_jarquchi EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = foreign_emissary EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = foreign_emissary EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = keeper_of_the_horses EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = keeper_of_the_horses EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = court_guru EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = court_guru EMPLOYER = $EMPLOYER$ }
- 2%:
court_position_generator_shared_modifier = { POS = court_brahmin EMPLOYER = $EMPLOYER$ }court_position_generator_variable_effect = { VAR = $VAR$ POS = court_brahmin EMPLOYER = $EMPLOYER$ }
- 2%: … (more in the script below)
- … (more in the script below)
- 2%:
- … (more in the script below)
• 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)
court_position_generator_effect = {
save_scope_as = candidate
$EMPLOYER$ = { save_scope_as = liege }
save_scope_value_as = {
name = only_empty
value = flag:$ONLY_EMPTY$
}
# Randomly select a fitting role and save it to a variable
random_list = {
2 = { # ARCHITECT
trigger = {
court_position_generator_pickable_trigger = { POS = royal_architect EMPLOYER = $EMPLOYER$ }
}
court_position_generator_shared_modifier = {
POS = royal_architect
EMPLOYER = $EMPLOYER$
}
court_position_generator_variable_effect = {
VAR = $VAR$
POS = royal_architect
EMPLOYER = $EMPLOYER$
}
}
2 = { # SENESCHAL
trigger = {
court_position_generator_pickable_trigger = { POS = seneschal EMPLOYER = $EMPLOYER$ }
}
court_position_generator_shared_modifier = {
POS = seneschal
EMPLOYER = $EMPLOYER$
}
court_position_generator_variable_effect = {
VAR = $VAR$
POS = seneschal
EMPLOYER = $EMPLOYER$
}
}
2 = { # TUTOR
trigger = {
court_position_generator_pickable_trigger = { POS = court_tutor EMPLOYER = $EMPLOYER$ }
}
court_position_generator_shared_modifier = {
POS = court_tutor
EMPLOYER = $EMPLOYER$
}
court_position_generator_variable_effect = {
VAR = $VAR$
POS = court_tutor
EMPLOYER = $EMPLOYER$
}
}
2 = { # HIGH ALMONER
trigger = {
court_position_generator_pickable_trigger = { POS = high_almoner EMPLOYER = $EMPLOYER$ }
}
court_position_generator_shared_modifier = {
POS = high_almoner
EMPLOYER = $EMPLOYER$
}
court_position_generator_variable_effect = {
VAR = $VAR$
POS = high_almoner
EMPLOYER = $EMPLOYER$
}
}
2 = { # COURT PHYSICIAN
trigger = {
court_position_generator_pickable_trigger = { POS = court_physician EMPLOYER = $EMPLOYER$ }
}
court_position_generator_shared_modifier = {
POS = court_physician
EMPLOYER = $EMPLOYER$
}
court_position_generator_variable_effect = {
VAR = $VAR$
POS = court_physician
EMPLOYER = $EMPLOYER$
}
}
2 = { # ANTIQUARIAN
trigger = {
court_position_generator_pickable_trigger = { POS = antiquarian EMPLOYER = $EMPLOYER$ }
}
court_position_generator_shared_modifier = {
POS = antiquarian
EMPLOYER = $EMPLOYER$
}
court_position_generator_variable_effect = {
VAR = $VAR$
POS = antiquarian
EMPLOYER = $EMPLOYER$
}
}
2 = { # HORSE MASTER
trigger = {
court_position_generator_pickable_trigger = { POS = master_of_horse EMPLOYER = $EMPLOYER$ }
}
court_position_generator_shared_modifier = {
POS = master_of_horse
EMPLOYER = $EMPLOYER$
}
court_position_generator_variable_effect = {
VAR = $VAR$
POS = master_of_horse
EMPLOYER = $EMPLOYER$
}
}
2 = { # BODYGUARD
trigger = {
court_position_generator_pickable_trigger = { POS = bodyguard EMPLOYER = $EMPLOYER$ }
}
court_position_generator_shared_modifier = {
POS = bodyguard
EMPLOYER = $EMPLOYER$
}
court_position_generator_variable_effect = {
VAR = $VAR$
POS = bodyguard
EMPLOYER = $EMPLOYER$
}As written in game/common/scripted_effects/00_court_position_effects.txt.
The first 120 of its 707 lines; the rest is in game/common/scripted_effects/00_court_position_effects.txt from line 827.
Where it is used
Every place in common/, events/ and history/ that calls court_position_generator_effect.
Character interactions (1)
Events (7)
- … Rewards
bp1_yearly.8191 - A Place at Court
hold_court.8090 - char_interaction.0350
- Eminent Eunuch: Family Promotion
ep3_story_cycle_admin_eunuch.2061 - Eminent Eunuch: Further Responsibilities
ep3_story_cycle_admin_eunuch.2060 - Looking for Work
hold_court.8340
1 more
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.