CK3 DatabaseCrusader Kings III · 1.20.1.2 “Crozier” · unofficial
Silk & Silverout Tue, Nov 17What's free, what needs the DLC, price →

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)

33 more

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.

Spotted a mistake on this page?