Scripted effect · The Royal Court files
create_artifact_necklace_pedestal_effect
create_artifact_necklace_pedestal_effect = { OWNER = … SMITH = … }game/common/scripted_effects/00_ep1_artifact_creation_effects.txt, line 11697 (113 lines). Parameters: $OWNER$, $SMITH$.
create_artifact_necklace_pedestal_effect is a scripted effect in Crusader Kings III, in the The Royal Court files, written at line 11697 of its file. A call passes 2 parameters: OWNER and SMITH. The game's script calls it in 1 place, among them 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:goldsmith = scope:dummy_gender
Then
clear_saved_scope = goldsmithclear_saved_scope = dummy_gender
save_adventurer_location_effect = yeshidden_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 (113 lines of game script)
create_artifact_necklace_pedestal_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
creator = scope:goldsmith
description = placeholder #properly set later
visuals = necklace_pedestal
type = necklace_pedestal
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_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 = brooch
type = brooch
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 }
create_artifact = {
name = artifact_necklace_name
creator = scope:goldsmith
description = placeholder #properly set later
visuals = necklace_pedestal
type = necklace_pedestal
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_pedestal
type = necklace_pedestal
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
}
}
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_necklace_pedestal_effect.
Scripted effects (1)
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.