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_necklace_effect

create_artifact_necklace_effect = { OWNER = … SMITH = … }

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

create_artifact_necklace_effect is a scripted effect in Crusader Kings III, in the The Royal Court files, written at line 11561 of its file. A call passes 2 parameters: OWNER and SMITH. The game's script calls it in 9 places, among them …: the Jeweler (event ep3_laamp_decision_event.1065), Heirloom Offering (event emperor_imperial_examination.300) and In Their Footsteps (event bp2_yearly.2002). Patch 1.20.1.2, from game/common/scripted_effects/00_ep1_artifact_creation_effects.txt.

What it does

  • If

    • scope:goldsmith = scope:dummy_gender

    Then

    • clear_saved_scope = goldsmith
    • clear_saved_scope = dummy_gender
  • save_adventurer_location_effect = yes
  • 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 (120 lines of game script)
create_artifact_necklace_effect = {
	# Get the character the artifact is being made for.
	$OWNER$ = { save_scope_as = owner }
	$SMITH$ = { save_scope_as = goldsmith }
	if = { #Any existing dummy character gets turned into the goldsmith
		limit = {
			exists = scope:dummy_gender
			scope:goldsmith = scope:dummy_gender
		}
		clear_saved_scope = goldsmith
		clear_saved_scope = dummy_gender
	}
	save_adventurer_location_effect = yes
	hidden_effect_new_object = {
		# Get artifact quality and wealth
		get_artifact_quality_effect = yes
		get_artifact_wealth_effect = yes
		# Create the artifact
		if = {
			limit = { exists = scope:adventurer }
			create_artifact = {
				name = artifact_necklace_name
				description = placeholder #properly set later
				visuals = necklace
				type = necklace
				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_brooch_name
				creator = scope:host
				description = placeholder # Will be updated in the post-creation effects after decorations are assigned.
				visuals = necklace
				type = necklace
				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:goldsmith
				exists = scope:owner
				scope:goldsmith = scope:owner
			}
			create_artifact = {
				name = artifact_necklace_name
				description = placeholder #properly set later
				visuals = necklace
				type = necklace
				modifier = artifact_placeholder_modifier
				wealth = scope:wealth
				quality = scope:quality
				history = {
					type = created
					actor = scope:goldsmith
					recipient = scope:goldsmith
					location = scope:goldsmith.location
				}
				save_scope_as = newly_created_artifact
			}
		}
		else_if = {
			limit = { exists = scope:goldsmith }
			create_artifact = {
				name = artifact_necklace_name
				creator = scope:goldsmith
				description = placeholder #properly set later
				visuals = necklace
				type = necklace
				modifier = artifact_placeholder_modifier
				wealth = scope:wealth
				quality = scope:quality
				save_scope_as = newly_created_artifact
			}
		}
		else = {
			create_artifact = {
				name = artifact_necklace_name
				description = placeholder #properly set later
				visuals = necklace
				type = necklace
				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 = {
			#Loc
			get_artifact_feature_references_effect = yes
			set_artifact_description = artifact_necklace_description
			remove_artifact_modifier = artifact_placeholder_modifier
			add_scaled_artifact_modifier_minor_prestige_effect = yes
			add_scaled_artifact_modifier_attractiveness_effect = yes
			if = {
				limit = {
					OR = {
						rarity = famed
						rarity = illustrious

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

The first 120 of its 135 lines; the rest is in game/common/scripted_effects/00_ep1_artifact_creation_effects.txt from line 11561.

Where it is used

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

Events (5)

Scripted effects inside an event file (1)

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