Scripted effect
wound_treatment_results_effect
wound_treatment_results_effect = { OUTCOME = … TREATMENT = … }game/common/scripted_effects/20_health_effects.txt, line 3411 (197 lines). Parameters: $OUTCOME$, $TREATMENT$.
wound_treatment_results_effect is a scripted effect in Crusader Kings III, written at line 3411 of its file. A call passes 2 parameters: OUTCOME and TREATMENT. The game's script calls it in 9 places, among them health.0100 (event), health.0101 (event) and Inspiration: A Model Ruler (event fund_inspiration.6102). Patch 1.20.1.2, from game/common/scripted_effects/20_health_effects.txt.
What it does
add_wound_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_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)
wound_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_wound_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 gangrene if no body part can be removed
NOT = { has_character_modifier = gangrene_modifier }
AND = {
has_character_modifier = gangrene_modifier
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_infected_or_gangrenous_wound_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_infected_or_gangrenous_wound_trigger = no }
add_character_flag = { flag = physician_used_wrong_method days = 30 }
}
}
1 = { #Disfigurement
trigger = {
NOT = { has_trait = disfigured }
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
}
}
1 = { #Castration
trigger = {
is_male = yes
is_eunuch_trigger = no
OR = {
has_infected_or_gangrenous_wound_trigger = yes
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 = { has_infected_or_gangrenous_wound_trigger = no }
add_character_flag = { flag = physician_used_wrong_method days = 30 }
}
}
1 = { #Remove eye
trigger = {
NOT = { has_trait = one_eyed }
OR = {
has_infected_or_gangrenous_wound_trigger = yes
AND = {
scope:treatment_result_outcome = flag:failure
scope:physician = { NOT = { has_trait = lifestyle_physician } }
}
}
}
add_trait_force_tooltip = one_eyed
increase_wounds_no_death_effect = { REASON = treatment }
set_variable = {
name = treatment_strategy
value = flag:eye
days = 30
}
if = {
limit = { has_infected_or_gangrenous_wound_trigger = no }As written in game/common/scripted_effects/20_health_effects.txt.
The first 120 of its 197 lines; the rest is in game/common/scripted_effects/20_health_effects.txt from line 3411.
Where it is used
Every place in common/, events/ and history/ that calls wound_treatment_results_effect.
Events (9)
- health.0100
- health.0101
- Inspiration: A Model Ruler
fund_inspiration.6102 - Race Against Time
mpo_events_anna.0020 - Wounded: Aching
health.4102 - Wounded: Disaster Strikes
health.4105
3 more
- Wounded: Healing
health.4101 - Wounded: Healing Hands
health.4103 - Wounded: On the Mend
health.4104
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.