Disease modding

From Crusader Kings II Wiki
Jump to: navigation, search
Diseases are defined in folder common/diseases/.
Configuration key Type Description Example
rip bool
  • If not specified, the disease will be available in both version (with the same values in both) and doesn't need to be set twice.
  • If rip=no, this will exclude a disease from The Reaper's Due disease database, so that there can be two versions of the disease.
rip=no
contagiousness float contagiousness = 0.15
outbreak_chance float outbreak_chance = 0.01
effect modifiers Province modifiers applied during an outbreak.
effect = {
	city_tax_modifier = -0.5
	supply_limit = -4
	max_attrition = 0.05
}
icon int The index of icon frame in GFX_disease_icons icon = 1
tooltip key Localization key for disease description tooltip = TUBERCULOSIS_INFO
months int Duration of an outbreak. months = 30
trait trait Associated epidemic trait when a character gets the disease. trait = has_tuberculosis
always_get_message bool always_get_message = no
color color Color for epidemics mapmode. color = { 84 171 176 }
major bool major = yes
active bool Whether the disease exists at game start, or needs to get activated via scripting command activate_disease. active = no
timeperiod clause Validity range for the disease.
Key Type Description
start_date date Start of timeperiod
end_date date End of timeperiod
one_only bool Whether the disease will activate multiple times or once in the timeperiod
outbreak_chance float
can_outbreak conditions Global conditions (total_years_played, global flags, game rules, ...)
months int
max_total_provinces int
spread_through_water bool
min_nb_province int Ignored if 0.
max_nb_province int Ignored if 0.
province_infection_duration int
outbreak_scenario int Detailed scenario of epidemics progression, with starting provinces(start_provinces) and excluded geographical regions (excluded_regions)
timeperiod = {
	start_date = 769.1.1
	end_date = 1452.1.1
	one_only = no
}
timeperiod = {
	start_date = 1100.1.1
	end_date = 1400.1.1
	
	outbreak_chance = 0.01
	can_outbreak = {
		total_years_played = 25
		NOT = { has_global_flag = black_death_happened }
		has_game_rule = {
			name = epidemics
			value = delayed_dynamic
		}
	}
	
	min_nb_province = 1
	max_nb_province = 15
	one_only = yes
	province_infection_duration = 36
	
	outbreak_scenario = { # Classic plague
		chance = 0.30
		start_provinces = {
			1448
		}
		excluded_regions = {
			custom_historical_plague_free_zone
		}
	}
}
yearly_province_pulse commands
character_infection_chances clause
character_infection_chances = {
	months = 3
}
on_character_infection commands
on_province_infection commands
disease_gfx disease_gfx = disease_gfx_typhoid_fever
Modding
History
Scripting
Common
Gfx/Sfx/localisation