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_crown_effect

create_artifact_crown_effect = { OWNER = … SMITH = … }

game/common/scripted_effects/00_ep1_artifact_creation_effects.txt, line 11186 (95 lines). Parameters: $OWNER$, $SMITH$.

create_artifact_crown_effect is a scripted effect in Crusader Kings III, in the The Royal Court files, written at line 11186 of its file. A call passes 2 parameters: OWNER and SMITH. The game's script calls it in 10 places, among them …: Center of the World (event travel_events_cities.1030), …: the Jeweler (event ep3_laamp_decision_event.1065) and A Laden Caravan (event travel_events_oltner_2.1030). Patch 1.20.1.2, from game/common/scripted_effects/00_ep1_artifact_creation_effects.txt.

What it does

Every line of it is script with no tooltip text: the script is below.

The script as written (95 lines of game script)
create_artifact_crown_effect = {
	# Get the character the artifact is being made for.
	$OWNER$ = { save_scope_as = owner }
	$SMITH$ = { save_scope_as = goldsmith }
	save_adventurer_location_effect = yes

	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_crown_name
				description = placeholder # Will be updated in the post-creation effects
				template = crown_wearable_template
				visuals = crown
				type = helmet
				modifier = artifact_placeholder_modifier
				wealth = scope:wealth
				quality = scope:quality
				save_scope_as = newly_created_artifact
				history = {
					location = ROOT.capital_province
					actor = scope:adventurer
					recipient = scope:owner
					type = given
				}
			}
		}
		else = {
			create_artifact = {
				name = artifact_crown_name
				creator = scope:goldsmith
				description = placeholder # Will be updated in the post-creation effects
				template = crown_wearable_template
				visuals = crown
				type = helmet
				modifier = artifact_placeholder_modifier
				wealth = scope:wealth
				quality = scope:quality
				save_scope_as = newly_created_artifact
			}
		}

		scope:newly_created_artifact = {
			# Get gem type if necessary and update description
			get_artifact_feature_references_effect = yes
			set_artifact_description = artifact_crown_description

			# Crowns with high rarity get more modifiers
			if = {
				limit = {
					rarity = illustrious
				}
				add_2_scaled_artifact_modifier_rulership_effect = yes
				add_scaled_artifact_modifier_majesty_effect = yes
				add_scaled_artifact_modifier_minor_prestige_effect = yes
			}
			else_if = {
				limit = {
					rarity = famed
				}
				add_2_scaled_artifact_modifier_rulership_effect = yes
				add_scaled_artifact_modifier_majesty_effect = yes
				add_scaled_artifact_modifier_minor_prestige_effect = yes
			}
			else_if = {
				limit= {
					rarity = masterwork
				}
				add_scaled_artifact_modifier_minor_prestige_effect = yes
				add_scaled_artifact_modifier_rulership_effect = yes
			}
			else_if = {
				limit= {
					rarity = common
				}
				add_scaled_artifact_modifier_minor_prestige_effect = yes
				add_scaled_artifact_modifier_rulership_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_crown_effect.

Character interactions (1)

  • Bestow Artifact

Events (8)

2 more

Scripted effects inside an event file (1)

  • create_cultural_artifact_effect

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?