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

Scripted effect · The Royal Court files

create_artifact_bird_feather_effect

create_artifact_bird_feather_effect = { ANIMAL = … HUNTER = … OWNER = … }

game/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt, line 1047 (86 lines). Parameters: $ANIMAL$, $HUNTER$, $OWNER$.

create_artifact_bird_feather_effect is a scripted effect in Crusader Kings III, in the The Royal Court files, written at line 1047 of its file. A call passes 3 parameters: ANIMAL, HUNTER and OWNER. The game's script calls it in 4 places, among them …: Last Flight (event pet_animal.3199), Plucked from the Sky (event hunt.5050) and The Cycle Continues (event pet_animal.3020). Patch 1.20.1.2, from game/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt.

What it does

  • scope:owner:
  • hidden_effect_new_object = { … }

• 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 (86 lines of game script)
create_artifact_bird_feather_effect = {
	# Get the character the artifact is being made for.
	$OWNER$ = { save_scope_as = owner }
	$HUNTER$ = { save_scope_as = hunter }
	scope:owner = {
		set_variable = { name = animal_type value = $ANIMAL$ }
		if = {
			limit = {
				OR = {
					NOT = { exists = var:animal_type }
					var:animal_type ?= flag:none
				}
			}
			hunt_activity_falconry_game_effect = { PROVINCE = scope:hunter.location }
		}
	}
	if = {
		limit = { exists = scope:adventurer }
		scope:adventurer = { save_scope_as = creator }
	}
	else = {
		scope:hunter = { save_scope_as = creator }
	}
	hidden_effect_new_object = {
		# Get artifact quality, wealth, materials, and decorations
		animal_artifact_wealth_quality_effect = yes
		get_animal_hunt_location_effect = yes
		scope:location = { add_to_list = artifact_material_sources }
		scope:owner = {
			create_artifact = {	
				name = artifact_bird_feather_name
				creator = scope:hunter
				description = placeholder
				visuals = bird_feather
				type = bird_feather
				modifier = artifact_placeholder_modifier
				wealth = scope:wealth
				quality = scope:quality
				save_scope_as = newly_created_artifact
			}
		}
		scope:newly_created_artifact = {
			if = {
				limit = {
					scope:owner.var:animal_type ?= flag:eagle
					exists = scope:owner.var:story_cycle_eagle_name
				}
				set_variable = {
					name = pet_name
					value = scope:owner.var:story_cycle_eagle_name
				}
				set_artifact_name = artifact_animal_feather_name_eagle
				set_artifact_description = artifact_bird_feather_pet_description
			}
			else = {
				set_artifact_description = artifact_bird_feather_description
			}

			set_max_durability = 60

			# Set prestige
			add_scaled_artifact_modifier_minor_prestige_effect = yes
			# Set stress loss
			add_scaled_artifact_modifier_stress_gain_effect = yes
			remove_artifact_modifier = artifact_placeholder_modifier
			
			set_variable = {
				name = animal_type
				value = scope:owner.var:animal_type
			}
			set_variable = {
				name = quality
				value = scope:quality
			}
			set_variable = {
				name = wealth
				value = scope:wealth
			}
		}
		scope:owner = {
			remove_variable = adventure_artifact_location
			remove_variable = adventure_artifact_hunter
			remove_variable = animal_type
		}
	}
}

As written in game/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt.

Where it is used

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

Events (3)

Scripted effects (1)

Source: game/common/scripted_effects/01_ep1_court_artifact_creation_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?