Scripted effect · Wandering Nobles files
hire_for_court_position_journey_effect
hire_for_court_position_journey_effect = { CHARACTER = … COURT_POSITION = … }game/common/scripted_effects/08_bp3_effects.txt, line 971 (93 lines). Parameters: $CHARACTER$, $COURT_POSITION$.
hire_for_court_position_journey_effect is a scripted effect in Crusader Kings III, in the Wandering Nobles files, written at line 971 of its file. A call passes 2 parameters: CHARACTER and COURT_POSITION. The game's script calls it in 8 places, among them … Drills (event bp3_journey.1700), … Rattan Snare (event pilgrimage_seasia.1100) and Architectural Peddling (event bp3_journey.1000). Its body carries 1 text of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/08_bp3_effects.txt.
What it does
If
is_valid_to_hire_court_position_type = $COURT_POSITION$_court_positionIf
a check the game hides
Then
$CHARACTER$.aptitude:$COURT_POSITION$_court_position > scope:current_holder.aptitude:$COURT_POSITION$_court_position
Then
If
a check the game hides
Then
replace_court_position = { recipient = $CHARACTER$ holder = scope:current_holder court_position = $COURT_POSITION$_court_position }
Otherwise
appoint_court_position = { recipient = $CHARACTER$ court_position = $COURT_POSITION$_court_position }
Otherwise
$CHARACTER$ = { add_to_court_and_entourage_effect = yes }
If
is_valid_to_hire_court_position_type = $COURT_POSITION$_court_position
Then
employ_character_as_position_in_current_scope_court_effect = { CHARACTER = $CHARACTER$ POSITION = $COURT_POSITION$ }
Else if
$CHARACTER$.aptitude:$COURT_POSITION$_court_position > scope:current_holder.aptitude:$COURT_POSITION$_court_position
Then
replace_court_position = { recipient = $CHARACTER$ holder = scope:current_holder court_position = $COURT_POSITION$_court_position }
If
has_activity_intent = journey_curiosity_intent
Then
add_hook = { type = strong_obligation_hook target = $CHARACTER$ }- Obligation Hooks reduce Court Position salaries by -50%
• 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 (93 lines of game script)
hire_for_court_position_journey_effect = {
hidden_effect = {
$CHARACTER$ = {
add_to_court_and_entourage_effect = yes
}
# if filled, pick worst one to be replaced
if = {
limit = {
NOT = { can_employ_court_position_type = $COURT_POSITION$_court_position }
any_court_position_holder = {
type = $COURT_POSITION$_court_position
}
}
ordered_court_position_holder = {
type = $COURT_POSITION$_court_position
order_by = {
value = aptitude:$COURT_POSITION$_court_position
multiply = -1
}
save_scope_as = current_holder
}
}
}
show_as_tooltip = {
if = {
limit = {
is_valid_to_hire_court_position_type = $COURT_POSITION$_court_position
trigger_if = {
limit = { exists = scope:current_holder }
$CHARACTER$.aptitude:$COURT_POSITION$_court_position > scope:current_holder.aptitude:$COURT_POSITION$_court_position
}
}
if = {
limit = { exists = scope:current_holder }
custom_tooltip = $COURT_POSITION$_old_holder_aptitude_tooltip
add_character_flag = temporary_court_position_cost_removal
replace_court_position = {
recipient = $CHARACTER$
holder = scope:current_holder
court_position = $COURT_POSITION$_court_position
}
remove_character_flag = temporary_court_position_cost_removal
}
else = {
appoint_court_position = {
recipient = $CHARACTER$
court_position = $COURT_POSITION$_court_position
}
}
}
else = {
$CHARACTER$ = {
add_to_court_and_entourage_effect = yes
}
}
}
if = {
limit = {
NOT = { exists = scope:current_holder }
is_valid_to_hire_court_position_type = $COURT_POSITION$_court_position
}
employ_character_as_position_in_current_scope_court_effect = {
CHARACTER = $CHARACTER$
POSITION = $COURT_POSITION$
}
}
else_if = {
limit = {
exists = scope:current_holder
$CHARACTER$.aptitude:$COURT_POSITION$_court_position > scope:current_holder.aptitude:$COURT_POSITION$_court_position
}
add_character_flag = temporary_court_position_cost_removal
replace_court_position = {
recipient = $CHARACTER$
holder = scope:current_holder
court_position = $COURT_POSITION$_court_position
}
remove_character_flag = temporary_court_position_cost_removal
}
if = {
limit = {
has_activity_intent = journey_curiosity_intent
}
add_hook = {
type = strong_obligation_hook
target = $CHARACTER$
}
custom_tooltip = obligation_hook_tt
}
}As written in game/common/scripted_effects/08_bp3_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls hire_for_court_position_journey_effect.
Events (8)
- … Drills
bp3_journey.1700 - … Rattan Snare
pilgrimage_seasia.1100 - Architectural Peddling
bp3_journey.1000 - Hawking Meat
bp3_journey.1400 - Hospitable Hospices
travel_events_oltner_2.1010 - Shave and a Haircut
bp3_journey.1200
2 more
- The Travelling Troupe
travel_events_oltner_2.1240 - Trust Me
bp3_journey.1800
Source: game/common/scripted_effects/08_bp3_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.