Scripted effect · Legacy of Persia files
create_artifact_illustrious_sassanian_sword_effect
create_artifact_illustrious_sassanian_sword_effect = { OWNER = … }game/common/scripted_effects/03_dlc_fp3_artifact_creation_effects.txt, line 314 (42 lines). Parameters: $OWNER$.
create_artifact_illustrious_sassanian_sword_effect is a scripted effect in Crusader Kings III, in the Legacy of Persia files, written at line 314 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/03_dlc_fp3_artifact_creation_effects.txt.
What it does
set_artifact_rarity_illustrious = yes- “Sassanian Sword” Artifact is created
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 (42 lines of game script)
create_artifact_illustrious_sassanian_sword_effect = {
# 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_sassanian_sword_name
description = artifact_sassanian_sword_description
type = regalia
template = unique_regalia_template
visuals = sassanian_sword
wealth = scope:wealth
quality = scope:quality
history = {
type = created_before_history
}
modifier = artifact_placeholder_modifier
save_scope_as = newly_created_artifact
}
hidden_effect_new_object = {
scope:newly_created_artifact = {
# Prestige modifier is scaled based on the Wealth of the artifact (opulence).
set_variable = sassanian_sword
add_scaled_artifact_modifier_minor_prestige_effect = yes
add_2_scaled_artifact_modifier_combat_effect = yes
add_2_scaled_artifact_modifier_majesty_effect = yes
add_scaled_artifact_modifier_attractiveness_effect = yes
set_variable = {
name = quality
value = scope:quality
}
set_variable = {
name = wealth
value = scope:wealth
}
}
}
}As written in game/common/scripted_effects/03_dlc_fp3_artifact_creation_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls create_artifact_illustrious_sassanian_sword_effect.
Source: game/common/scripted_effects/03_dlc_fp3_artifact_creation_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.