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_urn_effect

create_artifact_urn_effect = { OWNER = … POTTER = … }

game/common/scripted_effects/00_ep1_artifact_creation_effects.txt, line 14349 (112 lines). Parameters: $OWNER$, $POTTER$.

create_artifact_urn_effect is a scripted effect in Crusader Kings III, in the The Royal Court files, written at line 14349 of its file. A call passes 2 parameters: OWNER and POTTER. The game's script calls it in 3 places, among them Heirloom Offering (event emperor_imperial_examination.300), Inspiration Realized (event fund_inspiration.1061) and tournament_contest_generate_prize_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/00_ep1_artifact_creation_effects.txt.

What it does

  • If

    • scope:potter = scope:dummy_gender

    Then

    • clear_saved_scope = potter
    • clear_saved_scope = dummy_gender
  • 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 (112 lines of game script)
create_artifact_urn_effect = {
	# Get the character the artifact is being made for.
	$OWNER$ = { save_scope_as = owner }
	$POTTER$ = { save_scope_as = potter }
	if = { #Any existing dummy character gets turned into the potter
		limit = {
			exists = scope:dummy_gender
			scope:potter = scope:dummy_gender
		}
		clear_saved_scope = potter
		clear_saved_scope = dummy_gender
	}
	hidden_effect_new_object = {
		# Get artifact quality, wealth, materials, and decorations
		get_artifact_quality_effect = yes
		get_artifact_wealth_effect = yes

		# Create the artifact
		if = {
			limit = { exists = scope:adventurer }
			create_artifact = {
				name = artifact_urn_name
				description = placeholder
				visuals = urn
				type = urn
				modifier = artifact_placeholder_modifier
				wealth = scope:wealth
				quality = scope:quality
				save_scope_as = newly_created_artifact
				history = {
					location = scope:location
					actor = scope:adventurer
					recipient = root
					type = discovered
				}
			}
		}
		else_if = {
			limit = {
				scope:host ?= $OWNER$
				scope:activity ?= { has_activity_type = activity_tournament }
			}
			create_artifact = {
				name = artifact_urn_name
				creator = scope:host
				description = placeholder # Will be updated in the post-creation effects after decorations are assigned.
				visuals = urn
				type = urn
				modifier = artifact_placeholder_modifier
				wealth = scope:wealth
				quality = scope:quality
				history = {
					type = prize_created
					recipient = scope:host
				}
				save_scope_as = newly_created_artifact
			}
		}
		else_if = {
			limit = { exists = scope:potter }
			create_artifact = {
				name = artifact_urn_name
				creator = scope:potter
				description = placeholder # Will be updated in the post-creation effects after decorations are assigned.
				visuals = urn
				type = urn
				modifier = artifact_placeholder_modifier
				wealth = scope:wealth
				quality = scope:quality
				save_scope_as = newly_created_artifact
			}
		}
		else = {
			create_artifact = {
				name = artifact_urn_name
				description = placeholder # Will be updated in the post-creation effects after decorations are assigned.
				visuals = urn
				type = urn
				modifier = artifact_placeholder_modifier
				wealth = scope:wealth
				quality = scope:quality
				save_scope_as = newly_created_artifact
				history = { type = created_before_history }
			}
		}
		scope:newly_created_artifact = {
			# Finish generating decorations and update description
			get_artifact_feature_references_effect = yes
			set_artifact_description = artifact_urn_description
			# Add artifact modifiers
			add_scaled_artifact_modifier_grandeur_small_effect = yes
			add_scaled_artifact_modifier_minor_prestige_effect = yes
			if = {
				limit = {
					OR = {
						rarity = famed
						rarity = illustrious
					}
				}
				add_scaled_artifact_modifier_majesty_effect = yes
			}
			set_variable = {
				name = quality
				value = scope:quality
			}
			set_variable = {
				name = wealth
				value = scope:wealth
			}
		}
	}
}

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

Where it is used

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

Events (2)

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