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

Scripted effect · Legends of the Dead files

epidemic_prevention_effect

epidemic_prevention_effect = { PHYSICIAN = … PREVENTION_LEVEL = … }

game/common/scripted_effects/06_dlc_ce1_epidemics_effects.txt, line 442 (205 lines). Parameters: $PHYSICIAN$, $PREVENTION_LEVEL$.

epidemic_prevention_effect is a scripted effect in Crusader Kings III, in the Legends of the Dead files, written at line 442 of its file. A call passes 2 parameters: PHYSICIAN and PREVENTION_LEVEL. The game's script calls it in 1 place, among them …: Early Prevention (event physician_epidemic_events.1020). Its body carries 3 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/06_dlc_ce1_epidemics_effects.txt.

The comment above it in the file

Epidemic treatment effect

What it does

  • If

    • $PREVENTION_LEVEL$ = 1

    Then

    • You opt for the safe treatment
  • If

    • $PREVENTION_LEVEL$ = 2

    Then

    • You opt for a riskier treatment
  • If

    • $PREVENTION_LEVEL$ = 3

    Then

    • You opt for a mystical treatment

• 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)
epidemic_prevention_effect = {
	$PHYSICIAN$ = { save_scope_as = physician }
	# Apply prevention
	if = {
		limit = {
			$PREVENTION_LEVEL$ = 1
		}
		custom_tooltip = minor_epidemic_treatment.tt
		hidden_effect = {
			# 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)
					}
					trigger_event = { id = physician_epidemic_events.1021 days = { 3 14 } } #Safe prevention sucess
				}
				30 = { # Failure
					trigger_event = { id = physician_epidemic_events.1022 days = { 3 14 } } #Safe prevention failure
				}
			}
		}
	}
	if = {
		limit = {
			$PREVENTION_LEVEL$ = 2
		}
		custom_tooltip = moderate_epidemic_treatment.tt
		# OUTCOME RANDOMIZATION
		hidden_effect = {
			random_list = {
				1 = { #Success
					modifier = {
						scope:physician = {
							learning >= mediocre_skill_rating
							learning < medium_skill_rating
						}
						factor = 2
					}
					modifier = {
						scope:physician = {
							learning >= medium_skill_rating
							learning < decent_skill_rating
						}
						factor = 4
					}
					modifier = {
						scope:physician = {
							learning >= decent_skill_rating
							learning < high_skill_rating
						}
						factor = 7
					}
					modifier = {
						scope:physician = {
							learning >= high_skill_rating
						}
						factor = 10
					}
					modifier = {
						scope:physician = { has_trait = lifestyle_physician }
						factor = 2
					}
					modifier = {
						scope:physician = {
							has_trait = lifestyle_physician
							has_trait_xp = {
								trait = lifestyle_physician
								value >= 50
							}
						}
						factor = 5
					}
					modifier = {
						scope:physician = {
							has_trait = lifestyle_physician
							has_trait_xp = {
								trait = lifestyle_physician
								value >= 100
							}
						}
						factor = 5
					}
					trigger_event = { id = physician_epidemic_events.1023 days = { 3 14 } } #success
				}
				10 = { #Failure
					trigger_event = { id = physician_epidemic_events.1024 days = { 3 14 } } #Failure
				}
			}
		}
	}
	if = {
		limit = {
			$PREVENTION_LEVEL$ = 3
		}
		custom_tooltip = mystic_epidemic_treatment.tt
		# OUTCOME RANDOMIZATION
		hidden_effect = {
			random_list = {
				1 = { #Success
					modifier = {
						scope:physician = {
							learning >= mediocre_skill_rating
							learning < medium_skill_rating
						}
						factor = 2
					}
					modifier = {
						scope:physician = {
							learning >= medium_skill_rating
							learning < decent_skill_rating
						}
						factor = 4
					}
					modifier = {
						scope:physician = {

As written in game/common/scripted_effects/06_dlc_ce1_epidemics_effects.txt.

The first 120 of its 205 lines; the rest is in game/common/scripted_effects/06_dlc_ce1_epidemics_effects.txt from line 442.

Where it is used

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

Events (1)

Source: game/common/scripted_effects/06_dlc_ce1_epidemics_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?