Scripted effect · Legends of the Dead files
change_legend_quality_effect
change_legend_quality_effect = { VALUE = … }game/common/scripted_effects/06_dlc_ce1_legend_effects.txt, line 839 (167 lines). Parameters: $VALUE$.
change_legend_quality_effect is a scripted effect in Crusader Kings III, in the Legends of the Dead files, written at line 839 of its file. A call passes 1 parameter: VALUE. The game's script calls it in 52 places, among them A … Blessing (event legend_spread_events.5005), A Bloody Heirloom (event legend_spread_events.5015) and A Deathbed Confession (event legend_spread_events.8060). Its body carries 14 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/06_dlc_ce1_legend_effects.txt.
The comment above it in the file
Has to be run on the legend itself
What it does
If a check the game hides passes: the same again (12 lines)
If
$VALUE$ <= major_legend_quality_decrease
Then
- The discount towards upgrading your Legend decreases greatly
Else if
$VALUE$ <= medium_legend_quality_decrease
Then
- The discount towards upgrading your Legend decreases
Else if
$VALUE$ >= major_legend_quality_increase
Then
- The discount towards upgrading your Legend increases greatly
Else if
$VALUE$ >= medium_legend_quality_increase
Then
- The discount towards upgrading your Legend increases
Else if
100 <= { value = var:legend_quality_progress add = $VALUE$ }
Then
- The discount towards upgrading your Legend increases to the maximum
Else if
0 >= { value = var:legend_quality_progress add = $VALUE$ }
Then
- The discount towards upgrading your Legend decreases to the minimum
Otherwise
If
$VALUE$ <= major_legend_quality_decrease
Then
- The discount towards upgrading your Legend decreases greatly
Else if
$VALUE$ <= medium_legend_quality_decrease
Then
- The discount towards upgrading your Legend decreases
Else if
$VALUE$ >= major_legend_quality_increase
Then
- The discount towards upgrading your Legend increases greatly
Else if
$VALUE$ >= medium_legend_quality_increase
Then
- The discount towards upgrading your Legend increases
• 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)
change_legend_quality_effect = {
# Firstly, do I exist and if not, set me
if = {
limit = {
NOT = { exists = var:legend_quality_progress }
}
if = {
limit = {
$VALUE$ <= major_legend_quality_decrease
}
custom_tooltip = major_legend_quality_decrease_tt
set_variable = {
name = legend_quality_progress
value = $VALUE$
}
}
else_if = {
limit = {
$VALUE$ <= medium_legend_quality_decrease
}
custom_tooltip = medium_legend_quality_decrease_tt
set_variable = {
name = legend_quality_progress
value = $VALUE$
}
}
else_if = {
limit = {
$VALUE$ < 0
}
custom_tooltip = minor_legend_quality_decrease_tt
set_variable = {
name = legend_quality_progress
value = $VALUE$
}
}
else_if = {
limit = {
$VALUE$ >= major_legend_quality_increase
}
custom_tooltip = major_legend_quality_increase_tt
set_variable = {
name = legend_quality_progress
value = $VALUE$
}
}
else_if = {
limit = {
$VALUE$ >= medium_legend_quality_increase
}
custom_tooltip = medium_legend_quality_increase_tt
set_variable = {
name = legend_quality_progress
value = $VALUE$
}
}
else_if = {
limit = {
$VALUE$ > 0
}
custom_tooltip = minor_legend_quality_increase_tt
set_variable = {
name = legend_quality_progress
value = $VALUE$
}
}
else = {
set_variable = {
name = legend_quality_progress
value = 0
}
}
}
# Otherwise, check if the progress is going to go over 100 and if so, cap at 100
else_if = {
limit = {
exists = var:legend_quality_progress
100 <= {
value = var:legend_quality_progress
add = $VALUE$
}
}
custom_tooltip = maximum_legend_quality_discount_reach_tt
set_variable = {
name = legend_quality_progress
value = 100
}
}
# Otherwise, check if the progress is going to go below 0 and if so, cap at 0
else_if = {
limit = {
exists = var:legend_quality_progress
0 >= {
value = var:legend_quality_progress
add = $VALUE$
}
}
custom_tooltip = minimum_legend_quality_discount_reach_tt
set_variable = {
name = legend_quality_progress
value = 0
}
}
# Otherwise, just apply the mathematics
else = {
if = {
limit = {
$VALUE$ <= major_legend_quality_decrease
}
custom_tooltip = major_legend_quality_decrease_tt
change_variable = {
name = legend_quality_progress
add = $VALUE$
}
}
else_if = {
limit = {
$VALUE$ <= medium_legend_quality_decrease
}
custom_tooltip = medium_legend_quality_decrease_ttAs written in game/common/scripted_effects/06_dlc_ce1_legend_effects.txt.
The first 120 of its 167 lines; the rest is in game/common/scripted_effects/06_dlc_ce1_legend_effects.txt from line 839.
Where it is used
Every place in common/, events/ and history/ that calls change_legend_quality_effect.
Events (51)
- A … Blessing
legend_spread_events.5005 - A Bloody Heirloom
legend_spread_events.5015 - A Deathbed Confession
legend_spread_events.8060 - A Few Words?
legend_spread_events.5045 - A Grand Entrance
legend_spread_events.5070 - A Holy Happening
legend_spread_events.8070
45 more
- A Legendary Love
legend_spread_events.8160 - A Legendary Tipple
legend_spread_events.5420 - A Legendary Victory
legend_spread_events.8013 - A Legendary Victory
legend_spread_events.8141 - A Sinful Ancestor
legend_spread_events.8040 - A Virtuous Ancestor
legend_spread_events.8050 - A Walking Legend
bp3_journey.2000 - An Angelic Initiation
legend_spread_events.8130 - Being Neighborly
legend_spread_events.5305 - Besmirched
legend_spread_events.5020 - Captured for Posterity
coronation_events.1030 - Common People?
legend_spread_events.5415 - Distant Lands: Arrival
legend_spread_events.8122 - Distant Lands: Defeat
legend_spread_events.8124 - Distant Lands: Victory
legend_spread_events.8125 - Dusty Tomes
legend_spread_events.5025 - Echoes of the Future
legend_spread_events.8171 - Family Flora
legend_spread_events.5040 - Family Matters
legend_spread_events.5035 - For Whom The Bells Toll
legend_spread_events.8170 - Friends In High Places
legend_spread_events.5030 - Greasing Mouths
legend_spread_events.5320 - Heresy!
legend_spread_events.8020 - Holy Bread
legend_spread_events.5065 - Innocent Voices
legend_spread_events.0001 - Lain Hands
legend_spread_events.5010 - Legends Do Die
legend_spread_events.8012 - Most Haunted
legend_spread_events.8100 - Necessary Embellishments
legend_spread_events.5400 - One-Eyed Bandit
legend_spread_events.5210 - Righteous Vengeance
legend_spread_events.8180 - Rumors From the Wild
legend_spread_events.5405 - Sound Foundations
legend_spread_events.5000 - The … Buried
legend_spread_events.8181 - The … Child
legend_spread_events.8190 - The … of the …
legend_spread_events.8090 - The … Tome: Arrival
legend_spread_events.8002 - The … Tome: Lost
legend_spread_events.8004 - The … Tome: Unearthed
legend_spread_events.8003 - The Blood of …
legend_spread_events.8110 - The Legendary Fist
legend_spread_events.8080 - The Permanent Mark
legend_spread_events.8150 - What Lies Beyond?
legend_spread_events.5410 - What's My Purpose?
legend_spread_events.8172 - Whispered Tales
travel_events.5001
Scripted effects (1)
Source: game/common/scripted_effects/06_dlc_ce1_legend_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.