diff --git a/common/factions/00_peasant_faction_new.txt b/common/factions/00_peasant_faction_new.txt index adc1bc940..7acff4878 100644 --- a/common/factions/00_peasant_faction_new.txt +++ b/common/factions/00_peasant_faction_new.txt @@ -217,7 +217,7 @@ peasant_faction = { add = 25 county_opinion < 0 rite != scope:faction.faction_target.rite - scope:root.rite = { has_cultural_parameter = county_peasant_and_populist_factions_more_common_rite } + scope:root.rite = { has_doctrine = county_peasant_and_populist_factions_more_common_rite } } # Difficulty Settings diff --git a/common/factions/00_populist_faction.txt b/common/factions/00_populist_faction.txt index 276852e1f..af3c25bd9 100644 --- a/common/factions/00_populist_faction.txt +++ b/common/factions/00_populist_faction.txt @@ -342,7 +342,7 @@ add = 25 county_opinion < 0 rite != scope:faction.faction_target.rite - scope:root.rite = { has_cultural_parameter = county_peasant_and_populist_factions_more_common_rite } + scope:root.rite = { has_doctrine = county_peasant_and_populist_factions_more_common_rite } } # Realm Stability Settings diff --git a/common/script_values/06_ce1_epidemics_values.txt b/common/script_values/06_ce1_epidemics_values.txt new file mode 100644 index 000000000..74a583a95 --- /dev/null +++ b/common/script_values/06_ce1_epidemics_values.txt @@ -0,0 +1,1828 @@ +###################### +# Epidemics +###################### + +#### OUTBREAK CHANCE ### +# Chance for an outbreak of this intensity to spawn on a province per year +# % from 0-100 inclusive +# root = potential province + +### CONTROL VALUES ### +# These should be enough to change the balance of epidemics + +# Outbreak + +outbreak_chance_base_extra_low = 0.0005 +outbreak_chance_base_very_low = 0.001 +outbreak_chance_base_low = 0.01 +outbreak_chance_base_medium = 0.02 +outbreak_chance_base_high = 0.04 +outbreak_chance_base_very_high = 0.12 + +outbreak_increase_add_very_low = 0.001 +outbreak_increase_add_low = 0.004 +outbreak_increase_add_medium = 0.008 +outbreak_increase_add_high = 0.016 +outbreak_increase_add_very_high = 0.032 +outbreak_increase_add_extra_high = 0.064 + +outbreak_decrease_add_low = -0.003 +outbreak_decrease_add_medium = -0.008 +outbreak_decrease_add_high = -0.016 +outbreak_decrease_add_very_high = -0.032 +outbreak_decrease_add_unlikely = -0.064 + +outbreak_increase_mult_low = 0.1 +outbreak_increase_mult_medium = 0.2 +outbreak_increase_mult_high = 0.4 +outbreak_increase_mult_very_high = 0.8 + +outbreak_decrease_mult_low = -0.2 +outbreak_decrease_mult_medium = -0.35 +outbreak_decrease_mult_high = -0.6 +outbreak_decrease_mult_very_high = -0.8 +outbreak_decrease_mult_unlikely = -0.995 + +# Spread + +spread_chance_base_low = 3.5 +spread_chance_base_medium = 5 +spread_chance_base_high = 9 + +spread_increase_add_low = 2 +spread_increase_add_medium = 3 +spread_increase_add_high = 4 + +spread_decrease_add_low = -0.5 +spread_decrease_add_medium = -1 +spread_decrease_add_high = -2 +spread_decrease_add_very_high = -3 + +spread_increase_mult_low = 0.25 +spread_increase_mult_medium = 0.75 +spread_increase_mult_high = 1 +spread_increase_mult_very_high = 1.5 + +spread_decrease_mult_low = -0.25 +spread_decrease_mult_medium = -0.5 +spread_decrease_mult_high = -0.75 +spread_decrease_mult_unlikely = -0.991 + + +outbreak_chance_minor_default_value = { + value = outbreak_chance_base_low + + #Buildings + add = { + value = num_buildings + multiply = outbreak_increase_add_very_low + } + #Tradeports / Coasts + if = { + limit = { + has_building_or_higher = common_tradeport_01 + } + add = outbreak_increase_add_high + } + else_if = { + limit = { + is_coastal = yes + } + add = outbreak_increase_add_medium + } + + if = { + limit = { + OR = { + has_global_variable = is_in_tutorial + AND = { + has_global_variable = start_epidemic_grace + OR = { + county.holder = { is_ai = no } + county.holder = { + any_liege_or_above = { is_ai = no } + } + } + } + } + } + multiply = 0 + } +} + +outbreak_chance_minor_mult_value = { + value = 0.6 + + # Game rules + if = { + limit = { + has_game_rule = epidemic_frequency_often + } + add = outbreak_increase_mult_low + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_very_often + } + add = outbreak_increase_mult_medium + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_doomsday + } + add = outbreak_increase_mult_high + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_rare + } + add = outbreak_decrease_mult_medium + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_very_rare + } + add = outbreak_decrease_mult_high + } + + #Development + if = { + limit = { + county.development_level <= 20 + } + add = { + value = county.development_level + multiply = 0.002 + } + } + else_if = { + limit = { + county.development_level <= 40 + } + add = { + value = county.development_level + multiply = 0.003 + } + } + else = { + add = { + value = county.development_level + multiply = 0.004 + } + } + + #Terrain + if = { + limit = { + OR = { + terrain = hills + terrain = forest + terrain = desert + terrain = desert_mountains + terrain = mountains + } + } + add = outbreak_decrease_mult_low + } + else_if = { + limit = { + OR = { + terrain = jungle + terrain = taiga + } + } + add = outbreak_increase_mult_low + } + + #Developed places + if = { + limit = { + has_holding_type = city_holding + } + add = outbreak_increase_mult_medium + } + else_if = { + limit = { + has_holding = yes + } + add = outbreak_increase_mult_low + } + if = { + limit = { + OR = { + has_holding_type = herder_holding + has_holding_type = nomad_holding + } + } + add = outbreak_decrease_mult_high + } + + if = { + limit = { + county.development_level < 10 + } + multiply = 0.5 + } + + multiply = 0.4 + min = 0.001 +} + +outbreak_chance_major_default_value = { + value = outbreak_chance_base_very_low + + #Buildings + add = { + value = num_buildings + multiply = outbreak_increase_add_low + } + #Tradeports / Coasts + if = { + limit = { + has_building_or_higher = common_tradeport_01 + } + add = outbreak_increase_add_high + } + else_if = { + limit = { + is_coastal = yes + } + add = outbreak_increase_add_medium + } + + if = { + limit = { + OR = { + has_global_variable = is_in_tutorial + AND = { + has_global_variable = start_epidemic_grace + OR = { + county.holder = { is_ai = no } + county.holder = { + any_liege_or_above = { is_ai = no } + } + } + } + } + } + multiply = 0 + } +} + +outbreak_chance_major_mult_value = { + value = 0.45 + + # Game rules + if = { + limit = { + has_game_rule = epidemic_frequency_often + } + add = outbreak_increase_mult_low + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_very_often + } + add = outbreak_increase_mult_medium + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_doomsday + } + add = outbreak_increase_mult_high + } + else_if = { + limit = { + OR = { + has_game_rule = epidemic_frequency_rare + has_game_rule = easy_difficulty + } + } + add = outbreak_decrease_mult_medium + } + else_if = { + limit = { + OR = { + has_game_rule = epidemic_frequency_very_rare + has_game_rule = very_easy_difficulty + } + } + add = outbreak_decrease_mult_high + } + + #Development + if = { + limit = { + county.development_level <= 20 + } + add = { + value = county.development_level + multiply = 0.008 + } + } + else_if = { + limit = { + county.development_level <= 40 + } + add = { + value = county.development_level + multiply = 0.010 + } + } + else = { + add = { + value = county.development_level + multiply = 0.012 + } + } + + #Terrain + if = { + limit = { + OR = { + terrain = hills + terrain = forest + terrain = desert + terrain = desert_mountains + terrain = mountains + } + } + add = outbreak_decrease_mult_low + } + else_if = { + limit = { + OR = { + terrain = jungle + terrain = taiga + } + } + add = outbreak_increase_mult_low + } + + #Developed places + if = { + limit = { + has_holding_type = city_holding + } + add = outbreak_increase_mult_medium + } + else_if = { + limit = { + has_holding = yes + } + add = outbreak_increase_mult_low + } + if = { + limit = { + OR = { + has_holding_type = herder_holding + has_holding_type = nomad_holding + } + } + add = outbreak_decrease_mult_high + } + + if = { + limit = { + county.development_level < 10 + } + multiply = 0.1 + } + + multiply = 0.4 + + min = 0.001 +} + +outbreak_chance_apocalyptic_default_value = { + value = outbreak_chance_base_extra_low + + #Buildings + add = { + value = num_buildings + multiply = outbreak_increase_add_low + } + #Tradeports / Coasts + if = { + limit = { + has_building_or_higher = common_tradeport_01 + } + add = outbreak_increase_add_high + } + else_if = { + limit = { + is_coastal = yes + } + add = outbreak_increase_add_medium + } + + if = { + limit = { + OR = { + has_global_variable = is_in_tutorial + AND = { + has_global_variable = start_epidemic_grace + OR = { + county.holder = { is_ai = no } + county.holder = { + any_liege_or_above = { is_ai = no } + } + } + } + } + } + multiply = 0 + } +} + +outbreak_chance_apocalyptic_mult_value = { + value = 0.2 + + # Game rules + if = { + limit = { + has_game_rule = epidemic_frequency_often + } + add = outbreak_increase_mult_low + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_very_often + } + add = outbreak_increase_mult_medium + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_doomsday + } + add = outbreak_increase_mult_high + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_rare + } + add = outbreak_decrease_mult_medium + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_very_rare + } + add = outbreak_decrease_mult_high + } + + #Development + if = { + limit = { + county.development_level <= 20 + } + add = { + value = county.development_level + multiply = 0.008 + } + } + else_if = { + limit = { + county.development_level <= 40 + } + add = { + value = county.development_level + multiply = 0.010 + } + } + else = { + add = { + value = county.development_level + multiply = 0.012 + } + } + + #Terrain + if = { + limit = { + OR = { + terrain = hills + terrain = forest + terrain = desert + terrain = desert_mountains + terrain = mountains + } + } + add = outbreak_decrease_mult_low + } + else_if = { + limit = { + OR = { + terrain = jungle + terrain = taiga + } + } + add = outbreak_increase_mult_low + } + + #Developed places + if = { + limit = { + has_holding_type = city_holding + } + add = outbreak_increase_mult_medium + } + else_if = { + limit = { + has_holding = yes + } + add = outbreak_increase_mult_low + } + + + multiply = 0.4 + + min = 0.0005 +} + + +outbreak_chance_dysentery_default_value = { + + value = outbreak_chance_base_low #Shouldn't happen unless there's an army present + if = { + limit = { + any_army_in_location ?= { + OR = { + is_army_in_combat = yes + is_army_in_raid = yes + } + } + } + add = outbreak_increase_add_extra_high + } + if = { + limit = { + any_army_in_location ?= { + count >= 1 + } + } + add = outbreak_increase_add_very_high + + } + if = { + limit = { + any_army_in_location ?= { + is_army_in_siege = yes + } + } + add = outbreak_increase_add_extra_high + if = { + limit = { + fort_level >= 12 + } + add = outbreak_increase_add_very_high + add = outbreak_increase_add_high + add = outbreak_increase_add_high + add = outbreak_increase_add_medium + add = outbreak_increase_add_low + } + else_if = { + limit = { + fort_level >= 10 + } + add = outbreak_increase_add_high + add = outbreak_increase_add_high + add = outbreak_increase_add_medium + add = outbreak_increase_add_low + } + else_if = { + limit = { + fort_level >= 8 + } + add = outbreak_increase_add_high + add = outbreak_increase_add_medium + add = outbreak_increase_add_low + } + else_if = { + limit = { + fort_level >= 4 + } + add = outbreak_increase_add_medium + add = outbreak_increase_add_low + } + else_if = { + limit = { + fort_level > 2 + } + add = outbreak_increase_add_low + } + } + + if = { + limit = { + OR = { + has_global_variable = is_in_tutorial + AND = { + has_global_variable = start_epidemic_grace + OR = { + county.holder = { is_ai = no } + county.holder = { + any_liege_or_above = { is_ai = no } + } + } + } + } + } + multiply = 0 + } +} + +outbreak_chance_dysentery_mult_value = { + value = 1 + # Game rules + if = { + limit = { + has_game_rule = epidemic_frequency_often + } + add = outbreak_increase_mult_low + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_very_often + } + add = outbreak_increase_mult_medium + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_doomsday + } + add = outbreak_increase_mult_high + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_rare + } + add = outbreak_decrease_mult_medium + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_very_rare + } + add = outbreak_decrease_mult_high + } + + #Terrain + if = { + limit = { + OR = { + terrain = hills + terrain = forest + terrain = desert + terrain = desert_mountains + terrain = mountains + } + } + add = outbreak_decrease_mult_low + } + else_if = { + limit = { + OR = { + terrain = jungle + terrain = taiga + } + } + add = outbreak_increase_mult_low + } + + #Developed places + if = { + limit = { + has_holding_type = city_holding + } + add = outbreak_increase_mult_medium + } + else_if = { + limit = { + has_holding = yes + } + add = outbreak_increase_mult_low + } + + if = { + limit = { + county.development_level < 10 + } + multiply = 0.1 + } + + multiply = 0.4 + + min = 0.001 +} + +outbreak_chance_black_plague_default_value = { + value = outbreak_chance_base_extra_low + + #Buildings + if = { + limit = { + num_buildings >= 20 + } + add = { + value = num_buildings + multiply = outbreak_increase_add_medium + } + } + + #Tradeports / Coasts + if = { + limit = { + has_building_or_higher = common_tradeport_01 + } + add = outbreak_increase_add_high + } + else_if = { + limit = { + is_coastal = yes + } + add = outbreak_increase_add_medium + } + + # Random Black Death game rule, set in the 5y playable pulse + if = { + limit = { + has_global_variable = random_black_plague_var + } + add = 1000 + } + + if = { + limit = { + has_game_rule = epidemic_frequency_disabled + } + multiply = 0 + } + + if = { + limit = { + OR = { + has_global_variable = is_in_tutorial + AND = { + has_global_variable = start_epidemic_grace + OR = { + county.holder = { is_ai = no } + county.holder = { + any_liege_or_above = { is_ai = no } + } + } + } + } + } + multiply = 0 + } +} + +outbreak_chance_black_plague_mult_value = { + value = 1 + #Development + add = { + value = county.development_level + multiply = 0.08 + } + + # Game rules + if = { + limit = { + has_game_rule = epidemic_frequency_often + } + add = outbreak_increase_mult_low + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_very_often + } + add = outbreak_increase_mult_medium + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_doomsday + } + add = outbreak_increase_mult_high + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_rare + } + add = outbreak_decrease_mult_medium + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_very_rare + } + add = outbreak_decrease_mult_high + } + + + #Terrain + if = { + limit = { + OR = { + terrain = hills + terrain = forest + terrain = desert + terrain = desert_mountains + terrain = mountains + } + } + add = outbreak_decrease_mult_low + } + else_if = { + limit = { + OR = { + terrain = jungle + terrain = taiga + } + } + add = outbreak_increase_mult_low + } + + #Developed places + if = { + limit = { + has_holding_type = city_holding + } + add = outbreak_increase_mult_medium + } + else_if = { + limit = { + has_holding = yes + } + add = outbreak_increase_mult_low + } + + if = { + limit = { + county.development_level < 10 + } + multiply = 0.1 + } + + multiply = 0.4 + + min = 0.001 +} + +#### SPREAD CHANCE ### +#Controls the spread of the epidemic +#root = potential_province + +spread_chance_epidemics_default_value = { + if = { + limit = { + scope:epidemic = { + outbreak_intensity = apocalyptic + } + } + add = spread_chance_base_high + } + else_if = { + limit = { + scope:epidemic = { + outbreak_intensity = major + } + } + add = spread_chance_base_medium + } + else = { #minor + add = spread_chance_base_low + } + + #less patchy, add + if = { + limit = { + county = { + any_county_province_epidemic = { + this.epidemic_type = scope:epidemic.epidemic_type + } + } + } + add = spread_increase_add_high + } + + #Dysentery spreads to armies and forts + if = { + limit = { scope:epidemic.epidemic_type = epidemic_type:dysentery } + add = { + if = { + limit = { + any_army_in_location ?= { + is_army_in_siege = yes + } + } + add = spread_increase_add_high + } + if = { + limit = { + any_army_in_location ?= { + OR = { + is_army_in_combat = yes + is_army_in_raid = yes + } + } + } + add = spread_increase_add_medium + } + if = { + limit = { + any_army_in_location ?= { + count >= 1 + } + } + add = spread_increase_add_high + } + } + add = { + value = fort_level + multiply = spread_increase_mult_low + } + } + + #Buildings + add = { + value = num_buildings + multiply = spread_increase_mult_low + } + + #Tradeports + if = { + limit = { + has_building_or_higher = common_tradeport_08 + } + add = spread_increase_add_high + add = spread_increase_add_high + add = spread_increase_add_medium + add = spread_increase_add_medium + add = spread_increase_add_medium + add = spread_increase_add_low + add = spread_increase_add_low + add = spread_increase_add_low + } + else_if = { + limit = { + has_building_or_higher = common_tradeport_07 + } + add = spread_increase_add_high + add = spread_increase_add_medium + add = spread_increase_add_medium + add = spread_increase_add_medium + add = spread_increase_add_low + add = spread_increase_add_low + add = spread_increase_add_low + } + else_if = { + limit = { + has_building_or_higher = common_tradeport_06 + } + add = spread_increase_add_medium + add = spread_increase_add_medium + add = spread_increase_add_medium + add = spread_increase_add_low + add = spread_increase_add_low + add = spread_increase_add_low + } + else_if = { + limit = { + has_building_or_higher = common_tradeport_05 + } + add = spread_increase_add_medium + add = spread_increase_add_medium + add = spread_increase_add_low + add = spread_increase_add_low + add = spread_increase_add_low + } + else_if = { + limit = { + has_building_or_higher = common_tradeport_04 + } + add = spread_increase_add_medium + add = spread_increase_add_low + add = spread_increase_add_low + add = spread_increase_add_low + } + else_if = { + limit = { + has_building_or_higher = common_tradeport_03 + } + add = spread_increase_add_low + add = spread_increase_add_low + add = spread_increase_add_low + } + else_if = { + limit = { + has_building_or_higher = common_tradeport_02 + } + add = spread_increase_add_low + add = spread_increase_add_low + } + else_if = { + limit = { + has_building_or_higher = common_tradeport_01 + } + add = spread_increase_add_low + } + + #Markets + if = { + limit = { + has_building_or_higher = market_villages_02 + } + add = spread_increase_add_low + add = spread_increase_add_low + } + else_if = { + limit = { + has_building_or_higher = market_villages_01 + } + add = spread_increase_add_low + } + + #Guild Halls + if = { + limit = { + has_building_or_higher = guild_halls_08 + } + add = spread_increase_add_high + add = spread_increase_add_high + add = spread_increase_add_high + add = spread_increase_add_high + } + else_if = { + limit = { + has_building_or_higher = guild_halls_06 + } + add = spread_increase_add_high + add = spread_increase_add_high + add = spread_increase_add_high + } + else_if = { + limit = { + has_building_or_higher = guild_halls_04 + } + add = spread_increase_add_high + add = spread_increase_add_high + } + else_if = { + limit = { + has_building_or_higher = guild_halls_02 + } + add = spread_increase_add_high + } + + #Terrain + if = { + limit = { + terrain = farmlands + } + add = spread_increase_add_medium + } + else_if = { + limit = { + OR = { + terrain = floodplains + terrain = wetlands + } + } + add = spread_increase_add_low + } + else_if = { + limit = { + OR = { + terrain = plains + terrain = steppe + } + } + add = spread_increase_add_low + } + else_if = { + limit = { + OR = { + terrain = hills + terrain = drylands + terrain = oasis + terrain = forest + } + } + add = spread_decrease_add_low + } + else_if = { + limit = { + OR = { + terrain = jungle + terrain = taiga + } + } + add = spread_decrease_add_medium + } + else_if = { + limit = { + OR = { + terrain = desert + terrain = desert_mountains + terrain = mountains + } + } + add = spread_decrease_add_medium + } + #Island? + if = { + limit = { + geographical_region = divergence_island_regions + } + add = spread_decrease_add_medium + } + #Cultural Traditions + if = { + limit = { + county.culture = { + OR = { + has_cultural_tradition = tradition_city_keepers + has_cultural_tradition = tradition_maritime_mercantilism + } + } + } + add = spread_increase_add_medium + } + else_if = { + limit = { + county.culture = { + OR = { + has_cultural_tradition = tradition_esteemed_hospitality + has_cultural_tradition = tradition_horse_lords + has_cultural_tradition = tradition_caravaneers + has_cultural_tradition = tradition_seafaring + } + } + } + add = spread_increase_add_low + } + else_if = { + limit = { + county.culture = { + OR = { + has_cultural_tradition = tradition_practiced_pirates + has_cultural_tradition = tradition_parochialism + } + } + } + add = spread_increase_add_low + } + if = { + limit = { + county.culture = { + has_cultural_tradition = tradition_hidden_cities + } + } + add = spread_decrease_add_high + } + else_if = { + limit = { + county.culture = { + has_cultural_parameter = less_plague_spread_culture + } + } + add = spread_decrease_add_high + } + + # Imperial Policy Japan + if = { + limit = { + AND = { + geographical_region = world_asia_japan + county.holder = { + has_realm_law = isolation_law + } + } + } + add = spread_decrease_add_medium + } + + #Reinfection shouldn't happen often + if = { + limit = { + scope:epidemic = { + is_target_in_variable_list = { + name = epidemic_cooldown + } + } + } + add = spread_decrease_add_very_high + } +} + +spread_chance_epidemics_mult_value = { + value = 1 + min = 0.001 + #Coastal Statistics Squash + if = { + limit = { + OR = { + is_coastal = yes + is_riverside_province = yes + } + NOR = { + has_building_or_higher = common_tradeport_04 + num_buildings > 4 + } + } + add = spread_decrease_mult_medium + } + + #Making sure that England gets properly rekted by the Black Plague + if = { + limit = { + has_global_variable = black_death + scope:epidemic = global_var:black_death + OR = { + is_coastal = yes + is_riverside_province = yes + } + has_building_or_higher = common_tradeport_06 + num_buildings > 10 + } + add = spread_increase_mult_high + } + + #less patchy, mult + if = { + limit = { + county = { + any_county_province_epidemic = { + this.epidemic_type = scope:epidemic.epidemic_type + } + } + } + add = spread_increase_mult_very_high + } + + #Development + add = { + value = county.development_level + multiply = 0.025 + } + + # Game rules + if = { + limit = { + has_game_rule = epidemic_frequency_doomsday + } + add = spread_increase_mult_very_high + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_very_often + } + add = spread_increase_mult_medium + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_often + } + add = spread_increase_mult_low + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_very_rare + } + add = spread_decrease_mult_medium + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_rare + } + add = spread_decrease_mult_low + } + + #Intensity mult + + if = { + limit = { + scope:epidemic = { + outbreak_intensity = apocalyptic + } + } + add = spread_increase_mult_high + } + else_if = { + limit = { + scope:epidemic = { + outbreak_intensity = major + } + } + add = spread_increase_mult_medium + } + + #Recent Epidemics + if = { + limit = { + is_target_in_variable_list = { + name = epidemic_cooldown #Average lifespan + target = scope:epidemic.epidemic_type + } + } + if = { + limit = { + has_game_rule = epidemic_frequency_often + } + add = spread_decrease_mult_high + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_very_often + } + add = spread_decrease_mult_medium + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_doomsday + } + add = spread_decrease_mult_low + } + else = { + add = spread_decrease_mult_unlikely + } + } + + #People still remember how to social distance in general + if = { + limit = { + has_variable = epidemic_cooldown_general #Average social memory + } + if = { + limit = { + has_game_rule = epidemic_frequency_very_often + } + add = spread_decrease_mult_medium + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_doomsday + } + add = spread_decrease_mult_low + } + else = { + add = spread_decrease_mult_high + } + } + + #Developed places + if = { + limit = { + has_holding = yes + } + add = spread_increase_mult_low + } + if = { + limit = { + OR = { + has_holding_type = castle_holding + has_holding_type = church_holding + } + } + add = spread_increase_mult_low + } + if = { + limit = { + has_holding_type = city_holding + } + add = spread_increase_mult_medium + } + if = { + limit = { + OR = { + has_holding_type = herder_holding + has_holding_type = nomad_holding + } + } + add = spread_decrease_mult_unlikely + } +} + +#### DAILY INFECTION RATE ### +#The velocity at which the infection rate goes up in a province + +infection_rate_change_value = { + +} + +#### CHARACTER INFECTION CHANCE ### +#Monthly chance for an epidemic to infect a character in the province + +would_follow_social_distancing_value = { + value = -1 #let's assume medieval people wouldn't by default + if = { + limit = { has_perk = wash_your_hands_perk } + add = 10 + } + if = { + limit = { has_trait = shy } + add = 1 + } + if = { + limit = { has_trait = paranoid } + add = 2 + } + if = { + limit = { has_trait = reclusive } + add = 4 + } + if = { + limit = { has_trait = shrewd } + add = 1 + } + if = { + limit = { has_trait = lifestyle_physician } + add = 4 + } + if = { + limit = { has_trait = lifestyle_herbalist } + add = 2 + } + if = { + limit = { has_trait = diligent } + add = 1 + } + if = { + limit = { has_trait = craven } + add = 1 + } + if = { + limit = { has_trait = temperate } + add = 1 + } + if = { + limit = { has_trait = arbitrary } + add = -1 + } + if = { + limit = { has_trait = brave } + add = -1 + } + if = { + limit = { has_trait = impatient } + add = -2 + } + if = { + limit = { has_trait = gregarious } + add = -4 + } + if = { + limit = { has_trait = dull } + add = -2 + } + #Would your culture be touchy?/take this seriously + if = { + limit = { culture = { has_cultural_tradition = tradition_fp2_ritualised_friendship } } + add = -1 + } + if = { + limit = { culture = { has_cultural_tradition = tradition_life_is_just_a_joke } } + add = -1 + } + if = { + limit = { culture = { has_cultural_parameter = better_disease_resistance } } + add = 20 + } +} + +character_infection_chance_default_value = { + value = 10 + #If you're already sick/weak you're screwed + if = { + limit = { + OR = { + has_trait = sickly + has_trait = inbred + health <= poor_health + } + } + add = 20 + } + #Epidemic Intensity + if = { + limit = { + scope:epidemic ?= { + outbreak_intensity = apocalyptic + epidemic_type.epidemic_trait = trait:bubonic_plague + } + } + add = 40 + } + else_if = { + limit = { + scope:epidemic ?= { + outbreak_intensity = apocalyptic + NOT = { epidemic_type.epidemic_trait = trait:bubonic_plague } + } + } + add = 30 + } + else_if = { + limit = { + scope:epidemic ?= { + outbreak_intensity = major + } + } + add = 20 + } + else = { #minor + add = 10 + } + #Let's see if you have any advantageous traits/perks / Wash your hands is included in the social distancing calculation, these are purely health related + if = { + limit = { + has_trait = athletic + } + add = -4 + } + if = { + limit = { + has_perk = iron_constitution_perk + } + add = -6 + } + if = { + limit = { + has_perk = healthy_perk + } + add = -8 + } + if = { + limit = { + has_trait = whole_of_body + } + add = -10 + } + #Things to bump the numbers + if = { + limit = { + is_foreign_court_or_pool_guest = yes + } + add = 40 + } + if = { + limit = { + is_ruler = no + } + add = 10 + } + #Children getting hit with measles + if = { + limit = { + scope:epidemic.epidemic_type.epidemic_trait = trait:measles + is_adult = no + } + add = 20 + } + #"Old" people get hit more in general + if = { + limit = { + age >= 65 + } + add = 40 + } + else_if = { + limit = { + age >= 50 + } + add = 20 + } + # Camp resistance. + # Slight buff. + if = { + limit = { + host.domicile ?= { has_domicile_parameter = camp_infection_chance_buff_1 } + } + add = -10 + } + # Max buff. + else_if = { + limit = { + host.domicile ?= { has_domicile_parameter = camp_infection_chance_buff_6 } + } + add = -40 + } + # Very high buff. + else_if = { + limit = { + host.domicile ?= { has_domicile_parameter = camp_infection_chance_buff_5 } + } + add = -30 + } + # High buff. + else_if = { + limit = { + host.domicile ?= { has_domicile_parameter = camp_infection_chance_buff_4 } + } + add = -25 + } + # Medium buff. + else_if = { + limit = { + host.domicile ?= { has_domicile_parameter = camp_infection_chance_buff_3 } + } + add = -20 + } + # Small buff. + else_if = { + limit = { + host.domicile ?= { has_domicile_parameter = camp_infection_chance_buff_2 } + } + add = -15 + } + #Would you follow social distancing? + #your numerical social distance value gets transformed here into a bonus/malus + add = { + value = would_follow_social_distancing_value + multiply = -1 #inverted value + } + #How infected is your location? + #Follows the infection rate thresholds set for the barony/county modifiers + if = { + limit = { + location = { epidemic_resistance > 80 } + } + multiply = 0.25 + } + else_if = { + limit = { + location = { epidemic_resistance > 50 } + } + multiply = 0.5 + } + else_if = { + limit = { + location = { epidemic_resistance > 10 } + } + multiply = 0.75 + } + #Are you taking proper measures? + if = { + limit = { + has_character_modifier = isolating_modifier + } + multiply = 0.25 #75% less likely + } + if = { + limit = { + has_character_modifier = hiding_from_epidemic + } + multiply = 0.25 #75% less likely + } + min = 1 # Never totally immune +} + +#How contagious is this character? +character_contagious_value = { + add = { #would they follow social distancing? + value = would_follow_social_distancing_value + multiply = -1 #inverted + } + if = { + limit = { + has_trait = wheezing + } + add = 4 + } +} + +recent_epidemics_outbreak_mult_value = { + value = 1 + #Recently recovered from this epidemic + if = { + limit = { + is_target_in_variable_list = { + name = epidemic_cooldown #Average lifespan + target = scope:epidemic_type + } + } + if = { + limit = { + has_game_rule = epidemic_frequency_very_often + } + value = outbreak_decrease_mult_high + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_doomsday + } + value = outbreak_decrease_mult_medium + } + else = { + value = outbreak_decrease_mult_unlikely + } + + } + + #People still remember how to social distance in general + else_if = { + limit = { + has_variable = epidemic_cooldown_general #Average social memory + } + if = { + limit = { + has_game_rule = epidemic_frequency_very_often + } + value = outbreak_decrease_mult_medium + } + else_if = { + limit = { + has_game_rule = epidemic_frequency_doomsday + } + value = outbreak_decrease_mult_low + } + else = { + value = outbreak_decrease_mult_high + } + } + min = 0 +} + +#How badly effected is a county's development? +epidemic_development_loss_value = { + subtract = scope:base_loss + + #This feeds into the change_development_progress in 00_epidemics + #Bear in mind that minimal_development_progress_loss is 10 + #and massive_development_progress_loss is 100 + #Aim for something between those two extremes generally (in minus) + + #Since we have widespread development loss handled by modifier, we + #now use this figure to 'chunk' down places with very high development + #so they are disproportionately affected + + scope:epidemic = { + switch = { + trigger = outbreak_intensity + minor = { subtract = 2.5 } + major = { subtract = 5 } + apocalyptic = { subtract = 7.5 } + } + } + + # Development + subtract = { + value = development_level + multiply = 0.3 + } + + multiply = { + value = 6 + divide = num_county_holdings + } + + multiply = { + value = 100 + subtract = title_province.epidemic_resistance + multiply = 0.005 + add = 1 + } +} + +#How badly effected is a county's fertility? +epidemic_fertility_loss_value = { + subtract = scope:base_loss + + scope:epidemic = { + switch = { + trigger = outbreak_intensity + minor = { subtract = 2.5 } + major = { subtract = 5 } + apocalyptic = { subtract = 7.5 } + } + } + + # Fertility + subtract = { + value = county_fertility + multiply = 0.3 + } + + multiply = { + value = 6 + divide = num_county_holdings + } + + multiply = { + value = 50 + subtract = title_province.epidemic_resistance + multiply = 0.005 + add = 1 + } +} + +epidemic_fromdust_value = { + value = minor_gold_value + multiply = former_infected_county_count +} + +former_infected_county_count = { + value = 1 + every_in_list = { + variable = formerly_infected_counties + add = 0.1 + } +} diff --git a/common/script_values/99_court_chaplain_values.txt b/common/script_values/99_court_chaplain_values.txt index c349c80e9..518b6ab5e 100644 --- a/common/script_values/99_court_chaplain_values.txt +++ b/common/script_values/99_court_chaplain_values.txt @@ -942,34 +942,34 @@ court_chaplain_conversion_contextual_bonuses = { } #Conversion bonuses from certain Holy Sites. - if = { - limit = { - scope:councillor.faith = { - controls_holy_site_with_parameter = jerusalem_conversion_bonus - } - title:b_jerusalem = { - is_holy_site_of = scope:councillor.faith - } - } - add = { - value = scope:councillor.conversion_holy_site_jerusalem - desc = COURT_CHAPLAIN_CONVERSION_HOLY_SITE_JERUSALEM - } - } - if = { - limit = { - scope:councillor.faith = { - controls_holy_site_with_parameter = kerala_conversion_bonus - } - title:b_mahoyadapuram = { - is_holy_site_of = scope:councillor.faith - } - } - add = { - value = scope:councillor.conversion_holy_site_kerala - desc = COURT_CHAPLAIN_CONVERSION_HOLY_SITE_KERALA - } - } + #if = { + # limit = { + # scope:councillor.faith = { + # controls_holy_site_with_parameter = jerusalem_conversion_bonus + # } + # title:b_jerusalem = { + # is_holy_site_of = scope:councillor.faith + # } + # } + # add = { + # value = scope:councillor.conversion_holy_site_jerusalem + # desc = COURT_CHAPLAIN_CONVERSION_HOLY_SITE_JERUSALEM + # } + #} + #if = { + # limit = { + # scope:councillor.faith = { + # controls_holy_site_with_parameter = kerala_conversion_bonus + # } + # title:b_mahoyadapuram = { + # is_holy_site_of = scope:councillor.faith + # } + # } + # add = { + # value = scope:councillor.conversion_holy_site_kerala + # desc = COURT_CHAPLAIN_CONVERSION_HOLY_SITE_KERALA + # } + #} if = { limit = { exists = scope:county @@ -988,21 +988,21 @@ court_chaplain_conversion_contextual_bonuses = { desc = COURT_CHAPLAIN_CONVERSION_HOLY_SITE_IONA } } - if = { - limit = { - exists = scope:county - scope:county.faith = { - controls_holy_site_with_parameter = wadi_el_milk_conversion_resistance_bonus - } - title:b_wadi_el-milk = { - is_holy_site_of = scope:councillor.faith - } - } - add = { - value = scope:councillor.conversion_holy_site_wadi_el_milk - desc = COURT_CHAPLAIN_CONVERSION_HOLY_SITE_WADI_EL_MILK - } - } + #if = { + # limit = { + # exists = scope:county + # scope:county.faith = { + # controls_holy_site_with_parameter = wadi_el_milk_conversion_resistance_bonus + # } + # title:b_wadi_el-milk = { + # is_holy_site_of = scope:councillor.faith + # } + # } + # add = { + # value = scope:councillor.conversion_holy_site_wadi_el_milk + # desc = COURT_CHAPLAIN_CONVERSION_HOLY_SITE_WADI_EL_MILK + # } + #} if = { limit = { scope:councillor.faith = { diff --git a/common/scripted_triggers/00_councillor_triggers.txt b/common/scripted_triggers/00_councillor_triggers.txt index f8ff98028..9b3203e7b 100644 --- a/common/scripted_triggers/00_councillor_triggers.txt +++ b/common/scripted_triggers/00_councillor_triggers.txt @@ -1229,34 +1229,6 @@ task_conversion_valid_county_trigger = { } } } - # Ash'ari in Spain tend to not convert Muwhalladi often - trigger_if = { - limit = { - scope:councillor_liege = { - faith = faith:sunni - capital_province ?= { geographical_region = world_europe_west_iberia } - scope:county_check.rite = rite:maliki - } - scope:county_check = { - title_province = { geographical_region = world_europe_west_iberia } - } - } - OR = { - scope:councillor_liege = { - has_character_flag = vassal_directive_convert_faith - vassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege } - } - scope:councillor_liege = { ai_zeal >= 50 } - scope:county_check = { county_opinion <= -20 } - scope:county_check = { # Always convert holy sites - any_county_province = { - barony = { - is_holy_site_of = scope:councillor_liege.faith - } - } - } - } - } # If a ruler has Jizya tax, they'll only convert the same *religious family* when ai_zeal is really high, they're converting unreformed pagans, counties in a kingdom with a Holy Site, or others of the same religion trigger_if = { limit = {