Scripted effect
add_to_entourage_court_and_activity_effect
add_to_entourage_court_and_activity_effect = { CHAR_TO_ADD = … NEW_COURT_OWNER = … }game/common/scripted_effects/00_activity_effects.txt, line 4501 (46 lines). Parameters: $CHAR_TO_ADD$, $NEW_COURT_OWNER$.
add_to_entourage_court_and_activity_effect is a scripted effect in Crusader Kings III, written at line 4501 of its file. A call passes 2 parameters: CHAR_TO_ADD and NEW_COURT_OWNER. The game's script calls it in 39 places, among them … … Brigandage (event pilgrimage.1110), … A Wanderer from Nalanda (event pilgrimage_seasia.1200) and … Adam's Guilt (event pilgrimage.3003). Patch 1.20.1.2, from game/common/scripted_effects/00_activity_effects.txt.
The comment above it in the file
The following effects take the CHAR_TO_ADD and NEW_COURT_OWNER scopes, determining if the CHAR_TO_ADD is a pool character since the add_companion automatically adds pool characters as a courtier, whereas if CHAR_TO_ADD is not a pool character, it does not. "X joins your Court"
What it does
Every line of it is script with no tooltip text: the script is below.
The script as written (46 lines of game script)
add_to_entourage_court_and_activity_effect = {
#If the character is a pool character
$NEW_COURT_OWNER$ = {
if = {
limit = {
#Pool characters get automatically added as courtiers
$CHAR_TO_ADD$ = { is_pool_character = yes }
}
show_as_tooltip = { add_courtier = $CHAR_TO_ADD$ } #This already happens with add_companion
hidden_effect = { # This must go above activity effect, or they will try and make their own travel plan!
if = {
limit = { $CHAR_TO_ADD$ = { NOT = { exists = current_travel_plan } } }
$NEW_COURT_OWNER$.current_travel_plan ?= { add_companion = $CHAR_TO_ADD$ }
}
}
if = {
limit = { exists = involved_activity }
$CHAR_TO_ADD$ = { add_to_activity = $NEW_COURT_OWNER$.involved_activity }
}
}
#If the character is NOT a pool character
else = {
if = {
limit = {
$CHAR_TO_ADD$ = {
NOT = { is_courtier_of = $NEW_COURT_OWNER$ }
}
}
add_courtier = $CHAR_TO_ADD$
}
hidden_effect = { # This must go above activity effect, or they will try and make their own travel plan!
if = {
limit = { $CHAR_TO_ADD$ = { NOT = { exists = current_travel_plan } } }
$NEW_COURT_OWNER$.current_travel_plan ?= { add_companion = $CHAR_TO_ADD$ }
}
}
if = {
limit = {
exists = involved_activity
$CHAR_TO_ADD$ = { can_join_activity = $NEW_COURT_OWNER$.involved_activity }
}
$CHAR_TO_ADD$ = { add_to_activity = $NEW_COURT_OWNER$.involved_activity }
}
}
}
}As written in game/common/scripted_effects/00_activity_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls add_to_entourage_court_and_activity_effect.
Events (39)
- … … Brigandage
pilgrimage.1110 - … A Wanderer from Nalanda
pilgrimage_seasia.1200 - … Adam's Guilt
pilgrimage.3003 - … Adam's Innocence
pilgrimage.3002 - … An Unexpected Encounter
pilgrimage.2004 - … Floating Shrine
pilgrimage_seasia.400
33 more
- … Intimate Desires
pilgrimage.2101 - … Mangrove Spirits
pilgrimage_seasia.200 - … Rattan Snare
pilgrimage_seasia.1100 - … Safety in Numbers
pilgrimage.1140 - … Sampan Pirates
pilgrimage_seasia.900 - … The Fishermen of …
pilgrimage_seasia.500 - … The Nāga's Victim
pilgrimage_seasia.700 - … The Pawang
pilgrimage_seasia.1500 - … The Pearl Diver
pilgrimage_seasia.100 - … Thieves
pilgrimage.2020 - … Traders of Tanah Makkah
pilgrimage_seasia.1000 - A Party of Peasants
bp2_adult_education.9100 - Danger: Battle Ahead
travel_danger_events.6011 - Danger: Contested Ground
travel_danger_events.6013 - Danger: Smoke Ahead
travel_danger_events.6010 - Danger: War's Passage
travel_danger_events.6012 - Erotic Dancing
cultural_festival.9050 - Hike: On the Road Again
travel_start_event.1090 - Mandala Ritual: Diseased Spirits
tgp_east_asia_mandala_task_contract_events.2400 - Mandala Ritual: Divine Thief
tgp_east_asia_mandala_task_contract_events.4400 - Mandala Ritual: Goat Oracle
tgp_east_asia_mandala_task_contract_events.4700 - Mandala Ritual: Guru's Peace
tgp_east_asia_mandala_task_contract_events.3500 - Mandala Ritual: Laughing Ascetic
tgp_east_asia_mandala_task_contract_events.4100 - Mandala Ritual: Midwives' Dream
tgp_east_asia_mandala_task_contract_events.1500 - Out of Turn
tour_grounds_events.1007 - The … Among the Weeds
tour_travel.1002 - The …, United!
chariot_race.4040 - The More the Merrier
pilgrimage.6001 - Zealotry: A Crisis of Faith
pilgrimage_intent.1000 - Zealotry: A Smitten …
pilgrimage_intent.9000 - Zealotry: Impressionable Youth
pilgrimage_intent.1001 - Zealotry: Passing Travelers
pilgrimage_intent.1010 - Zealotry: Unfamiliar Pilgrims
pilgrimage_intent.1020
Source: game/common/scripted_effects/00_activity_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.