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

Scripted effect

transfer_eagle_effect

transfer_eagle_effect = { GIVER = … METHOD = … RECIPIENT = … }

game/common/scripted_effects/00_animal_effects.txt, line 1791 (126 lines). Parameters: $GIVER$, $METHOD$, $RECIPIENT$.

transfer_eagle_effect is a scripted effect in Crusader Kings III, written at line 1791 of its file. A call passes 3 parameters: GIVER, METHOD and RECIPIENT. The game's script calls it in 2 places, among them The Enemy's Eagle (event pet_animal.3050) and sell_eagle_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/00_animal_effects.txt.

What it does

• 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)
transfer_eagle_effect = {
	$RECIPIENT$ = { save_scope_as = recipient }
	$GIVER$ = { save_scope_as = giver }
	if = {
		limit = {
			flag:$METHOD$ = flag:gift
		}
		scope:recipient = { save_scope_value_as = { name = eagle_capture_method value = flag:gift } }
	}
	else_if = {
		limit = {
			flag:$METHOD$ = flag:market
		}
		scope:recipient = { save_scope_value_as = { name = eagle_capture_method value = flag:market } }
	}
	else_if = {
		limit = {
			flag:$METHOD$ = flag:stolen
		}
		scope:recipient = { save_scope_value_as = { name = eagle_capture_method value = flag:stolen } }
	}
	
	scope:giver = {
		random_owned_story = { # Get the story
			limit = {
				story_type = story_cycle_pet_eagle
			}
			save_scope_as = story
		}
		# Transfer the eagle to the recipient
		scope:recipient = { # Start the story and transfer the age
			add_character_flag = { flag = cant_sell_eagle years = 1 } # Can't sell it for a while
			set_variable = { # Set the name
				name = story_cycle_eagle_name
				value = scope:giver.var:story_cycle_eagle_name
			}
			set_variable = { # Set the gender
				name = eagle_gender
				value = scope:giver.var:eagle_gender
			}
			set_variable = {
				name = eagle_age_variable
				value = scope:giver.var:eagle_age_variable
			}
			start_eagle_story_cycle_effect = yes # Start the story
		} 
		if = { # Get the eagle's personality traits
			limit = {
				has_eagle_personality_trait_trigger = yes
			}
			switch = {
				trigger = var:eagle_personality_trait
				flag:brave = {
					scope:recipient = { set_variable = { name = eagle_personality_trait value = flag:brave } }
				}
				flag:curious = {
					scope:recipient = { set_variable = { name = eagle_personality_trait value = flag:curious } }
				}
				flag:loyal = {
					scope:recipient = { set_variable = { name = eagle_personality_trait value = flag:loyal } }
				}
				flag:calm = {
					scope:recipient = { set_variable = { name = eagle_personality_trait value = flag:calm } }
				}
				flag:wise = {
					scope:recipient = { set_variable = { name = eagle_personality_trait value = flag:wise } }
				}
				flag:cunning = {
					scope:recipient = { set_variable = { name = eagle_personality_trait value = flag:cunning } }
				}
			}
			if = { # Get the eagle's secondary personality trait
				limit = {
					has_secondary_eagle_personality_trait_trigger = yes
				}
				switch = {
					trigger = var:eagle_personality_trait_2
					flag:observant = {
						scope:recipient = { set_variable = { name = eagle_personality_trait_2 value = flag:observant } }
						add_character_modifier = { modifier = observant_eagle_story_modifier }
					}
					flag:protective = {
						scope:recipient = { set_variable = { name = eagle_personality_trait_2 value = flag:protective } }
						add_character_modifier = { modifier = protective_eagle_story_modifier }
					}
					flag:aggressive = {
						scope:recipient = { set_variable = { name = eagle_personality_trait_2 value = flag:aggressive } }
						add_character_modifier = { modifier = aggressive_eagle_story_modifier }
					}
				}
			}
			scope:recipient = { # Get the eagle's personality level + add the modifier
				set_variable = {
					name = eagle_personality_level
					value = scope:giver.var:eagle_personality_level
				}
				add_eagle_personality_modifier_effect = yes
			}
		}
		# Get the eagle's sickness
		if = {
			limit = {
				has_character_modifier = weak_eagle_modifier
			}
			scope:recipient = { add_character_modifier = { modifier = weak_eagle_modifier years = 1 } }
		}
		else_if = {
			limit = {
				has_character_modifier = very_weak_eagle_modifier
			}
			scope:recipient = { add_character_modifier = { modifier = very_weak_eagle_modifier years = 1 } }
		}
		else_if = {
			limit = {
				has_character_modifier = strong_eagle_modifier
			}
			scope:recipient = { add_character_modifier = { modifier = strong_eagle_modifier years = 1 } }
		}
		# Remove the eagle from the giver
		show_as_tooltip = {

As written in game/common/scripted_effects/00_animal_effects.txt.

The first 120 of its 126 lines; the rest is in game/common/scripted_effects/00_animal_effects.txt from line 1791.

Where it is used

Every place in common/, events/ and history/ that calls transfer_eagle_effect.

Events (1)

Scripted effects (1)

Source: game/common/scripted_effects/00_animal_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?