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_animal_hide_effect

create_artifact_animal_hide_effect = { ANIMAL = … HUNTER = … LEGENDARY = … OWNER = … }

game/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt, line 479 (187 lines). Parameters: $ANIMAL$, $HUNTER$, $LEGENDARY$, $OWNER$.

create_artifact_animal_hide_effect is a scripted effect in Crusader Kings III, in the The Royal Court files, written at line 479 of its file. A call passes 4 parameters: ANIMAL, HUNTER, LEGENDARY and OWNER. The game's script calls it in 25 places, among them … Deer (event tgp_japan_yearly_events.1110), … Gift (event pet_animal.3080) and …: Day of Sorrow (event pet_animal.0199). Patch 1.20.1.2, from game/common/scripted_effects/01_ep1_court_artifact_creation_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)
create_artifact_animal_hide_effect = {
	# Get the character the artifact is being made for.
	$OWNER$ = { save_scope_as = owner }
	$HUNTER$ = { save_scope_as = hunter }
	save_scope_value_as = { name = legendary value = $LEGENDARY$ }
	scope:owner = {
		set_variable = { name = animal_type value = $ANIMAL$ days = 5 }
		if = {
			limit = {
				OR = {
					NOT = { exists = var:animal_type }
					var:animal_type ?= flag:none
				}
			}
			random_list = {
				8 = {
					hunt_activity_standard_game_effect = { PROVINCE = scope:hunter.location HUNTER = scope:hunter }
				}
				2 = {
					hunt_activity_dangerous_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, and materials
		animal_artifact_wealth_quality_effect = yes
		get_animal_hunt_location_effect = yes
		scope:location = { add_to_list = artifact_material_sources }
		if = {
			limit = {
				OR = {
					hunt_hide_big_trigger = { VARIABLE = scope:owner.var:animal_type }
					AND = {
						exists = scope:animal_hide_size
						scope:animal_hide_size = flag:big
					}
				}
			}		
			if = {
				limit = {
					NOT = { exists = scope:animal_hide_size }
				}
				save_scope_value_as = { name = animal_hide_size value = flag:big }
			}
			scope:owner = {
				create_artifact = {	
					name = artifact_animal_hide_big_name
					creator = scope:creator
					description = placeholder
					visuals = large_animal_hide
					type = animal_hide_big
					modifier = artifact_placeholder_modifier
					wealth = scope:wealth
					quality = scope:quality
					save_scope_as = newly_created_artifact
				}
				scope:newly_created_artifact = {
					# Set grandeur
					add_scaled_artifact_modifier_grandeur_big_effect = yes
					# Set prestige
					add_scaled_artifact_modifier_prestige_effect = yes
				}	
			}				
		}
		else = {
			if = {
				limit = {
					NOT = { exists = scope:animal_hide_size }
				}
				save_scope_value_as = { name = animal_hide_size value = flag:small }
			}
			scope:owner = {
				create_artifact = {
					name = artifact_small_hide_name
					creator = scope:creator
					description = placeholder
					visuals = small_animal_hide
					type = animal_hide
					modifier = artifact_placeholder_modifier
					wealth = scope:wealth
					quality = scope:quality
					save_scope_as = newly_created_artifact
				}
				scope:newly_created_artifact = {
					if = {
						limit = {
							has_artifact_feature = animal_hide_type_cat
							exists = scope:owner.var:story_cycle_cat_name
						}
						set_variable = {
							name = pet_name
							value = scope:owner.var:story_cycle_cat_name
						}
					}
					else_if = {
						limit = {
							has_artifact_feature = animal_hide_type_dog
							exists = scope:owner.var:story_cycle_dog_name
						}
						set_variable = {
							name = pet_name
							value = scope:owner.var:story_cycle_dog_name
						}
					}
					# Set grandeur
					add_scaled_artifact_modifier_grandeur_small_effect = yes
					# Set prestige
					add_scaled_artifact_modifier_minor_prestige_effect = yes
				}
			}
		}
		scope:newly_created_artifact = {

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

The first 120 of its 187 lines; the rest is in game/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt from line 479.

Where it is used

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

Character interactions (1)

  • Bestow Artifact

Events (19)

13 more

Scripted effects inside an event file (1)

  • feast_default_2013_pelt_creation_effect

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?