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_result_tooltip_effect

wound_treatment_result_tooltip_effect = { OUTCOME = … TREATMENT = … }

game/common/scripted_effects/20_health_effects.txt, line 3366 (44 lines). Parameters: $OUTCOME$, $TREATMENT$.

wound_treatment_result_tooltip_effect is a scripted effect in Crusader Kings III, written at line 3366 of its file. A call passes 2 parameters: OUTCOME and TREATMENT. The game's script calls it in 2 places, among them …: Disastrous Mistreatment (event health.3200) 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_wound_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:

• 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 (44 lines of game script)
wound_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_wound_treatment_modifier_effect = { TREATMENT = $TREATMENT$ OUTCOME = $OUTCOME$ }

				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
					}
				}
			}
		}
	}
}

As written in game/common/scripted_effects/20_health_effects.txt.

Where it is used

Every place in common/, events/ and history/ that calls wound_treatment_result_tooltip_effect.

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?