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

Scripted effect

safe_disease_treatment_effect

safe_disease_treatment_effect = { PATIENT = … TREATMENT_PICKER = … }

game/common/scripted_effects/20_health_effects.txt, line 1710 (133 lines). Parameters: $PATIENT$, $TREATMENT_PICKER$.

safe_disease_treatment_effect is a scripted effect in Crusader Kings III, written at line 1710 of its file. A call passes 2 parameters: PATIENT and TREATMENT_PICKER. The game's script calls it in 18 places, among them … A Journey's End? (event health.1001), …: A Killer In Our Midst (event health.2101) and …: My Ailing … (event health.3102). 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

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

The script as written (120 lines of game script)
safe_disease_treatment_effect = {
	$TREATMENT_PICKER$ = { save_scope_as = treatment_picker }
	$PATIENT$ = {
		custom_tooltip = safe_diseaste_treatment.tt

		hidden_effect = {
			save_court_physician_as_effect = { SCOPE_NAME = physician }

			if = {
				limit = {
					NOT = { exists = scope:sick_character }
				}
				save_scope_as = sick_character
			} #If a sick character was not already saved we save the patient as Sick Character here

			if = {
				limit = {
					exists = scope:physician
					court_physician_available_trigger = yes
				}

				#Physician skill up
				scope:physician = {
					random_list = {
						90 = {  #physician
							trigger = {
								NAND = {
									has_trait = lifestyle_physician
									has_trait_xp = {
										trait = lifestyle_physician
										value >= 100
									}
								}
							}
							physician_level_up_chance_effect = { CHANCE = 10 }
						}
						10 = { #Mystic
							trigger = {
								NOR = {
									AND = {
										has_trait = lifestyle_mystic
										has_trait_xp = {
											trait = lifestyle_mystic
											value >= 100
										}
									}
									AND = { #Because then this would be the only option which is weird
										has_trait = lifestyle_physician
										has_trait_xp = {
											trait = lifestyle_physician
											value >= 100
										}
									}
								}
								OR = {
									NAND = { #Either, this is my first rank up
										has_trait = lifestyle_physician
										has_trait = lifestyle_mystic
									}
									has_trait = lifestyle_mystic #I have already chosen this path
								}
							}
							modifier = {
								has_trait = lifestyle_mystic
								factor = 2
							}
							modifier = {
								ai_zeal >= medium_positive_ai_value
								factor = 0
							}
							mystic_level_up_chance_effect = { CHANCE = 10 }
						}
					}
				}

				# OUTCOME RANDOMIZATION
				random_list = {
					70 = { # Success
						modifier = {
							factor = scope:physician.physician_safe_treatment_skill_factor
							# 1 for an average learning skill character without traits
							# 0.2 min for low learning
							# ~3 for high skill character without traits
							# ~12 for high skill character with best trait (physician_3)
						}
						modifier = { # Bump the death numbers a bit
							$PATIENT$ = { is_ruler = no }
							factor = 0.8
						}
						modifier = { # Pool characters should die more
							$PATIENT$ = { is_pool_character = yes }
							factor = 0.2
						}
						trigger_event = health.3103 #Safe treatment sucess
					}
					30 = { # Failure
						trigger_event = health.3104 #Safe treatment failure
					}
					70 = { # Failure on purpose
						trigger = {
							court_physician_can_fail_on_purpose_trigger = yes
						}
						opinion_modifier = {
							who = scope:physician
							opinion_target = scope:sick_character
							multiplier = -1 # Adds 100 for -100 opinion
						}
						modifier = {
							factor = { #To keep it scaling with success
								add = scope:physician.physician_safe_treatment_skill_factor
								divide = 2
							}
						}
						modifier = { #Are they already trying to kill you?
							add = 40
							scope:sick_character = {
								any_targeting_scheme = {
									scheme_type = murder
									OR = {
										scheme_owner = scope:physician

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

The first 120 of its 133 lines; the rest is in game/common/scripted_effects/20_health_effects.txt from line 1710.

Where it is used

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