Scripted effect · The Royal Court files
create_artifact_wall_narwhal_horn_effect
create_artifact_wall_narwhal_horn_effect = { HUNTER = … OWNER = … }game/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt, line 768 (101 lines). Parameters: $HUNTER$, $OWNER$.
create_artifact_wall_narwhal_horn_effect is a scripted effect in Crusader Kings III, in the The Royal Court files, written at line 768 of its file. A call passes 2 parameters: HUNTER and OWNER. The game's script calls it in 4 places, among them Heirloom Offering (event emperor_imperial_examination.300), generate_historical_artifact_based_on_location_effect (scripted effect) 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
save_adventurer_location_effect = yeshidden_effect_new_object = { … }scope:newly_created_artifact:If
scope:quality >= 66
Then
add_artifact_modifier = artifact_court_grandeur_baseline_add_2_modifier
Else if
scope:quality >= 33
Then
add_artifact_modifier = artifact_court_grandeur_baseline_add_1_modifier
If
scope:wealth >= 66
Then
add_artifact_modifier = artifact_monthly_prestige_2_modifier
Else if
scope:wealth >= 33
Then
add_artifact_modifier = artifact_placeholder_modifier
• 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 (101 lines of game script)
create_artifact_wall_narwhal_horn_effect = {
$OWNER$ = { save_scope_as = owner }
$HUNTER$ = { save_scope_as = hunter }
save_adventurer_location_effect = yes
hidden_effect_new_object = {
# Get artifact quality and wealth
get_artifact_quality_effect = yes
get_artifact_wealth_effect = yes
scope:owner = {
set_variable = {
name = animal_type
value = flag:unicorn
days = 1
}
if = {
limit = { exists = scope:adventurer }
scope:adventurer = { save_scope_as = creator }
}
else = { save_scope_as = creator }
}
scope:owner = {
if = {
limit = {
exists = scope:adventurer
}
create_artifact = {
name = artifact_wall_narwhal_horn_name
description = artifact_wall_narwhal_horn
visuals = animal_trophy
type = animal_skull
modifier = artifact_monthly_prestige_3_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 = {
create_artifact = {
name = artifact_wall_narwhal_horn_name
description = artifact_wall_narwhal_horn
creator = scope:hunter
visuals = animal_trophy
type = animal_skull
modifier = artifact_monthly_prestige_3_modifier
wealth = scope:wealth
quality = scope:quality
#decaying = no
save_scope_as = newly_created_artifact
}
}
}
scope:newly_created_artifact = {
# Set grandeur
add_scaled_artifact_modifier_grandeur_big_effect = yes
# Set prestige
add_scaled_artifact_modifier_prestige_effect = yes
add_scaled_artifact_modifier_piety_effect = yes
# Extra for really good stuff
if = {
limit = {
OR = {
rarity = illustrious
rarity = famed
}
}
add_scaled_artifact_modifier_majesty_effect = yes
add_scaled_artifact_modifier_dynasty_prestige_effect = yes
}
remove_artifact_modifier = artifact_placeholder_modifier
save_scope_as = epic
}
}
scope:newly_created_artifact = {
if = {
limit = { scope:quality >= 66 }
add_artifact_modifier = artifact_court_grandeur_baseline_add_2_modifier
}
else_if = {
limit = { scope:quality >= 33 }
add_artifact_modifier = artifact_court_grandeur_baseline_add_1_modifier
}
# Wealth determines prestige
if = {
limit = { scope:wealth >= 66 }
add_artifact_modifier = artifact_monthly_prestige_2_modifier
}
else_if = {
limit = { scope:wealth >= 33 }
add_artifact_modifier = artifact_placeholder_modifier
}
save_scope_as = epic
}
}As written in game/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls create_artifact_wall_narwhal_horn_effect.
Events (2)
- Heirloom Offering
emperor_imperial_examination.300 - Unicorn's Horn
debug.329
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.