Scripted effect
disease_treatment_results_effect
disease_treatment_results_effect = { OUTCOME = … TREATMENT = … }game/common/scripted_effects/20_health_effects.txt, line 2870 (368 lines). Parameters: $OUTCOME$, $TREATMENT$.
disease_treatment_results_effect is a scripted effect in Crusader Kings III, written at line 2870 of its file. A call passes 2 parameters: OUTCOME and TREATMENT. The game's script calls it in 8 places, among them …: A Greater Power (event health.3108), …: A Little Brighter (event health.3103) and …: A Medical Miracle (event health.3105). Patch 1.20.1.2, from game/common/scripted_effects/20_health_effects.txt.
What it does
add_disease_treatment_modifier_effect = { TREATMENT = $TREATMENT$ OUTCOME = $OUTCOME$ }If
scope:treatment_result_treatment = flag:risky
Then
- 1 of 5 things will happen:
- 20%: Nothing else happens
- 20%:
add_trait_force_tooltip = one_leggedincrease_wounds_no_death_effect = { REASON = treatment }
- 20%:
add_trait_force_tooltip = disfiguredincrease_wounds_no_death_effect = { REASON = treatment }
- 20%:
add_eunuch_trait_effect = yesincrease_wounds_no_death_effect = { REASON = treatment }
- 20%:
add_trait_force_tooltip = one_eyedincrease_wounds_no_death_effect = { REASON = treatment }
If
scope:treatment_result_treatment = flag:mystic
Then
- 1 of 2 things will happen:
- 67% (base chance; changed in play) › 1 of 3 things will happen:
- 71%: Nothing else happens
- 14%:
- 14%:
- 33%: Nothing else happens
- 67% (base chance; changed in play) › 1 of 3 things will happen:
If
scope:treatment_result_outcome = flag:failure
Then
- 1 of 6 things will happen:
- 15%:
add_trait_force_tooltip = lunatic_1
- 15%:
add_trait_force_tooltip = possessed_1
- 15%:
add_trait_force_tooltip = dull
- 15%:
add_trait_force_tooltip = craven
- 15%:
add_trait_force_tooltip = paranoid
- 23%: Gains 100 Stress
- 15%:
- If has “treatment strategy” (a variable the game's script sets):
- If treatment strategy is occult: Stress and fulfillment impact: by trait: Zealous +80
- Else, if treatment strategy is occult cannibal: Stress and fulfillment impact: by trait: Zealous +80, Compassionate +80
- Else, if treatment strategy is occult deviant: Stress and fulfillment impact: by trait: Zealous +80, Chaste +80
If
scope:treatment_result_outcome = flag:failureOne of these
scope:treatment_result_treatment = flag:riskyor
scope:treatment_result_treatment = flag:mystic
Then
physician_rank_up_tooltip_effect = yes
• 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)
disease_treatment_results_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$
}
#APPLY MODIFIERS (OR REMOVE TRAITS)
add_disease_treatment_modifier_effect = { TREATMENT = $TREATMENT$ OUTCOME = $OUTCOME$ }
#RISKY TREATMENT: DETERMINING TREATMENT STRATEGY AND REMOVING BODY PART
if = {
limit = { scope:treatment_result_treatment = flag:risky }
random_list = {
1 = { #Medicine
trigger = {
OR = { #Only use for cancer if no body part can be removed
NOT = { scope:disease_type ?= flag:cancer }
AND = {
scope:disease_type ?= flag:cancer
has_trait = one_eyed
has_trait = one_legged
has_trait = disfigured
OR = {
is_female = yes
is_eunuch_trigger = yes
}
}
}
}
set_variable = {
name = treatment_strategy
value = flag:medicine
days = 30
}
}
1 = { #Amputation
trigger = {
NOT = { has_trait = one_legged }
OR = {
has_amputation_type_disease_trigger = yes
AND = {
scope:treatment_result_outcome = flag:failure
scope:physician = { NOT = { has_trait = lifestyle_physician } }
}
}
}
add_trait_force_tooltip = one_legged
increase_wounds_no_death_effect = { REASON = treatment }
set_variable = {
name = treatment_strategy
value = flag:amputation
days = 30
}
if = {
limit = { has_amputation_type_disease_trigger = no }
add_character_flag = { flag = physician_used_wrong_method days = 30 }
}
}
1 = { #Disfigurement
trigger = {
NOT = { has_trait = disfigured }
OR = {
has_disfigurement_type_disease_trigger = yes
AND = {
scope:treatment_result_outcome = flag:failure
scope:physician = { NOT = { has_trait = lifestyle_physician } }
}
}
}
add_trait_force_tooltip = disfigured
increase_wounds_no_death_effect = { REASON = treatment }
set_variable = {
name = treatment_strategy
value = flag:disfigurement
days = 30
}
if = {
limit = { has_disfigurement_type_disease_trigger = no }
add_character_flag = { flag = physician_used_wrong_method days = 30 }
}
}
1 = { #Castration
trigger = {
is_male = yes
is_eunuch_trigger = no
OR = {
scope:disease_type ?= flag:cancer
AND = {
scope:treatment_result_outcome = flag:failure
scope:physician = { NOT = { has_trait = lifestyle_physician } }
}
}
}
add_eunuch_trait_effect = yes
increase_wounds_no_death_effect = { REASON = treatment }
set_variable = {
name = treatment_strategy
value = flag:castration
days = 30
}
if = {
limit = { NOT = { scope:disease_type ?= flag:cancer } }
add_character_flag = { flag = physician_used_wrong_method days = 30 }
}
}
1 = { #Remove eye
trigger = {
NOT = { has_trait = one_eyed }
OR = {
scope:disease_type ?= flag:cancer
AND = {
scope:treatment_result_outcome = flag:failure
scope:physician = { NOT = { has_trait = lifestyle_physician } }
}
}As written in game/common/scripted_effects/20_health_effects.txt.
The first 120 of its 368 lines; the rest is in game/common/scripted_effects/20_health_effects.txt from line 2870.
Where it is used
Every place in common/, events/ and history/ that calls disease_treatment_results_effect.
Events (8)
- …: A Greater Power
health.3108 - …: A Little Brighter
health.3103 - …: A Medical Miracle
health.3105 - …: Balanced Humors
health.3106 - …: Conflicted Feelings
health.3109 - …: Disastrous Mistreatment
health.3107
2 more
- …: Even Worse
health.3104 - …: Into Darkness
health.3110
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.