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_regalia_effect

create_artifact_regalia_effect = { OWNER = … SMITH = … }

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

create_artifact_regalia_effect is a scripted effect in Crusader Kings III, in the The Royal Court files, written at line 10756 of its file. A call passes 2 parameters: OWNER and SMITH. The game's script calls it in 14 places, among them …: Center of the World (event travel_events_cities.1030), …: the Jeweler (event ep3_laamp_decision_event.1065) and A Closeted Cadaver (event court.0112). Patch 1.20.1.2, from game/common/scripted_effects/00_ep1_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 (100 lines of game script)
create_artifact_regalia_effect = {
	# Get the character the artifact is being made for.
	$OWNER$ = { save_scope_as = owner }
	$SMITH$ = { save_scope_as = goldsmith }
	# Get artifact quality and wealth
	get_artifact_quality_effect = yes
	get_artifact_wealth_effect = yes

	save_adventurer_location_effect = yes

	# Create the artifact
	if = {
		limit = {
			exists = scope:adventurer
		}
		create_artifact = {
			name = artifact_regalia_name
			description = artifact_regalia_description
			visuals = regalia
			type = regalia
			template = regalia_template
			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 = given
			}
		}
	}
	else = {
		create_artifact = {
			name = artifact_regalia_name
			description = artifact_regalia_description
			creator = scope:goldsmith
			visuals = regalia
			type = regalia
			template = regalia_template
			modifier = artifact_placeholder_modifier
			wealth = scope:wealth
			quality = scope:quality
			save_scope_as = newly_created_artifact
		}
	}

	hidden_effect_new_object = {
		scope:newly_created_artifact = {
			# Prestige modifier is scaled based on the Wealth of the artifact (opulence).
			add_scaled_artifact_modifier_minor_prestige_effect = yes

			# If we're using the cross-bearing orb (explicit religious symbol), trade some prestige for piety.
			if = {
				limit = {
					has_artifact_feature = regalia_accessory_orb
				}
				add_artifact_modifier = artifact_monthly_prestige_penalty_modifier
				if = {
					limit = { # Give a tiny bit more piety for high rarity artifacts.
						OR = {
							rarity = famed
							rarity = illustrious
						}
					}
					add_artifact_modifier = artifact_monthly_piety_5_modifier
				}
				else = {
					add_artifact_modifier = artifact_monthly_piety_2_modifier
				}
			}

			# Add a Majesty-related modifier based on the Quality of the artifact.
			if = {
				limit = { # Add a second Majesty-related modifier for high rarity artifacts.
					OR = {
						rarity = famed
						rarity = illustrious
					}
				}
				add_2_scaled_artifact_modifier_majesty_effect = yes
			}
			else = {
				add_scaled_artifact_modifier_majesty_effect = yes
			}

			add_scaled_artifact_modifier_attractiveness_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_regalia_effect.

Character interactions (1)

  • Bestow Artifact

Events (10)

4 more

Scripted effects inside an event file (2)

  • create_cultural_artifact_effect
  • tribute_mission_1000_set_artifact_reward_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?