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

Scripted effect

inform_liege_about_disease_treatment_effect

inform_liege_about_disease_treatment_effect = { OUTCOME = … TREATMENT = … }

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

inform_liege_about_disease_treatment_effect is a scripted effect in Crusader Kings III, written at line 4054 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

Every line of it is script with no tooltip text: the script is below.

The script as written (91 lines of game script)
inform_liege_about_disease_treatment_effect = {
	hidden_effect = {
		save_scope_value_as = {
			name = treatment
			value = flag:$TREATMENT$
		}
		save_scope_value_as = {
			name = outcome
			value = flag:$OUTCOME$
		}

		#To save scope for portrait
		if = {
			limit = {
				scope:physician != scope:sick_character
			}
			scope:physician = { save_scope_as = portrait }
		}
		
		#Is liege generally responsible for our treatment?
		if = {
			limit = { liege_is_responsible_for_treatment_trigger = yes }

			#Toast messages for success and minor failures: only if liege actually picked the treatment
			#Event for major failures and death: always

			liege = {
				#CRITICAL SUCCESS & SUCCESS (TOAST)
				if = {
					limit = {
						exists = scope:treatment_picker
						this = scope:treatment_picker
						OR = {
							scope:outcome = flag:success
							scope:outcome = flag:critical_success
						}
					}
					send_interface_toast = {
						title = court_physician_treatment_success_message_title
						left_icon = scope:sick_character
						right_icon = scope:portrait
						disease_treatment_result_tooltip_effect = { TREATMENT = $TREATMENT$ OUTCOME = $OUTCOME$ }
					}
				}
				#FAILURE
				else_if = {
					limit = { scope:outcome = flag:failure }
					#SAFE FAILURE (TOAST)
					if = {
						limit = {
							exists = scope:treatment_picker
							this = scope:treatment_picker
							scope:treatment = flag:safe
						}
						send_interface_toast = {
							title = court_physician_treatment_failure_message_title
							left_icon = scope:sick_character
							right_icon = scope:portrait
							wound_treatment_result_tooltip_effect = { TREATMENT = $TREATMENT$ OUTCOME = $OUTCOME$ }
						}
					}
					#RISKY FAILURE (EVENT)
					else_if = {
						limit = { scope:treatment = flag:risky }
						save_scope_value_as = {
							name = disease_or_wound
							value = flag:disease
						}
						trigger_event = health.3200
					}
					#MYSTIC FAILURE (EVENT)
					else_if = {
						limit = { scope:treatment = flag:mystic }
						trigger_event = health.3201 
						#reveal secret in this event
					}
				}
				#DEATH (EVENT)
				else_if = {
					limit = { scope:outcome = flag:death }

					add_character_flag = {
						flag = sent_relevant_death_event #This blocks further death events triggered by death_management.0001
						days = 5
					}
					trigger_event = health.3200
				}
			}
		}
	}
}

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

Where it is used

Every place in common/, events/ and history/ that calls inform_liege_about_disease_treatment_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?