CK3 DatabaseCrusader Kings III · 1.20.1.2 “Crozier” · unofficial
Silk & Silverout Tue, Nov 17What's free, what needs the DLC, price →

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

• 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)

3 more

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.

Spotted a mistake on this page?