Scripted effect
create_artifact_pedestal_buddhism_relic_effect_hist
create_artifact_pedestal_buddhism_relic_effect_hist = { OWNER = … }game/common/scripted_effects/01_exp1_historical_artifacts_creation_effect.txt, line 567 (190 lines). Parameters: $OWNER$.
create_artifact_pedestal_buddhism_relic_effect_hist is a scripted effect in Crusader Kings III, written at line 567 of its file. A call passes 1 parameter: OWNER. The game's script calls it in 3 places, among them historical_artifacts.0023 (event), inspiration_adventure_create_artifact_effect (scripted effect) and debug.349 (event). Patch 1.20.1.2, from game/common/scripted_effects/01_exp1_historical_artifacts_creation_effect.txt.
What it does
get_artifact_quality_effect = yesget_artifact_wealth_effect = yes- 1 of 8 things will happen:
- 13%: Nothing else happens
- 13%: Nothing else happens
- 13%: Nothing else happens
- 13%: Nothing else happens
- 13%: Nothing else happens
- 13%: Nothing else happens
- 13%: Nothing else happens
- 13%: Nothing else happens
If
One of these
scope:buddhism_relic_name = flag:robeor
scope:buddhism_relic_name = flag:bowlor
scope:buddhism_relic_name = flag:tongue
Then
set_artifact_rarity_illustrious = yes- “…” Artifact is created
Else if
scope:buddhism_relic_name = flag:tooth
Then
set_artifact_rarity_illustrious = yes- “…” Artifact is created
Otherwise
- “…” Artifact is created
scope:newly_created_artifact:add_scaled_artifact_modifier_piety_effect = yesadd_scaled_artifact_modifier_grandeur_small_effect = yesIf
One of these
rarity = famedor
rarity = illustrious
Then
Otherwise
add_artifact_modifier = artifact_monthly_prestige_penalty_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 (120 lines of game script)
create_artifact_pedestal_buddhism_relic_effect_hist = {
# 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
get_artifact_quality_effect = yes
get_artifact_wealth_effect = yes
# Identify which relic it is
random_list = {
10 = {
save_scope_value_as = {
name = buddhism_relic_name
value = flag:tooth
}
}
10 = {
save_scope_value_as = {
name = buddhism_relic_name
value = flag:bone
}
}
10 = {
trigger = {
NOT = {
any_artifact = {
has_variable = buddhism_robe
}
}
}
save_scope_value_as = {
name = buddhism_relic_name
value = flag:robe
}
}
10 = {
trigger = {
NOT = {
any_artifact = {
has_variable = buddhism_bowl
}
}
}
save_scope_value_as = {
name = buddhism_relic_name
value = flag:bowl
}
}
10 = {
trigger = {
NOT = {
any_artifact = {
has_variable = buddhism_tongue
}
}
}
save_scope_value_as = {
name = buddhism_relic_name
value = flag:tongue
}
}
10 = {
save_scope_value_as = {
name = buddhism_relic_name
value = flag:hair
}
}
10 = {
save_scope_value_as = {
name = buddhism_relic_name
value = flag:sarira
}
}
10 = {
save_scope_value_as = {
name = buddhism_relic_name
value = flag:bo
}
}
}
# Create the artifact
if = {
limit = {
exists = scope:buddhism_relic_name
OR = {
scope:buddhism_relic_name = flag:robe
scope:buddhism_relic_name = flag:bowl
scope:buddhism_relic_name = flag:tongue
}
}
set_artifact_rarity_illustrious = yes
create_artifact = {
name = artifact_pedestal_reliquary_buddhism_name
description = artifact_pedestal_reliquary_buddhism_description
type = pedestal
template = buddhism_artifact_template
visuals = pedestal_buddhism_relic
wealth = scope:wealth
quality = scope:quality
history = {
type = created_before_history
}
modifier = artifact_placeholder_modifier
save_scope_as = newly_created_artifact
}
}
else_if = {
limit = {
exists = scope:buddhism_relic_name
scope:buddhism_relic_name = flag:tooth
}
set_artifact_rarity_illustrious = yes
create_artifact = {
name = artifact_pedestal_reliquary_buddhism_name
description = artifact_pedestal_reliquary_buddhism_description
type = pedestal
template = buddhism_artifact_template
visuals = buddha_tooth
wealth = scope:wealth
quality = scope:qualityAs written in game/common/scripted_effects/01_exp1_historical_artifacts_creation_effect.txt.
The first 120 of its 190 lines; the rest is in game/common/scripted_effects/01_exp1_historical_artifacts_creation_effect.txt from line 567.
Where it is used
Every place in common/, events/ and history/ that calls create_artifact_pedestal_buddhism_relic_effect_hist.
Events (2)
Scripted effects (1)
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.