Scripted effect
create_artifact_throne_charlemagne_effect
create_artifact_throne_charlemagne_effect = { OWNER = … }game/common/scripted_effects/01_exp1_historical_artifacts_creation_effect.txt, line 1269 (53 lines). Parameters: $OWNER$.
create_artifact_throne_charlemagne_effect is a scripted effect in Crusader Kings III, written at line 1269 of its file. A call passes 1 parameter: OWNER. The game's script calls it in 3 places, among them historical_artifacts.0023 (event), 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_exp1_historical_artifacts_creation_effect.txt.
What it does
set_artifact_rarity_illustrious = yes- “Throne of Charlemagne” Artifact is created
scope:newly_created_artifact:add_artifact_history = { type = inherited date = 814.1.2 recipient = character:90095 }add_artifact_history = { type = inherited date = 817.1.1 recipient = character:30227 }add_artifact_title_history = { target = title:e_hre date = 973.5.7 }add_scaled_artifact_modifier_majesty_effect = yesadd_scaled_artifact_modifier_rulership_effect = yes
• 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 (53 lines of game script)
create_artifact_throne_charlemagne_effect = { #Create at start
# Get the character the artifact is being made for.
$OWNER$ = { save_scope_as = owner }
# Not really used, but if we don't set the scopes we get errors in the feature selection
set_artifact_rarity_illustrious = yes
# Create the artifact
create_artifact = {
name = artifact_throne_charlemagne_name
description = artifact_throne_charlemagne_description
type = throne_special
visuals = throne_charlemagne
wealth = scope:wealth
quality = scope:quality
template = throne_charlemagne_template
history = {
type = created
date = 800.12.25
recipient = character:6392 #Karl I the Great
location = province:2092 #Aachen
}
modifier = throne_charlemagne_modifier
save_scope_as = newly_created_artifact
decaying = no
}
scope:newly_created_artifact = {
set_variable = { name = historical_unique_artifact value = yes }
set_variable = charlamagne_throne
# k_lotharingia history copied manually because it is destroyed before 1066
add_artifact_history = {
type = inherited
date = 814.1.2
recipient = character:90095 #Louis I
}
add_artifact_history = {
type = inherited
date = 817.1.1
recipient = character:30227 #Lothair I
}
add_artifact_title_history = {
target = title:e_hre
date = 973.5.7
}
add_scaled_artifact_modifier_majesty_effect = yes
add_scaled_artifact_modifier_rulership_effect = yes
save_scope_as = epic
save_scope_value_as = {
name = throne
value = yes
}
}
}As written in game/common/scripted_effects/01_exp1_historical_artifacts_creation_effect.txt.
Where it is used
Every place in common/, events/ and history/ that calls create_artifact_throne_charlemagne_effect.
Source: game/common/scripted_effects/01_exp1_historical_artifacts_creation_effect.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.