Scripted effect · Legacy of Persia files
create_artifact_sassanian_sword_effect
create_artifact_sassanian_sword_effect = { OWNER = … }game/common/scripted_effects/03_dlc_fp3_artifact_creation_effects.txt, line 243 (70 lines). Parameters: $OWNER$.
create_artifact_sassanian_sword_effect is a scripted effect in Crusader Kings III, in the Legacy of Persia files, written at line 243 of its file. A call passes 1 parameter: OWNER. The game's script calls it in 2 places, among them Qanats of … (event travel_events_fp3.0021) and Tomb Raiders (event travel_events_fp3.0050). Patch 1.20.1.2, from game/common/scripted_effects/03_dlc_fp3_artifact_creation_effects.txt.
What it does
- 1 of 3 things will happen:
- 17%:
- 50%:
- 33%:
- “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 (70 lines of game script)
create_artifact_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
random_list = {
1 = { set_artifact_rarity_masterwork = yes }
3 = { set_artifact_rarity_famed = yes }
2 = { 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).
add_scaled_artifact_modifier_minor_prestige_effect = yes
# Add a combat-related modifiers, 2 of them if it's famed.
if = {
limit = {
rarity = famed
}
add_2_scaled_artifact_modifier_combat_effect = yes
}
else = {
add_scaled_artifact_modifier_combat_effect = yes
}
# Add a Majesty-related modifier based on the Quality of the artifact.
if = {
limit = { # Add a second Majesty-related modifier for high rarity artifacts.
OR = {
rarity = famed
rarity = illustrious
}
}
add_2_scaled_artifact_modifier_majesty_effect = yes
}
else = {
add_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_sassanian_sword_effect.
Events (2)
- Qanats of …
travel_events_fp3.0021 - Tomb Raiders
travel_events_fp3.0050
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.