Scripted effect
disease_treatment_result_tooltip_effect
disease_treatment_result_tooltip_effect = { OUTCOME = … TREATMENT = … }game/common/scripted_effects/20_health_effects.txt, line 2796 (73 lines). Parameters: $OUTCOME$, $TREATMENT$.
disease_treatment_result_tooltip_effect is a scripted effect in Crusader Kings III, written at line 2796 of its file. A call passes 2 parameters: OUTCOME and TREATMENT. The game's script calls it in 3 places, among them …: Disastrous Mistreatment (event health.3200), …: Disastrous Mistreatment (event health.3201) and inform_liege_about_disease_treatment_effect (scripted effect). Its body carries 1 text of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/20_health_effects.txt.
What it does
If
a check the game hides
Then
- … died while undergoing the treatment.
Otherwise
scope:sick_character:add_disease_treatment_modifier_effect = { TREATMENT = $TREATMENT$ OUTCOME = $OUTCOME$ }- If has “treatment strategy” (a variable the game's script sets):
- If treatment strategy is amputation:
add_trait_force_tooltip = one_legged
- Else, if treatment strategy is disfigurement:
add_trait_force_tooltip = disfigured
- Else, if treatment strategy is eye:
add_trait_force_tooltip = one_eyed
- Else, if treatment strategy is castration:
add_eunuch_trait_effect = yes
- If treatment strategy is amputation:
- If has “mystic side effect” (a variable the game's script sets):
- If mystic side effect is Lunacy:
add_trait_force_tooltip = lunatic_1
- Else, if mystic side effect is possessed:
add_trait_force_tooltip = possessed_1
- Else, if mystic side effect is dull:
add_trait_force_tooltip = dull
- Else, if mystic side effect is craven:
add_trait_force_tooltip = craven
- Else, if mystic side effect is paranoid:
add_trait_force_tooltip = paranoid
- Else, if mystic side effect is massive stress gain: Gains 100 Stress
- If mystic side effect is Lunacy:
• 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 (73 lines of game script)
disease_treatment_result_tooltip_effect = {
save_temporary_scope_value_as = {
name = treatment_result_treatment
value = flag:$TREATMENT$
}
save_temporary_scope_value_as = {
name = treatment_result_outcome
value = flag:$OUTCOME$
}
#Show death or treatment outcome
if = {
limit = { scope:sick_character = { is_alive = no } }
custom_tooltip = health.3200.death.tt
}
else = {
show_as_tooltip = {
scope:sick_character = {
add_disease_treatment_modifier_effect = { TREATMENT = $TREATMENT$ OUTCOME = $OUTCOME$ }
#Risky
if = {
limit = { has_variable = treatment_strategy }
if = {
limit = { var:treatment_strategy = flag:amputation }
add_trait_force_tooltip = one_legged
}
else_if = {
limit = { var:treatment_strategy = flag:disfigurement }
add_trait_force_tooltip = disfigured
}
else_if = {
limit = { var:treatment_strategy = flag:eye }
add_trait_force_tooltip = one_eyed
}
else_if = {
limit = {
var:treatment_strategy = flag:castration
}
add_eunuch_trait_effect = yes
}
}
if = {
limit = { has_variable = mystic_side_effect }
#Mystic
if = {
limit = { var:mystic_side_effect = flag:lunatic }
add_trait_force_tooltip = lunatic_1
}
else_if = {
limit = { var:mystic_side_effect = flag:possessed }
add_trait_force_tooltip = possessed_1
}
else_if = {
limit = { var:mystic_side_effect = flag:dull }
add_trait_force_tooltip = dull
}
else_if = {
limit = { var:mystic_side_effect = flag:craven }
add_trait_force_tooltip = craven
}
else_if = {
limit = { var:mystic_side_effect = flag:paranoid }
add_trait_force_tooltip = paranoid
}
else_if = {
limit = { var:mystic_side_effect = flag:massive_stress_gain }
add_stress = massive_stress_gain
}
}
}
}
}
}As written in game/common/scripted_effects/20_health_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls disease_treatment_result_tooltip_effect.
Events (2)
- …: Disastrous Mistreatment
health.3200 - …: Disastrous Mistreatment
health.3201
Scripted effects (1)
Source: game/common/scripted_effects/20_health_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.