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

Scripted effect

recover_from_disease_effect

recover_from_disease_effect = { DISEASE = … }

game/common/scripted_effects/20_health_effects.txt, line 719 (194 lines). Parameters: $DISEASE$.

recover_from_disease_effect is a scripted effect in Crusader Kings III, written at line 719 of its file. A call passes 1 parameter: DISEASE. The game's script calls it in 16 places, among them … Sickness (event pilgrimage.2008), …: A Battle Won (event health.1105) and …: A Chance to Breathe (event health.1112). Patch 1.20.1.2, from game/common/scripted_effects/20_health_effects.txt.

The comment above it in the file

Removes the disease in question and sends notifications to everyone who should know. Needs the arguments DISEASE (trait name, only exception is early_great_pox - it should be removed as great_pox). Does NOT send an event to the character who gets the disease.

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)
recover_from_disease_effect = {
	hidden_effect = {
		save_scope_value_as = {
			name = disease_type
			value = flag:$DISEASE$
		}

		if = {
			limit = {
				has_trait = early_great_pox
				scope:disease_type = flag:great_pox
			}
			save_scope_value_as = {
				name = disease_type
				value = flag:early_great_pox
			}
		}	
	}

	if = { #They actually have the disease you want to remove
		limit = { has_trait = $DISEASE$ }

		save_scope_as = sick_character

		#Notifications (first, because some notifications need to check health which are changed when traits are removed)
		hidden_effect = {

			#IMPORTANT CHARACTER (add to list)
			if = {
				limit = { #The disease has to be somewhat dangerous
					OR = {
						health < death_chance_dying_health
						NOR = {
							scope:disease_type = flag:ill
							scope:disease_type = flag:gout_ridden
							scope:disease_type = flag:lovers_pox
							scope:disease_type = flag:early_great_pox
						}
					}
				}
				every_parent = {
					limit = { is_playable_character = yes }
					add_to_temporary_list = disase_notification_list
				}
				every_child = {
					limit = { is_playable_character = yes }
					add_to_temporary_list = disase_notification_list
				}
				every_spouse = {
					limit = {
						is_playable_character = yes
						NOT = { is_in_list = disase_notification_list }
					}
					add_to_temporary_list = disase_notification_list
				}
				every_heir_title = {
					limit = {
						exists = holder
					}
					holder = {
						if = {
							limit = {
								player_heir ?= scope:sick_character
								NOT = { is_in_list = disase_notification_list }
							}
							add_to_temporary_list = disase_notification_list
						}
					}
				}
			}

			#PARTNERS WHO WANT TO KNOW ABOUT STDS (add to list)
			if = {
				limit = {
					OR = {
						scope:disease_type = flag:great_pox
						scope:disease_type = flag:lovers_pox
						scope:disease_type = flag:early_great_pox
					}
				}
				every_relation = {
					type = lover
					limit = {
						is_playable_character = yes
						NOT = { is_in_list = disase_notification_list }
					}
					add_to_temporary_list = disase_notification_list
				}
				every_concubine = {
					limit = {
						is_playable_character = yes
						NOT = { is_in_list = disase_notification_list }
					}
					add_to_temporary_list = disase_notification_list
				}
			}

			#IMPOTANT CHARACTER NOTIFICATION EVENT
			every_parent = {
				limit = {
					inform_about_relative_recovery_trigger = yes
				}
				add_to_temporary_list = disase_notification_list
			}
			every_spouse = {
				limit = {
					inform_about_relative_recovery_trigger = yes
					NOT = { is_in_list = disase_notification_list }
				}
				add_to_temporary_list = disase_notification_list
			}
			every_heir_title = {
				limit = {
					exists = holder
				}
				holder = {
					if = {
						limit = {
							player_heir = scope:sick_character
							inform_about_relative_recovery_trigger = yes

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

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

Where it is used

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

Events (15)

9 more

Scripted effects inside an event file (1)

  • pam_secular_faith_recover_from_any_disease_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?