Scripted effect · The Royal Court files
create_artifact_tapestry_effect
create_artifact_tapestry_effect = { OWNER = … WEAVER = … }game/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt, line 224 (137 lines). Parameters: $OWNER$, $WEAVER$.
create_artifact_tapestry_effect is a scripted effect in Crusader Kings III, in the The Royal Court files, written at line 224 of its file. A call passes 2 parameters: OWNER and WEAVER. The game's script calls it in 6 places, among them Inspiration Realized (event fund_inspiration.1001), Inspiration Realized (event fund_inspiration.1041) and inspiration_adventure_create_artifact_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/01_ep1_court_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 (120 lines of game script)
create_artifact_tapestry_effect = {
# Get the character the artifact is being made for.
$OWNER$ = { save_scope_as = owner }
$WEAVER$ = { save_scope_as = weaver }
save_adventurer_location_effect = yes
hidden_effect_new_object = {
# Get artifact quality, wealth, and materials
get_artifact_quality_effect = yes
get_artifact_wealth_effect = yes
if = { #If the scene has been set in events we save it on the owner here so we can access it when choosing features
limit = { exists = scope:tapestry_scene }
scope:owner = {
set_variable = {
name = artifact_tapestry_scene
value = scope:tapestry_scene
days = 1
}
}
}
# Fallback
else = {
random_list = {
10 = {
scope:owner = {
set_variable = {
name = artifact_tapestry_scene
value = flag:geometric_patterns
days = 1
}
}
}
10 = {
scope:owner = {
set_variable = {
name = artifact_tapestry_scene
value = flag:garden
days = 1
}
}
}
10 = {
scope:owner = {
set_variable = {
name = artifact_tapestry_scene
value = flag:bucolic
days = 1
}
}
}
}
}
# Create the artifact
scope:owner = {
if = {
limit = {
exists = scope:inspiration_owner
}
create_artifact = {
name = artifact_wall_tapestry_name
description = placeholder # Will be regenerated in the post-creation effects
creator = scope:weaver
visuals = tapestry
type = tapestry
modifier = artifact_placeholder_modifier
save_scope_as = newly_created_artifact
wealth = scope:wealth
quality = scope:quality
#decaying = no
}
}
else_if = {
limit = {
exists = scope:adventurer
}
create_artifact = {
name = artifact_wall_tapestry_name
description = placeholder # Will be regenerated in the post-creation effects
creator = scope:adventurer
visuals = tapestry
type = tapestry
modifier = artifact_placeholder_modifier
save_scope_as = newly_created_artifact
wealth = scope:wealth
quality = scope:quality
#decaying = no
history = {
location = scope:location
actor = scope:adventurer
recipient = root
type = discovered
}
}
}
else = {
create_artifact = {
name = artifact_wall_tapestry_name
description = placeholder # Will be regenerated in the post-creation effects
creator = scope:weaver
visuals = tapestry
type = tapestry
modifier = artifact_placeholder_modifier
save_scope_as = newly_created_artifact
wealth = scope:wealth
quality = scope:quality
#decaying = no
}
}
}
scope:newly_created_artifact = {
set_artifact_description = artifact_wall_tapestry_description
# Set grandeur
add_scaled_artifact_modifier_grandeur_big_effect = yes
if = {
limit = {
has_artifact_feature = tapestry_scene_religious
}
add_scaled_artifact_modifier_piety_effect = yes
}As written in game/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt.
The first 120 of its 137 lines; the rest is in game/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt from line 224.
Where it is used
Every place in common/, events/ and history/ that calls create_artifact_tapestry_effect.
Character interactions (1)
- Bestow Artifact
Events (4)
- Inspiration Realized
fund_inspiration.1001 - Inspiration Realized
fund_inspiration.1041 - … Tapestry
debug.316 - … Tapestry
debug.318
Scripted effects (1)
Source: game/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.