diff --git a/common/activities/activity_types/coronation.txt b/common/activities/activity_types/coronation.txt index a80683b13..6b9fcac59 100644 --- a/common/activities/activity_types/coronation.txt +++ b/common/activities/activity_types/coronation.txt @@ -3874,7 +3874,7 @@ scope:host = { OR = { # religion = religion:tengrism_religion - religion = religion:mediterranean_religion +# religion = religion:mediterranean_religion # religion = religion:siberian_religion # religion = religion:kamuyism_religion AND = { diff --git a/common/buildings/00_castle_buildings.txt b/common/buildings/00_castle_buildings.txt index 3dfe2f2d1..4afc59145 100644 --- a/common/buildings/00_castle_buildings.txt +++ b/common/buildings/00_castle_buildings.txt @@ -412,7 +412,7 @@ castle_01 = { } can_construct = { - culture = { + culture ?= { has_innovation = innovation_motte } japan_castle_construction_trigger = yes @@ -571,7 +571,7 @@ castle_01 = { } modifier = { factor = 5 - scope:holder.culture = { has_cultural_parameter = ai_more_likely_to_castle } + scope:holder.culture ?= { has_cultural_parameter = ai_more_likely_to_castle } } } } @@ -954,10 +954,14 @@ castle_02 = { building_requirement_tribal = no } can_construct = { - culture = { - has_innovation = innovation_battlements + trigger_if = { + limit = { exists = culture } + culture ?= { has_innovation = innovation_battlements } + japan_castle_construction_trigger = yes + } + trigger_else = { + always = no } - japan_castle_construction_trigger = yes } cost_gold = main_building_tier_2_cost @@ -1052,11 +1056,11 @@ castle_02 = { ai_general_building_modifier = yes modifier = { add = 1 - scope:holder.culture = { has_cultural_parameter = ai_more_likely_to_castle } + scope:holder.culture ?= { has_cultural_parameter = ai_more_likely_to_castle } } modifier = { add = 10 - scope:holder.culture = { has_cultural_era_or_later = culture_era_high_medieval } + scope:holder.culture ?= { has_cultural_era_or_later = culture_era_high_medieval } } modifier = { factor = 3 @@ -1463,7 +1467,7 @@ castle_03 = { building_requirement_tribal = no } can_construct = { - culture = { + culture ?= { has_innovation = innovation_hoardings } japan_castle_construction_trigger = yes @@ -1563,11 +1567,11 @@ castle_03 = { ai_general_building_modifier = yes modifier = { add = 1 - scope:holder.culture = { has_cultural_parameter = ai_more_likely_to_castle } + scope:holder.culture ?= { has_cultural_parameter = ai_more_likely_to_castle } } modifier = { add = 10 - scope:holder.culture = { has_cultural_era_or_later = culture_era_late_medieval } + scope:holder.culture ?= { has_cultural_era_or_later = culture_era_late_medieval } } modifier = { factor = 3 @@ -1964,7 +1968,7 @@ castle_04 = { building_requirement_tribal = no } can_construct = { - culture = { + culture ?= { has_innovation = innovation_machicolations } japan_castle_construction_trigger = yes @@ -2063,7 +2067,7 @@ castle_04 = { ai_general_building_modifier = yes modifier = { add = 1 - scope:holder.culture = { has_cultural_parameter = ai_more_likely_to_castle } + scope:holder.culture ?= { has_cultural_parameter = ai_more_likely_to_castle } } modifier = { factor = 3 diff --git a/common/buildings/00_city_buildings.txt b/common/buildings/00_city_buildings.txt index 0245aa40e..2a11cd323 100644 --- a/common/buildings/00_city_buildings.txt +++ b/common/buildings/00_city_buildings.txt @@ -457,7 +457,7 @@ city_01 = { } can_construct = { - culture = { + culture ?= { has_innovation = innovation_city_planning } } @@ -601,7 +601,7 @@ city_01 = { } modifier = { factor = 5 - scope:holder.culture = { has_cultural_parameter = ai_more_likely_to_city } + scope:holder.culture ?= { has_cultural_parameter = ai_more_likely_to_city } } } } @@ -1052,22 +1052,22 @@ city_02 = { } can_construct = { trigger_if = { - limit = { - NOT = { - culture = { - has_cultural_parameter = next_level_cities + limit = { exists = culture } + trigger_if = { + limit = { + NOT = { + culture ?= { has_cultural_parameter = next_level_cities } } } + culture ?= { has_innovation = innovation_manorialism } } - culture = { - has_innovation = innovation_manorialism + trigger_else = { + culture ?= { has_cultural_parameter = next_level_cities } } } trigger_else = { - culture = { - has_cultural_parameter = next_level_cities - } - } + always = no + } } cost_gold = main_building_tier_2_cost @@ -1159,7 +1159,7 @@ city_02 = { base = 6 modifier = { add = 1 - scope:holder.culture = { has_cultural_parameter = ai_more_likely_to_city } + scope:holder.culture ?= { has_cultural_parameter = ai_more_likely_to_city } } modifier = { factor = 2 @@ -1612,20 +1612,20 @@ city_03 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_cities } } } - culture = { + culture ?= { has_innovation = innovation_windmills } } trigger_else = { - culture = { + culture ?= { has_cultural_parameter = next_level_cities } - culture = { + culture ?= { has_innovation = innovation_manorialism } } @@ -1721,7 +1721,7 @@ city_03 = { base = 5 modifier = { add = 1 - scope:holder.culture = { has_cultural_parameter = ai_more_likely_to_city } + scope:holder.culture ?= { has_cultural_parameter = ai_more_likely_to_city } } modifier = { factor = 2 @@ -2166,20 +2166,20 @@ city_04 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_cities } } } - culture = { + culture ?= { has_innovation = innovation_cranes } } trigger_else = { - culture = { + culture ?= { has_cultural_parameter = next_level_cities } - culture = { + culture ?= { has_innovation = innovation_windmills } } @@ -2273,7 +2273,7 @@ city_04 = { base = 4 modifier = { add = 1 - scope:holder.culture = { has_cultural_parameter = ai_more_likely_to_city } + scope:holder.culture ?= { has_cultural_parameter = ai_more_likely_to_city } } modifier = { factor = 2 @@ -2348,7 +2348,7 @@ guild_halls_02 = { can_construct_showing_failures_only = { building_requirement_tribal = no - culture = { + culture ?= { trigger_if = { limit = { NOT = { has_cultural_parameter = next_level_guild_halls } @@ -2400,21 +2400,21 @@ guild_halls_03 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_guild_halls } } } - culture = { + culture ?= { has_innovation = innovation_manorialism } has_building_or_higher = city_02 } trigger_else = { - culture = { + culture ?= { has_innovation = innovation_crop_rotation } - culture = { + culture ?= { has_cultural_parameter = next_level_guild_halls } has_building_or_higher = city_01 @@ -2468,22 +2468,22 @@ guild_halls_04 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_guild_halls } } } - culture = { + culture ?= { has_innovation = innovation_manorialism } has_building_or_higher = city_02 } trigger_else = { - culture = { + culture ?= { has_innovation = innovation_crop_rotation } - culture = { + culture ?= { has_cultural_parameter = next_level_guild_halls } has_building_or_higher = city_01 @@ -2537,21 +2537,21 @@ guild_halls_05 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_guild_halls } } } - culture = { + culture ?= { has_innovation = innovation_guilds } has_building_or_higher = city_03 } trigger_else = { - culture = { + culture ?= { has_innovation = innovation_manorialism } - culture = { + culture ?= { has_cultural_parameter = next_level_guild_halls } has_building_or_higher = city_02 @@ -2605,21 +2605,21 @@ guild_halls_06 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_guild_halls } } } - culture = { + culture ?= { has_innovation = innovation_guilds } has_building_or_higher = city_03 } trigger_else = { - culture = { + culture ?= { has_innovation = innovation_manorialism } - culture = { + culture ?= { has_cultural_parameter = next_level_guild_halls } has_building_or_higher = city_02 @@ -2673,21 +2673,21 @@ guild_halls_07 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_guild_halls } } } - culture = { + culture ?= { has_innovation = innovation_cranes } has_building_or_higher = city_04 } trigger_else = { - culture = { + culture ?= { has_innovation = innovation_guilds } - culture = { + culture ?= { has_cultural_parameter = next_level_guild_halls } has_building_or_higher = city_03 @@ -2741,21 +2741,21 @@ guild_halls_08 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_guild_halls } } } - culture = { + culture ?= { has_innovation = innovation_cranes } has_building_or_higher = city_04 } trigger_else = { - culture = { + culture ?= { has_innovation = innovation_guilds } - culture = { + culture ?= { has_cultural_parameter = next_level_guild_halls } has_building_or_higher = city_03 diff --git a/common/buildings/00_monotown_buildings.txt b/common/buildings/00_monotown_buildings.txt index 705a3883d..607358860 100644 --- a/common/buildings/00_monotown_buildings.txt +++ b/common/buildings/00_monotown_buildings.txt @@ -382,7 +382,7 @@ monotown_01 = { } can_construct = { - culture = { + culture ?= { has_innovation = innovation_city_planning } government_has_flag = government_is_urepublic @@ -505,7 +505,7 @@ monotown_01 = { } modifier = { factor = 5 - scope:holder.culture = { has_cultural_parameter = ai_more_likely_to_city } + scope:holder.culture ?= { has_cultural_parameter = ai_more_likely_to_city } } } } @@ -884,17 +884,17 @@ monotown_02 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_cities } } } - culture = { + culture ?= { has_innovation = innovation_manorialism } } trigger_else = { - culture = { + culture ?= { has_cultural_parameter = next_level_cities } } @@ -968,7 +968,7 @@ monotown_02 = { base = 6 modifier = { add = 1 - scope:holder.culture = { has_cultural_parameter = ai_more_likely_to_city } + scope:holder.culture ?= { has_cultural_parameter = ai_more_likely_to_city } } modifier = { factor = 2 @@ -1359,20 +1359,20 @@ monotown_03 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_cities } } } - culture = { + culture ?= { has_innovation = innovation_windmills } } trigger_else = { - culture = { + culture ?= { has_cultural_parameter = next_level_cities } - culture = { + culture ?= { has_innovation = innovation_manorialism } } @@ -1453,7 +1453,7 @@ monotown_03 = { base = 5 modifier = { add = 1 - scope:holder.culture = { has_cultural_parameter = ai_more_likely_to_city } + scope:holder.culture ?= { has_cultural_parameter = ai_more_likely_to_city } } modifier = { factor = 2 @@ -1837,20 +1837,20 @@ monotown_04 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_cities } } } - culture = { + culture ?= { has_innovation = innovation_cranes } } trigger_else = { - culture = { + culture ?= { has_cultural_parameter = next_level_cities } - culture = { + culture ?= { has_innovation = innovation_windmills } } @@ -1924,7 +1924,7 @@ monotown_04 = { base = 4 modifier = { add = 1 - scope:holder.culture = { has_cultural_parameter = ai_more_likely_to_city } + scope:holder.culture ?= { has_cultural_parameter = ai_more_likely_to_city } } modifier = { factor = 2 diff --git a/common/buildings/00_special_buildings.txt b/common/buildings/00_special_buildings.txt index f335b5270..68f770aa0 100644 --- a/common/buildings/00_special_buildings.txt +++ b/common/buildings/00_special_buildings.txt @@ -57,7 +57,7 @@ holy_site_cathedral_01 = { } } scope:holder = { - culture = { + culture ?= { has_innovation = innovation_crop_rotation } } @@ -137,7 +137,7 @@ holy_site_mosque_01 = { } } scope:holder = { - culture = { + culture ?= { has_innovation = innovation_crop_rotation } } @@ -223,7 +223,7 @@ holy_site_fire_temple_01 = { } } scope:holder = { - culture = { + culture ?= { has_innovation = innovation_crop_rotation } } @@ -308,7 +308,7 @@ holy_site_pagan_grand_temple_01 = { } } scope:holder = { - culture = { + culture ?= { has_innovation = innovation_crop_rotation } } @@ -396,7 +396,7 @@ holy_site_indian_grand_temple_01 = { } } scope:holder = { - culture = { + culture ?= { has_innovation = innovation_crop_rotation } } @@ -497,7 +497,7 @@ holy_site_buddhist_grand_temple_01 = { } } scope:holder = { - culture = { + culture ?= { has_innovation = innovation_crop_rotation } } @@ -580,7 +580,7 @@ holy_site_japanese_temple_01 = { } } scope:holder = { - culture = { + culture ?= { has_innovation = innovation_crop_rotation } } @@ -663,7 +663,7 @@ holy_site_chinese_temple_01 = { } } scope:holder = { - culture = { + culture ?= { has_innovation = innovation_crop_rotation } } @@ -746,7 +746,7 @@ holy_site_se_asia_pagan_temple_01 = { } } scope:holder = { - culture = { + culture ?= { has_innovation = innovation_crop_rotation } } @@ -829,7 +829,7 @@ holy_site_other_grand_temple_01 = { } } scope:holder = { - culture = { + culture ?= { has_innovation = innovation_crop_rotation } } @@ -1405,7 +1405,7 @@ holy_site_cologne_cathedral_01 = { } } scope:holder = { - culture = { + culture ?= { has_innovation = innovation_crop_rotation } } @@ -1504,7 +1504,7 @@ holy_site_canterbury_cathedral_01 = { } } scope:holder = { - culture = { + culture ?= { has_innovation = innovation_crop_rotation } } @@ -1600,7 +1600,7 @@ holy_site_canterbury_cathedral_02 = { } } scope:holder = { - culture = { + culture ?= { has_innovation = innovation_crop_rotation } } @@ -1696,7 +1696,7 @@ holy_site_canterbury_cathedral_03 = { } } scope:holder = { - culture = { + culture ?= { has_innovation = innovation_crop_rotation } } @@ -1917,7 +1917,7 @@ visby_ringmur_01 = { } can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_battlements } } @@ -2464,7 +2464,7 @@ alhambra_02 = { } can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } @@ -2557,7 +2557,7 @@ citadel_of_aleppo_02 = { } can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } @@ -2668,7 +2668,7 @@ the_tower_of_london_01 = { } can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_battlements } } @@ -2699,7 +2699,7 @@ the_tower_of_london_01 = { modifier = { factor = 5 scope:holder = { - culture = { + culture ?= { has_cultural_parameter = ai_more_likely_to_castle } } @@ -2730,7 +2730,7 @@ london_bridge_01 = { } can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_development_03 } } @@ -2793,7 +2793,7 @@ notre_dame_01 = { can_construct = { christianity_or_syncretic_with_christianity_trigger = { CHARACTER = scope:holder } scope:holder = { - culture = { + culture ?= { has_innovation = innovation_windmills } } @@ -2871,7 +2871,7 @@ brihadeeswarar_temple_01 = { can_construct = { scope:holder = { - culture = { + culture ?= { has_innovation = innovation_manorialism } } @@ -4183,7 +4183,7 @@ hotin_fort_02 = { } can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } @@ -4232,7 +4232,7 @@ golden_gate_of_kiev_01 = { } can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_battlements } } @@ -4288,7 +4288,7 @@ heddal_stave_church_01 = { } can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_city_planning } } @@ -4353,7 +4353,7 @@ temple_of_uppsala_01 = { } } scope:holder = { - culture = { + culture ?= { has_innovation = innovation_city_planning } } @@ -4439,7 +4439,7 @@ temple_of_uppsala_02 = { } } scope:holder = { - culture = { + culture ?= { has_innovation = innovation_manorialism } } @@ -4519,7 +4519,7 @@ lund_cathedral_01 = { } } scope:holder = { - culture = { + culture ?= { has_innovation = innovation_crop_rotation } } @@ -4719,7 +4719,7 @@ aljaferia_palace_01 = { type_icon = "aljaferia.dds" can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } @@ -4864,7 +4864,7 @@ alcazar_of_segovia_01 = { type_icon = "alcazar_segovia.dds" can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } @@ -5080,7 +5080,7 @@ soltaniyeh_01 = { can_construct = { scope:holder = { - culture = { + culture ?= { has_innovation = innovation_development_03 } } @@ -5242,7 +5242,7 @@ falak_ol_aflak_citadel_01 = { type_icon = "icon_structure_falak_ol_aflak_citadel.dds" can_construct_showing_failures_only = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } @@ -5353,7 +5353,7 @@ great_wall_of_gorgan_01 = { type_icon = "icon_structure_great_wall_of_gorgan.dds" can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } @@ -5442,7 +5442,7 @@ rainbow_mountains_01 = { type_icon = "icon_structure_ala_daghlar_mountains.dds" can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } @@ -5489,7 +5489,7 @@ mount_damavand_01 = { type_icon = "icon_structure_mount_damavand.dds" can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } @@ -5545,7 +5545,7 @@ tomb_of_cyrus_01 = { type_icon = "icon_structure_tomb_of_cyrus.dds" can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } @@ -5596,7 +5596,7 @@ ark_of_bukhara_01 = { type_icon = "icon_structure_ark_of_bukhara.dds" can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } @@ -5646,7 +5646,7 @@ shah_i_zinda_01 = { type_icon = "icon_structure_shah_i_zindah.dds" can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_development_01 } } @@ -5691,7 +5691,7 @@ shah_i_zinda_02 = { type_icon = "icon_structure_ruins_of_ctesiphon.dds" can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } @@ -6132,7 +6132,7 @@ kassiopi_castle = { can_construct = { scope:holder = { - culture = { + culture ?= { has_innovation = innovation_battlements } } @@ -6486,7 +6486,7 @@ despot_palace = { } can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_primogeniture has_cultural_pillar = heritage_byzantine } @@ -6594,7 +6594,7 @@ meteora_02 = { cost_gold = 1000 can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -6767,7 +6767,7 @@ mount_athos_03 = { cost_gold = 1000 can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -9504,7 +9504,7 @@ mount_fuji_01 = { text = holy_site_building_trigger barony = { is_holy_site_of = scope:holder.faith } } - scope:holder.faith = { has_doctrine = special_doctrine_immaterial_harmony } + scope:holder.faith ?= { has_doctrine = special_doctrine_immaterial_harmony } } } } @@ -9560,7 +9560,7 @@ itsukushima_jinja_01 = { text = holy_site_building_trigger barony = { is_holy_site_of = scope:holder.faith } } - scope:holder.faith = { has_doctrine = special_doctrine_immaterial_harmony } + scope:holder.faith ?= { has_doctrine = special_doctrine_immaterial_harmony } } } } @@ -9625,7 +9625,7 @@ itsukushima_jinja_02 = { text = holy_site_building_trigger barony = { is_holy_site_of = scope:holder.faith } } - scope:holder.faith = { has_doctrine = special_doctrine_immaterial_harmony } + scope:holder.faith ?= { has_doctrine = special_doctrine_immaterial_harmony } } } } @@ -11182,7 +11182,7 @@ trosky_castle_01 = { } can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_battlements } } diff --git a/common/buildings/00_standard_economy_buildings.txt b/common/buildings/00_standard_economy_buildings.txt index b06cf4f9b..26e4f7645 100644 --- a/common/buildings/00_standard_economy_buildings.txt +++ b/common/buildings/00_standard_economy_buildings.txt @@ -34,13 +34,19 @@ caravanserai_01 = { can_construct_showing_failures_only = { building_requirement_tribal = no - scope:holder.culture = { - has_innovation = innovation_guilds + exists = scope:holder.culture + trigger_if = { + limit = { exists = scope:holder.culture } + scope:holder.culture ?= { has_innovation = innovation_guilds } } trigger_if = { limit = { - culture = { has_cultural_parameter = second_caravanserai } + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_parameter = second_caravanserai } + } } custom_tooltip = { text = has_two_caravanserai_in_county @@ -68,9 +74,11 @@ caravanserai_01 = { is_enabled = { trigger_if = { limit = { + exists = culture NOT = { - culture = { - has_cultural_parameter = watermills_windmills_cities + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_parameter = watermills_windmills_cities } } } } @@ -90,7 +98,11 @@ caravanserai_01 = { } trigger_if = { limit = { - culture = { has_cultural_parameter = second_caravanserai } + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_parameter = second_caravanserai } + } } county = { any_county_province = { @@ -115,8 +127,10 @@ caravanserai_01 = { limit = { has_holding_type = city_holding is_county_capital = no - culture = { - has_cultural_parameter = watermills_windmills_cities + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_parameter = watermills_windmills_cities } } } has_building_or_higher = city_01 @@ -197,7 +211,7 @@ caravanserai_02 = { } can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -250,7 +264,7 @@ caravanserai_03 = { } can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -301,7 +315,7 @@ caravanserai_04 = { } can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -352,7 +366,7 @@ caravanserai_05 = { } can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -403,7 +417,7 @@ caravanserai_06 = { } can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -455,7 +469,7 @@ caravanserai_07 = { } can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -507,7 +521,7 @@ caravanserai_08 = { } can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -559,8 +573,10 @@ watermills_01 = { building_watermills_requirement_terrain = yes AND = { has_building_or_higher = logging_camps_04 - culture = { - has_cultural_parameter = watermills_forestries_unlock + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_parameter = watermills_forestries_unlock } } } } @@ -573,9 +589,11 @@ watermills_01 = { is_enabled = { trigger_if = { limit = { + exists = culture NOT = { - culture = { - has_cultural_parameter = watermills_windmills_cities + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_parameter = watermills_windmills_cities } } } } @@ -601,7 +619,7 @@ watermills_01 = { limit = { has_holding_type = city_holding is_county_capital = no - culture = { + culture ?= { has_cultural_parameter = watermills_windmills_cities } } @@ -615,19 +633,21 @@ watermills_01 = { is_county_capital = yes } OR = { - culture = { # Standard unlock from innovation (High medieval) - has_innovation = innovation_windmills - } - culture = { # Unlock from culture trad early but still need the previous Civic economic building inovation (Early medieval) - has_cultural_parameter = next_level_w_mills - has_innovation = innovation_manorialism - } - AND = { # Unlock from Cultural Tradition - has_building_or_higher = logging_camps_04 - culture = { - has_cultural_parameter = watermills_forestries_unlock + trigger_if = { + limit = { exists = culture } + OR = { + culture ?= { has_innovation = innovation_windmills } + culture ?= { + has_cultural_parameter = next_level_w_mills + has_innovation = innovation_manorialism + } + AND = { + has_building_or_higher = logging_camps_04 + culture ?= { has_cultural_parameter = watermills_forestries_unlock } + } } } + trigger_else = { always = no } } } @@ -682,8 +702,10 @@ watermills_02 = { building_watermills_requirement_terrain = yes AND = { has_building_or_higher = logging_camps_04 - culture = { - has_cultural_parameter = watermills_forestries_unlock + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_parameter = watermills_forestries_unlock } } } } @@ -698,30 +720,30 @@ watermills_02 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = next_level_w_mills } - culture = { + culture ?= { has_cultural_parameter = watermills_forestries_unlock } } } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_windmills } } trigger_else = { OR = { - culture = { # Standard unlock from innovation (High medieval) + culture ?= { # Standard unlock from innovation (High medieval) has_innovation = innovation_windmills } - culture = { # Unlock from culture trad early but still need the previous Civic economic building inovation (Early medieval) + culture ?= { # Unlock from culture trad early but still need the previous Civic economic building inovation (Early medieval) has_cultural_parameter = next_level_w_mills has_innovation = innovation_manorialism } AND = { # Unlock from Cultural Tradition has_building_or_higher = logging_camps_04 - culture = { + culture ?= { has_cultural_parameter = watermills_forestries_unlock } } @@ -772,7 +794,7 @@ watermills_03 = { building_watermills_requirement_terrain = yes AND = { has_building_or_higher = logging_camps_04 - culture = { + culture ?= { has_cultural_parameter = watermills_forestries_unlock } } @@ -782,31 +804,31 @@ watermills_03 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = next_level_w_mills } - culture = { + culture ?= { has_cultural_parameter = watermills_forestries_unlock } } } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_windmills } building_requirement_castle_city_church = { LEVEL = 02 } } trigger_else = { OR = { - culture = { # Standard unlock from innovation (High medieval) + culture ?= { # Standard unlock from innovation (High medieval) has_innovation = innovation_windmills } - culture = { # Unlock from culture trad early but still need the previous Civic economic building inovation (Early medieval) + culture ?= { # Unlock from culture trad early but still need the previous Civic economic building inovation (Early medieval) has_cultural_parameter = next_level_w_mills has_innovation = innovation_manorialism } AND = { # Unlock from Cultural Tradition has_building_or_higher = logging_camps_04 - culture = { + culture ?= { has_cultural_parameter = watermills_forestries_unlock } } @@ -856,7 +878,7 @@ watermills_04 = { building_watermills_requirement_terrain = yes AND = { has_building_or_higher = logging_camps_04 - culture = { + culture ?= { has_cultural_parameter = watermills_forestries_unlock } } @@ -866,31 +888,31 @@ watermills_04 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = next_level_w_mills } - culture = { + culture ?= { has_cultural_parameter = watermills_forestries_unlock } } } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_windmills } building_requirement_castle_city_church = { LEVEL = 02 } } trigger_else = { OR = { - culture = { # Standard unlock from innovation (High medieval) + culture ?= { # Standard unlock from innovation (High medieval) has_innovation = innovation_windmills } - culture = { # Unlock from culture trad early but still need the previous Civic economic building inovation (Early medieval) + culture ?= { # Unlock from culture trad early but still need the previous Civic economic building inovation (Early medieval) has_cultural_parameter = next_level_w_mills has_innovation = innovation_manorialism } AND = { # Unlock from Cultural Tradition has_building_or_higher = logging_camps_04 - culture = { + culture ?= { has_cultural_parameter = watermills_forestries_unlock } } @@ -939,13 +961,13 @@ watermills_05 = { building_watermills_requirement_terrain = yes } can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = next_level_w_mills } } @@ -953,7 +975,7 @@ watermills_05 = { building_requirement_castle_city_church = { LEVEL = 03 } } trigger_else = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = next_level_w_mills } building_requirement_castle_city_church = { LEVEL = 02 } @@ -1003,22 +1025,22 @@ watermills_06 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = next_level_w_mills } } } building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } trigger_else = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = next_level_w_mills } building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_windmills } } @@ -1067,22 +1089,22 @@ watermills_07 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = next_level_w_mills } } } building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } trigger_else = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = next_level_w_mills } building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_windmills } } @@ -1131,22 +1153,22 @@ watermills_08 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = next_level_w_mills } } } building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } trigger_else = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = next_level_w_mills } building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_windmills } } @@ -1194,9 +1216,11 @@ windmills_01 = { building_windmills_requirement_terrain = yes AND = { has_building_or_higher = hill_farms_04 - culture = { - has_cultural_parameter = windmills_hill_farms_unlock + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_parameter = windmills_hill_farms_unlock } } + trigger_else = { always = no } } } building_requirement_castle_city_church = { LEVEL = 01 } @@ -1208,30 +1232,30 @@ windmills_01 = { is_enabled = { trigger_if = { - limit = { - NOT = { - scope:holder.culture = { - has_cultural_parameter = watermills_windmills_cities + limit = { exists = scope:holder.culture } + trigger_if = { + limit = { + NOT = { + scope:holder.culture ?= { has_cultural_parameter = watermills_windmills_cities } } } - } - is_county_capital = yes - } - trigger_else = { - scope:holder.culture = { - has_cultural_parameter = watermills_windmills_cities - } - OR = { is_county_capital = yes - AND = { - NOR = { - has_building_or_higher = watermills_01 - has_building_or_higher = caravanserai_01 + } + trigger_else = { + scope:holder.culture ?= { has_cultural_parameter = watermills_windmills_cities } + OR = { + is_county_capital = yes + AND = { + NOR = { + has_building_or_higher = watermills_01 + has_building_or_higher = caravanserai_01 + } + has_building_or_higher = city_01 } - has_building_or_higher = city_01 } } } + trigger_else = { always = no } } show_disabled = yes @@ -1240,8 +1264,10 @@ windmills_01 = { limit = { has_holding_type = city_holding is_county_capital = no - culture = { - has_cultural_parameter = watermills_windmills_cities + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_parameter = watermills_windmills_cities } } } has_building_or_higher = city_01 @@ -1255,19 +1281,21 @@ windmills_01 = { is_county_capital = yes } OR = { - culture = { # Standard unlock from inovation (High medieval) - has_innovation = innovation_windmills - } - culture = { # Unlock from culture trad early but still need the previous Civic economic building inovation (Early medieval) - has_cultural_parameter = next_level_w_mills - has_innovation = innovation_manorialism - } - AND = { # Unlock from Culture trad - has_building_or_higher = hill_farms_04 - culture = { - has_cultural_parameter = windmills_hill_farms_unlock + trigger_if = { + limit = { exists = culture } + OR = { + culture ?= { has_innovation = innovation_windmills } + culture ?= { + has_cultural_parameter = next_level_w_mills + has_innovation = innovation_manorialism + } + AND = { + has_building_or_higher = hill_farms_04 + culture ?= { has_cultural_parameter = windmills_hill_farms_unlock } + } } } + trigger_else = { always = no } } } @@ -1326,7 +1354,7 @@ windmills_02 = { building_windmills_requirement_terrain = yes AND = { has_building_or_higher = hill_farms_04 - culture = { + culture ?= { has_cultural_parameter = windmills_hill_farms_unlock } } @@ -1338,30 +1366,30 @@ windmills_02 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = next_level_w_mills } - culture = { + culture ?= { has_cultural_parameter = windmills_hill_farms_unlock } } } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_windmills } } trigger_else = { OR = { - culture = { # Standard unlock from inovation (High medieval) + culture ?= { # Standard unlock from inovation (High medieval) has_innovation = innovation_windmills } - culture = { # Unlock from culture trad early but still need the previous Civic economic building inovation (Early medieval) + culture ?= { # Unlock from culture trad early but still need the previous Civic economic building inovation (Early medieval) has_cultural_parameter = next_level_w_mills has_innovation = innovation_manorialism } AND = { # Unlock from Culture trad has_building_or_higher = hill_farms_04 - culture = { + culture ?= { has_cultural_parameter = windmills_hill_farms_unlock } } @@ -1412,7 +1440,7 @@ windmills_03 = { building_windmills_requirement_terrain = yes AND = { has_building_or_higher = hill_farms_04 - culture = { + culture ?= { has_cultural_parameter = windmills_hill_farms_unlock } } @@ -1422,30 +1450,30 @@ windmills_03 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = next_level_w_mills } - culture = { + culture ?= { has_cultural_parameter = windmills_hill_farms_unlock } } } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_windmills } } trigger_else = { OR = { - culture = { # Standard unlock from inovation (High medieval) + culture ?= { # Standard unlock from inovation (High medieval) has_innovation = innovation_windmills } - culture = { # Unlock from culture trad early but still need the previous Civic economic building inovation (Early medieval) + culture ?= { # Unlock from culture trad early but still need the previous Civic economic building inovation (Early medieval) has_cultural_parameter = next_level_w_mills has_innovation = innovation_manorialism } AND = { # Unlock from Culture trad has_building_or_higher = hill_farms_04 - culture = { + culture ?= { has_cultural_parameter = windmills_hill_farms_unlock } } @@ -1492,7 +1520,7 @@ windmills_04 = { building_windmills_requirement_terrain = yes AND = { has_building_or_higher = hill_farms_04 - culture = { + culture ?= { has_cultural_parameter = windmills_hill_farms_unlock } } @@ -1502,10 +1530,10 @@ windmills_04 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = next_level_w_mills } - culture = { + culture ?= { has_cultural_parameter = windmills_hill_farms_unlock } } @@ -1514,16 +1542,16 @@ windmills_04 = { } trigger_else = { OR = { - culture = { # Standard unlock from inovation (High medieval) + culture ?= { # Standard unlock from inovation (High medieval) has_innovation = innovation_windmills } - culture = { # Unlock from culture trad early but still need the previous Civic economic building inovation (Early medieval) + culture ?= { # Unlock from culture trad early but still need the previous Civic economic building inovation (Early medieval) has_cultural_parameter = next_level_w_mills has_innovation = innovation_manorialism } AND = { # Unlock from Culture trad has_building_or_higher = hill_farms_04 - culture = { + culture ?= { has_cultural_parameter = windmills_hill_farms_unlock } } @@ -1569,13 +1597,13 @@ windmills_05 = { building_windmills_requirement_terrain = yes } can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_windmills } trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = next_level_w_mills } } @@ -1583,7 +1611,7 @@ windmills_05 = { building_requirement_castle_city_church = { LEVEL = 03 } } trigger_else = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = next_level_w_mills } building_requirement_castle_city_church = { LEVEL = 02 } @@ -1631,22 +1659,22 @@ windmills_06 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = next_level_w_mills } } } building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } trigger_else = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = next_level_w_mills } building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_windmills } } @@ -1693,22 +1721,22 @@ windmills_07 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = next_level_w_mills } } } building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } trigger_else = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = next_level_w_mills } building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_windmills } } @@ -1755,22 +1783,22 @@ windmills_08 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = next_level_w_mills } } } building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } trigger_else = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = next_level_w_mills } building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_windmills } } @@ -2771,11 +2799,11 @@ paddy_fields_01 = { } modifier = { factor = 2 - scope:holder.culture = { has_innovation = innovation_champa_rice } + scope:holder.culture ?= { has_innovation = innovation_champa_rice } } modifier = { factor = 0 - scope:holder.culture = { has_innovation = innovation_champa_rice } # this also allows farm estates to be built in rice fields + scope:holder.culture ?= { has_innovation = innovation_champa_rice } # this also allows farm estates to be built in rice fields NOT = { has_building_or_higher = farm_estates_01 } @@ -2884,18 +2912,18 @@ paddy_fields_03 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = rice_cultivators_next_level_paddy_fields } } } building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } trigger_else = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = rice_cultivators_next_level_paddy_fields } building_requirement_castle_city_church = { LEVEL = 01 } @@ -2987,18 +3015,18 @@ paddy_fields_04 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = rice_cultivators_next_level_paddy_fields } } } building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } trigger_else = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = rice_cultivators_next_level_paddy_fields } building_requirement_castle_city_church = { LEVEL = 01 } @@ -3092,21 +3120,21 @@ paddy_fields_05 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = rice_cultivators_next_level_paddy_fields } } } building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } trigger_else = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = rice_cultivators_next_level_paddy_fields } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } building_requirement_castle_city_church = { LEVEL = 02 } @@ -3201,21 +3229,21 @@ paddy_fields_06 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = rice_cultivators_next_level_paddy_fields } } } building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } trigger_else = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = rice_cultivators_next_level_paddy_fields } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } building_requirement_castle_city_church = { LEVEL = 02 } @@ -3310,21 +3338,21 @@ paddy_fields_07 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = rice_cultivators_next_level_paddy_fields } } } building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } trigger_else = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = rice_cultivators_next_level_paddy_fields } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } building_requirement_castle_city_church = { LEVEL = 03 } @@ -3420,21 +3448,21 @@ paddy_fields_08 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = rice_cultivators_next_level_paddy_fields } } } building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } trigger_else = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = rice_cultivators_next_level_paddy_fields } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } building_requirement_castle_city_church = { LEVEL = 03 } @@ -4487,7 +4515,7 @@ common_tradeport_01 = { trigger_if = { # Sometimes tribals can into botes limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = trade_ports_enabled_for_tribals } } @@ -4553,13 +4581,13 @@ common_tradeport_01 = { modifier = { add = 5 - culture = { + culture ?= { has_cultural_parameter = trade_ports_enabled_for_tribals } } modifier = { add = 5 - culture = { + culture ?= { has_cultural_parameter = trade_ports_stationed_maa_bonus } } @@ -4598,7 +4626,7 @@ common_tradeport_02 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = trade_ports_enabled_for_tribals } } @@ -4616,17 +4644,17 @@ common_tradeport_02 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_trade_ports } } } - culture = { + culture ?= { has_innovation = innovation_crop_rotation } } trigger_else = { - culture = { + culture ?= { has_cultural_parameter = next_level_trade_ports } @@ -4692,21 +4720,21 @@ common_tradeport_03 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_trade_ports } } } - culture = { + culture ?= { has_innovation = innovation_manorialism } building_requirement_castle_city_church = { LEVEL = 02 } } trigger_else = { - culture = { + culture ?= { has_innovation = innovation_crop_rotation } - culture = { + culture ?= { has_cultural_parameter = next_level_trade_ports } building_requirement_castle_city_church = { LEVEL = 01 } @@ -4772,21 +4800,21 @@ common_tradeport_04 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_trade_ports } } } - culture = { + culture ?= { has_innovation = innovation_manorialism } building_requirement_castle_city_church = { LEVEL = 02 } } trigger_else = { - culture = { + culture ?= { has_innovation = innovation_crop_rotation } - culture = { + culture ?= { has_cultural_parameter = next_level_trade_ports } building_requirement_castle_city_church = { LEVEL = 01 } @@ -4852,21 +4880,21 @@ common_tradeport_05 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_trade_ports } } } - culture = { + culture ?= { has_innovation = innovation_guilds } building_requirement_castle_city_church = { LEVEL = 03 } } trigger_else = { - culture = { + culture ?= { has_innovation = innovation_manorialism } - culture = { + culture ?= { has_cultural_parameter = next_level_trade_ports } building_requirement_castle_city_church = { LEVEL = 02 } @@ -4932,21 +4960,21 @@ common_tradeport_06 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_trade_ports } } } - culture = { + culture ?= { has_innovation = innovation_guilds } building_requirement_castle_city_church = { LEVEL = 03 } } trigger_else = { - culture = { + culture ?= { has_innovation = innovation_manorialism } - culture = { + culture ?= { has_cultural_parameter = next_level_trade_ports } building_requirement_castle_city_church = { LEVEL = 02 } @@ -5012,21 +5040,21 @@ common_tradeport_07 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_trade_ports } } } - culture = { + culture ?= { has_innovation = innovation_cranes } building_requirement_castle_city_church = { LEVEL = 04 } } trigger_else = { - culture = { + culture ?= { has_innovation = innovation_guilds } - culture = { + culture ?= { has_cultural_parameter = next_level_trade_ports } building_requirement_castle_city_church = { LEVEL = 03 } @@ -5092,21 +5120,21 @@ common_tradeport_08 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_trade_ports } } } - culture = { + culture ?= { has_innovation = innovation_cranes } building_requirement_castle_city_church = { LEVEL = 04 } } trigger_else = { - culture = { + culture ?= { has_innovation = innovation_guilds } - culture = { + culture ?= { has_cultural_parameter = next_level_trade_ports } building_requirement_castle_city_church = { LEVEL = 03 } @@ -5241,8 +5269,12 @@ pastures_01 = { } modifier = { factor = 4 - culture = { - has_cultural_parameter = farm_estates_pastures_unlock + AND = { + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_parameter = farm_estates_pastures_unlock } + } } } } @@ -5258,7 +5290,7 @@ pastures_02 = { can_construct_showing_failures_only = { building_requirement_tribal = no - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_crop_rotation } } @@ -5323,7 +5355,7 @@ pastures_03 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } @@ -5390,7 +5422,7 @@ pastures_04 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } @@ -5460,7 +5492,7 @@ pastures_05 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -5530,7 +5562,7 @@ pastures_06 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -5601,7 +5633,7 @@ pastures_07 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -5671,7 +5703,7 @@ pastures_08 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -5741,11 +5773,13 @@ hunting_grounds_01 = { can_construct_potential = { building_hunting_grounds_requirement_terrain = yes building_requirement_castle_city_church = { LEVEL = 01 } - scope:holder.culture = { - NOT = { - has_cultural_parameter = vegetarian_building_ban + trigger_if = { + limit = { exists = scope:holder.culture } + scope:holder.culture ?= { + NOT = { has_cultural_parameter = vegetarian_building_ban } } } + trigger_else = { always = no } } can_construct_showing_failures_only = { @@ -5753,14 +5787,16 @@ hunting_grounds_01 = { } is_enabled = { - scope:holder.culture = { - NOT = { - has_cultural_parameter = vegetarian_building_ban + trigger_if = { + limit = { exists = scope:holder.culture } + scope:holder.culture ?= { + NOT = { has_cultural_parameter = vegetarian_building_ban } } } - culture = { - NOT = { - has_cultural_parameter = vegetarian_building_ban + trigger_if = { + limit = { exists = culture } + culture ?= { + NOT = { has_cultural_parameter = vegetarian_building_ban } } } } @@ -5830,7 +5866,7 @@ hunting_grounds_02 = { can_construct_potential = { building_hunting_grounds_requirement_terrain = yes building_requirement_castle_city_church = { LEVEL = 01 } - scope:holder.culture = { + scope:holder.culture ?= { NOT = { has_cultural_parameter = vegetarian_building_ban } @@ -5839,18 +5875,18 @@ hunting_grounds_02 = { can_construct_showing_failures_only = { building_requirement_tribal = no - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_crop_rotation } } is_enabled = { - scope:holder.culture = { + scope:holder.culture ?= { NOT = { has_cultural_parameter = vegetarian_building_ban } } - culture = { + culture ?= { NOT = { has_cultural_parameter = vegetarian_building_ban } @@ -5909,10 +5945,10 @@ hunting_grounds_03 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } - scope:holder.culture = { + scope:holder.culture ?= { NOT = { has_cultural_parameter = vegetarian_building_ban } @@ -5924,12 +5960,12 @@ hunting_grounds_03 = { } is_enabled = { - scope:holder.culture = { + scope:holder.culture ?= { NOT = { has_cultural_parameter = vegetarian_building_ban } } - culture = { + culture ?= { NOT = { has_cultural_parameter = vegetarian_building_ban } @@ -5984,10 +6020,10 @@ hunting_grounds_04 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } - scope:holder.culture = { + scope:holder.culture ?= { NOT = { has_cultural_parameter = vegetarian_building_ban } @@ -5999,12 +6035,12 @@ hunting_grounds_04 = { } is_enabled = { - scope:holder.culture = { + scope:holder.culture ?= { NOT = { has_cultural_parameter = vegetarian_building_ban } } - culture = { + culture ?= { NOT = { has_cultural_parameter = vegetarian_building_ban } @@ -6059,10 +6095,10 @@ hunting_grounds_05 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } - scope:holder.culture = { + scope:holder.culture ?= { NOT = { has_cultural_parameter = vegetarian_building_ban } @@ -6074,12 +6110,12 @@ hunting_grounds_05 = { } is_enabled = { - scope:holder.culture = { + scope:holder.culture ?= { NOT = { has_cultural_parameter = vegetarian_building_ban } } - culture = { + culture ?= { NOT = { has_cultural_parameter = vegetarian_building_ban } @@ -6138,10 +6174,10 @@ hunting_grounds_06 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } - scope:holder.culture = { + scope:holder.culture ?= { NOT = { has_cultural_parameter = vegetarian_building_ban } @@ -6153,12 +6189,12 @@ hunting_grounds_06 = { } is_enabled = { - scope:holder.culture = { + scope:holder.culture ?= { NOT = { has_cultural_parameter = vegetarian_building_ban } } - culture = { + culture ?= { NOT = { has_cultural_parameter = vegetarian_building_ban } @@ -6217,10 +6253,10 @@ hunting_grounds_07 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } - scope:holder.culture = { + scope:holder.culture ?= { NOT = { has_cultural_parameter = vegetarian_building_ban } @@ -6232,12 +6268,12 @@ hunting_grounds_07 = { } is_enabled = { - scope:holder.culture = { + scope:holder.culture ?= { NOT = { has_cultural_parameter = vegetarian_building_ban } } - culture = { + culture ?= { NOT = { has_cultural_parameter = vegetarian_building_ban } @@ -6300,10 +6336,10 @@ hunting_grounds_08 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } - scope:holder.culture = { + scope:holder.culture ?= { NOT = { has_cultural_parameter = vegetarian_building_ban } @@ -6315,12 +6351,12 @@ hunting_grounds_08 = { } is_enabled = { - scope:holder.culture = { + scope:holder.culture ?= { NOT = { has_cultural_parameter = vegetarian_building_ban } } - culture = { + culture ?= { NOT = { has_cultural_parameter = vegetarian_building_ban } @@ -6434,9 +6470,11 @@ orchards_01 = { } modifier = { factor = 2 - culture = { - has_cultural_parameter = vegetarian_fruit_orchard_allowed + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_parameter = vegetarian_fruit_orchard_allowed } } + trigger_else = { always = no } } } } @@ -6452,7 +6490,7 @@ orchards_02 = { can_construct_showing_failures_only = { building_requirement_tribal = no - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_crop_rotation } } @@ -6510,7 +6548,7 @@ orchards_03 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } @@ -6571,7 +6609,7 @@ orchards_04 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } @@ -6632,7 +6670,7 @@ orchards_05 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -6693,7 +6731,7 @@ orchards_06 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -6755,7 +6793,7 @@ orchards_07 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -6820,7 +6858,7 @@ orchards_08 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -6886,7 +6924,7 @@ farm_estates_01 = { building_farm_estates_requirement_terrain = yes AND = { has_building_or_higher = pastures_04 - culture = { + culture ?= { has_cultural_parameter = farm_estates_pastures_unlock } } @@ -6902,13 +6940,13 @@ farm_estates_01 = { } AND = { has_building_or_higher = pastures_04 - culture = { + culture ?= { has_cultural_parameter = farm_estates_pastures_unlock } } AND = { building_paddy_fields_requirement_terrain = yes - scope:holder.culture = { has_innovation = innovation_champa_rice } + scope:holder.culture ?= { has_innovation = innovation_champa_rice } building_requirement_castle_city_church = { LEVEL = 01 } } } @@ -6973,7 +7011,7 @@ farm_estates_02 = { building_farm_estates_requirement_terrain = yes AND = { has_building_or_higher = pastures_04 - culture = { + culture ?= { has_cultural_parameter = farm_estates_pastures_unlock } } @@ -6985,20 +7023,20 @@ farm_estates_02 = { OR = { AND = { building_requirement_castle_city_church = { LEVEL = 01 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_crop_rotation } building_farm_estates_requirement_terrain = yes } AND = { has_building_or_higher = pastures_04 - culture = { + culture ?= { has_cultural_parameter = farm_estates_pastures_unlock } } AND = { building_paddy_fields_requirement_terrain = yes - scope:holder.culture = { has_innovation = innovation_champa_rice } + scope:holder.culture ?= { has_innovation = innovation_champa_rice } building_requirement_castle_city_church = { LEVEL = 01 } } } @@ -7010,7 +7048,7 @@ farm_estates_02 = { building_farm_estates_requirement_terrain = yes AND = { has_building_or_higher = pastures_04 - culture = { + culture ?= { has_cultural_parameter = farm_estates_pastures_unlock } } @@ -7077,7 +7115,7 @@ farm_estates_03 = { building_farm_estates_requirement_terrain = yes AND = { has_building_or_higher = pastures_04 - culture = { + culture ?= { has_cultural_parameter = farm_estates_pastures_unlock } } @@ -7144,7 +7182,7 @@ farm_estates_04 = { building_farm_estates_requirement_terrain = yes AND = { has_building_or_higher = pastures_04 - culture = { + culture ?= { has_cultural_parameter = farm_estates_pastures_unlock } } @@ -7211,12 +7249,12 @@ farm_estates_05 = { building_farm_estates_requirement_terrain = yes AND = { building_paddy_fields_requirement_terrain = yes - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_champa_rice } } } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -7297,12 +7335,12 @@ farm_estates_06 = { building_farm_estates_requirement_terrain = yes AND = { building_paddy_fields_requirement_terrain = yes - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_champa_rice } } } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -7375,12 +7413,12 @@ farm_estates_07 = { building_farm_estates_requirement_terrain = yes AND = { building_paddy_fields_requirement_terrain = yes - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_champa_rice } } } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -7454,12 +7492,12 @@ farm_estates_08 = { building_farm_estates_requirement_terrain = yes AND = { building_paddy_fields_requirement_terrain = yes - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_champa_rice } } } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -7621,17 +7659,17 @@ cereal_fields_02 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = vegetarian_next_level_cereal_fields } } } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_crop_rotation } } trigger_else = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = vegetarian_next_level_cereal_fields } } @@ -7643,7 +7681,7 @@ cereal_fields_02 = { building_farm_estates_requirement_terrain = yes AND = { has_building_or_higher = pastures_04 - culture = { + culture ?= { has_cultural_parameter = farm_estates_pastures_unlock } } @@ -7716,18 +7754,18 @@ cereal_fields_03 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = vegetarian_next_level_cereal_fields } } } building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } trigger_else = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = vegetarian_next_level_cereal_fields has_innovation = innovation_crop_rotation } @@ -7802,18 +7840,18 @@ cereal_fields_04 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = vegetarian_next_level_cereal_fields } } } building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } trigger_else = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = vegetarian_next_level_cereal_fields has_innovation = innovation_crop_rotation } @@ -7889,18 +7927,18 @@ cereal_fields_05 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = vegetarian_next_level_cereal_fields } } } building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } trigger_else = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = vegetarian_next_level_cereal_fields has_innovation = innovation_manorialism } @@ -7975,18 +8013,18 @@ cereal_fields_06 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = vegetarian_next_level_cereal_fields } } } building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } trigger_else = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = vegetarian_next_level_cereal_fields has_innovation = innovation_manorialism } @@ -8063,18 +8101,18 @@ cereal_fields_07 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = vegetarian_next_level_cereal_fields } } } building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } trigger_else = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = vegetarian_next_level_cereal_fields has_innovation = innovation_guilds } @@ -8151,18 +8189,18 @@ cereal_fields_08 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = vegetarian_next_level_cereal_fields } } } building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } trigger_else = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = vegetarian_next_level_cereal_fields has_innovation = innovation_guilds } @@ -8286,9 +8324,11 @@ logging_camps_01 = { } modifier = { factor = 4 - scope:holder.culture = { - has_cultural_parameter = watermills_forestries_unlock + trigger_if = { + limit = { exists = scope:holder.culture } + scope:holder.culture ?= { has_cultural_parameter = watermills_forestries_unlock } } + trigger_else = { always = no } } } } @@ -8304,7 +8344,7 @@ logging_camps_02 = { can_construct_showing_failures_only = { building_requirement_tribal = no - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_crop_rotation } } @@ -8347,7 +8387,7 @@ logging_camps_02 = { } modifier = { factor = 4 - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = watermills_forestries_unlock } } @@ -8364,7 +8404,7 @@ logging_camps_03 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } @@ -8423,7 +8463,7 @@ logging_camps_04 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } @@ -8483,7 +8523,7 @@ logging_camps_05 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -8544,7 +8584,7 @@ logging_camps_06 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -8605,7 +8645,7 @@ logging_camps_07 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -8666,7 +8706,7 @@ logging_camps_08 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -8776,7 +8816,7 @@ peat_quarries_02 = { can_construct_showing_failures_only = { building_requirement_tribal = no - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_crop_rotation } } @@ -8830,7 +8870,7 @@ peat_quarries_03 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } @@ -8885,7 +8925,7 @@ peat_quarries_04 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } @@ -8941,7 +8981,7 @@ peat_quarries_05 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -8998,7 +9038,7 @@ peat_quarries_06 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -9056,7 +9096,7 @@ peat_quarries_07 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -9114,7 +9154,7 @@ peat_quarries_08 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -9229,7 +9269,7 @@ hill_farms_01 = { } modifier = { factor = 4 - culture = { + culture ?= { has_cultural_parameter = windmills_hill_farms_unlock } } @@ -9245,7 +9285,7 @@ hill_farms_02 = { } can_construct_showing_failures_only = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_crop_rotation } building_requirement_tribal = no @@ -9308,7 +9348,7 @@ hill_farms_03 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } @@ -9375,7 +9415,7 @@ hill_farms_04 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } @@ -9441,7 +9481,7 @@ hill_farms_05 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -9508,7 +9548,7 @@ hill_farms_06 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -9576,7 +9616,7 @@ hill_farms_07 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -9644,7 +9684,7 @@ hill_farms_08 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -9762,7 +9802,7 @@ elephant_pens_02 = { } can_construct_showing_failures_only = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_crop_rotation } building_requirement_tribal = no @@ -9816,7 +9856,7 @@ elephant_pens_03 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } @@ -9872,7 +9912,7 @@ elephant_pens_04 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } @@ -9928,7 +9968,7 @@ elephant_pens_05 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -9984,7 +10024,7 @@ elephant_pens_06 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -10040,7 +10080,7 @@ elephant_pens_07 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -10097,7 +10137,7 @@ elephant_pens_08 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -10241,7 +10281,7 @@ plantations_02 = { can_construct_potential = { building_plantations_requirement_terrain = yes building_requirement_castle_city_church = { LEVEL = 01 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_crop_rotation } } @@ -10253,7 +10293,7 @@ plantations_02 = { can_construct_showing_failures_only = { building_requirement_tribal = no - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_crop_rotation } } @@ -10313,7 +10353,7 @@ plantations_03 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } @@ -10379,7 +10419,7 @@ plantations_04 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } @@ -10449,7 +10489,7 @@ plantations_05 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -10518,7 +10558,7 @@ plantations_06 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -10587,7 +10627,7 @@ plantations_07 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -10656,7 +10696,7 @@ plantations_08 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -10788,7 +10828,7 @@ quarries_02 = { can_construct_showing_failures_only = { building_requirement_tribal = no - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_crop_rotation } } @@ -10846,7 +10886,7 @@ quarries_03 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } @@ -10911,7 +10951,7 @@ quarries_04 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } @@ -10981,7 +11021,7 @@ quarries_05 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -11043,7 +11083,7 @@ quarries_06 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -11106,7 +11146,7 @@ quarries_07 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -11171,7 +11211,7 @@ quarries_08 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } diff --git a/common/buildings/00_standard_fortification_buildings.txt b/common/buildings/00_standard_fortification_buildings.txt index c6d15cb07..5aec3c7c3 100644 --- a/common/buildings/00_standard_fortification_buildings.txt +++ b/common/buildings/00_standard_fortification_buildings.txt @@ -74,22 +74,20 @@ ramparts_02 = { can_construct_showing_failures_only = { trigger_if = { - limit = { - NOT = { - culture = { - has_cultural_parameter = next_level_fortification - } + limit = { exists = culture } + trigger_if = { + limit = { NOT = { culture ?= { has_cultural_parameter = next_level_fortification } } } + trigger_if = { + limit = { exists = scope:holder.culture } + scope:holder.culture ?= { has_innovation = innovation_motte } } + trigger_else = { always = no } } - scope:holder.culture = { - has_innovation = innovation_motte - } - } - trigger_else = { - culture = { - has_cultural_parameter = next_level_fortification + trigger_else = { + culture ?= { has_cultural_parameter = next_level_fortification } } } + trigger_else = { always = no } building_requirement_tribal = no } @@ -118,7 +116,7 @@ ramparts_02 = { modifier = { add = 1 scope:holder = { - culture = { + culture ?= { has_cultural_parameter = ai_more_likely_to_fortify } } @@ -143,22 +141,22 @@ ramparts_03 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } } } building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_battlements } } trigger_else = { building_requirement_castle_city_church = { LEVEL = 01 } - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_motte } } @@ -194,7 +192,7 @@ ramparts_03 = { modifier = { add = 1 scope:holder = { - culture = { + culture ?= { has_cultural_parameter = ai_more_likely_to_fortify } } @@ -215,22 +213,22 @@ ramparts_04 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } } } building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_battlements } } trigger_else = { building_requirement_castle_city_church = { LEVEL = 01 } - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_motte } } @@ -269,7 +267,7 @@ ramparts_04 = { modifier = { add = 1 scope:holder = { - culture = { + culture ?= { has_cultural_parameter = ai_more_likely_to_fortify } } @@ -290,22 +288,22 @@ ramparts_05 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } } } building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } trigger_else = { building_requirement_castle_city_church = { LEVEL = 02 } - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_battlements } } @@ -344,7 +342,7 @@ ramparts_05 = { modifier = { add = 1 scope:holder = { - culture = { + culture ?= { has_cultural_parameter = ai_more_likely_to_fortify } } @@ -365,22 +363,22 @@ ramparts_06 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } } } building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } trigger_else = { building_requirement_castle_city_church = { LEVEL = 02 } - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_battlements } } @@ -419,7 +417,7 @@ ramparts_06 = { modifier = { add = 1 scope:holder = { - culture = { + culture ?= { has_cultural_parameter = ai_more_likely_to_fortify } } @@ -440,22 +438,22 @@ ramparts_07 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } } } building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_machicolations } } trigger_else = { building_requirement_castle_city_church = { LEVEL = 03 } - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } @@ -494,7 +492,7 @@ ramparts_07 = { modifier = { add = 1 scope:holder = { - culture = { + culture ?= { has_cultural_parameter = ai_more_likely_to_fortify } } @@ -515,22 +513,22 @@ ramparts_08 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } } } building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_machicolations } } trigger_else = { building_requirement_castle_city_church = { LEVEL = 03 } - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } @@ -567,7 +565,7 @@ ramparts_08 = { modifier = { add = 1 scope:holder = { - culture = { + culture ?= { has_cultural_parameter = ai_more_likely_to_fortify } } @@ -618,7 +616,7 @@ curtain_walls_01 = { modifier = { add = 1 scope:holder = { - culture = { + culture ?= { has_cultural_parameter = ai_more_likely_to_fortify } } @@ -651,22 +649,20 @@ curtain_walls_02 = { can_construct_showing_failures_only = { trigger_if = { - limit = { - NOT = { - culture = { - has_cultural_parameter = next_level_fortification - } + limit = { exists = culture } + trigger_if = { + limit = { NOT = { culture ?= { has_cultural_parameter = next_level_fortification } } } + trigger_if = { + limit = { exists = scope:holder.culture } + scope:holder.culture ?= { has_innovation = innovation_motte } } + trigger_else = { always = no } } - scope:holder.culture = { - has_innovation = innovation_motte - } - } - trigger_else = { - culture = { - has_cultural_parameter = next_level_fortification + trigger_else = { + culture ?= { has_cultural_parameter = next_level_fortification } } } + trigger_else = { always = no } building_requirement_tribal = no } @@ -697,7 +693,7 @@ curtain_walls_02 = { modifier = { add = 1 scope:holder = { - culture = { + culture ?= { has_cultural_parameter = ai_more_likely_to_fortify } } @@ -723,22 +719,22 @@ curtain_walls_03 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } } } building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_battlements } } trigger_else = { building_requirement_castle_city_church = { LEVEL = 01 } - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_motte } } @@ -775,7 +771,7 @@ curtain_walls_03 = { modifier = { add = 1 scope:holder = { - culture = { + culture ?= { has_cultural_parameter = ai_more_likely_to_fortify } } @@ -797,22 +793,22 @@ curtain_walls_04 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } } } building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_battlements } } trigger_else = { building_requirement_castle_city_church = { LEVEL = 01 } - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_motte } } @@ -849,7 +845,7 @@ curtain_walls_04 = { modifier = { add = 1 scope:holder = { - culture = { + culture ?= { has_cultural_parameter = ai_more_likely_to_fortify } } @@ -871,22 +867,22 @@ curtain_walls_05 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } } } building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } trigger_else = { building_requirement_castle_city_church = { LEVEL = 02 } - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_battlements } } @@ -924,7 +920,7 @@ curtain_walls_05 = { modifier = { add = 1 scope:holder = { - culture = { + culture ?= { has_cultural_parameter = ai_more_likely_to_fortify } } @@ -946,22 +942,22 @@ curtain_walls_06 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } } } building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } trigger_else = { building_requirement_castle_city_church = { LEVEL = 02 } - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_battlements } } @@ -1000,7 +996,7 @@ curtain_walls_06 = { modifier = { add = 1 scope:holder = { - culture = { + culture ?= { has_cultural_parameter = ai_more_likely_to_fortify } } @@ -1022,22 +1018,22 @@ curtain_walls_07 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } } } building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_machicolations } } trigger_else = { building_requirement_castle_city_church = { LEVEL = 03 } - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } @@ -1076,7 +1072,7 @@ curtain_walls_07 = { modifier = { add = 1 scope:holder = { - culture = { + culture ?= { has_cultural_parameter = ai_more_likely_to_fortify } } @@ -1098,22 +1094,22 @@ curtain_walls_08 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } } } building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_machicolations } } trigger_else = { building_requirement_castle_city_church = { LEVEL = 03 } - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } @@ -1150,7 +1146,7 @@ curtain_walls_08 = { modifier = { add = 1 scope:holder = { - culture = { + culture ?= { has_cultural_parameter = ai_more_likely_to_fortify } } @@ -1204,7 +1200,7 @@ watchtowers_01 = { modifier = { add = 1 scope:holder = { - culture = { + culture ?= { has_cultural_parameter = ai_more_likely_to_fortify } } @@ -1238,22 +1234,20 @@ watchtowers_02 = { can_construct_showing_failures_only = { trigger_if = { - limit = { - NOT = { - culture = { - has_cultural_parameter = next_level_fortification - } + limit = { exists = culture } + trigger_if = { + limit = { NOT = { culture ?= { has_cultural_parameter = next_level_fortification } } } + trigger_if = { + limit = { exists = scope:holder.culture } + scope:holder.culture ?= { has_innovation = innovation_motte } } + trigger_else = { always = no } } - scope:holder.culture = { - has_innovation = innovation_motte - } - } - trigger_else = { - culture = { - has_cultural_parameter = next_level_fortification + trigger_else = { + culture ?= { has_cultural_parameter = next_level_fortification } } } + trigger_else = { always = no } building_requirement_tribal = no } @@ -1286,7 +1280,7 @@ watchtowers_02 = { modifier = { add = 1 scope:holder = { - culture = { + culture ?= { has_cultural_parameter = ai_more_likely_to_fortify } } @@ -1312,22 +1306,22 @@ watchtowers_03 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } } } building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_battlements } } trigger_else = { building_requirement_castle_city_church = { LEVEL = 01 } - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_motte } } @@ -1366,7 +1360,7 @@ watchtowers_03 = { modifier = { add = 1 scope:holder = { - culture = { + culture ?= { has_cultural_parameter = ai_more_likely_to_fortify } } @@ -1388,22 +1382,22 @@ watchtowers_04 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } } } building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_battlements } } trigger_else = { building_requirement_castle_city_church = { LEVEL = 01 } - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_motte } } @@ -1443,7 +1437,7 @@ watchtowers_04 = { modifier = { add = 1 scope:holder = { - culture = { + culture ?= { has_cultural_parameter = ai_more_likely_to_fortify } } @@ -1465,22 +1459,22 @@ watchtowers_05 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } } } building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } trigger_else = { building_requirement_castle_city_church = { LEVEL = 02 } - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_battlements } } @@ -1521,7 +1515,7 @@ watchtowers_05 = { modifier = { add = 1 scope:holder = { - culture = { + culture ?= { has_cultural_parameter = ai_more_likely_to_fortify } } @@ -1543,22 +1537,22 @@ watchtowers_06 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } } } building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } trigger_else = { building_requirement_castle_city_church = { LEVEL = 02 } - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_battlements } } @@ -1600,7 +1594,7 @@ watchtowers_06 = { modifier = { add = 1 scope:holder = { - culture = { + culture ?= { has_cultural_parameter = ai_more_likely_to_fortify } } @@ -1622,22 +1616,22 @@ watchtowers_07 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } } } building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_machicolations } } trigger_else = { building_requirement_castle_city_church = { LEVEL = 03 } - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } @@ -1679,7 +1673,7 @@ watchtowers_07 = { modifier = { add = 1 scope:holder = { - culture = { + culture ?= { has_cultural_parameter = ai_more_likely_to_fortify } } @@ -1701,22 +1695,22 @@ watchtowers_08 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } } } building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_machicolations } } trigger_else = { building_requirement_castle_city_church = { LEVEL = 03 } - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } @@ -1756,7 +1750,7 @@ watchtowers_08 = { modifier = { add = 1 scope:holder = { - culture = { + culture ?= { has_cultural_parameter = ai_more_likely_to_fortify } } @@ -1833,22 +1827,20 @@ hill_forts_02 = { can_construct_showing_failures_only = { trigger_if = { - limit = { - NOT = { - culture = { - has_cultural_parameter = next_level_fortification - } + limit = { exists = culture } + trigger_if = { + limit = { NOT = { culture ?= { has_cultural_parameter = next_level_fortification } } } + trigger_if = { + limit = { exists = scope:holder.culture } + scope:holder.culture ?= { has_innovation = innovation_motte } } + trigger_else = { always = no } } - scope:holder.culture = { - has_innovation = innovation_motte - } - } - trigger_else = { - culture = { - has_cultural_parameter = next_level_fortification + trigger_else = { + culture ?= { has_cultural_parameter = next_level_fortification } } } + trigger_else = { always = no } building_requirement_tribal = no } @@ -1898,22 +1890,22 @@ hill_forts_03 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } } } building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_battlements } } trigger_else = { building_requirement_castle_city_church = { LEVEL = 01 } - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_motte } } @@ -1965,22 +1957,22 @@ hill_forts_04 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } } } building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_battlements } } trigger_else = { building_requirement_castle_city_church = { LEVEL = 01 } - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_motte } } @@ -2033,22 +2025,22 @@ hill_forts_05 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } } } building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } trigger_else = { building_requirement_castle_city_church = { LEVEL = 02 } - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_battlements } } @@ -2101,22 +2093,22 @@ hill_forts_06 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } } } building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } trigger_else = { building_requirement_castle_city_church = { LEVEL = 02 } - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_battlements } } @@ -2169,22 +2161,22 @@ hill_forts_07 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } } } building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_machicolations } } trigger_else = { building_requirement_castle_city_church = { LEVEL = 03 } - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } @@ -2237,22 +2229,22 @@ hill_forts_08 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } } } building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_machicolations } } trigger_else = { building_requirement_castle_city_church = { LEVEL = 03 } - culture = { + culture ?= { has_cultural_parameter = next_level_fortification } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } diff --git a/common/buildings/00_standard_military_buildings.txt b/common/buildings/00_standard_military_buildings.txt new file mode 100644 index 000000000..4b8cebcc0 --- /dev/null +++ b/common/buildings/00_standard_military_buildings.txt @@ -0,0 +1,6538 @@ +############################### +# Standard Military Buildings # +############################### + +# Regimental Grounds - High Levy, All MaA, High MaA Maintenance +# - Farmland, Floodplain +# Barracks - Normal Levy, Heavy Infantry, Pikemen +# - Farmland, Plain, Dryland, Floodplain +# Warrior Lodges - Poor Levy, Heavy Infantry, Pikemen, Skirmishers, Flat Stationed MaA Pursuit +# - Certain Regions: Mountains, Desert Mountains, Hills (certain regions) +# Hillside Grazing - Poor Levy, Heavy Cavalry, Light Cavalry, Horse Archers +# - Certain Regions: Mountains, Desert Mountains, Hills (certain regions) +# Outposts - Poor Levy, Super Poor Tax, Defensive Advantage, Raid Time, Skirmishers, Archers +# - Forest, Taiga, Jungle, Wetland +# Camel Farms - Poor Levy, Super Poor Tax, Camel Cavalry, Light Cavalry +# - Camelry Region: Desert, Floodplain, Oasis, Dryland +# Horse Pastures - Low Levy, Low tax, Horse Archers, Light Cavalry, Flat Stationed MaA Screen +# - Eastern Steppe Region/Steppe Terrain +# Blacksmiths - Normal Stationed MaA bonuses, Holding Taxes %, Levy Reinforcement, Low Knight Effectiveness +# Stables - Low Levy, Light Cavalry, Heavy Cavalry +# Militia Camps - Normal Levy, Archers, Skirmishers +# Workshops - Late Game Building - Normal Tax, Siege Weapons, Recruitment Cost for Archers/Skirmishers, Maintenance for Archers/Skirmishers +# Wind Furnaces - Good Tax, Good Stationed MaA bonuses, high Knight Effectiveness +# - Wootz Steel Innovation + + +### wind_furnace + +wind_furnace_01 = { + construction_time = standard_construction_time + + can_construct_potential = { + building_wind_furnace_requirement_terrain = yes + building_requirement_castle_city_church = { LEVEL = 01 } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_1_cost + + province_modifier = { + stationed_maa_damage_mult = high_maa_damage_tier_1 + stationed_maa_toughness_mult = high_maa_toughness_tier_1 + monthly_income = good_building_tax_tier_1 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = wind_furnace_02 + + type_icon = "icon_building_wind_furnaces.dds" + + ai_value = { + base = 100 + ai_tier_1_building_modifier = yes + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + + modifier = { + factor = 0 + has_holding_type = city_holding + } + modifier = { + factor = 0 + has_holding_type = church_holding + } + } +} + +wind_furnace_02 = { + construction_time = standard_construction_time + + can_construct_potential = { + building_wind_furnace_requirement_terrain = yes + building_requirement_castle_city_church = { LEVEL = 01 } + } + + can_construct_showing_failures_only = { + scope:holder.culture = { + has_innovation = innovation_barracks + } + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_2_cost + + province_modifier = { + stationed_maa_damage_mult = high_maa_damage_tier_2 + stationed_maa_toughness_mult = high_maa_toughness_tier_2 + monthly_income = good_building_tax_tier_2 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = wind_furnace_03 + + ai_value = { + base = 9 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + modifier = { # Fill all building slots before going for upgrades + factor = 0 + free_building_slots > 0 + } + } +} + +wind_furnace_03 = { + construction_time = standard_construction_time + + can_construct_potential = { + building_wind_furnace_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 02 } + scope:holder.culture = { + has_innovation = innovation_burhs + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_3_cost + + province_modifier = { + stationed_maa_damage_mult = high_maa_damage_tier_3 + stationed_maa_toughness_mult = high_maa_toughness_tier_3 + monthly_income = good_building_tax_tier_3 + } + character_modifier = { + knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_3 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = wind_furnace_04 + + ai_value = { + base = 8 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +wind_furnace_04 = { + construction_time = standard_construction_time + effect_desc = windfurnaces_effects_desc + + can_construct_potential = { + building_wind_furnace_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 02 } + scope:holder.culture = { + has_innovation = innovation_burhs + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_4_cost + + province_modifier = { + stationed_maa_damage_mult = high_maa_damage_tier_4 + stationed_maa_toughness_mult = high_maa_toughness_tier_4 + monthly_income = good_building_tax_tier_4 + } + character_modifier = { + knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_4 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = wind_furnace_05 + + ai_value = { + base = 7 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +wind_furnace_05 = { + construction_time = standard_construction_time + effect_desc = windfurnaces_effects_desc + + can_construct_potential = { + building_wind_furnace_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 03 } + scope:holder.culture = { + has_innovation = innovation_castle_baileys + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_5_cost + + province_modifier = { + stationed_maa_damage_mult = high_maa_damage_tier_5 + stationed_maa_toughness_mult = high_maa_toughness_tier_5 + monthly_income = good_building_tax_tier_5 + } + character_modifier = { + knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_5 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = wind_furnace_06 + + ai_value = { + base = 6 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +wind_furnace_06 = { + construction_time = standard_construction_time + effect_desc = windfurnaces_effects_desc + + can_construct_potential = { + building_wind_furnace_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 03 } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_6_cost + + province_modifier = { + stationed_maa_damage_mult = high_maa_damage_tier_6 + stationed_maa_toughness_mult = high_maa_toughness_tier_6 + monthly_income = good_building_tax_tier_6 + } + character_modifier = { + knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_6 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = wind_furnace_07 + + ai_value = { + base = 5 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +wind_furnace_07 = { + construction_time = standard_construction_time + effect_desc = windfurnaces_effects_desc + + can_construct_potential = { + building_wind_furnace_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 04 } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_7_cost + + province_modifier = { + stationed_maa_damage_mult = high_maa_damage_tier_7 + stationed_maa_toughness_mult = high_maa_toughness_tier_7 + monthly_income = good_building_tax_tier_7 + } + character_modifier = { + knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_7 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = wind_furnace_08 + + ai_value = { + base = 4 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +wind_furnace_08 = { + construction_time = standard_construction_time + effect_desc = windfurnaces_effects_desc + + can_construct_potential = { + building_wind_furnace_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 04 } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_8_cost + + province_modifier = { + stationed_maa_damage_mult = high_maa_damage_tier_8 + stationed_maa_toughness_mult = high_maa_toughness_tier_8 + monthly_income = good_building_tax_tier_8 + } + character_modifier = { + knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_8 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + ai_value = { + base = 3 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +### Powder Magazines + +powder_magazine_01 = { + construction_time = standard_construction_time + effect_desc = powder_magazine_1_effect_desc + + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + scope:holder.culture ?= { has_cultural_parameter = unlock_powder_magazines } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_1_cost + + province_modifier = { + stationed_gunpowder_damage_mult = high_maa_damage_tier_1 + stationed_gunpowder_toughness_mult = high_maa_toughness_tier_1 + stationed_siege_weapon_siege_value_mult = normal_maa_siege_value_tier_1 + stationed_maa_siege_value_add = 0.02 + } + character_modifier = { + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + type_icon = "icon_building_powder_magazine.dds" + + next_building = powder_magazine_02 + + ai_value = { + base = 12 + ai_tier_1_building_modifier = yes + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + modifier = { + factor = 0 + building_farm_estates_requirement_terrain = yes + NOT = { + has_building_or_higher = farm_estates_01 + } + } + modifier = { + factor = 0 + building_orchards_requirement_terrain = yes + NOT = { + has_building_or_higher = orchards_01 + } + } + modifier = { + factor = 0 + has_holding_type = city_holding + } + modifier = { + factor = 0 + has_holding_type = church_holding + } + } +} + +powder_magazine_02 = { + construction_time = standard_construction_time + effect_desc = powder_magazine_1_effect_desc + + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + } + + can_construct_showing_failures_only = { + scope:holder.culture = { has_cultural_parameter = unlock_powder_magazines } + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_2_cost + + province_modifier = { + stationed_gunpowder_damage_mult = high_maa_damage_tier_2 + stationed_gunpowder_toughness_mult = high_maa_toughness_tier_2 + stationed_siege_weapon_siege_value_mult = normal_maa_siege_value_tier_2 + stationed_maa_siege_value_add = 0.04 + } + character_modifier = { + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + type_icon = "icon_building_powder_magazine.dds" + + next_building = powder_magazine_03 + + ai_value = { + base = 9 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + modifier = { # Fill all building slots before going for upgrades + factor = 0 + free_building_slots > 0 + } + } +} + +powder_magazine_03 = { + construction_time = standard_construction_time + effect_desc = powder_magazine_1_effect_desc + + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 02 } + } + + can_construct_showing_failures_only = { + scope:holder.culture = { has_cultural_parameter = unlock_powder_magazines } + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_3_cost + + province_modifier = { + stationed_gunpowder_damage_mult = high_maa_damage_tier_3 + stationed_gunpowder_toughness_mult = high_maa_toughness_tier_3 + stationed_siege_weapon_siege_value_mult = normal_maa_siege_value_tier_3 + stationed_maa_siege_value_add = 0.06 + } + character_modifier = { + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + type_icon = "icon_building_powder_magazine.dds" + + next_building = powder_magazine_04 + + ai_value = { + base = 8 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +powder_magazine_04 = { + construction_time = standard_construction_time + effect_desc = powder_magazine_2_effect_desc + + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 02 } + } + + can_construct_showing_failures_only = { + scope:holder.culture = { has_cultural_parameter = unlock_powder_magazines } + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_4_cost + + province_modifier = { + stationed_gunpowder_damage_mult = high_maa_damage_tier_4 + stationed_gunpowder_toughness_mult = high_maa_toughness_tier_4 + stationed_siege_weapon_siege_value_mult = normal_maa_siege_value_tier_4 + stationed_maa_siege_value_add = 0.08 + } + character_modifier = { + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + type_icon = "icon_building_powder_magazine.dds" + + next_building = powder_magazine_05 + + ai_value = { + base = 7 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +powder_magazine_05 = { + construction_time = standard_construction_time + effect_desc = powder_magazine_2_effect_desc + + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 03 } + } + + can_construct_showing_failures_only = { + scope:holder.culture = { has_cultural_parameter = unlock_powder_magazines } + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_5_cost + + province_modifier = { + stationed_gunpowder_damage_mult = high_maa_damage_tier_5 + stationed_gunpowder_toughness_mult = high_maa_toughness_tier_5 + stationed_siege_weapon_siege_value_mult = normal_maa_siege_value_tier_5 + stationed_maa_siege_value_add = 0.1 + } + character_modifier = { + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + type_icon = "icon_building_powder_magazine.dds" + + next_building = powder_magazine_06 + + ai_value = { + base = 6 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +powder_magazine_06 = { + construction_time = standard_construction_time + effect_desc = powder_magazine_2_effect_desc + + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 03 } + } + + can_construct_showing_failures_only = { + scope:holder.culture = { has_cultural_parameter = unlock_powder_magazines } + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_6_cost + + province_modifier = { + stationed_gunpowder_damage_mult = high_maa_damage_tier_6 + stationed_gunpowder_toughness_mult = high_maa_toughness_tier_6 + stationed_siege_weapon_siege_value_mult = normal_maa_siege_value_tier_6 + stationed_maa_siege_value_add = 0.12 + } + character_modifier = { + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + type_icon = "icon_building_powder_magazine.dds" + + next_building = powder_magazine_07 + + ai_value = { + base = 5 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +powder_magazine_07 = { + construction_time = standard_construction_time + effect_desc = powder_magazine_3_effect_desc + + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 04 } + } + + can_construct_showing_failures_only = { + scope:holder.culture = { has_cultural_parameter = unlock_powder_magazines } + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_7_cost + + province_modifier = { + stationed_gunpowder_damage_mult = high_maa_damage_tier_7 + stationed_gunpowder_toughness_mult = high_maa_toughness_tier_7 + stationed_siege_weapon_siege_value_mult = normal_maa_siege_value_tier_7 + stationed_maa_siege_value_add = 0.14 + } + character_modifier = { + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + type_icon = "icon_building_powder_magazine.dds" + + next_building = powder_magazine_08 + + ai_value = { + base = 4 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +powder_magazine_08 = { + construction_time = standard_construction_time + effect_desc = powder_magazine_3_effect_desc + + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 04 } + } + + can_construct_showing_failures_only = { + scope:holder.culture = { has_cultural_parameter = unlock_powder_magazines } + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_8_cost + + province_modifier = { + stationed_gunpowder_damage_mult = high_maa_damage_tier_8 + stationed_gunpowder_toughness_mult = high_maa_toughness_tier_8 + stationed_siege_weapon_siege_value_mult = normal_maa_siege_value_tier_8 + stationed_maa_siege_value_add = 0.16 + } + character_modifier = { + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + type_icon = "icon_building_powder_magazine.dds" + + ai_value = { + base = 3 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +### workshops + +workshops_01 = { + construction_time = slow_construction_time + + can_construct_potential = { + building_workshops_requirement_terrain = yes + building_requirement_castle_city_church = { LEVEL = 01 } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + scope:holder.culture ?= { + has_innovation = innovation_advanced_bowmaking + } + } + + cost_gold = expensive_building_tier_1_cost + + province_modifier = { + monthly_income = normal_building_tax_tier_1 + stationed_siege_weapon_siege_value_mult = normal_maa_siege_value_tier_1 + stationed_maa_siege_value_add = 0.05 + } + character_modifier = { + skirmishers_maintenance_mult = good_building_maa_maintenance_tier_1 + archers_maintenance_mult = good_building_maa_maintenance_tier_1 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = workshops_02 + + type_icon = "icon_building_workshops.dds" + + ai_value = { + base = 10 + ai_tier_1_building_modifier = yes + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + modifier = { + factor = 0 + building_farm_estates_requirement_terrain = yes + NOT = { + has_building_or_higher = farm_estates_01 + } + } + modifier = { + factor = 0 + building_orchards_requirement_terrain = yes + NOT = { + has_building_or_higher = orchards_01 + } + } + } +} + +workshops_02 = { + construction_time = slow_construction_time + + can_construct_potential = { + building_workshops_requirement_terrain = yes + building_requirement_castle_city_church = { LEVEL = 01 } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + scope:holder.culture = { + has_innovation = innovation_advanced_bowmaking + } + } + + cost_gold = expensive_building_tier_2_cost + + province_modifier = { + monthly_income = normal_building_tax_tier_2 + stationed_siege_weapon_siege_value_mult = normal_maa_siege_value_tier_2 + stationed_maa_siege_value_add = 0.1 + } + character_modifier = { + skirmishers_maintenance_mult = good_building_maa_maintenance_tier_2 + archers_maintenance_mult = good_building_maa_maintenance_tier_2 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = workshops_03 + + ai_value = { + base = 9 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + modifier = { # Fill all building slots before going for upgrades + factor = 0 + free_building_slots > 0 + } + } +} + +workshops_03 = { + construction_time = slow_construction_time + + can_construct_potential = { + building_workshops_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 02 } + scope:holder.culture = { + has_innovation = innovation_advanced_bowmaking + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = expensive_building_tier_3_cost + + province_modifier = { + monthly_income = normal_building_tax_tier_3 + stationed_siege_weapon_siege_value_mult = normal_maa_siege_value_tier_3 + stationed_archers_damage_mult = high_maa_damage_tier_1 + stationed_skirmishers_damage_mult = high_maa_damage_tier_1 + stationed_maa_siege_value_add = 0.15 + } + character_modifier = { + skirmishers_maintenance_mult = good_building_maa_maintenance_tier_3 + archers_maintenance_mult = good_building_maa_maintenance_tier_3 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = workshops_04 + + ai_value = { + base = 8 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +workshops_04 = { + construction_time = slow_construction_time + + can_construct_potential = { + building_workshops_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 02 } + scope:holder.culture = { + has_innovation = innovation_advanced_bowmaking + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = expensive_building_tier_4_cost + + province_modifier = { + monthly_income = normal_building_tax_tier_4 + stationed_siege_weapon_siege_value_mult = normal_maa_siege_value_tier_4 + stationed_archers_damage_mult = high_maa_damage_tier_2 + stationed_skirmishers_damage_mult = high_maa_damage_tier_2 + stationed_maa_siege_value_add = 0.2 + } + character_modifier = { + skirmishers_maintenance_mult = good_building_maa_maintenance_tier_4 + archers_maintenance_mult = good_building_maa_maintenance_tier_4 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = workshops_05 + + ai_value = { + base = 7 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +workshops_05 = { + construction_time = slow_construction_time + + can_construct_potential = { + building_workshops_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 03 } + scope:holder.culture = { + has_innovation = innovation_advanced_bowmaking + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = expensive_building_tier_5_cost + + province_modifier = { + monthly_income = normal_building_tax_tier_5 + stationed_siege_weapon_siege_value_mult = normal_maa_siege_value_tier_5 + stationed_archers_damage_mult = high_maa_damage_tier_3 + stationed_skirmishers_damage_mult = high_maa_damage_tier_3 + stationed_maa_siege_value_add = 0.25 + } + character_modifier = { + skirmishers_maintenance_mult = good_building_maa_maintenance_tier_5 + archers_maintenance_mult = good_building_maa_maintenance_tier_5 + cultural_head_fascination_mult = 0.05 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = workshops_06 + + ai_value = { + base = 6 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +workshops_06 = { + construction_time = slow_construction_time + + can_construct_potential = { + building_workshops_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 03 } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = expensive_building_tier_6_cost + + province_modifier = { + monthly_income = normal_building_tax_tier_6 + stationed_siege_weapon_siege_value_mult = normal_maa_siege_value_tier_6 + stationed_archers_damage_mult = high_maa_damage_tier_4 + stationed_skirmishers_damage_mult = high_maa_damage_tier_4 + stationed_maa_siege_value_add = 0.3 + } + character_modifier = { + skirmishers_maintenance_mult = good_building_maa_maintenance_tier_6 + archers_maintenance_mult = good_building_maa_maintenance_tier_6 + cultural_head_fascination_mult = 0.10 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = workshops_07 + + ai_value = { + base = 5 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +workshops_07 = { + construction_time = slow_construction_time + + can_construct_potential = { + building_workshops_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 04 } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = expensive_building_tier_7_cost + + province_modifier = { + monthly_income = normal_building_tax_tier_7 + stationed_siege_weapon_siege_value_mult = normal_maa_siege_value_tier_7 + stationed_archers_damage_mult = high_maa_damage_tier_5 + stationed_skirmishers_damage_mult = high_maa_damage_tier_5 + stationed_maa_siege_value_add = 0.35 + } + character_modifier = { + skirmishers_maintenance_mult = good_building_maa_maintenance_tier_7 + archers_maintenance_mult = good_building_maa_maintenance_tier_7 + cultural_head_fascination_mult = 0.15 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = workshops_08 + + ai_value = { + base = 4 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +workshops_08 = { + construction_time = slow_construction_time + + can_construct_potential = { + building_workshops_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 04 } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = expensive_building_tier_8_cost + + province_modifier = { + monthly_income = normal_building_tax_tier_8 + stationed_siege_weapon_siege_value_mult = normal_maa_siege_value_tier_8 + stationed_archers_damage_mult = high_maa_damage_tier_6 + stationed_skirmishers_damage_mult = high_maa_damage_tier_6 + stationed_maa_siege_value_add = 0.4 + } + character_modifier = { + skirmishers_maintenance_mult = good_building_maa_maintenance_tier_8 + archers_maintenance_mult = good_building_maa_maintenance_tier_8 + cultural_head_fascination_mult = 0.20 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + ai_value = { + base = 3 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +### horse_pastures + +horse_pastures_01 = { + construction_time = quick_construction_time + + can_construct_potential = { + building_horse_pastures_requirement_terrain = yes + } + + can_construct_showing_failures_only = { + } + + cost_gold = cheap_building_tier_1_cost + + levy = small_building_levy_tier_1 + + character_modifier = { + movement_speed = high_movement_speed_tier_1 + movement_speed_land_raiding = high_movement_speed_tier_1 + } + + province_modifier = { + stationed_light_cavalry_toughness_mult = normal_maa_toughness_tier_1 + stationed_light_cavalry_damage_mult = normal_maa_damage_tier_1 + stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_1 + stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_1 + stationed_archer_cavalry_screen_mult = normal_maa_screen_tier_1 + stationed_archer_cavalry_pursuit_mult = normal_maa_pursuit_tier_1 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = horse_pastures_02 + + type_icon = "icon_building_horse_pastures.dds" + + ai_value = { + base = 10 + ai_tier_1_building_modifier = yes + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + ai_stacking_bonus_camel_farms_modifier = yes + ai_stacking_bonus_hillside_grazing_modifier = yes + ai_stacking_bonus_stables_modifier = yes + ai_anti_synergy_armored_infantry_modifier = yes + ai_anti_synergy_light_infantry_modifier = yes + ai_archer_cavalry_modifier = yes + ai_light_cavalry_modifier = yes + modifier = { + factor = 0 + building_regimental_grounds_requirement_terrain = yes + NOT = { + has_building_or_higher = regimental_grounds_01 + } + } + modifier = { + factor = 0 + building_farm_estates_requirement_terrain = yes + NOT = { + has_building_or_higher = farm_estates_01 + } + } + modifier = { + factor = 0 + building_orchards_requirement_terrain = yes + NOT = { + has_building_or_higher = orchards_01 + } + } + modifier = { + add = -9 + has_building_or_higher = city_01 + } + modifier = { + add = -9 + scope:holder = { + OR = { + AND = { + government_has_flag = government_is_theocracy + highest_held_title_tier <= tier_barony + } + is_theocratic_lessee = yes + } + } + } + } +} + +horse_pastures_02 = { + construction_time = quick_construction_time + + can_construct_potential = { + building_horse_pastures_requirement_terrain = yes + } + + can_construct_showing_failures_only = { + scope:holder.culture = { + has_innovation = innovation_barracks + } + } + + cost_gold = cheap_building_tier_2_cost + + levy = small_building_levy_tier_2 + + character_modifier = { + movement_speed = high_movement_speed_tier_2 + movement_speed_land_raiding = high_movement_speed_tier_2 + } + + province_modifier = { + stationed_light_cavalry_toughness_mult = normal_maa_toughness_tier_2 + stationed_light_cavalry_damage_mult = normal_maa_damage_tier_2 + stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_2 + stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_2 + stationed_archer_cavalry_screen_mult = normal_maa_screen_tier_2 + stationed_archer_cavalry_pursuit_mult = normal_maa_pursuit_tier_2 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = horse_pastures_03 + + ai_value = { + base = 9 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + modifier = { # Fill all building slots before going for upgrades + factor = 0 + free_building_slots > 0 + } + } +} + +horse_pastures_03 = { + construction_time = quick_construction_time + + can_construct_potential = { + building_horse_pastures_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 02 } + scope:holder.culture = { + has_innovation = innovation_burhs + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_3_cost + + levy = small_building_levy_tier_3 + + character_modifier = { + movement_speed = high_movement_speed_tier_3 + movement_speed_land_raiding = high_movement_speed_tier_3 + } + + province_modifier = { + stationed_light_cavalry_toughness_mult = normal_maa_toughness_tier_3 + stationed_light_cavalry_damage_mult = normal_maa_damage_tier_3 + stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_3 + stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_3 + stationed_archer_cavalry_screen_mult = normal_maa_screen_tier_3 + stationed_archer_cavalry_pursuit_mult = normal_maa_pursuit_tier_3 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = horse_pastures_04 + + ai_value = { + base = 8 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +horse_pastures_04 = { + construction_time = quick_construction_time + + can_construct_potential = { + building_horse_pastures_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 02 } + scope:holder.culture = { + has_innovation = innovation_burhs + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_4_cost + + levy = small_building_levy_tier_4 + + character_modifier = { + movement_speed = high_movement_speed_tier_4 + movement_speed_land_raiding = high_movement_speed_tier_4 + } + + province_modifier = { + stationed_light_cavalry_toughness_mult = normal_maa_toughness_tier_4 + stationed_light_cavalry_damage_mult = normal_maa_damage_tier_4 + stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_4 + stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_4 + stationed_archer_cavalry_screen_mult = normal_maa_screen_tier_4 + stationed_archer_cavalry_pursuit_mult = normal_maa_pursuit_tier_4 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = horse_pastures_05 + + ai_value = { + base = 7 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +horse_pastures_05 = { + construction_time = quick_construction_time + + can_construct_potential = { + building_horse_pastures_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 03 } + scope:holder.culture = { + has_innovation = innovation_castle_baileys + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_5_cost + + levy = small_building_levy_tier_5 + + character_modifier = { + movement_speed = high_movement_speed_tier_5 + movement_speed_land_raiding = high_movement_speed_tier_5 + } + + province_modifier = { + stationed_light_cavalry_toughness_mult = normal_maa_toughness_tier_5 + stationed_light_cavalry_damage_mult = normal_maa_damage_tier_5 + stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_5 + stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_5 + stationed_archer_cavalry_screen_mult = normal_maa_screen_tier_5 + stationed_archer_cavalry_pursuit_mult = normal_maa_pursuit_tier_5 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = horse_pastures_06 + + ai_value = { + base = 6 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +horse_pastures_06 = { + construction_time = quick_construction_time + + can_construct_potential = { + building_horse_pastures_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 03 } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_6_cost + + levy = small_building_levy_tier_6 + + character_modifier = { + movement_speed = high_movement_speed_tier_6 + movement_speed_land_raiding = high_movement_speed_tier_6 + } + + province_modifier = { + stationed_light_cavalry_toughness_mult = normal_maa_toughness_tier_6 + stationed_light_cavalry_damage_mult = normal_maa_damage_tier_6 + stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_6 + stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_6 + stationed_archer_cavalry_screen_mult = normal_maa_screen_tier_6 + stationed_archer_cavalry_pursuit_mult = normal_maa_pursuit_tier_6 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = horse_pastures_07 + + ai_value = { + base = 5 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +horse_pastures_07 = { + construction_time = quick_construction_time + + can_construct_potential = { + building_horse_pastures_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 04 } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_7_cost + + levy = small_building_levy_tier_7 + + character_modifier = { + movement_speed = high_movement_speed_tier_7 + movement_speed_land_raiding = high_movement_speed_tier_7 + } + + province_modifier = { + stationed_light_cavalry_toughness_mult = normal_maa_toughness_tier_7 + stationed_light_cavalry_damage_mult = normal_maa_damage_tier_7 + stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_7 + stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_7 + stationed_archer_cavalry_screen_mult = normal_maa_screen_tier_7 + stationed_archer_cavalry_pursuit_mult = normal_maa_pursuit_tier_7 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = horse_pastures_08 + + ai_value = { + base = 4 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +horse_pastures_08 = { + construction_time = quick_construction_time + + can_construct_potential = { + building_horse_pastures_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 04 } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_8_cost + + levy = small_building_levy_tier_8 + + character_modifier = { + movement_speed = high_movement_speed_tier_8 + movement_speed_land_raiding = high_movement_speed_tier_8 + } + + province_modifier = { + stationed_light_cavalry_toughness_mult = normal_maa_toughness_tier_8 + stationed_light_cavalry_damage_mult = normal_maa_damage_tier_8 + stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_8 + stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_8 + stationed_archer_cavalry_screen_mult = normal_maa_screen_tier_8 + stationed_archer_cavalry_pursuit_mult = normal_maa_pursuit_tier_8 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + ai_value = { + base = 3 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + + +### hillside_grazing + +hillside_grazing_01 = { + construction_time = quick_construction_time + + can_construct_potential = { + building_hillside_grazing_requirement_terrain = yes + } + + can_construct_showing_failures_only = { + } + + cost_gold = cheap_building_tier_1_cost + + levy = small_building_levy_tier_1 + + province_modifier = { + stationed_light_cavalry_damage_mult = normal_maa_damage_tier_1 + stationed_heavy_cavalry_damage_mult = normal_maa_damage_tier_1 + stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_1 + monthly_income = super_poor_building_tax_tier_1 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = hillside_grazing_02 + + type_icon = "icon_building_hillside_grazing.dds" + + ai_value = { + base = 11 # Little nudge + ai_tier_1_building_modifier = yes + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + ai_stacking_bonus_camel_farms_modifier = yes + ai_stacking_bonus_horse_pastures_modifier = yes + ai_stacking_bonus_stables_modifier = yes + ai_archer_cavalry_modifier = yes + ai_light_cavalry_modifier = yes + ai_heavy_cavalry_modifier = yes + modifier = { + factor = 0 + building_regimental_grounds_requirement_terrain = yes + NOT = { + has_building_or_higher = regimental_grounds_01 + } + } + modifier = { + factor = 0 + building_farm_estates_requirement_terrain = yes + NOT = { + has_building_or_higher = farm_estates_01 + } + } + modifier = { + factor = 0 + building_orchards_requirement_terrain = yes + NOT = { + has_building_or_higher = orchards_01 + } + } + modifier = { + add = -10 + has_building_or_higher = city_01 + } + } +} + +hillside_grazing_02 = { + construction_time = quick_construction_time + + can_construct_potential = { + building_hillside_grazing_requirement_terrain = yes + } + + can_construct_showing_failures_only = { + scope:holder.culture = { + has_innovation = innovation_barracks + } + } + + cost_gold = cheap_building_tier_2_cost + + levy = small_building_levy_tier_2 + + province_modifier = { + stationed_light_cavalry_toughness_mult = low_maa_toughness_tier_1 + stationed_light_cavalry_damage_mult = normal_maa_damage_tier_2 + stationed_heavy_cavalry_toughness_mult = low_maa_toughness_tier_1 + stationed_heavy_cavalry_damage_mult = normal_maa_damage_tier_2 + stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_1 + stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_2 + monthly_income = super_poor_building_tax_tier_2 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = hillside_grazing_03 + + ai_value = { + base = 9 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + modifier = { # Fill all building slots before going for upgrades + factor = 0 + free_building_slots > 0 + } + } +} + +hillside_grazing_03 = { + construction_time = quick_construction_time + + can_construct_potential = { + building_hillside_grazing_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 02 } + scope:holder.culture = { + has_innovation = innovation_burhs + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_3_cost + + levy = small_building_levy_tier_3 + + province_modifier = { + stationed_light_cavalry_toughness_mult = low_maa_toughness_tier_2 + stationed_light_cavalry_damage_mult = normal_maa_damage_tier_3 + stationed_heavy_cavalry_toughness_mult = low_maa_toughness_tier_2 + stationed_heavy_cavalry_damage_mult = normal_maa_damage_tier_3 + stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_2 + stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_3 + monthly_income = super_poor_building_tax_tier_3 + stationed_maa_screen_add = 4 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = hillside_grazing_04 + + ai_value = { + base = 8 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +hillside_grazing_04 = { + construction_time = quick_construction_time + + can_construct_potential = { + building_hillside_grazing_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 02 } + scope:holder.culture = { + has_innovation = innovation_burhs + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_4_cost + + levy = small_building_levy_tier_4 + + province_modifier = { + stationed_light_cavalry_toughness_mult = low_maa_toughness_tier_3 + stationed_light_cavalry_damage_mult = normal_maa_damage_tier_4 + stationed_heavy_cavalry_toughness_mult = low_maa_toughness_tier_3 + stationed_heavy_cavalry_damage_mult = normal_maa_damage_tier_4 + stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_3 + stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_4 + monthly_income = super_poor_building_tax_tier_4 + stationed_maa_screen_add = 6 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = hillside_grazing_05 + + ai_value = { + base = 7 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +hillside_grazing_05 = { + construction_time = quick_construction_time + + can_construct_potential = { + building_hillside_grazing_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 03 } + scope:holder.culture = { + has_innovation = innovation_castle_baileys + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_5_cost + + levy = small_building_levy_tier_5 + + province_modifier = { + stationed_light_cavalry_toughness_mult = low_maa_toughness_tier_4 + stationed_light_cavalry_damage_mult = normal_maa_damage_tier_5 + stationed_heavy_cavalry_toughness_mult = low_maa_toughness_tier_4 + stationed_heavy_cavalry_damage_mult = normal_maa_damage_tier_5 + stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_4 + stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_5 + monthly_income = super_poor_building_tax_tier_5 + stationed_maa_screen_add = 8 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = hillside_grazing_06 + + ai_value = { + base = 6 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +hillside_grazing_06 = { + construction_time = quick_construction_time + + can_construct_potential = { + building_hillside_grazing_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 03 } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_6_cost + + levy = small_building_levy_tier_6 + + province_modifier = { + stationed_light_cavalry_toughness_mult = low_maa_toughness_tier_5 + stationed_light_cavalry_damage_mult = normal_maa_damage_tier_6 + stationed_heavy_cavalry_toughness_mult = low_maa_toughness_tier_5 + stationed_heavy_cavalry_damage_mult = normal_maa_damage_tier_6 + stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_5 + stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_6 + monthly_income = super_poor_building_tax_tier_6 + stationed_maa_screen_add = 12 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = hillside_grazing_07 + + ai_value = { + base = 5 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +hillside_grazing_07 = { + construction_time = quick_construction_time + + can_construct_potential = { + building_hillside_grazing_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 04 } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_7_cost + + levy = small_building_levy_tier_7 + + province_modifier = { + stationed_light_cavalry_toughness_mult = low_maa_toughness_tier_6 + stationed_light_cavalry_damage_mult = normal_maa_damage_tier_7 + stationed_heavy_cavalry_toughness_mult = low_maa_toughness_tier_6 + stationed_heavy_cavalry_damage_mult = normal_maa_damage_tier_7 + stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_6 + stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_7 + monthly_income = super_poor_building_tax_tier_7 + stationed_maa_screen_add = 16 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = hillside_grazing_08 + + ai_value = { + base = 4 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +hillside_grazing_08 = { + construction_time = quick_construction_time + + can_construct_potential = { + building_hillside_grazing_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 04 } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_8_cost + + levy = small_building_levy_tier_8 + + province_modifier = { + stationed_light_cavalry_toughness_mult = low_maa_toughness_tier_7 + stationed_light_cavalry_damage_mult = normal_maa_damage_tier_8 + stationed_heavy_cavalry_toughness_mult = low_maa_toughness_tier_7 + stationed_heavy_cavalry_damage_mult = normal_maa_damage_tier_8 + stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_7 + stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_8 + monthly_income = super_poor_building_tax_tier_8 + stationed_maa_screen_add = 20 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + ai_value = { + base = 3 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + + +### warrior_lodges + +warrior_lodges_01 = { + construction_time = quick_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_civil_cost_low_discount_effect_toto_desc + } + } + can_construct_potential = { + building_warrior_lodges_requirement_terrain = yes + trigger_if = { + limit = { + scope:holder = { + NOT = { + government_has_flag = government_is_tribal + } + } + } + NOT = { + has_holding_type = tribal_holding + } + } + } + + can_construct_showing_failures_only = { + } + + cost_gold = cheap_building_tier_1_cost + + levy = normal_building_levy_tier_1 + + province_modifier = { + stationed_skirmishers_damage_mult = normal_maa_damage_tier_1 + stationed_pikemen_damage_mult = normal_maa_damage_tier_1 + stationed_heavy_infantry_damage_mult = normal_maa_damage_tier_1 + travel_danger = -1 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = warrior_lodges_02 + + type_icon = "icon_building_warrior_lodges.dds" + + ai_value = { + base = 11 # Little nudge + ai_tier_1_building_modifier = yes + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + ai_stacking_bonus_military_camps_modifier = yes + ai_stacking_bonus_smiths_modifier = yes + ai_stacking_bonus_wind_furnaces_modifier = yes + ai_stacking_bonus_outposts_modifier = yes + ai_skirmisher_modifier = yes + ai_pikemen_modifier = yes + ai_heavy_infantry_modifier = yes + modifier = { + factor = 0 + building_regimental_grounds_requirement_terrain = yes + NOT = { + has_building_or_higher = regimental_grounds_01 + } + } + modifier = { + factor = 0 + building_farm_estates_requirement_terrain = yes + NOT = { + has_building_or_higher = farm_estates_01 + } + } + modifier = { + factor = 0 + building_orchards_requirement_terrain = yes + NOT = { + has_building_or_higher = orchards_01 + } + } + modifier = { + add = -10 + has_building_or_higher = city_01 + } + modifier = { + add = -10 + scope:holder = { + OR = { + AND = { + government_has_flag = government_is_theocracy + highest_held_title_tier <= tier_barony + } + is_theocratic_lessee = yes + } + } + } + } +} + +warrior_lodges_02 = { + construction_time = quick_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_civil_cost_low_discount_effect_toto_desc + } + } + can_construct_potential = { + building_warrior_lodges_requirement_terrain = yes + trigger_if = { + limit = { + scope:holder = { + NOT = { + government_has_flag = government_is_tribal + } + } + } + NOT = { + has_holding_type = tribal_holding + } + } + } + + can_construct_showing_failures_only = { + scope:holder.culture = { + has_innovation = innovation_barracks + } + } + + cost_gold = cheap_building_tier_2_cost + + levy = normal_building_levy_tier_2 + + province_modifier = { + stationed_skirmishers_toughness_mult = low_maa_toughness_tier_1 + stationed_skirmishers_damage_mult = normal_maa_damage_tier_2 + stationed_pikemen_toughness_mult = low_maa_toughness_tier_1 + stationed_pikemen_damage_mult = normal_maa_damage_tier_2 + stationed_heavy_infantry_toughness_mult = low_maa_toughness_tier_1 + stationed_heavy_infantry_damage_mult = normal_maa_damage_tier_2 + travel_danger = -2 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = warrior_lodges_03 + + ai_value = { + base = 9 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + modifier = { # Fill all building slots before going for upgrades + factor = 0 + free_building_slots > 0 + } + } +} + +warrior_lodges_03 = { + construction_time = quick_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_civil_cost_low_discount_effect_toto_desc + } + } + can_construct_potential = { + building_warrior_lodges_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 02 } + scope:holder.culture = { + has_innovation = innovation_burhs + } + trigger_if = { + limit = { + scope:holder = { + NOT = { + government_has_flag = government_is_tribal + } + } + } + NOT = { + has_holding_type = tribal_holding + } + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_3_cost + + levy = normal_building_levy_tier_3 + + province_modifier = { + stationed_skirmishers_toughness_mult = low_maa_toughness_tier_2 + stationed_skirmishers_damage_mult = normal_maa_damage_tier_3 + stationed_pikemen_toughness_mult = low_maa_toughness_tier_2 + stationed_pikemen_damage_mult = normal_maa_damage_tier_3 + stationed_heavy_infantry_toughness_mult = low_maa_toughness_tier_2 + stationed_heavy_infantry_damage_mult = normal_maa_damage_tier_3 + stationed_maa_pursuit_add = 4 + travel_danger = -3 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = warrior_lodges_04 + + ai_value = { + base = 8 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +warrior_lodges_04 = { + construction_time = quick_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_civil_cost_low_discount_effect_toto_desc + } + } + can_construct_potential = { + building_warrior_lodges_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 02 } + scope:holder.culture = { + has_innovation = innovation_burhs + } + trigger_if = { + limit = { + scope:holder = { + NOT = { + government_has_flag = government_is_tribal + } + } + } + NOT = { + has_holding_type = tribal_holding + } + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_4_cost + + levy = normal_building_levy_tier_4 + + province_modifier = { + stationed_skirmishers_toughness_mult = low_maa_toughness_tier_3 + stationed_skirmishers_damage_mult = normal_maa_damage_tier_4 + stationed_pikemen_toughness_mult = low_maa_toughness_tier_3 + stationed_pikemen_damage_mult = normal_maa_damage_tier_4 + stationed_heavy_infantry_toughness_mult = low_maa_toughness_tier_3 + stationed_heavy_infantry_damage_mult = normal_maa_damage_tier_4 + stationed_maa_pursuit_add = 6 + travel_danger = -4 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = warrior_lodges_05 + + ai_value = { + base = 7 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +warrior_lodges_05 = { + construction_time = quick_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_civil_cost_low_discount_effect_toto_desc + } + } + can_construct_potential = { + building_warrior_lodges_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 03 } + scope:holder.culture = { + has_innovation = innovation_castle_baileys + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_5_cost + + levy = normal_building_levy_tier_5 + + province_modifier = { + stationed_skirmishers_toughness_mult = low_maa_toughness_tier_4 + stationed_skirmishers_damage_mult = normal_maa_damage_tier_5 + stationed_pikemen_toughness_mult = low_maa_toughness_tier_4 + stationed_pikemen_damage_mult = normal_maa_damage_tier_5 + stationed_heavy_infantry_toughness_mult = low_maa_toughness_tier_4 + stationed_heavy_infantry_damage_mult = normal_maa_damage_tier_5 + stationed_maa_pursuit_add = 8 + travel_danger = -5 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = warrior_lodges_06 + + ai_value = { + base = 6 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +warrior_lodges_06 = { + construction_time = quick_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_civil_cost_low_discount_effect_toto_desc + } + } + can_construct_potential = { + building_warrior_lodges_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 03 } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_6_cost + + levy = normal_building_levy_tier_6 + + province_modifier = { + stationed_skirmishers_toughness_mult = low_maa_toughness_tier_5 + stationed_skirmishers_damage_mult = normal_maa_damage_tier_6 + stationed_pikemen_toughness_mult = low_maa_toughness_tier_5 + stationed_pikemen_damage_mult = normal_maa_damage_tier_6 + stationed_heavy_infantry_toughness_mult = low_maa_toughness_tier_5 + stationed_heavy_infantry_damage_mult = normal_maa_damage_tier_6 + stationed_maa_pursuit_add = 12 + travel_danger = -6 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = warrior_lodges_07 + + ai_value = { + base = 5 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +warrior_lodges_07 = { + construction_time = quick_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_civil_cost_low_discount_effect_toto_desc + } + } + can_construct_potential = { + building_warrior_lodges_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 04 } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_7_cost + + levy = normal_building_levy_tier_7 + + province_modifier = { + stationed_skirmishers_toughness_mult = low_maa_toughness_tier_6 + stationed_skirmishers_damage_mult = normal_maa_damage_tier_7 + stationed_pikemen_toughness_mult = low_maa_toughness_tier_6 + stationed_pikemen_damage_mult = normal_maa_damage_tier_7 + stationed_heavy_infantry_toughness_mult = low_maa_toughness_tier_6 + stationed_heavy_infantry_damage_mult = normal_maa_damage_tier_7 + stationed_maa_pursuit_add = 16 + travel_danger = -7 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = warrior_lodges_08 + + ai_value = { + base = 4 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +warrior_lodges_08 = { + construction_time = quick_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_civil_cost_low_discount_effect_toto_desc + } + } + can_construct_potential = { + building_warrior_lodges_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 04 } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_8_cost + + levy = normal_building_levy_tier_8 + + province_modifier = { + stationed_skirmishers_toughness_mult = low_maa_toughness_tier_7 + stationed_skirmishers_damage_mult = normal_maa_damage_tier_8 + stationed_pikemen_toughness_mult = low_maa_toughness_tier_7 + stationed_pikemen_damage_mult = normal_maa_damage_tier_8 + stationed_heavy_infantry_toughness_mult = low_maa_toughness_tier_7 + stationed_heavy_infantry_damage_mult = normal_maa_damage_tier_8 + stationed_maa_pursuit_add = 20 + travel_danger = -8 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + ai_value = { + base = 3 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +### military_camps + +military_camps_01 = { + construction_time = quick_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_archery_cost_discount_effect_toto_desc + } + } + can_construct_potential = { + building_military_camps_requirement_terrain = yes + building_requirement_castle_city_church = { LEVEL = 01 } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_1_cost + + levy = normal_building_levy_tier_1 + + province_modifier = { + stationed_archers_damage_mult = high_maa_damage_tier_1 + stationed_skirmishers_damage_mult = high_maa_damage_tier_1 + stationed_skirmishers_pursuit_mult = high_maa_pursuit_tier_1 + travel_danger = -1 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = military_camps_02 + + type_icon = "icon_building_military_camps.dds" + + ai_value = { + base = 10 + ai_tier_1_building_modifier = yes + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + ai_stacking_bonus_warrior_lodges_modifier = yes + ai_stacking_bonus_outposts_modifier = yes + ai_anti_synergy_armored_infantry_modifier = yes + ai_anti_synergy_cavalry_modifier = yes + ai_anti_synergy_light_infantry_modifier = yes + ai_skirmisher_modifier = yes + ai_archer_modifier = yes + modifier = { + add = non_stationed_maa_bonus + has_stationed_regiment = yes + NOR = { + has_stationed_regiment_of_base_type = skirmishers + has_stationed_regiment_of_base_type = archers + } + } + modifier = { + factor = 0 + building_regimental_grounds_requirement_terrain = yes + NOT = { + has_building_or_higher = regimental_grounds_01 + } + } + modifier = { + factor = 0 + building_farm_estates_requirement_terrain = yes + NOT = { + has_building_or_higher = farm_estates_01 + } + } + modifier = { + factor = 0 + building_orchards_requirement_terrain = yes + NOT = { + has_building_or_higher = orchards_01 + } + } + modifier = { + factor = 0 + building_horse_pastures_requirement_terrain = yes + NOT = { + has_building_or_higher = horse_pastures_01 + } + } + modifier = { + factor = 0 + building_hillside_grazing_requirement_terrain = yes + NOT = { + has_building_or_higher = hillside_grazing_01 + } + } + modifier = { + factor = 0 + building_warrior_lodges_requirement_terrain = yes + NOT = { + has_building_or_higher = warrior_lodges_01 + } + } + modifier = { + add = -9 + has_building_or_higher = city_01 + } + modifier = { + add = -3 + OR = { + exists = barony.lessee + scope:holder = { + highest_held_title_tier <= tier_barony + } + } + } + modifier = { + add = -10 + scope:holder = { + OR = { + AND = { + government_has_flag = government_is_theocracy + highest_held_title_tier <= tier_barony + } + is_theocratic_lessee = yes + } + } + } + } +} + +military_camps_02 = { + construction_time = quick_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_archery_cost_discount_effect_toto_desc + } + } + can_construct_potential = { + building_military_camps_requirement_terrain = yes + building_requirement_castle_city_church = { LEVEL = 01 } + trigger_if = { + limit = { + NOT = { + culture = { + has_cultural_parameter = next_level_military_camps + } + } + } + scope:holder.culture = { + has_innovation = innovation_barracks + } + } + trigger_else = { + culture = { + has_cultural_parameter = next_level_military_camps + } + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_2_cost + + levy = normal_building_levy_tier_2 + + province_modifier = { + stationed_archers_damage_mult = high_maa_damage_tier_2 + stationed_skirmishers_damage_mult = high_maa_damage_tier_2 + stationed_skirmishers_pursuit_mult = high_maa_pursuit_tier_2 + travel_danger = -2 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = military_camps_03 + + ai_value = { + base = 9 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + modifier = { # Fill all building slots before going for upgrades + factor = 0 + free_building_slots > 0 + } + } +} + +military_camps_03 = { + construction_time = quick_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_archery_cost_discount_effect_toto_desc + } + } + can_construct_potential = { + building_military_camps_requirement_terrain = yes + } + + can_construct = { + trigger_if = { + limit = { + NOT = { + culture = { + has_cultural_parameter = next_level_military_camps + } + } + } + scope:holder.culture = { + has_innovation = innovation_burhs + } + building_requirement_castle_city_church = { LEVEL = 02 } + } + trigger_else = { + culture = { + has_cultural_parameter = next_level_military_camps + } + building_requirement_castle_city_church = { LEVEL = 01 } + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_3_cost + + levy = normal_building_levy_tier_3 + + province_modifier = { + stationed_archers_damage_mult = high_maa_damage_tier_3 + stationed_skirmishers_damage_mult = high_maa_damage_tier_3 + stationed_skirmishers_pursuit_mult = high_maa_pursuit_tier_3 + stationed_skirmishers_screen_mult = normal_maa_screen_tier_1 + stationed_archers_toughness_mult = normal_maa_toughness_tier_1 + stationed_skirmishers_toughness_mult = normal_maa_toughness_tier_1 + travel_danger = -3 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = military_camps_04 + + ai_value = { + base = 8 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +military_camps_04 = { + construction_time = quick_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_archery_cost_discount_effect_toto_desc + } + } + can_construct_potential = { + building_military_camps_requirement_terrain = yes + } + + can_construct = { + trigger_if = { + limit = { + NOT = { + culture = { + has_cultural_parameter = next_level_military_camps + } + } + } + scope:holder.culture = { + has_innovation = innovation_burhs + } + building_requirement_castle_city_church = { LEVEL = 02 } + } + trigger_else = { + culture = { + has_cultural_parameter = next_level_military_camps + } + building_requirement_castle_city_church = { LEVEL = 01 } + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_4_cost + + levy = normal_building_levy_tier_4 + + county_modifier = { + supply_limit = 200 + monthly_county_control_growth_factor = 0.05 + } + + province_modifier = { + stationed_archers_damage_mult = high_maa_damage_tier_4 + stationed_skirmishers_damage_mult = high_maa_damage_tier_4 + stationed_skirmishers_pursuit_mult = high_maa_pursuit_tier_4 + stationed_skirmishers_screen_mult = normal_maa_screen_tier_2 + stationed_archers_toughness_mult = normal_maa_toughness_tier_2 + stationed_skirmishers_toughness_mult = normal_maa_toughness_tier_2 + travel_danger = -4 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = military_camps_05 + + ai_value = { + base = 7 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +military_camps_05 = { + construction_time = quick_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_archery_cost_discount_effect_toto_desc + } + } + can_construct_potential = { + building_military_camps_requirement_terrain = yes + } + + can_construct = { + trigger_if = { + limit = { + NOT = { + culture = { + has_cultural_parameter = next_level_military_camps + } + } + } + scope:holder.culture = { + has_innovation = innovation_castle_baileys + } + building_requirement_castle_city_church = { LEVEL = 03 } + } + trigger_else = { + culture = { + has_cultural_parameter = next_level_military_camps + } + scope:holder.culture = { + has_innovation = innovation_burhs + } + building_requirement_castle_city_church = { LEVEL = 02 } + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_5_cost + + levy = normal_building_levy_tier_5 + + character_modifier = { + men_at_arms_maintenance = normal_building_maa_maintenance_tier_5 + } + + county_modifier = { + supply_limit = 400 + monthly_county_control_growth_factor = 0.1 + } + + province_modifier = { + stationed_archers_damage_mult = high_maa_damage_tier_5 + stationed_skirmishers_damage_mult = high_maa_damage_tier_5 + stationed_skirmishers_pursuit_mult = high_maa_pursuit_tier_5 + stationed_skirmishers_screen_mult = normal_maa_screen_tier_3 + stationed_archers_toughness_mult = normal_maa_toughness_tier_3 + stationed_skirmishers_toughness_mult = normal_maa_toughness_tier_3 + travel_danger = -5 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = military_camps_06 + + ai_value = { + base = 6 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +military_camps_06 = { + construction_time = quick_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_archery_cost_discount_effect_toto_desc + } + } + can_construct_potential = { + building_military_camps_requirement_terrain = yes + } + + can_construct = { + trigger_if = { + limit = { + NOT = { + culture = { + has_cultural_parameter = next_level_military_camps + } + } + } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + building_requirement_castle_city_church = { LEVEL = 03 } + } + trigger_else = { + culture = { + has_cultural_parameter = next_level_military_camps + } + scope:holder.culture = { + has_innovation = innovation_castle_baileys + } + building_requirement_castle_city_church = { LEVEL = 02 } + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_6_cost + + levy = normal_building_levy_tier_6 + + character_modifier = { + men_at_arms_maintenance = normal_building_maa_maintenance_tier_6 + } + + county_modifier = { + supply_limit = 600 + monthly_county_control_growth_factor = 0.15 + } + + province_modifier = { + stationed_archers_damage_mult = high_maa_damage_tier_6 + stationed_skirmishers_damage_mult = high_maa_damage_tier_6 + stationed_skirmishers_pursuit_mult = high_maa_pursuit_tier_6 + stationed_skirmishers_screen_mult = normal_maa_screen_tier_4 + stationed_archers_toughness_mult = normal_maa_toughness_tier_4 + stationed_skirmishers_toughness_mult = normal_maa_toughness_tier_4 + travel_danger = -6 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = military_camps_07 + + ai_value = { + base = 5 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +military_camps_07 = { + construction_time = quick_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_archery_cost_discount_effect_toto_desc + } + } + can_construct_potential = { + building_military_camps_requirement_terrain = yes + } + + can_construct = { + trigger_if = { + limit = { + NOT = { + culture = { + has_cultural_parameter = next_level_military_camps + } + } + } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + building_requirement_castle_city_church = { LEVEL = 04 } + } + trigger_else = { + culture = { + has_cultural_parameter = next_level_military_camps + } + scope:holder.culture = { + has_innovation = innovation_castle_baileys + } + building_requirement_castle_city_church = { LEVEL = 03 } + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_7_cost + + levy = normal_building_levy_tier_7 + + character_modifier = { + men_at_arms_maintenance = normal_building_maa_maintenance_tier_7 + } + + county_modifier = { + supply_limit = 800 + monthly_county_control_growth_factor = 0.20 + } + + province_modifier = { + stationed_archers_damage_mult = high_maa_damage_tier_7 + stationed_skirmishers_damage_mult = high_maa_damage_tier_7 + stationed_skirmishers_pursuit_mult = high_maa_pursuit_tier_7 + stationed_skirmishers_screen_mult = normal_maa_screen_tier_5 + stationed_archers_toughness_mult = normal_maa_toughness_tier_5 + stationed_skirmishers_toughness_mult = normal_maa_toughness_tier_5 + travel_danger = -7 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = military_camps_08 + + ai_value = { + base = 4 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +military_camps_08 = { + construction_time = quick_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_archery_cost_discount_effect_toto_desc + } + } + can_construct_potential = { + building_military_camps_requirement_terrain = yes + } + + can_construct = { + trigger_if = { + limit = { + NOT = { + culture = { + has_cultural_parameter = next_level_military_camps + } + } + } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + building_requirement_castle_city_church = { LEVEL = 04 } + } + trigger_else = { + culture = { + has_cultural_parameter = next_level_military_camps + } + scope:holder.culture = { + has_innovation = innovation_castle_baileys + } + building_requirement_castle_city_church = { LEVEL = 03 } + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_8_cost + + levy = normal_building_levy_tier_8 + + character_modifier = { + men_at_arms_maintenance = normal_building_maa_maintenance_tier_8 + } + + county_modifier = { + supply_limit = 1000 + monthly_county_control_growth_factor = 0.25 + } + + province_modifier = { + stationed_archers_damage_mult = high_maa_damage_tier_8 + stationed_skirmishers_damage_mult = high_maa_damage_tier_8 + stationed_skirmishers_pursuit_mult = high_maa_pursuit_tier_8 + stationed_skirmishers_screen_mult = normal_maa_screen_tier_6 + stationed_archers_toughness_mult = normal_maa_toughness_tier_6 + stationed_skirmishers_toughness_mult = normal_maa_toughness_tier_6 + travel_danger = -8 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + ai_value = { + base = 3 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +### regimental_grounds + +regimental_grounds_01 = { + construction_time = slow_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_wrestling_cost_discount_effect_toto_desc + } + } + can_construct_potential = { + building_regimental_grounds_requirement_terrain = yes + building_requirement_castle_city_church = { LEVEL = 01 } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = expensive_building_tier_1_cost + + levy = excellent_building_levy_tier_1 + + character_modifier = { + men_at_arms_maintenance = good_building_maa_maintenance_tier_1 + } + + province_modifier = { + stationed_maa_damage_mult = normal_maa_damage_tier_1 + stationed_maa_toughness_mult = normal_maa_toughness_tier_1 + travel_danger = -1 + } + county_modifier = { + levy_reinforcement_rate = high_levy_reinforcement_rate_tier_1 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = regimental_grounds_02 + + type_icon = "icon_building_regimental_grounds.dds" + + ai_value = { + base = 13 # One of the best buildings, a slight nudge + ai_tier_1_building_modifier = yes + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + modifier = { + add = -99 + has_building_or_higher = city_01 + } + modifier = { + add = -10 + scope:holder = { + OR = { + AND = { + government_has_flag = government_is_theocracy + highest_held_title_tier <= tier_barony + } + is_theocratic_lessee = yes + } + } + } + } +} + +regimental_grounds_02 = { + construction_time = slow_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_wrestling_cost_discount_effect_toto_desc + } + } + can_construct_potential = { + building_regimental_grounds_requirement_terrain = yes + building_requirement_castle_city_church = { LEVEL = 01 } + scope:holder.culture = { + has_innovation = innovation_barracks + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = expensive_building_tier_2_cost + + levy = excellent_building_levy_tier_2 + + character_modifier = { + men_at_arms_maintenance = good_building_maa_maintenance_tier_2 + } + + province_modifier = { + stationed_maa_damage_mult = normal_maa_damage_tier_2 + stationed_maa_toughness_mult = normal_maa_toughness_tier_2 + travel_danger = -2 + } + + county_modifier = { + levy_reinforcement_rate = high_levy_reinforcement_rate_tier_2 + monthly_county_control_growth_factor = 0.05 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = regimental_grounds_03 + + ai_value = { + base = 9 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + modifier = { # Fill all building slots before going for upgrades + factor = 0 + free_building_slots > 0 + } + } +} + +regimental_grounds_03 = { + construction_time = slow_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_wrestling_cost_discount_effect_toto_desc + } + } + can_construct_potential = { + building_regimental_grounds_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 02 } + scope:holder.culture = { + has_innovation = innovation_burhs + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = expensive_building_tier_3_cost + + levy = excellent_building_levy_tier_3 + + character_modifier = { + men_at_arms_maintenance = good_building_maa_maintenance_tier_3 + } + + province_modifier = { + stationed_maa_damage_mult = normal_maa_damage_tier_3 + stationed_maa_toughness_mult = normal_maa_toughness_tier_3 + travel_danger = -3 + } + + county_modifier = { + levy_reinforcement_rate = high_levy_reinforcement_rate_tier_3 + monthly_county_control_growth_factor = 0.05 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = regimental_grounds_04 + + ai_value = { + base = 8 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +regimental_grounds_04 = { + construction_time = slow_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_wrestling_cost_discount_effect_toto_desc + } + } + can_construct_potential = { + building_regimental_grounds_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 02 } + scope:holder.culture = { + has_innovation = innovation_burhs + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = expensive_building_tier_4_cost + + levy = excellent_building_levy_tier_4 + + character_modifier = { + men_at_arms_maintenance = good_building_maa_maintenance_tier_4 + } + + province_modifier = { + stationed_maa_damage_mult = normal_maa_damage_tier_4 + stationed_maa_toughness_mult = normal_maa_toughness_tier_4 + travel_danger = -4 + } + + county_modifier = { + levy_reinforcement_rate = high_levy_reinforcement_rate_tier_4 + monthly_county_control_growth_factor = 0.05 + levy_size = 0.02 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = regimental_grounds_05 + + ai_value = { + base = 7 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +regimental_grounds_05 = { + construction_time = slow_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_wrestling_cost_discount_effect_toto_desc + } + } + can_construct_potential = { + building_regimental_grounds_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 03 } + scope:holder.culture = { + has_innovation = innovation_castle_baileys + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = expensive_building_tier_5_cost + + levy = excellent_building_levy_tier_5 + + character_modifier = { + men_at_arms_maintenance = good_building_maa_maintenance_tier_5 + } + + province_modifier = { + stationed_maa_damage_mult = normal_maa_damage_tier_5 + stationed_maa_toughness_mult = normal_maa_toughness_tier_5 + supply_limit = 1000 + travel_danger = -5 + } + + county_modifier = { + levy_reinforcement_rate = high_levy_reinforcement_rate_tier_5 + monthly_county_control_growth_factor = 0.05 + levy_size = 0.02 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = regimental_grounds_06 + + ai_value = { + base = 6 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +regimental_grounds_06 = { + construction_time = slow_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_wrestling_cost_discount_effect_toto_desc + } + } + can_construct_potential = { + building_regimental_grounds_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 03 } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = expensive_building_tier_6_cost + + levy = excellent_building_levy_tier_6 + + character_modifier = { + men_at_arms_maintenance = good_building_maa_maintenance_tier_6 + } + + province_modifier = { + stationed_maa_damage_mult = normal_maa_damage_tier_6 + stationed_maa_toughness_mult = normal_maa_toughness_tier_6 + supply_limit = 1000 + travel_danger = -6 + } + + county_modifier = { + levy_reinforcement_rate = high_levy_reinforcement_rate_tier_6 + monthly_county_control_growth_factor = 0.05 + levy_size = 0.02 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = regimental_grounds_07 + + ai_value = { + base = 5 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +regimental_grounds_07 = { + construction_time = slow_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_wrestling_cost_discount_effect_toto_desc + } + } + can_construct_potential = { + building_regimental_grounds_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 04 } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = expensive_building_tier_7_cost + + levy = excellent_building_levy_tier_7 + + character_modifier = { + men_at_arms_maintenance = good_building_maa_maintenance_tier_7 + knight_limit = 1 + } + + province_modifier = { + stationed_maa_damage_mult = normal_maa_damage_tier_7 + stationed_maa_toughness_mult = normal_maa_toughness_tier_7 + supply_limit = 1000 + travel_danger = -7 + } + + county_modifier = { + levy_reinforcement_rate = high_levy_reinforcement_rate_tier_7 + monthly_county_control_growth_factor = 0.05 + levy_size = 0.02 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = regimental_grounds_08 + + ai_value = { + base = 4 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +regimental_grounds_08 = { + construction_time = slow_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_wrestling_cost_discount_effect_toto_desc + } + } + can_construct_potential = { + building_regimental_grounds_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 04 } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = expensive_building_tier_8_cost + + levy = excellent_building_levy_tier_8 + + character_modifier = { + men_at_arms_maintenance = good_building_maa_maintenance_tier_8 + knight_limit = 1 + army_maintenance_mult = -0.01 + } + + province_modifier = { + stationed_maa_damage_mult = normal_maa_damage_tier_8 + stationed_maa_toughness_mult = normal_maa_toughness_tier_8 + supply_limit = 1000 + travel_danger = -8 + } + + county_modifier = { + levy_reinforcement_rate = high_levy_reinforcement_rate_tier_8 + monthly_county_control_growth_factor = 0.05 + levy_size = 0.02 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + ai_value = { + base = 3 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +### outposts + +outposts_01 = { + construction_time = quick_construction_time + effect_desc = outposts_desc + + can_construct_potential = { + building_outposts_requirement_terrain = yes + building_requirement_castle_city_church = { LEVEL = 01 } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_1_cost + + levy = poor_building_levy_tier_1 + province_modifier = { + monthly_income = super_poor_building_tax_tier_1 + defender_holding_advantage = normal_building_advantage_tier_1 + stationed_skirmishers_damage_mult = low_maa_damage_tier_1 + stationed_skirmishers_toughness_mult = normal_maa_toughness_tier_1 + stationed_skirmishers_screen_mult = normal_maa_screen_tier_1 + stationed_archers_damage_mult = low_maa_damage_tier_1 + stationed_archers_toughness_mult = normal_maa_toughness_tier_1 + hostile_raid_time = 0.1 + travel_danger = -1 + } + character_culture_modifier = { + parameter = outposts_building_bonuses + skirmishers_maintenance_mult = -0.01 + archers_maintenance_mult = -0.01 + skirmishers_recruitment_cost_mult = -0.01 + archers_recruitment_cost_mult = -0.01 + } + province_culture_modifier = { + parameter = outposts_building_bonuses + monthly_income = super_poor_building_tax_tier_1 + levy_size = 0.01 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = outposts_02 + + type_icon = "icon_building_outposts.dds" + + ai_value = { + base = 10 + ai_tier_1_building_modifier = yes + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + ai_skirmisher_modifier = yes + ai_archer_modifier = yes + ai_stacking_bonus_warrior_lodges_modifier = yes + ai_stacking_bonus_military_camps_modifier = yes + ai_anti_synergy_armored_infantry_modifier = yes + ai_anti_synergy_cavalry_modifier = yes + modifier = { + factor = 0 + building_camel_farms_requirement_terrain = yes + NOT = { + has_building_or_higher = camel_farms_01 + } + } + modifier = { + factor = 0 + building_horse_pastures_requirement_terrain = yes + NOT = { + has_building_or_higher = horse_pastures_01 + } + } + modifier = { + factor = 0 + building_hillside_grazing_requirement_terrain = yes + NOT = { + has_building_or_higher = hillside_grazing_01 + } + } + modifier = { + factor = 0 + building_warrior_lodges_requirement_terrain = yes + NOT = { + has_building_or_higher = warrior_lodges_01 + } + } + modifier = { # It now has a small economic component; build it last + add = -3 + has_building_or_higher = city_01 + } + modifier = { + add = -10 + scope:holder = { + OR = { + AND = { + government_has_flag = government_is_theocracy + highest_held_title_tier <= tier_barony + } + is_theocratic_lessee = yes + } + } + } + } +} + +outposts_02 = { + construction_time = quick_construction_time + effect_desc = outposts_desc + + can_construct_potential = { + building_outposts_requirement_terrain = yes + building_requirement_castle_city_church = { LEVEL = 01 } + } + + can_construct_showing_failures_only = { + scope:holder.culture = { + has_innovation = innovation_barracks + } + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_2_cost + + levy = poor_building_levy_tier_2 + province_modifier = { + monthly_income = super_poor_building_tax_tier_2 + defender_holding_advantage = normal_building_advantage_tier_2 + stationed_skirmishers_damage_mult = low_maa_damage_tier_2 + stationed_skirmishers_toughness_mult = normal_maa_toughness_tier_2 + stationed_skirmishers_screen_mult = normal_maa_screen_tier_2 + stationed_archers_damage_mult = low_maa_damage_tier_2 + stationed_archers_toughness_mult = normal_maa_toughness_tier_2 + hostile_raid_time = 0.2 + travel_danger = -2 + } + county_modifier = { + monthly_county_control_growth_add = 0.1 + } + character_culture_modifier = { + parameter = outposts_building_bonuses + skirmishers_maintenance_mult = -0.02 + archers_maintenance_mult = -0.02 + skirmishers_recruitment_cost_mult = -0.02 + archers_recruitment_cost_mult = -0.02 + } + province_culture_modifier = { + parameter = outposts_building_bonuses + monthly_income = super_poor_building_tax_tier_2 + levy_size = 0.02 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = outposts_03 + + ai_value = { + base = 9 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + modifier = { # Fill all building slots before going for upgrades + factor = 0 + free_building_slots > 0 + } + } +} + +outposts_03 = { + construction_time = quick_construction_time + effect_desc = outposts_desc + + can_construct_potential = { + building_outposts_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 02 } + scope:holder.culture = { + has_innovation = innovation_burhs + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_3_cost + + levy = poor_building_levy_tier_3 + province_modifier = { + monthly_income = super_poor_building_tax_tier_3 + defender_holding_advantage = normal_building_advantage_tier_3 + stationed_skirmishers_damage_mult = low_maa_damage_tier_3 + stationed_skirmishers_toughness_mult = normal_maa_toughness_tier_3 + stationed_skirmishers_screen_mult = normal_maa_screen_tier_3 + stationed_archers_damage_mult = low_maa_damage_tier_3 + stationed_archers_toughness_mult = normal_maa_toughness_tier_3 + hostile_raid_time = 0.3 + travel_danger = -3 + } + county_modifier = { + monthly_county_control_growth_add = 0.1 + } + character_culture_modifier = { + parameter = outposts_building_bonuses + skirmishers_maintenance_mult = -0.03 + archers_maintenance_mult = -0.03 + skirmishers_recruitment_cost_mult = -0.03 + archers_recruitment_cost_mult = -0.03 + } + province_culture_modifier = { + parameter = outposts_building_bonuses + monthly_income = super_poor_building_tax_tier_3 + levy_size = 0.03 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = outposts_04 + + ai_value = { + base = 8 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +outposts_04 = { + construction_time = quick_construction_time + effect_desc = outposts_desc + + can_construct_potential = { + building_outposts_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 02 } + scope:holder.culture = { + has_innovation = innovation_burhs + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_4_cost + + levy = poor_building_levy_tier_4 + province_modifier = { + monthly_income = super_poor_building_tax_tier_4 + defender_holding_advantage = normal_building_advantage_tier_4 + stationed_skirmishers_damage_mult = low_maa_damage_tier_4 + stationed_skirmishers_toughness_mult = normal_maa_toughness_tier_4 + stationed_skirmishers_screen_mult = normal_maa_screen_tier_4 + stationed_archers_damage_mult = low_maa_damage_tier_4 + stationed_archers_toughness_mult = normal_maa_toughness_tier_4 + hostile_raid_time = 0.4 + travel_danger = -4 + } + county_modifier = { + monthly_county_control_growth_add = 0.1 + } + character_culture_modifier = { + parameter = outposts_building_bonuses + skirmishers_maintenance_mult = -0.04 + archers_maintenance_mult = -0.04 + skirmishers_recruitment_cost_mult = -0.04 + archers_recruitment_cost_mult = -0.04 + } + province_culture_modifier = { + parameter = outposts_building_bonuses + monthly_income = super_poor_building_tax_tier_4 + levy_size = 0.04 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = outposts_05 + + ai_value = { + base = 7 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +outposts_05 = { + construction_time = quick_construction_time + effect_desc = outposts_desc + + can_construct_potential = { + building_outposts_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 03 } + scope:holder.culture = { + has_innovation = innovation_castle_baileys + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_5_cost + + levy = poor_building_levy_tier_5 + province_modifier = { + monthly_income = super_poor_building_tax_tier_5 + defender_holding_advantage = normal_building_advantage_tier_5 + stationed_skirmishers_damage_mult = low_maa_damage_tier_5 + stationed_skirmishers_toughness_mult = normal_maa_toughness_tier_5 + stationed_skirmishers_screen_mult = normal_maa_screen_tier_5 + stationed_archers_damage_mult = low_maa_damage_tier_5 + stationed_archers_toughness_mult = normal_maa_toughness_tier_5 + hostile_raid_time = 0.5 + travel_danger = -5 + } + county_modifier = { + monthly_county_control_growth_add = 0.1 + garrison_size = 0.05 + } + character_culture_modifier = { + parameter = outposts_building_bonuses + skirmishers_maintenance_mult = -0.05 + archers_maintenance_mult = -0.05 + skirmishers_recruitment_cost_mult = -0.05 + archers_recruitment_cost_mult = -0.05 + } + province_culture_modifier = { + parameter = outposts_building_bonuses + monthly_income = super_poor_building_tax_tier_5 + levy_size = 0.05 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = outposts_06 + + ai_value = { + base = 6 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +outposts_06 = { + construction_time = quick_construction_time + effect_desc = outposts_desc + + can_construct_potential = { + building_outposts_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 03 } + scope:holder.culture = { + has_innovation = innovation_castle_baileys + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_6_cost + + levy = poor_building_levy_tier_6 + province_modifier = { + monthly_income = super_poor_building_tax_tier_6 + defender_holding_advantage = normal_building_advantage_tier_6 + stationed_skirmishers_damage_mult = low_maa_damage_tier_6 + stationed_skirmishers_toughness_mult = normal_maa_toughness_tier_6 + stationed_skirmishers_screen_mult = normal_maa_screen_tier_6 + stationed_archers_damage_mult = low_maa_damage_tier_6 + stationed_archers_toughness_mult = normal_maa_toughness_tier_6 + hostile_raid_time = 0.6 + travel_danger = -6 + } + county_modifier = { + monthly_county_control_growth_add = 0.1 + garrison_size = 0.05 + } + character_culture_modifier = { + parameter = outposts_building_bonuses + skirmishers_maintenance_mult = -0.06 + archers_maintenance_mult = -0.06 + skirmishers_recruitment_cost_mult = -0.06 + archers_recruitment_cost_mult = -0.06 + } + province_culture_modifier = { + parameter = outposts_building_bonuses + monthly_income = super_poor_building_tax_tier_6 + levy_size = 0.06 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = outposts_07 + + ai_value = { + base = 5 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +outposts_07 = { + construction_time = quick_construction_time + effect_desc = outposts_desc + + can_construct_potential = { + building_outposts_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 04 } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_7_cost + + levy = poor_building_levy_tier_7 + province_modifier = { + monthly_income = super_poor_building_tax_tier_7 + defender_holding_advantage = normal_building_advantage_tier_7 + stationed_skirmishers_damage_mult = low_maa_damage_tier_7 + stationed_skirmishers_toughness_mult = normal_maa_toughness_tier_7 + stationed_skirmishers_screen_mult = normal_maa_screen_tier_7 + stationed_archers_damage_mult = low_maa_damage_tier_7 + stationed_archers_toughness_mult = normal_maa_toughness_tier_7 + hostile_raid_time = 0.7 + travel_danger = -7 + } + county_modifier = { + monthly_county_control_growth_add = 0.1 + garrison_size = 0.05 + } + character_culture_modifier = { + parameter = outposts_building_bonuses + skirmishers_maintenance_mult = -0.07 + archers_maintenance_mult = -0.07 + skirmishers_recruitment_cost_mult = -0.07 + archers_recruitment_cost_mult = -0.07 + } + province_culture_modifier = { + parameter = outposts_building_bonuses + monthly_income = super_poor_building_tax_tier_7 + levy_size = 0.07 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = outposts_08 + + ai_value = { + base = 4 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +outposts_08 = { + construction_time = quick_construction_time + effect_desc = outposts_desc + + can_construct_potential = { + building_outposts_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 04 } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = cheap_building_tier_8_cost + + levy = poor_building_levy_tier_8 + province_modifier = { + monthly_income = super_poor_building_tax_tier_8 + defender_holding_advantage = normal_building_advantage_tier_8 + stationed_skirmishers_damage_mult = low_maa_damage_tier_8 + stationed_skirmishers_toughness_mult = normal_maa_toughness_tier_8 + stationed_skirmishers_screen_mult = normal_maa_screen_tier_8 + stationed_archers_damage_mult = low_maa_damage_tier_8 + stationed_archers_toughness_mult = normal_maa_toughness_tier_8 + hostile_raid_time = 0.8 + travel_danger = -8 + } + county_modifier = { + monthly_county_control_growth_factor = 0.15 + monthly_county_control_growth_add = 0.1 + garrison_size = 0.05 + } + character_culture_modifier = { + parameter = outposts_building_bonuses + skirmishers_maintenance_mult = -0.08 + archers_maintenance_mult = -0.08 + skirmishers_recruitment_cost_mult = -0.08 + archers_recruitment_cost_mult = -0.08 + } + province_culture_modifier = { + parameter = outposts_building_bonuses + monthly_income = super_poor_building_tax_tier_8 + levy_size = 0.08 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + ai_value = { + base = 3 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +### barracks + +barracks_01 = { + construction_time = standard_construction_time + effect_desc = tournament_cost_effect_desc + + can_construct_potential = { + building_barracks_requirement_terrain = yes + building_requirement_castle_city_church = { LEVEL = 01 } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + #higher innovation req? + } + + cost_gold = normal_building_tier_1_cost + + levy = normal_building_levy_tier_1 + + province_modifier = { + stationed_heavy_infantry_damage_mult = high_maa_damage_tier_1 + stationed_pikemen_damage_mult = high_maa_damage_tier_1 + travel_danger = -1 + } + character_culture_modifier = { + parameter = building_barracks_piety_bonuses + monthly_piety = 0.1 + } + + county_culture_modifier = { + parameter = strength_in_numbers_maa_limit_bonus + levy_size = 0.01 + } + + province_culture_modifier = { + parameter = strength_in_numbers_maa_limit_bonus + stationed_heavy_infantry_damage_mult = -0.20 + stationed_pikemen_damage_mult = -0.20 + stationed_maa_damage_mult = low_maa_damage_tier_1 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = barracks_02 + + type_icon = "icon_building_barracks.dds" + + ai_value = { + base = 10 + ai_tier_1_building_modifier = yes + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + ai_anti_synergy_cavalry_modifier = yes + ai_anti_synergy_light_infantry_modifier = yes + ai_heavy_infantry_modifier = yes + ai_pikemen_modifier = yes + modifier = { + add = non_stationed_maa_bonus + has_stationed_regiment = yes + NOR = { + has_stationed_regiment_of_base_type = pikemen + has_stationed_regiment_of_base_type = heavy_infantry + } + } + modifier = { + add = -9 + has_building_or_higher = city_01 + } + modifier = { + add = -10 + scope:holder = { + government_has_flag = government_is_theocracy + highest_held_title_tier <= tier_barony + } + } + modifier = { + add = 5 + scope:holder = { + ai_has_pious_builder_personality = yes + culture = { has_cultural_parameter = building_barracks_piety_bonuses } + } + } + } +} + +barracks_02 = { + construction_time = standard_construction_time + effect_desc = tournament_cost_effect_desc + + can_construct_potential = { + building_barracks_requirement_terrain = yes + building_requirement_castle_city_church = { LEVEL = 01 } + } + + can_construct_showing_failures_only = { + trigger_if = { + limit = { + NOT = { + culture = { + has_cultural_parameter = next_level_barracks + } + } + } + scope:holder.culture = { + has_innovation = innovation_barracks + } + } + trigger_else = { + culture = { + has_cultural_parameter = next_level_barracks + } + } + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_2_cost + + levy = normal_building_levy_tier_2 + + province_modifier = { + stationed_heavy_infantry_damage_mult = high_maa_damage_tier_2 + stationed_pikemen_damage_mult = high_maa_damage_tier_2 + travel_danger = -2 + } + character_culture_modifier = { + parameter = building_barracks_piety_bonuses + monthly_piety = 0.2 + } + + county_culture_modifier = { + parameter = strength_in_numbers_maa_limit_bonus + levy_size = 0.01 + } + + province_culture_modifier = { + parameter = strength_in_numbers_maa_limit_bonus + stationed_heavy_infantry_damage_mult = -0.30 + stationed_pikemen_damage_mult = -0.30 + stationed_maa_damage_mult = low_maa_damage_tier_2 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = barracks_03 + + ai_value = { + base = 9 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + modifier = { + add = 4 + scope:holder = { + ai_has_pious_builder_personality = yes + culture = { has_cultural_parameter = building_barracks_piety_bonuses } + } + } + modifier = { # Fill all building slots before going for upgrades + factor = 0 + free_building_slots > 0 + } + } +} + +barracks_03 = { + construction_time = standard_construction_time + effect_desc = tournament_cost_effect_desc + + can_construct_potential = { + building_barracks_requirement_terrain = yes + } + + can_construct = { + trigger_if = { + limit = { + NOT = { + culture = { + has_cultural_parameter = next_level_barracks + } + } + } + scope:holder.culture = { + has_innovation = innovation_burhs + } + building_requirement_castle_city_church = { LEVEL = 02 } + } + trigger_else = { + culture = { + has_cultural_parameter = next_level_barracks + } + building_requirement_castle_city_church = { LEVEL = 01 } + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_3_cost + + levy = normal_building_levy_tier_3 + + province_modifier = { + stationed_heavy_infantry_damage_mult = high_maa_damage_tier_3 + stationed_pikemen_damage_mult = high_maa_damage_tier_3 + stationed_heavy_infantry_toughness_mult = high_maa_toughness_tier_1 + stationed_pikemen_toughness_mult = high_maa_toughness_tier_1 + travel_danger = -3 + } + character_culture_modifier = { + parameter = building_barracks_piety_bonuses + monthly_piety = 0.3 + } + + county_culture_modifier = { + parameter = strength_in_numbers_maa_limit_bonus + levy_size = 0.02 + } + + province_culture_modifier = { + parameter = strength_in_numbers_maa_limit_bonus + stationed_heavy_infantry_damage_mult = -0.40 + stationed_pikemen_damage_mult = -0.40 + stationed_heavy_infantry_toughness_mult = -0.20 + stationed_pikemen_toughness_mult = -0.20 + stationed_maa_damage_mult = low_maa_damage_tier_3 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = barracks_04 + + ai_value = { + base = 8 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + modifier = { + add = 3 + scope:holder = { + ai_has_pious_builder_personality = yes + culture = { has_cultural_parameter = building_barracks_piety_bonuses } + } + } + } +} + +barracks_04 = { + construction_time = standard_construction_time + effect_desc = tournament_cost_effect_desc + + can_construct_potential = { + building_barracks_requirement_terrain = yes + } + + can_construct = { + trigger_if = { + limit = { + NOT = { + culture = { + has_cultural_parameter = next_level_barracks + } + } + } + scope:holder.culture = { + has_innovation = innovation_burhs + } + building_requirement_castle_city_church = { LEVEL = 02 } + } + trigger_else = { + culture = { + has_cultural_parameter = next_level_barracks + } + building_requirement_castle_city_church = { LEVEL = 01 } + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_4_cost + + levy = normal_building_levy_tier_4 + + county_modifier = { + levy_reinforcement_rate = normal_levy_reinforcement_rate_tier_1 + } + province_modifier = { + stationed_heavy_infantry_damage_mult = high_maa_damage_tier_4 + stationed_pikemen_damage_mult = high_maa_damage_tier_4 + stationed_heavy_infantry_toughness_mult = high_maa_toughness_tier_2 + stationed_pikemen_toughness_mult = high_maa_toughness_tier_2 + travel_danger = -4 + } + character_culture_modifier = { + parameter = building_barracks_piety_bonuses + monthly_piety = 0.4 + } + + county_culture_modifier = { + parameter = strength_in_numbers_maa_limit_bonus + levy_size = 0.02 + } + + province_culture_modifier = { + parameter = strength_in_numbers_maa_limit_bonus + stationed_heavy_infantry_damage_mult = -0.50 + stationed_pikemen_damage_mult = -0.50 + stationed_heavy_infantry_toughness_mult = -0.30 + stationed_pikemen_toughness_mult = -0.30 + stationed_maa_damage_mult = low_maa_damage_tier_4 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = barracks_05 + + ai_value = { + base = 7 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + modifier = { + add = 3 + scope:holder = { + ai_has_pious_builder_personality = yes + culture = { has_cultural_parameter = building_barracks_piety_bonuses } + } + } + } +} + +barracks_05 = { + construction_time = standard_construction_time + effect_desc = tournament_cost_effect_desc + + can_construct_potential = { + building_barracks_requirement_terrain = yes + } + + can_construct = { + trigger_if = { + limit = { + NOT = { + culture = { + has_cultural_parameter = next_level_barracks + } + } + } + scope:holder.culture = { + has_innovation = innovation_castle_baileys + } + building_requirement_castle_city_church = { LEVEL = 03 } + } + trigger_else = { + culture = { + has_cultural_parameter = next_level_barracks + } + scope:holder.culture = { + has_innovation = innovation_burhs + } + building_requirement_castle_city_church = { LEVEL = 02 } + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_5_cost + + levy = normal_building_levy_tier_5 + + county_modifier = { + levy_reinforcement_rate = normal_levy_reinforcement_rate_tier_2 + levy_size = 0.01 + garrison_size = 0.01 + } + province_modifier = { + stationed_heavy_infantry_damage_mult = high_maa_damage_tier_5 + stationed_pikemen_damage_mult = high_maa_damage_tier_5 + stationed_heavy_infantry_toughness_mult = high_maa_toughness_tier_3 + stationed_pikemen_toughness_mult = high_maa_toughness_tier_3 + travel_danger = -5 + } + character_culture_modifier = { + parameter = building_barracks_piety_bonuses + monthly_piety = 0.5 + } + + county_culture_modifier = { + parameter = strength_in_numbers_maa_limit_bonus + levy_size = 0.03 + } + + province_culture_modifier = { + parameter = strength_in_numbers_maa_limit_bonus + stationed_heavy_infantry_damage_mult = -0.60 + stationed_pikemen_damage_mult = -0.60 + stationed_heavy_infantry_toughness_mult = -0.40 + stationed_pikemen_toughness_mult = -0.40 + stationed_maa_damage_mult = low_maa_damage_tier_5 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = barracks_06 + + ai_value = { + base = 6 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + modifier = { + add = 3 + scope:holder = { + ai_has_pious_builder_personality = yes + culture = { has_cultural_parameter = building_barracks_piety_bonuses } + } + } + } +} + +barracks_06 = { + construction_time = standard_construction_time + effect_desc = tournament_cost_effect_desc + + can_construct_potential = { + building_barracks_requirement_terrain = yes + } + + can_construct = { + trigger_if = { + limit = { + NOT = { + culture = { + has_cultural_parameter = next_level_barracks + } + } + } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + building_requirement_castle_city_church = { LEVEL = 03 } + } + trigger_else = { + culture = { + has_cultural_parameter = next_level_barracks + } + scope:holder.culture = { + has_innovation = innovation_castle_baileys + } + building_requirement_castle_city_church = { LEVEL = 02 } + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_6_cost + + levy = normal_building_levy_tier_6 + + county_modifier = { + levy_reinforcement_rate = normal_levy_reinforcement_rate_tier_3 + levy_size = 0.02 + garrison_size = 0.02 + } + province_modifier = { + stationed_heavy_infantry_damage_mult = high_maa_damage_tier_6 + stationed_pikemen_damage_mult = high_maa_damage_tier_6 + stationed_heavy_infantry_toughness_mult = high_maa_toughness_tier_4 + stationed_pikemen_toughness_mult = high_maa_toughness_tier_4 + travel_danger = -6 + } + character_culture_modifier = { + parameter = building_barracks_piety_bonuses + monthly_piety = 0.6 + } + + county_culture_modifier = { + parameter = strength_in_numbers_maa_limit_bonus + levy_size = 0.03 + } + + province_culture_modifier = { + parameter = strength_in_numbers_maa_limit_bonus + stationed_heavy_infantry_damage_mult = -0.70 + stationed_pikemen_damage_mult = -0.70 + stationed_heavy_infantry_toughness_mult = -0.50 + stationed_pikemen_toughness_mult = -0.50 + stationed_maa_damage_mult = low_maa_damage_tier_6 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = barracks_07 + + ai_value = { + base = 5 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + modifier = { + add = 2 + scope:holder = { + ai_has_pious_builder_personality = yes + culture = { has_cultural_parameter = building_barracks_piety_bonuses } + } + } + } +} + +barracks_07 = { + construction_time = standard_construction_time + effect_desc = tournament_cost_effect_desc + + can_construct_potential = { + building_barracks_requirement_terrain = yes + } + + can_construct = { + trigger_if = { + limit = { + NOT = { + culture = { + has_cultural_parameter = next_level_barracks + } + } + } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + building_requirement_castle_city_church = { LEVEL = 04 } + } + trigger_else = { + culture = { + has_cultural_parameter = next_level_barracks + } + scope:holder.culture = { + has_innovation = innovation_castle_baileys + } + building_requirement_castle_city_church = { LEVEL = 03 } + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_7_cost + + levy = normal_building_levy_tier_7 + + county_modifier = { + levy_reinforcement_rate = normal_levy_reinforcement_rate_tier_4 + levy_size = 0.03 + garrison_size = 0.03 + } + province_modifier = { + stationed_heavy_infantry_damage_mult = high_maa_damage_tier_7 + stationed_pikemen_damage_mult = high_maa_damage_tier_7 + stationed_heavy_infantry_toughness_mult = high_maa_toughness_tier_5 + stationed_pikemen_toughness_mult = high_maa_toughness_tier_5 + travel_danger = -7 + } + character_culture_modifier = { + parameter = building_barracks_piety_bonuses + monthly_piety = 0.7 + } + + county_culture_modifier = { + parameter = strength_in_numbers_maa_limit_bonus + levy_size = 0.04 + } + + province_culture_modifier = { + parameter = strength_in_numbers_maa_limit_bonus + stationed_heavy_infantry_damage_mult = -0.80 + stationed_pikemen_damage_mult = -0.80 + stationed_heavy_infantry_toughness_mult = -0.60 + stationed_pikemen_toughness_mult = -0.60 + stationed_maa_damage_mult = low_maa_damage_tier_7 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = barracks_08 + + ai_value = { + base = 4 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + modifier = { + add = 2 + scope:holder = { + ai_has_pious_builder_personality = yes + culture = { has_cultural_parameter = building_barracks_piety_bonuses } + } + } + } +} + +barracks_08 = { + construction_time = standard_construction_time + effect_desc = tournament_cost_effect_desc + + can_construct_potential = { + building_barracks_requirement_terrain = yes + } + + can_construct = { + trigger_if = { + limit = { + NOT = { + culture = { + has_cultural_parameter = next_level_barracks + } + } + } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + building_requirement_castle_city_church = { LEVEL = 04 } + } + trigger_else = { + culture = { + has_cultural_parameter = next_level_barracks + } + scope:holder.culture = { + has_innovation = innovation_castle_baileys + } + building_requirement_castle_city_church = { LEVEL = 03 } + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_8_cost + + levy = normal_building_levy_tier_8 + + county_modifier = { + levy_reinforcement_rate = normal_levy_reinforcement_rate_tier_5 + levy_size = 0.04 + garrison_size = 0.04 + } + province_modifier = { + stationed_heavy_infantry_damage_mult = high_maa_damage_tier_8 + stationed_pikemen_damage_mult = high_maa_damage_tier_8 + stationed_heavy_infantry_toughness_mult = high_maa_toughness_tier_6 + stationed_pikemen_toughness_mult = high_maa_toughness_tier_6 + travel_danger = -8 + } + character_culture_modifier = { + parameter = building_barracks_piety_bonuses + monthly_piety = 0.8 + } + + county_culture_modifier = { + parameter = strength_in_numbers_maa_limit_bonus + levy_size = 0.04 + } + + province_culture_modifier = { + parameter = strength_in_numbers_maa_limit_bonus + stationed_heavy_infantry_damage_mult = -0.90 + stationed_pikemen_damage_mult = -0.90 + stationed_heavy_infantry_toughness_mult = -0.70 + stationed_pikemen_toughness_mult = -0.70 + stationed_maa_damage_mult = low_maa_damage_tier_7 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + ai_value = { + base = 3 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + modifier = { + add = 2 + scope:holder = { + ai_has_pious_builder_personality = yes + culture = { has_cultural_parameter = building_barracks_piety_bonuses } + } + } + } +} + +### camel_farms + +camel_farms_01 = { + construction_time = standard_construction_time + + can_construct_potential = { + building_camel_farms_requirement_terrain = yes + building_requirement_castle_city_church = { LEVEL = 01 } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_1_cost + + levy = small_building_levy_tier_1 + character_modifier = { + knight_effectiveness_mult = high_knight_effectiveness_mult_tier_1 + } + + province_modifier = { + stationed_camel_cavalry_damage_mult = high_maa_damage_tier_1 + stationed_camel_cavalry_pursuit_mult = normal_maa_pursuit_tier_1 + stationed_light_cavalry_damage_mult = normal_maa_damage_tier_1 + stationed_light_cavalry_pursuit_mult = low_maa_pursuit_tier_1 + monthly_income = super_poor_building_tax_tier_1 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = camel_farms_02 + + type_icon = "icon_building_camel_farms.dds" + + ai_value = { + base = 10 + ai_tier_1_building_modifier = yes + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + ai_stacking_bonus_stables_modifier = yes + ai_stacking_bonus_horse_pastures_modifier = yes + ai_stacking_bonus_hillside_grazing_modifier = yes + modifier = { + factor = 0 + building_regimental_grounds_requirement_terrain = yes + NOT = { + has_building_or_higher = regimental_grounds_01 + } + } + modifier = { # It now has a small economic component; build it last + add = -3 + has_building_or_higher = city_01 + } + modifier = { + add = -10 + scope:holder = { + OR = { + AND = { + government_has_flag = government_is_theocracy + highest_held_title_tier <= tier_barony + } + is_theocratic_lessee = yes + } + } + } + } +} + +camel_farms_02 = { + construction_time = standard_construction_time + + can_construct_potential = { + building_camel_farms_requirement_terrain = yes + building_requirement_castle_city_church = { LEVEL = 01 } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + scope:holder.culture = { + has_innovation = innovation_barracks + } + } + + cost_gold = normal_building_tier_2_cost + + levy = small_building_levy_tier_2 + character_modifier = { + knight_effectiveness_mult = high_knight_effectiveness_mult_tier_2 + } + + province_modifier = { + stationed_camel_cavalry_damage_mult = high_maa_damage_tier_2 + stationed_camel_cavalry_pursuit_mult = normal_maa_pursuit_tier_2 + stationed_light_cavalry_damage_mult = normal_maa_damage_tier_2 + stationed_light_cavalry_pursuit_mult = low_maa_pursuit_tier_2 + monthly_income = super_poor_building_tax_tier_2 + } + + county_modifier = { + supply_limit = 200 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = camel_farms_03 + + ai_value = { + base = 9 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + modifier = { # Fill all building slots before going for upgrades + factor = 0 + free_building_slots > 0 + } + } +} + +camel_farms_03 = { + construction_time = standard_construction_time + + can_construct_potential = { + building_camel_farms_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 02 } + scope:holder.culture = { + has_innovation = innovation_burhs + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_3_cost + + levy = small_building_levy_tier_3 + character_modifier = { + knight_effectiveness_mult = high_knight_effectiveness_mult_tier_3 + } + + province_modifier = { + stationed_camel_cavalry_damage_mult = high_maa_damage_tier_3 + stationed_camel_cavalry_pursuit_mult = normal_maa_pursuit_tier_3 + stationed_camel_cavalry_toughness_mult = high_maa_toughness_tier_1 + stationed_camel_cavalry_screen_mult = normal_maa_screen_tier_1 + stationed_light_cavalry_damage_mult = normal_maa_damage_tier_3 + stationed_light_cavalry_pursuit_mult = low_maa_pursuit_tier_3 + stationed_light_cavalry_toughness_mult = low_maa_toughness_tier_1 + stationed_light_cavalry_screen_mult = low_maa_screen_tier_1 + monthly_income = super_poor_building_tax_tier_3 + } + + county_modifier = { + supply_limit = 200 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = camel_farms_04 + + ai_value = { + base = 8 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +camel_farms_04 = { + construction_time = standard_construction_time + effect_desc = camel_farms_effect_desc + + can_construct_potential = { + building_camel_farms_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 02 } + scope:holder.culture = { + has_innovation = innovation_burhs + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_4_cost + + levy = small_building_levy_tier_4 + character_modifier = { + knight_effectiveness_mult = high_knight_effectiveness_mult_tier_4 + } + + province_modifier = { + stationed_camel_cavalry_damage_mult = high_maa_damage_tier_4 + stationed_camel_cavalry_pursuit_mult = normal_maa_pursuit_tier_4 + stationed_camel_cavalry_toughness_mult = high_maa_toughness_tier_2 + stationed_camel_cavalry_screen_mult = normal_maa_screen_tier_2 + stationed_light_cavalry_damage_mult = normal_maa_damage_tier_4 + stationed_light_cavalry_pursuit_mult = low_maa_pursuit_tier_4 + stationed_light_cavalry_toughness_mult = low_maa_toughness_tier_2 + stationed_light_cavalry_screen_mult = low_maa_screen_tier_2 + monthly_income = super_poor_building_tax_tier_4 + } + + county_modifier = { + supply_limit = 200 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = camel_farms_05 + + ai_value = { + base = 7 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +camel_farms_05 = { + construction_time = standard_construction_time + effect_desc = camel_farms_effect_desc + + can_construct_potential = { + building_camel_farms_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 03 } + scope:holder.culture = { + has_innovation = innovation_castle_baileys + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_5_cost + + levy = small_building_levy_tier_5 + character_modifier = { + knight_effectiveness_mult = high_knight_effectiveness_mult_tier_5 + } + + province_modifier = { + stationed_camel_cavalry_damage_mult = high_maa_damage_tier_5 + stationed_camel_cavalry_pursuit_mult = normal_maa_pursuit_tier_5 + stationed_camel_cavalry_toughness_mult = high_maa_toughness_tier_3 + stationed_camel_cavalry_screen_mult = normal_maa_screen_tier_3 + stationed_light_cavalry_damage_mult = normal_maa_damage_tier_5 + stationed_light_cavalry_pursuit_mult = low_maa_pursuit_tier_5 + stationed_light_cavalry_toughness_mult = low_maa_toughness_tier_3 + stationed_light_cavalry_screen_mult = low_maa_screen_tier_3 + monthly_income = super_poor_building_tax_tier_5 + } + + county_modifier = { + supply_limit = 200 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = camel_farms_06 + + ai_value = { + base = 6 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +camel_farms_06 = { + construction_time = standard_construction_time + effect_desc = camel_farms_effect_desc + + can_construct_potential = { + building_camel_farms_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 03 } + scope:holder.culture = { + has_innovation = innovation_castle_baileys + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_6_cost + + levy = small_building_levy_tier_6 + character_modifier = { + knight_effectiveness_mult = high_knight_effectiveness_mult_tier_6 + } + + province_modifier = { + stationed_camel_cavalry_damage_mult = high_maa_damage_tier_6 + stationed_camel_cavalry_pursuit_mult = normal_maa_pursuit_tier_6 + stationed_camel_cavalry_toughness_mult = high_maa_toughness_tier_4 + stationed_camel_cavalry_screen_mult = normal_maa_screen_tier_4 + stationed_light_cavalry_damage_mult = normal_maa_damage_tier_6 + stationed_light_cavalry_pursuit_mult = low_maa_pursuit_tier_6 + stationed_light_cavalry_toughness_mult = low_maa_toughness_tier_4 + stationed_light_cavalry_screen_mult = low_maa_screen_tier_4 + monthly_income = super_poor_building_tax_tier_6 + hostile_raid_time = 0.2 + } + + county_modifier = { + supply_limit = 200 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = camel_farms_07 + + ai_value = { + base = 5 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +camel_farms_07 = { + construction_time = standard_construction_time + effect_desc = camel_farms_effect_desc + + can_construct_potential = { + building_camel_farms_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 04 } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_7_cost + + levy = small_building_levy_tier_7 + character_modifier = { + knight_effectiveness_mult = high_knight_effectiveness_mult_tier_7 + } + + province_modifier = { + stationed_camel_cavalry_damage_mult = high_maa_damage_tier_7 + stationed_camel_cavalry_pursuit_mult = normal_maa_pursuit_tier_7 + stationed_camel_cavalry_toughness_mult = high_maa_toughness_tier_5 + stationed_camel_cavalry_screen_mult = normal_maa_screen_tier_5 + stationed_light_cavalry_damage_mult = normal_maa_damage_tier_7 + stationed_light_cavalry_pursuit_mult = low_maa_pursuit_tier_7 + stationed_light_cavalry_toughness_mult = low_maa_toughness_tier_5 + stationed_light_cavalry_screen_mult = low_maa_screen_tier_5 + monthly_income = super_poor_building_tax_tier_7 + hostile_raid_time = 0.2 + } + + county_modifier = { + supply_limit = 200 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = camel_farms_08 + + ai_value = { + base = 4 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +camel_farms_08 = { + construction_time = standard_construction_time + effect_desc = camel_farms_effect_desc + + can_construct_potential = { + building_camel_farms_requirement_terrain = yes + } + + can_construct = { + building_requirement_castle_city_church = { LEVEL = 04 } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_8_cost + + levy = small_building_levy_tier_8 + character_modifier = { + knight_effectiveness_mult = high_knight_effectiveness_mult_tier_8 + } + + province_modifier = { + stationed_camel_cavalry_damage_mult = high_maa_damage_tier_8 + stationed_camel_cavalry_pursuit_mult = normal_maa_pursuit_tier_8 + stationed_camel_cavalry_toughness_mult = high_maa_toughness_tier_6 + stationed_camel_cavalry_screen_mult = normal_maa_screen_tier_6 + stationed_light_cavalry_damage_mult = normal_maa_damage_tier_8 + stationed_light_cavalry_pursuit_mult = low_maa_pursuit_tier_8 + stationed_light_cavalry_toughness_mult = low_maa_toughness_tier_6 + stationed_light_cavalry_screen_mult = low_maa_screen_tier_6 + monthly_income = super_poor_building_tax_tier_8 + hostile_raid_time = 0.2 + } + + county_modifier = { + supply_limit = 200 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + type_icon = "icon_building_camel_farms.dds" + + ai_value = { + base = 3 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + + +### stables + +stables_01 = { + construction_time = quick_construction_time + effect_desc = stables_effect_desc + + can_construct_potential = { + building_stables_requirement_terrain = yes + building_requirement_castle_city_church = { LEVEL = 01 } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_1_cost + + levy = normal_building_levy_tier_1 + + character_modifier = { + movement_speed = normal_movement_speed_tier_1 + character_travel_speed_mult = normal_movement_speed_tier_1 + } + + province_modifier = { + stationed_light_cavalry_damage_mult = high_maa_damage_tier_1 + stationed_heavy_cavalry_damage_mult = high_maa_damage_tier_1 + stationed_light_cavalry_pursuit_mult = normal_maa_pursuit_tier_1 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = stables_02 + + type_icon = "icon_building_stables.dds" + + ai_value = { + base = 10 + ai_tier_1_building_modifier = yes + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + ai_stacking_bonus_camel_farms_modifier = yes + ai_stacking_bonus_horse_pastures_modifier = yes + ai_stacking_bonus_hillside_grazing_modifier = yes + ai_anti_synergy_armored_infantry_modifier = yes + ai_anti_synergy_light_infantry_modifier = yes + ai_light_cavalry_modifier = yes + ai_heavy_cavalry_modifier = yes + ai_compensate_light_cavalry_modifier = yes # Specifically for buildings that boosts HC and LC + ai_compensate_heavy_cavalry_modifier = yes # Specifically for buildings that boosts HC and LC + modifier = { + add = non_stationed_maa_bonus + has_stationed_regiment = yes + NOR = { + has_stationed_regiment_of_base_type = light_cavalry + has_stationed_regiment_of_base_type = heavy_cavalry + } + } + modifier = { + factor = 0 + building_regimental_grounds_requirement_terrain = yes + NOT = { + has_building_or_higher = regimental_grounds_01 + } + } + modifier = { + factor = 0 + building_farm_estates_requirement_terrain = yes + NOT = { + has_building_or_higher = farm_estates_01 + } + } + modifier = { + factor = 0 + building_orchards_requirement_terrain = yes + NOT = { + has_building_or_higher = orchards_01 + } + } + modifier = { + factor = 0 + building_hillside_grazing_requirement_terrain = yes + NOT = { + has_building_or_higher = hillside_grazing_01 + } + } + modifier = { + factor = 0 + building_warrior_lodges_requirement_terrain = yes + NOT = { + has_building_or_higher = warrior_lodges_01 + } + } + modifier = { + add = -9 + has_building_or_higher = city_01 + } + modifier = { + add = -3 + OR = { + exists = barony.lessee + scope:holder = { + highest_held_title_tier <= tier_barony + } + } + } + modifier = { + add = -10 + scope:holder = { + OR = { + AND = { + government_has_flag = government_is_theocracy + highest_held_title_tier <= tier_barony + } + is_theocratic_lessee = yes + } + } + } + } +} + +stables_02 = { + construction_time = quick_construction_time + effect_desc = stables_effect_desc + + can_construct_potential = { + building_stables_requirement_terrain = yes + building_requirement_castle_city_church = { LEVEL = 01 } + } + + can_construct_showing_failures_only = { + trigger_if = { + limit = { + NOT = { + culture = { + has_cultural_parameter = next_level_stables + } + } + } + scope:holder.culture = { + has_innovation = innovation_barracks + } + } + trigger_else = { + culture = { + has_cultural_parameter = next_level_stables + } + } + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_2_cost + + levy = normal_building_levy_tier_2 + + character_modifier = { + movement_speed = normal_movement_speed_tier_2 + character_travel_speed_mult = normal_movement_speed_tier_2 + } + + province_modifier = { + stationed_light_cavalry_damage_mult = high_maa_damage_tier_2 + stationed_heavy_cavalry_damage_mult = high_maa_damage_tier_2 + stationed_light_cavalry_pursuit_mult = normal_maa_pursuit_tier_2 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = stables_03 + + ai_value = { + base = 9 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + modifier = { # Fill all building slots before going for upgrades + factor = 0 + free_building_slots > 0 + } + } +} + +stables_03 = { + construction_time = quick_construction_time + effect_desc = stables_effect_desc + + can_construct_potential = { + building_stables_requirement_terrain = yes + } + + can_construct = { + trigger_if = { + limit = { + NOT = { + culture = { + has_cultural_parameter = next_level_stables + } + } + } + scope:holder.culture = { + has_innovation = innovation_burhs + } + building_requirement_castle_city_church = { LEVEL = 02 } + } + trigger_else = { + culture = { + has_cultural_parameter = next_level_stables + } + building_requirement_castle_city_church = { LEVEL = 01 } + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_3_cost + + levy = normal_building_levy_tier_3 + + character_modifier = { + movement_speed = normal_movement_speed_tier_3 + character_travel_speed_mult = normal_movement_speed_tier_3 + } + + province_modifier = { + stationed_light_cavalry_damage_mult = high_maa_damage_tier_3 + stationed_heavy_cavalry_damage_mult = high_maa_damage_tier_3 + stationed_light_cavalry_pursuit_mult = normal_maa_pursuit_tier_3 + stationed_light_cavalry_toughness_mult = high_maa_toughness_tier_1 + stationed_heavy_cavalry_toughness_mult = high_maa_toughness_tier_1 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = stables_04 + + ai_value = { + base = 8 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +stables_04 = { + construction_time = quick_construction_time + effect_desc = stables_effect_desc + + can_construct_potential = { + building_stables_requirement_terrain = yes + } + + can_construct = { + trigger_if = { + limit = { + NOT = { + culture = { + has_cultural_parameter = next_level_stables + } + } + } + scope:holder.culture = { + has_innovation = innovation_burhs + } + building_requirement_castle_city_church = { LEVEL = 02 } + } + trigger_else = { + culture = { + has_cultural_parameter = next_level_stables + } + building_requirement_castle_city_church = { LEVEL = 01 } + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_4_cost + + levy = normal_building_levy_tier_4 + + character_modifier = { + movement_speed = normal_movement_speed_tier_4 + character_travel_speed_mult = normal_movement_speed_tier_4 + } + + province_modifier = { + stationed_light_cavalry_damage_mult = high_maa_damage_tier_4 + stationed_heavy_cavalry_damage_mult = high_maa_damage_tier_4 + stationed_light_cavalry_pursuit_mult = normal_maa_pursuit_tier_4 + stationed_light_cavalry_toughness_mult = high_maa_toughness_tier_2 + stationed_heavy_cavalry_toughness_mult = high_maa_toughness_tier_2 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = stables_05 + + ai_value = { + base = 7 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +stables_05 = { + construction_time = quick_construction_time + effect_desc = stables_effect_desc + + can_construct_potential = { + building_stables_requirement_terrain = yes + } + + can_construct = { + trigger_if = { + limit = { + NOT = { + culture = { + has_cultural_parameter = next_level_stables + } + } + } + scope:holder.culture = { + has_innovation = innovation_castle_baileys + } + building_requirement_castle_city_church = { LEVEL = 03 } + } + trigger_else = { + culture = { + has_cultural_parameter = next_level_stables + } + scope:holder.culture = { + has_innovation = innovation_burhs + } + building_requirement_castle_city_church = { LEVEL = 02 } + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_5_cost + + levy = normal_building_levy_tier_5 + + character_modifier = { + movement_speed = normal_movement_speed_tier_5 + character_travel_speed_mult = normal_movement_speed_tier_5 + } + + province_modifier = { + stationed_light_cavalry_toughness_mult = high_maa_toughness_tier_3 + stationed_light_cavalry_damage_mult = high_maa_damage_tier_5 + stationed_light_cavalry_screen_mult = normal_maa_screen_tier_1 + stationed_light_cavalry_pursuit_mult = normal_maa_pursuit_tier_5 + stationed_heavy_cavalry_toughness_mult = high_maa_toughness_tier_3 + stationed_heavy_cavalry_damage_mult = high_maa_damage_tier_5 + stationed_heavy_cavalry_screen_mult = normal_maa_screen_tier_1 + stationed_heavy_cavalry_pursuit_mult = normal_maa_pursuit_tier_1 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = stables_06 + + ai_value = { + base = 6 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +stables_06 = { + construction_time = quick_construction_time + effect_desc = stables_effect_desc + + can_construct_potential = { + building_stables_requirement_terrain = yes + } + + can_construct = { + trigger_if = { + limit = { + NOT = { + culture = { + has_cultural_parameter = next_level_stables + } + } + } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + building_requirement_castle_city_church = { LEVEL = 03 } + } + trigger_else = { + culture = { + has_cultural_parameter = next_level_stables + } + scope:holder.culture = { + has_innovation = innovation_castle_baileys + } + building_requirement_castle_city_church = { LEVEL = 02 } + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_6_cost + + levy = normal_building_levy_tier_6 + + character_modifier = { + movement_speed = normal_movement_speed_tier_6 + character_travel_speed_mult = normal_movement_speed_tier_6 + } + + province_modifier = { + stationed_light_cavalry_toughness_mult = high_maa_toughness_tier_4 + stationed_light_cavalry_damage_mult = high_maa_damage_tier_6 + stationed_light_cavalry_screen_mult = normal_maa_screen_tier_2 + stationed_light_cavalry_pursuit_mult = normal_maa_pursuit_tier_6 + stationed_heavy_cavalry_toughness_mult = high_maa_toughness_tier_4 + stationed_heavy_cavalry_damage_mult = high_maa_damage_tier_6 + stationed_heavy_cavalry_screen_mult = normal_maa_screen_tier_2 + stationed_heavy_cavalry_pursuit_mult = normal_maa_pursuit_tier_2 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = stables_07 + + ai_value = { + base = 5 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +stables_07 = { + construction_time = quick_construction_time + effect_desc = stables_effect_desc + + can_construct_potential = { + building_stables_requirement_terrain = yes + } + + can_construct = { + trigger_if = { + limit = { + NOT = { + culture = { + has_cultural_parameter = next_level_stables + } + } + } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + building_requirement_castle_city_church = { LEVEL = 04 } + } + trigger_else = { + culture = { + has_cultural_parameter = next_level_stables + } + scope:holder.culture = { + has_innovation = innovation_castle_baileys + } + building_requirement_castle_city_church = { LEVEL = 03 } + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_7_cost + + levy = normal_building_levy_tier_7 + + character_modifier = { + movement_speed = normal_movement_speed_tier_7 + character_travel_speed_mult = normal_movement_speed_tier_7 + } + + province_modifier = { + stationed_light_cavalry_toughness_mult = high_maa_toughness_tier_5 + stationed_light_cavalry_damage_mult = high_maa_damage_tier_7 + stationed_light_cavalry_screen_mult = normal_maa_screen_tier_3 + stationed_light_cavalry_pursuit_mult = normal_maa_pursuit_tier_7 + stationed_heavy_cavalry_toughness_mult = high_maa_toughness_tier_5 + stationed_heavy_cavalry_damage_mult = high_maa_damage_tier_7 + stationed_heavy_cavalry_screen_mult = normal_maa_screen_tier_3 + stationed_heavy_cavalry_pursuit_mult = normal_maa_pursuit_tier_3 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = stables_08 + + ai_value = { + base = 4 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +stables_08 = { + construction_time = quick_construction_time + effect_desc = stables_effect_desc + + can_construct_potential = { + building_stables_requirement_terrain = yes + } + + can_construct = { + trigger_if = { + limit = { + NOT = { + culture = { + has_cultural_parameter = next_level_stables + } + } + } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + building_requirement_castle_city_church = { LEVEL = 04 } + } + trigger_else = { + culture = { + has_cultural_parameter = next_level_stables + } + scope:holder.culture = { + has_innovation = innovation_castle_baileys + } + building_requirement_castle_city_church = { LEVEL = 03 } + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_8_cost + + levy = normal_building_levy_tier_8 + + character_modifier = { + movement_speed = normal_movement_speed_tier_8 + character_travel_speed_mult = normal_movement_speed_tier_8 + } + + province_modifier = { + stationed_light_cavalry_toughness_mult = high_maa_toughness_tier_6 + stationed_light_cavalry_damage_mult = high_maa_damage_tier_8 + stationed_light_cavalry_screen_mult = normal_maa_screen_tier_4 + stationed_light_cavalry_pursuit_mult = normal_maa_pursuit_tier_8 + stationed_heavy_cavalry_toughness_mult = high_maa_toughness_tier_6 + stationed_heavy_cavalry_damage_mult = high_maa_damage_tier_8 + stationed_heavy_cavalry_screen_mult = normal_maa_screen_tier_4 + stationed_heavy_cavalry_pursuit_mult = normal_maa_pursuit_tier_4 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + ai_value = { + base = 3 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + + } +} + + +### smiths + +smiths_01 = { + construction_time = quick_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_duel_cost_discount_effect_toto_desc + } + } + can_construct_potential = { + building_smiths_requirement_terrain = yes + building_requirement_castle_city_church = { LEVEL = 01 } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_1_cost + + + province_modifier = { + stationed_maa_damage_mult = normal_maa_damage_tier_1 + tax_mult = low_building_tax_mult_tier_1 + } + county_modifier = { + levy_reinforcement_rate = normal_levy_reinforcement_rate_tier_1 + } + character_modifier = { + knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_1 + } + + province_culture_modifier = { + parameter = coking_smith_bonuses + stationed_maa_toughness_mult = normal_maa_toughness_tier_1 + } + county_culture_modifier = { + parameter = coking_smith_bonuses + development_growth = innovation_coking_development_growth_value_1 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = smiths_02 + + type_icon = "icon_building_smiths.dds" + + ai_value = { + base = 10 + ai_tier_1_building_modifier = yes + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + ai_stacking_bonus_warrior_lodges_modifier = yes + ai_stacking_bonus_wind_furnaces_modifier = yes + ai_anti_synergy_cavalry_modifier = yes + ai_anti_synergy_light_infantry_modifier = yes + ai_heavy_infantry_modifier = yes + ai_pikemen_modifier = yes + modifier = { + add = non_stationed_maa_bonus + has_stationed_regiment = yes + NOR = { + has_stationed_regiment_of_base_type = pikemen + has_stationed_regiment_of_base_type = heavy_infantry + } + } + modifier = { + factor = 0 + building_regimental_grounds_requirement_terrain = yes + NOT = { + has_building_or_higher = regimental_grounds_01 + } + } + modifier = { + factor = 0 + building_farm_estates_requirement_terrain = yes + NOT = { + has_building_or_higher = farm_estates_01 + } + } + modifier = { + factor = 0 + building_orchards_requirement_terrain = yes + NOT = { + has_building_or_higher = orchards_01 + } + } + modifier = { + factor = 0 + building_horse_pastures_requirement_terrain = yes + NOT = { + has_building_or_higher = horse_pastures_01 + } + } + modifier = { + factor = 0 + building_hillside_grazing_requirement_terrain = yes + NOT = { + has_building_or_higher = hillside_grazing_01 + } + } + modifier = { + factor = 0 + building_warrior_lodges_requirement_terrain = yes + NOT = { + has_building_or_higher = warrior_lodges_01 + } + } + modifier = { + add = -9 + has_building_or_higher = city_01 + } + modifier = { + add = -3 + OR = { + exists = barony.lessee + scope:holder = { + highest_held_title_tier <= tier_barony + } + } + } + modifier = { + add = -10 + scope:holder = { + OR = { + AND = { + government_has_flag = government_is_theocracy + highest_held_title_tier <= tier_barony + } + is_theocratic_lessee = yes + } + } + } + } +} + +smiths_02 = { + construction_time = quick_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_duel_cost_discount_effect_toto_desc + } + } + can_construct_potential = { + building_smiths_requirement_terrain = yes + building_requirement_castle_city_church = { LEVEL = 01 } + trigger_if = { + limit = { + NOT = { + culture = { + has_cultural_parameter = next_level_smiths + } + } + } + scope:holder.culture = { + has_innovation = innovation_barracks + } + } + trigger_else = { + culture = { + has_cultural_parameter = next_level_smiths + } + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_2_cost + + province_modifier = { + stationed_maa_damage_mult = normal_maa_damage_tier_2 + tax_mult = low_building_tax_mult_tier_2 + } + county_modifier = { + levy_reinforcement_rate = normal_levy_reinforcement_rate_tier_2 + } + character_modifier = { + knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_2 + } + + province_culture_modifier = { + parameter = coking_smith_bonuses + stationed_maa_toughness_mult = normal_maa_toughness_tier_2 + } + county_culture_modifier = { + parameter = coking_smith_bonuses + development_growth = innovation_coking_development_growth_value_1 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = smiths_03 + + ai_value = { + base = 9 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + modifier = { # Fill all building slots before going for upgrades + factor = 0 + free_building_slots > 0 + } + } +} + +smiths_03 = { + construction_time = quick_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_duel_cost_discount_effect_toto_desc + } + } + can_construct_potential = { + building_smiths_requirement_terrain = yes + } + + can_construct = { + trigger_if = { + limit = { + NOT = { + culture = { + has_cultural_parameter = next_level_smiths + } + } + } + scope:holder.culture = { + has_innovation = innovation_burhs + } + building_requirement_castle_city_church = { LEVEL = 02 } + } + trigger_else = { + culture = { + has_cultural_parameter = next_level_smiths + } + building_requirement_castle_city_church = { LEVEL = 01 } + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_3_cost + + province_modifier = { + stationed_maa_damage_mult = normal_maa_damage_tier_3 + stationed_maa_toughness_mult = normal_maa_toughness_tier_1 + tax_mult = low_building_tax_mult_tier_3 + } + county_modifier = { + levy_reinforcement_rate = normal_levy_reinforcement_rate_tier_3 + } + character_modifier = { + knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_3 + } + + province_culture_modifier = { + parameter = coking_smith_bonuses + stationed_maa_toughness_mult = normal_maa_toughness_tier_3 + } + county_culture_modifier = { + parameter = coking_smith_bonuses + development_growth = innovation_coking_development_growth_value_2 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = smiths_04 + + ai_value = { + base = 8 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +smiths_04 = { + construction_time = quick_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_duel_cost_discount_effect_toto_desc + } + } + can_construct_potential = { + building_smiths_requirement_terrain = yes + } + + can_construct = { + trigger_if = { + limit = { + NOT = { + culture = { + has_cultural_parameter = next_level_smiths + } + } + } + scope:holder.culture = { + has_innovation = innovation_burhs + } + building_requirement_castle_city_church = { LEVEL = 02 } + } + trigger_else = { + culture = { + has_cultural_parameter = next_level_smiths + } + building_requirement_castle_city_church = { LEVEL = 01 } + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_4_cost + + province_modifier = { + stationed_maa_damage_mult = normal_maa_damage_tier_4 + stationed_maa_toughness_mult = normal_maa_toughness_tier_2 + tax_mult = low_building_tax_mult_tier_4 + } + county_modifier = { + levy_reinforcement_rate = normal_levy_reinforcement_rate_tier_4 + } + character_modifier = { + knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_4 + } + + province_culture_modifier = { + parameter = coking_smith_bonuses + stationed_maa_toughness_mult = normal_maa_toughness_tier_4 + } + county_culture_modifier = { + parameter = coking_smith_bonuses + development_growth = innovation_coking_development_growth_value_2 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = smiths_05 + + ai_value = { + base = 7 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +smiths_05 = { + construction_time = quick_construction_time + effect_desc = smiths_effect_desc + + can_construct_potential = { + building_smiths_requirement_terrain = yes + } + + can_construct = { + trigger_if = { + limit = { + NOT = { + culture = { + has_cultural_parameter = next_level_smiths + } + } + } + scope:holder.culture = { + has_innovation = innovation_castle_baileys + } + building_requirement_castle_city_church = { LEVEL = 03 } + } + trigger_else = { + culture = { + has_cultural_parameter = next_level_smiths + } + scope:holder.culture = { + has_innovation = innovation_burhs + } + building_requirement_castle_city_church = { LEVEL = 02 } + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_5_cost + + province_modifier = { + stationed_maa_damage_mult = normal_maa_damage_tier_5 + stationed_maa_toughness_mult = normal_maa_toughness_tier_3 + tax_mult = low_building_tax_mult_tier_5 + } + county_modifier = { + levy_reinforcement_rate = normal_levy_reinforcement_rate_tier_5 + } + character_modifier = { + knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_5 + } + + province_culture_modifier = { + parameter = coking_smith_bonuses + stationed_maa_toughness_mult = normal_maa_toughness_tier_5 + } + county_culture_modifier = { + parameter = coking_smith_bonuses + development_growth = innovation_coking_development_growth_value_3 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = smiths_06 + + ai_value = { + base = 6 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +smiths_06 = { + construction_time = quick_construction_time + effect_desc = smiths_effect_desc + + can_construct_potential = { + building_smiths_requirement_terrain = yes + } + + can_construct = { + trigger_if = { + limit = { + NOT = { + culture = { + has_cultural_parameter = next_level_smiths + } + } + } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + building_requirement_castle_city_church = { LEVEL = 03 } + } + trigger_else = { + culture = { + has_cultural_parameter = next_level_smiths + } + scope:holder.culture = { + has_innovation = innovation_castle_baileys + } + building_requirement_castle_city_church = { LEVEL = 02 } + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_6_cost + + province_modifier = { + stationed_maa_damage_mult = normal_maa_damage_tier_6 + stationed_maa_toughness_mult = normal_maa_toughness_tier_4 + tax_mult = low_building_tax_mult_tier_6 + } + county_modifier = { + levy_reinforcement_rate = normal_levy_reinforcement_rate_tier_6 + } + character_modifier = { + knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_6 + } + + province_culture_modifier = { + parameter = coking_smith_bonuses + stationed_maa_toughness_mult = normal_maa_toughness_tier_6 + } + county_culture_modifier = { + parameter = coking_smith_bonuses + development_growth = innovation_coking_development_growth_value_3 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = smiths_07 + + ai_value = { + base = 5 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +smiths_07 = { + construction_time = quick_construction_time + effect_desc = smiths_effect_desc + + can_construct_potential = { + building_smiths_requirement_terrain = yes + } + + can_construct = { + trigger_if = { + limit = { + NOT = { + culture = { + has_cultural_parameter = next_level_smiths + } + } + } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + building_requirement_castle_city_church = { LEVEL = 04 } + } + trigger_else = { + culture = { + has_cultural_parameter = next_level_smiths + } + scope:holder.culture = { + has_innovation = innovation_castle_baileys + } + building_requirement_castle_city_church = { LEVEL = 03 } + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_7_cost + + province_modifier = { + stationed_maa_damage_mult = normal_maa_damage_tier_7 + stationed_maa_toughness_mult = normal_maa_toughness_tier_5 + tax_mult = low_building_tax_mult_tier_7 + } + county_modifier = { + levy_reinforcement_rate = normal_levy_reinforcement_rate_tier_7 + } + character_modifier = { + knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_7 + } + + province_culture_modifier = { + parameter = coking_smith_bonuses + stationed_maa_toughness_mult = normal_maa_toughness_tier_7 + } + county_culture_modifier = { + parameter = coking_smith_bonuses + development_growth = innovation_coking_development_growth_value_4 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + next_building = smiths_08 + + ai_value = { + base = 4 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} + +smiths_08 = { + construction_time = quick_construction_time + effect_desc = smiths_effect_desc + + can_construct_potential = { + building_smiths_requirement_terrain = yes + } + + can_construct = { + trigger_if = { + limit = { + NOT = { + culture = { + has_cultural_parameter = next_level_smiths + } + } + } + scope:holder.culture = { + has_innovation = innovation_royal_armory + } + building_requirement_castle_city_church = { LEVEL = 04 } + } + trigger_else = { + culture = { + has_cultural_parameter = next_level_smiths + } + scope:holder.culture = { + has_innovation = innovation_castle_baileys + } + building_requirement_castle_city_church = { LEVEL = 03 } + } + } + + can_construct_showing_failures_only = { + building_requirement_tribal = no + } + + cost_gold = normal_building_tier_8_cost + + province_modifier = { + stationed_maa_damage_mult = normal_maa_damage_tier_8 + stationed_maa_toughness_mult = normal_maa_toughness_tier_6 + tax_mult = low_building_tax_mult_tier_8 + } + county_modifier = { + levy_reinforcement_rate = normal_levy_reinforcement_rate_tier_8 + } + character_modifier = { + knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_8 + } + + province_culture_modifier = { + parameter = coking_smith_bonuses + stationed_maa_toughness_mult = normal_maa_toughness_tier_8 + } + county_culture_modifier = { + parameter = coking_smith_bonuses + development_growth = innovation_coking_development_growth_value_4 + } + + on_complete = { + #Mandala Creator Aspect + creator_mandala_built_regular_building_piety_effect = yes + } + + ai_value = { + base = 3 + ai_general_building_modifier = yes + directive_to_build_military_modifier = yes + } +} diff --git a/common/buildings/00_temple_buildings.txt b/common/buildings/00_temple_buildings.txt index c65ddc236..ff3664005 100644 --- a/common/buildings/00_temple_buildings.txt +++ b/common/buildings/00_temple_buildings.txt @@ -734,17 +734,17 @@ temple_01 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = tribals_can_into_temples } } } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_city_planning } } trigger_else = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = tribals_can_into_temples } } @@ -754,7 +754,7 @@ temple_01 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = tribals_can_into_temples } } @@ -763,7 +763,7 @@ temple_01 = { building_requirement_tribal_holding_in_county = yes } trigger_else = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = tribals_can_into_temples } } @@ -848,7 +848,7 @@ temple_01 = { } if = { limit = { - county.holder.culture = { + county.holder.culture ?= { has_cultural_parameter = renown_from_temple_construction } exists = county.holder.dynasty @@ -857,7 +857,7 @@ temple_01 = { } if = { limit = { - county.holder.culture = { + county.holder.culture ?= { has_cultural_parameter = extra_piety_from_temple_construction } } @@ -868,11 +868,11 @@ temple_01 = { } if = { limit = { - county.holder.culture = { + county.holder.culture ?= { has_cultural_parameter = more_fervor_on_church_construction } } - county.holder.faith = { + county.holder.faith ?= { change_fervor = { value = notable_fervor_gain desc = fervor_gain_built_temple_holding @@ -880,7 +880,7 @@ temple_01 = { } } else = { - county.holder.faith = { + county.holder.faith ?= { change_fervor = { value = trivial_fervor_gain desc = fervor_gain_built_temple_holding @@ -889,7 +889,7 @@ temple_01 = { } if = { limit = { - county.holder.culture = { + county.holder.culture ?= { has_cultural_parameter = prestige_from_temple_construction } } @@ -897,7 +897,7 @@ temple_01 = { } if = { limit = { - county.holder.faith = { + county.holder.faith ?= { has_doctrine_parameter = neow_piety_from_temple_construction } } @@ -1777,23 +1777,21 @@ temple_02 = { } can_construct = { trigger_if = { - limit = { - NOT = { - scope:holder.culture = { - has_cultural_parameter = temple_next_level - } + limit = { exists = scope:holder.culture } + trigger_if = { + limit = { + NOT = { scope:holder.culture ?= { has_cultural_parameter = temple_next_level } } + } + scope:holder.culture ?= { has_innovation = innovation_manorialism } + } + trigger_else = { + scope:holder.culture ?= { + has_cultural_parameter = temple_next_level + has_innovation = innovation_city_planning } } - scope:holder.culture = { - has_innovation = innovation_manorialism - } - } - trigger_else = { - scope:holder.culture = { - has_cultural_parameter = temple_next_level - has_innovation = innovation_city_planning - } } + trigger_else = { always = no } } can_construct_showing_failures_only = { NOT = { scope:holder = { has_character_modifier = tgp_rebuilder_modifier } } } cost_gold = main_building_tier_2_cost @@ -1843,7 +1841,7 @@ temple_02 = { on_complete = { if = { limit = { - county.holder.culture = { + county.holder.culture ?= { has_cultural_parameter = renown_from_temple_construction } exists = county.holder.dynasty @@ -1852,11 +1850,11 @@ temple_02 = { } if = { limit = { - county.holder.culture = { + county.holder.culture ?= { has_cultural_parameter = more_fervor_on_church_construction } } - county.holder.faith = { + county.holder.faith ?= { change_fervor = { value = small_fervor_gain desc = fervor_gain_upgraded_temple_holding_culture_parameter @@ -2636,17 +2634,17 @@ temple_03 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = temple_next_level } } } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_windmills } } trigger_else = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = temple_next_level has_innovation = innovation_manorialism } @@ -2699,7 +2697,7 @@ temple_03 = { on_complete = { if = { limit = { - county.holder.culture = { + county.holder.culture ?= { has_cultural_parameter = renown_from_temple_construction } exists = county.holder.dynasty @@ -2708,11 +2706,11 @@ temple_03 = { } if = { limit = { - county.holder.culture = { + county.holder.culture ?= { has_cultural_parameter = more_fervor_on_church_construction } } - county.holder.faith = { + county.holder.faith ?= { change_fervor = { value = small_fervor_gain desc = fervor_gain_upgraded_temple_holding_culture_parameter @@ -3489,17 +3487,17 @@ temple_04 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = temple_next_level } } } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } trigger_else = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = temple_next_level has_innovation = innovation_windmills } @@ -3551,7 +3549,7 @@ temple_04 = { on_complete = { if = { limit = { - county.holder.culture = { + county.holder.culture ?= { has_cultural_parameter = renown_from_temple_construction } exists = county.holder.dynasty @@ -3560,11 +3558,11 @@ temple_04 = { } if = { limit = { - county.holder.culture = { + county.holder.culture ?= { has_cultural_parameter = more_fervor_on_church_construction } } - county.holder.faith = { + county.holder.faith ?= { change_fervor = { value = small_fervor_gain desc = fervor_gain_upgraded_temple_holding_culture_parameter @@ -3742,7 +3740,7 @@ scriptorium_02 = { can_construct_showing_failures_only = { building_requirement_tribal = no - culture = { + culture ?= { has_innovation = innovation_city_planning } } @@ -3797,7 +3795,7 @@ scriptorium_03 = { has_building_or_higher = temple_02 has_building_or_higher = temple_citadel_02 } - culture = { + culture ?= { has_innovation = innovation_manorialism } has_dlc_feature = legends @@ -3857,7 +3855,7 @@ scriptorium_04 = { has_building_or_higher = temple_02 has_building_or_higher = temple_citadel_02 } - culture = { + culture ?= { has_innovation = innovation_manorialism } has_dlc_feature = legends @@ -3917,7 +3915,7 @@ scriptorium_05 = { has_building_or_higher = temple_03 has_building_or_higher = temple_citadel_03 } - culture = { + culture ?= { has_innovation = innovation_windmills } has_dlc_feature = legends @@ -3977,7 +3975,7 @@ scriptorium_06 = { has_building_or_higher = temple_03 has_building_or_higher = temple_citadel_03 } - culture = { + culture ?= { has_innovation = innovation_windmills } has_dlc_feature = legends @@ -4036,7 +4034,7 @@ scriptorium_07 = { has_building_or_higher = temple_04 has_building_or_higher = temple_citadel_04 } - culture = { + culture ?= { has_innovation = innovation_cranes } has_dlc_feature = legends @@ -4096,7 +4094,7 @@ scriptorium_08 = { has_building_or_higher = temple_04 has_building_or_higher = temple_citadel_04 } - culture = { + culture ?= { has_innovation = innovation_cranes } has_dlc_feature = legends @@ -4155,8 +4153,12 @@ monastic_schools_01 = { can_construct_potential = { trigger_if = { limit = { - scope:holder.rite = { - NOT = { rite_has_parameter = monastic_schools_allowed_in_every_holding_type } + exists = scope:holder.rite + trigger_if = { + limit = { exists = scope:holder.rite } + scope:holder.rite ?= { + NOT = { rite_has_parameter = monastic_schools_allowed_in_every_holding_type } + } } } OR = { @@ -4233,7 +4235,7 @@ monastic_schools_02 = { can_construct_potential = { trigger_if = { limit = { - scope:holder.rite = { + scope:holder.rite ?= { NOT = { rite_has_parameter = monastic_schools_allowed_in_every_holding_type } } } @@ -4246,7 +4248,7 @@ monastic_schools_02 = { } can_construct_showing_failures_only = { - scope:holder.culture = { + scope:holder.culture ?= { trigger_if = { limit = { NOT = { has_cultural_parameter = next_level_monasteries } } has_innovation = innovation_city_planning @@ -4309,7 +4311,7 @@ monastic_schools_03 = { can_construct = { trigger_if = { limit = { - scope:holder.rite = { + scope:holder.rite ?= { NOT = { rite_has_parameter = monastic_schools_allowed_in_every_holding_type } } } @@ -4321,18 +4323,18 @@ monastic_schools_03 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_monasteries } } } - culture = { + culture ?= { has_innovation = innovation_manorialism } building_requirement_castle_city_church_temple_citadel_tribe = { LEVEL = 02 } } trigger_else = { - culture = { + culture ?= { has_innovation = innovation_city_planning has_cultural_parameter = next_level_monasteries } @@ -4395,7 +4397,7 @@ monastic_schools_04 = { can_construct = { trigger_if = { limit = { - scope:holder.rite = { + scope:holder.rite ?= { NOT = { rite_has_parameter = monastic_schools_allowed_in_every_holding_type } } } @@ -4407,18 +4409,18 @@ monastic_schools_04 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_monasteries } } } - culture = { + culture ?= { has_innovation = innovation_manorialism } building_requirement_castle_city_church_temple_citadel_tribe = { LEVEL = 02 } } trigger_else = { - culture = { + culture ?= { has_innovation = innovation_city_planning has_cultural_parameter = next_level_monasteries } @@ -4481,7 +4483,7 @@ monastic_schools_05 = { can_construct = { trigger_if = { limit = { - scope:holder.rite = { + scope:holder.rite ?= { NOT = { rite_has_parameter = monastic_schools_allowed_in_every_holding_type } } } @@ -4493,18 +4495,18 @@ monastic_schools_05 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_monasteries } } } - culture = { + culture ?= { has_innovation = innovation_windmills } building_requirement_castle_city_church_temple_citadel_tribe = { LEVEL = 03 } } trigger_else = { - culture = { + culture ?= { has_innovation = innovation_city_planning has_cultural_parameter = next_level_monasteries } @@ -4567,7 +4569,7 @@ monastic_schools_06 = { can_construct = { trigger_if = { limit = { - scope:holder.rite = { + scope:holder.rite ?= { NOT = { rite_has_parameter = monastic_schools_allowed_in_every_holding_type } } } @@ -4579,18 +4581,18 @@ monastic_schools_06 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_monasteries } } } - culture = { + culture ?= { has_innovation = innovation_windmills } building_requirement_castle_city_church_temple_citadel_tribe = { LEVEL = 03 } } trigger_else = { - culture = { + culture ?= { has_innovation = innovation_city_planning has_cultural_parameter = next_level_monasteries } @@ -4653,7 +4655,7 @@ monastic_schools_07 = { can_construct = { trigger_if = { limit = { - scope:holder.rite = { + scope:holder.rite ?= { NOT = { rite_has_parameter = monastic_schools_allowed_in_every_holding_type } } } @@ -4665,18 +4667,18 @@ monastic_schools_07 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_monasteries } } } - culture = { + culture ?= { has_innovation = innovation_cranes } building_requirement_castle_city_church_temple_citadel_tribe = { LEVEL = 04 } } trigger_else = { - culture = { + culture ?= { has_innovation = innovation_windmills has_cultural_parameter = next_level_monasteries } @@ -4739,7 +4741,7 @@ monastic_schools_08 = { can_construct = { trigger_if = { limit = { - scope:holder.rite = { + scope:holder.rite ?= { NOT = { rite_has_parameter = monastic_schools_allowed_in_every_holding_type } } } @@ -4751,18 +4753,18 @@ monastic_schools_08 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_monasteries } } } - culture = { + culture ?= { has_innovation = innovation_cranes } building_requirement_castle_city_church_temple_citadel_tribe = { LEVEL = 04 } } trigger_else = { - culture = { + culture ?= { has_innovation = innovation_windmills has_cultural_parameter = next_level_monasteries } @@ -4828,9 +4830,11 @@ megalith_01 = { has_building_or_higher = temple_01 has_building_or_higher = temple_citadel_01 } - scope:holder.rite = { - rite_has_parameter = can_build_megaliths + trigger_if = { + limit = { exists = scope:holder.rite } + scope:holder.rite ?= { rite_has_parameter = can_build_megaliths } } + trigger_else = { always = no } } can_construct_showing_failures_only = { @@ -4840,7 +4844,11 @@ megalith_01 = { is_enabled = { custom_tooltip = { text = province_is_of_a_megalith_faith_tt - county.rite = { rite_has_parameter = can_build_megaliths } + trigger_if = { + limit = { exists = county.rite } + county.rite ?= { rite_has_parameter = can_build_megaliths } + } + trigger_else = { always = no } } } @@ -4901,7 +4909,7 @@ megalith_02 = { has_building_or_higher = temple_01 has_building_or_higher = temple_citadel_01 } - scope:holder.rite = { + scope:holder.rite ?= { rite_has_parameter = can_build_megaliths } } @@ -4913,7 +4921,7 @@ megalith_02 = { is_enabled = { custom_tooltip = { text = province_is_of_a_megalith_faith_tt - county.rite = { rite_has_parameter = can_build_megaliths } + county.rite ?= { rite_has_parameter = can_build_megaliths } } } @@ -4953,13 +4961,13 @@ megalith_03 = { has_building_or_higher = temple_01 has_building_or_higher = temple_citadel_01 } - scope:holder.rite = { + scope:holder.rite ?= { rite_has_parameter = can_build_megaliths } } can_construct_showing_failures_only = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_city_planning } building_requirement_tribal = no @@ -4968,7 +4976,7 @@ megalith_03 = { is_enabled = { custom_tooltip = { text = province_is_of_a_megalith_faith_tt - county.rite = { rite_has_parameter = can_build_megaliths } + county.rite ?= { rite_has_parameter = can_build_megaliths } } } @@ -5008,13 +5016,13 @@ megalith_04 = { has_building_or_higher = temple_02 has_building_or_higher = temple_citadel_02 } - scope:holder.rite = { + scope:holder.rite ?= { rite_has_parameter = can_build_megaliths } } can_construct_showing_failures_only = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_city_planning } building_requirement_tribal = no @@ -5023,7 +5031,7 @@ megalith_04 = { is_enabled = { custom_tooltip = { text = province_is_of_a_megalith_faith_tt - county.rite = { rite_has_parameter = can_build_megaliths } + county.rite ?= { rite_has_parameter = can_build_megaliths } } } @@ -5064,13 +5072,13 @@ megalith_05 = { has_building_or_higher = temple_02 has_building_or_higher = temple_citadel_02 } - scope:holder.rite = { + scope:holder.rite ?= { rite_has_parameter = can_build_megaliths } } can_construct_showing_failures_only = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_city_planning } building_requirement_tribal = no @@ -5079,7 +5087,7 @@ megalith_05 = { is_enabled = { custom_tooltip = { text = province_is_of_a_megalith_faith_tt - county.rite = { rite_has_parameter = can_build_megaliths } + county.rite ?= { rite_has_parameter = can_build_megaliths } } } @@ -5121,13 +5129,13 @@ megalith_06 = { has_building_or_higher = temple_02 has_building_or_higher = temple_citadel_02 } - scope:holder.rite = { + scope:holder.rite ?= { rite_has_parameter = can_build_megaliths } } can_construct_showing_failures_only = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_city_planning } building_requirement_tribal = no @@ -5136,7 +5144,7 @@ megalith_06 = { is_enabled = { custom_tooltip = { text = province_is_of_a_megalith_faith_tt - county.rite = { rite_has_parameter = can_build_megaliths } + county.rite ?= { rite_has_parameter = can_build_megaliths } } } @@ -5178,13 +5186,13 @@ megalith_07 = { has_building_or_higher = temple_02 has_building_or_higher = temple_citadel_02 } - scope:holder.rite = { + scope:holder.rite ?= { rite_has_parameter = can_build_megaliths } } can_construct_showing_failures_only = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_city_planning } building_requirement_tribal = no @@ -5193,7 +5201,7 @@ megalith_07 = { is_enabled = { custom_tooltip = { text = province_is_of_a_megalith_faith_tt - county.rite = { rite_has_parameter = can_build_megaliths } + county.rite ?= { rite_has_parameter = can_build_megaliths } } } @@ -5235,13 +5243,13 @@ megalith_08 = { has_building_or_higher = temple_02 has_building_or_higher = temple_citadel_02 } - scope:holder.rite = { + scope:holder.rite ?= { rite_has_parameter = can_build_megaliths } } can_construct_showing_failures_only = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_city_planning } building_requirement_tribal = no @@ -5250,7 +5258,7 @@ megalith_08 = { is_enabled = { custom_tooltip = { text = province_is_of_a_megalith_faith_tt - county.rite = { rite_has_parameter = can_build_megaliths } + county.rite ?= { rite_has_parameter = can_build_megaliths } } } @@ -5341,7 +5349,7 @@ breweries_02 = { } can_construct_showing_failures_only = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_city_planning } building_requirement_tribal = no @@ -5391,7 +5399,7 @@ breweries_03 = { } can_construct_showing_failures_only = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_city_planning } building_requirement_tribal = no @@ -5432,7 +5440,7 @@ breweries_04 = { } can_construct_showing_failures_only = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } building_requirement_tribal = no @@ -5473,7 +5481,7 @@ breweries_05 = { } can_construct_showing_failures_only = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_windmills } building_requirement_tribal = no @@ -5514,7 +5522,7 @@ breweries_06 = { } can_construct_showing_failures_only = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_windmills } building_requirement_tribal = no @@ -5555,7 +5563,7 @@ breweries_07 = { } can_construct_showing_failures_only = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } building_requirement_tribal = no @@ -5596,7 +5604,7 @@ breweries_08 = { } can_construct_showing_failures_only = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } building_requirement_tribal = no diff --git a/common/buildings/00_tribal_buildings.txt b/common/buildings/00_tribal_buildings.txt index 534ed34db..cd612391e 100644 --- a/common/buildings/00_tribal_buildings.txt +++ b/common/buildings/00_tribal_buildings.txt @@ -255,7 +255,7 @@ tribe_02 = { can_construct_showing_failures_only = { OR = { scope:holder = { - culture = { has_innovation = innovation_plenary_assemblies } + culture ?= { has_innovation = innovation_plenary_assemblies } } mpo_permafrost_building_trigger = yes } @@ -370,7 +370,7 @@ longhouses_02 = { OR = { mpo_permafrost_building_trigger = yes scope:holder = { - culture = { has_innovation = innovation_barracks } + culture ?= { has_innovation = innovation_barracks } } } } @@ -463,7 +463,7 @@ war_camps_02 = { OR = { mpo_permafrost_building_trigger = yes scope:holder = { - culture = { has_innovation = innovation_barracks } + culture ?= { has_innovation = innovation_barracks } } } } @@ -560,7 +560,7 @@ palisades_02 = { OR = { mpo_permafrost_building_trigger = yes scope:holder = { - culture = { has_innovation = innovation_barracks } + culture ?= { has_innovation = innovation_barracks } } } } @@ -640,7 +640,7 @@ market_villages_02 = { OR = { mpo_permafrost_building_trigger = yes scope:holder = { - culture = { has_innovation = innovation_barracks } + culture ?= { has_innovation = innovation_barracks } } } } diff --git a/common/buildings/N3OW_duchy_capital_buildings.txt b/common/buildings/N3OW_duchy_capital_buildings.txt index fb4076177..d68cc6c3d 100644 --- a/common/buildings/N3OW_duchy_capital_buildings.txt +++ b/common/buildings/N3OW_duchy_capital_buildings.txt @@ -21,7 +21,7 @@ water_filter_mills_01 = { can_construct_showing_failures_only = { - culture = { + culture ?= { has_innovation = innovation_manorialism } } @@ -90,7 +90,7 @@ water_filter_mills_02 = { can_construct_showing_failures_only = { - culture = { + culture ?= { has_innovation = innovation_windmills } } @@ -134,7 +134,7 @@ water_filter_mills_03 = { can_construct_showing_failures_only = { - culture = { + culture ?= { has_innovation = innovation_cranes } } diff --git a/common/buildings/N3OW_standard_economy_buildings.txt b/common/buildings/N3OW_standard_economy_buildings.txt index f0e5d0d59..b5e8bb9d0 100644 --- a/common/buildings/N3OW_standard_economy_buildings.txt +++ b/common/buildings/N3OW_standard_economy_buildings.txt @@ -67,7 +67,7 @@ tell_mines_02 = { can_construct_potential = { building_tell_mines_requirement_terrain = yes building_requirement_castle_city_church = { LEVEL = 01 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_crop_rotation } } @@ -124,7 +124,7 @@ tell_mines_03 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } @@ -180,7 +180,7 @@ tell_mines_04 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } @@ -236,7 +236,7 @@ tell_mines_05 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -292,7 +292,7 @@ tell_mines_06 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -348,7 +348,7 @@ tell_mines_07 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -404,7 +404,7 @@ tell_mines_08 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -512,7 +512,7 @@ leclerc_dyeworks_02 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } @@ -564,7 +564,7 @@ leclerc_dyeworks_03 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -656,7 +656,7 @@ vineyards_02 = { can_construct_potential = { building_vineyards_requirement = yes building_requirement_castle_city_church = { LEVEL = 01 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_crop_rotation } } @@ -712,7 +712,7 @@ vineyards_03 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } @@ -766,7 +766,7 @@ vineyards_04 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } @@ -820,7 +820,7 @@ vineyards_05 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -874,7 +874,7 @@ vineyards_06 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -929,7 +929,7 @@ vineyards_07 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -984,7 +984,7 @@ vineyards_08 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -1112,11 +1112,13 @@ potato_fields_01 = { } modifier = { factor = 2 - scope:holder.culture = { has_innovation = innovation_champa_rice } + exists = scope:holder.culture + scope:holder.culture ?= { has_innovation = innovation_champa_rice } } modifier = { factor = 0 - scope:holder.culture = { has_innovation = innovation_champa_rice } # this also allows farm estates to be built in rice fields + exists = scope:holder.culture + scope:holder.culture ?= { has_innovation = innovation_champa_rice } # this also allows farm estates to be built in rice fields NOT = { has_building_or_higher = farm_estates_01 } @@ -1241,7 +1243,7 @@ potato_fields_03 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } @@ -1344,7 +1346,7 @@ potato_fields_04 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } @@ -1449,7 +1451,7 @@ potato_fields_05 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -1555,7 +1557,7 @@ potato_fields_06 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -1666,7 +1668,7 @@ potato_fields_07 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -1774,7 +1776,7 @@ potato_fields_08 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -1879,7 +1881,7 @@ doggerland_ivory_deposits_01 = { trigger_if = { # Sometimes tribals can into botes limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = trade_ports_enabled_for_tribals } } @@ -1940,13 +1942,13 @@ doggerland_ivory_deposits_01 = { modifier = { add = 5 - culture = { + culture ?= { has_cultural_parameter = trade_ports_enabled_for_tribals } } modifier = { add = 5 - culture = { + culture ?= { has_cultural_parameter = trade_ports_stationed_maa_bonus } } @@ -1985,7 +1987,7 @@ doggerland_ivory_deposits_02 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = trade_ports_enabled_for_tribals } } @@ -2003,17 +2005,17 @@ doggerland_ivory_deposits_02 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_trade_ports } } } - culture = { + culture ?= { has_innovation = innovation_crop_rotation } } trigger_else = { - culture = { + culture ?= { has_cultural_parameter = next_level_trade_ports } @@ -2074,21 +2076,21 @@ doggerland_ivory_deposits_03 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_trade_ports } } } - culture = { + culture ?= { has_innovation = innovation_manorialism } building_requirement_castle_city_church = { LEVEL = 02 } } trigger_else = { - culture = { + culture ?= { has_innovation = innovation_crop_rotation } - culture = { + culture ?= { has_cultural_parameter = next_level_trade_ports } building_requirement_castle_city_church = { LEVEL = 01 } @@ -2149,21 +2151,21 @@ doggerland_ivory_deposits_04 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_trade_ports } } } - culture = { + culture ?= { has_innovation = innovation_manorialism } building_requirement_castle_city_church = { LEVEL = 02 } } trigger_else = { - culture = { + culture ?= { has_innovation = innovation_crop_rotation } - culture = { + culture ?= { has_cultural_parameter = next_level_trade_ports } building_requirement_castle_city_church = { LEVEL = 01 } @@ -2224,21 +2226,21 @@ doggerland_ivory_deposits_05 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_trade_ports } } } - culture = { + culture ?= { has_innovation = innovation_guilds } building_requirement_castle_city_church = { LEVEL = 03 } } trigger_else = { - culture = { + culture ?= { has_innovation = innovation_manorialism } - culture = { + culture ?= { has_cultural_parameter = next_level_trade_ports } building_requirement_castle_city_church = { LEVEL = 02 } @@ -2299,21 +2301,21 @@ doggerland_ivory_deposits_06 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_trade_ports } } } - culture = { + culture ?= { has_innovation = innovation_guilds } building_requirement_castle_city_church = { LEVEL = 03 } } trigger_else = { - culture = { + culture ?= { has_innovation = innovation_manorialism } - culture = { + culture ?= { has_cultural_parameter = next_level_trade_ports } building_requirement_castle_city_church = { LEVEL = 02 } @@ -2374,21 +2376,21 @@ doggerland_ivory_deposits_07 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_trade_ports } } } - culture = { + culture ?= { has_innovation = innovation_cranes } building_requirement_castle_city_church = { LEVEL = 04 } } trigger_else = { - culture = { + culture ?= { has_innovation = innovation_guilds } - culture = { + culture ?= { has_cultural_parameter = next_level_trade_ports } building_requirement_castle_city_church = { LEVEL = 03 } @@ -2449,21 +2451,21 @@ doggerland_ivory_deposits_08 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = next_level_trade_ports } } } - culture = { + culture ?= { has_innovation = innovation_cranes } building_requirement_castle_city_church = { LEVEL = 04 } } trigger_else = { - culture = { + culture ?= { has_innovation = innovation_guilds } - culture = { + culture ?= { has_cultural_parameter = next_level_trade_ports } building_requirement_castle_city_church = { LEVEL = 03 } @@ -2562,7 +2564,7 @@ greenhouses_02 = { can_construct_showing_failures_only = { building_requirement_tribal = no - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_crop_rotation } } @@ -2604,7 +2606,7 @@ greenhouses_03 = { can_construct_showing_failures_only = { building_requirement_tribal = no - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } @@ -2642,7 +2644,7 @@ greenhouses_04 = { can_construct_showing_failures_only = { building_requirement_tribal = no - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } @@ -2681,7 +2683,7 @@ greenhouses_05 = { can_construct_showing_failures_only = { building_requirement_tribal = no - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -2720,7 +2722,7 @@ greenhouses_06 = { can_construct_showing_failures_only = { building_requirement_tribal = no - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -2759,7 +2761,7 @@ greenhouses_07 = { can_construct_showing_failures_only = { building_requirement_tribal = no - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -2799,7 +2801,7 @@ greenhouses_08 = { can_construct_showing_failures_only = { building_requirement_tribal = no - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -2878,7 +2880,7 @@ soapmaking_guilds_02 = { can_construct_showing_failures_only = { building_requirement_tribal = no - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_crop_rotation } } @@ -2919,7 +2921,7 @@ soapmaking_guilds_03 = { can_construct_showing_failures_only = { building_requirement_tribal = no - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } @@ -2956,7 +2958,7 @@ soapmaking_guilds_04 = { can_construct_showing_failures_only = { building_requirement_tribal = no - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } @@ -2994,7 +2996,7 @@ soapmaking_guilds_05 = { can_construct_showing_failures_only = { building_requirement_tribal = no - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -3032,7 +3034,7 @@ soapmaking_guilds_06 = { can_construct_showing_failures_only = { building_requirement_tribal = no - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_guilds } } @@ -3071,7 +3073,7 @@ soapmaking_guilds_07 = { can_construct_showing_failures_only = { building_requirement_tribal = no - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } @@ -3110,7 +3112,7 @@ soapmaking_guilds_08 = { can_construct_showing_failures_only = { building_requirement_tribal = no - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } diff --git a/common/buildings/NEOW_special_buildings.txt b/common/buildings/NEOW_special_buildings.txt index 1e24d5ee6..23b0f3062 100644 --- a/common/buildings/NEOW_special_buildings.txt +++ b/common/buildings/NEOW_special_buildings.txt @@ -87,7 +87,7 @@ court_of_europa_01 = { prestige_level >= 4 highest_held_title_tier >= tier_duchy } - scope:holder.culture = { has_innovation = innovation_manorialism } + scope:holder.culture ?= { has_innovation = innovation_manorialism } building_requirement_tribal = no } @@ -148,7 +148,7 @@ court_of_europa_02 = { prestige_level >= 4 highest_held_title_tier >= tier_duchy } - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } } effect_desc = feast_cost_discount_max_desc @@ -203,7 +203,7 @@ walls_of_nijmegen_01 = { type_icon = "toledo.dds" can_construct_potential = { - scope:holder.culture = { has_innovation = innovation_motte } + scope:holder.culture ?= { has_innovation = innovation_motte } building_requirement_tribal = no } @@ -243,7 +243,7 @@ port_of_amsterdam_01 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_manorialism } + scope:holder.culture ?= { has_innovation = innovation_manorialism } scope:holder = { highest_held_title_tier >= tier_duchy } } @@ -293,7 +293,7 @@ port_of_amsterdam_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 02 } } @@ -344,7 +344,7 @@ port_of_amsterdam_03 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -398,7 +398,7 @@ port_of_antwerpen_01 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_manorialism } + scope:holder.culture ?= { has_innovation = innovation_manorialism } scope:holder = { highest_held_title_tier >= tier_duchy } } @@ -448,7 +448,7 @@ port_of_antwerpen_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 02 } } @@ -499,7 +499,7 @@ port_of_antwerpen_03 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -816,7 +816,7 @@ palace_versailles_01 = { prestige_level >= 4 highest_held_title_tier >= tier_duchy } - scope:holder.culture = { has_innovation = innovation_baliffs } + scope:holder.culture ?= { has_innovation = innovation_baliffs } } effect_desc = cereal_fields_effect_desc @@ -871,7 +871,7 @@ palace_versailles_02 = { prestige_level >= 4 highest_held_title_tier >= tier_duchy } - scope:holder.culture = { has_innovation = innovation_guilds } + scope:holder.culture ?= { has_innovation = innovation_guilds } } effect_desc = farm_estates_effect_desc @@ -929,7 +929,7 @@ palace_versailles_03 = { prestige_level >= 4 highest_held_title_tier >= tier_duchy } - scope:holder.culture = { has_innovation = innovation_noblesse_oblige} + scope:holder.culture ?= { has_innovation = innovation_noblesse_oblige} } effect_desc = feast_cost_discount_max_desc @@ -984,7 +984,7 @@ port_of_calais_01 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_manorialism } + scope:holder.culture ?= { has_innovation = innovation_manorialism } scope:holder = { highest_held_title_tier >= tier_duchy } } @@ -1034,7 +1034,7 @@ port_of_calais_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 02 } } @@ -1085,7 +1085,7 @@ port_of_calais_03 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -1206,7 +1206,7 @@ palace_fontainebleau_01 = { prestige_level >= 4 highest_held_title_tier >= tier_duchy } - scope:holder.culture = { has_innovation = innovation_baliffs } + scope:holder.culture ?= { has_innovation = innovation_baliffs } building_requirement_tribal = no } @@ -1262,7 +1262,7 @@ palace_fontainebleau_02 = { prestige_level >= 4 highest_held_title_tier >= tier_duchy } - scope:holder.culture = { has_innovation = innovation_guilds } + scope:holder.culture ?= { has_innovation = innovation_guilds } } effect_desc = feast_cost_discount_max_desc @@ -1480,7 +1480,7 @@ chateau_bretagne_02 = { prestige_level >= 4 highest_held_title_tier >= tier_duchy } - scope:holder.culture = { has_innovation = innovation_guilds } + scope:holder.culture ?= { has_innovation = innovation_guilds } } effect_desc = feast_cost_discount_max_desc @@ -1585,7 +1585,7 @@ fortified_port_of_monaco_01 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_manorialism } + scope:holder.culture ?= { has_innovation = innovation_manorialism } scope:holder = { highest_held_title_tier >= tier_duchy } } @@ -1642,7 +1642,7 @@ fortified_port_of_monaco_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 02 } } @@ -1700,7 +1700,7 @@ fortified_port_of_monaco_03 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -1761,7 +1761,7 @@ port_of_la_rochelle_01 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_manorialism } + scope:holder.culture ?= { has_innovation = innovation_manorialism } scope:holder = { highest_held_title_tier >= tier_duchy } } @@ -1811,7 +1811,7 @@ port_of_la_rochelle_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 02 } } @@ -1862,7 +1862,7 @@ port_of_la_rochelle_03 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -2383,7 +2383,7 @@ belem_tower_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -2484,7 +2484,7 @@ toledo_steelworks_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -2536,7 +2536,7 @@ toledo_steelworks_03 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_cranes } + scope:holder.culture ?= { has_innovation = innovation_cranes } building_requirement_castle_city_church = { LEVEL = 04 } } @@ -2663,7 +2663,7 @@ almeria_castle_01 = { type_icon = "alcazar_segovia.dds" can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } @@ -2727,7 +2727,7 @@ alhambra_01 = { } can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } @@ -2782,7 +2782,7 @@ alcazar_of_segovia_01 = { type_icon = "alcazar_segovia.dds" can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } @@ -2937,7 +2937,7 @@ aljaferia_palace_01 = { type_icon = "aljaferia.dds" can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } @@ -3128,7 +3128,7 @@ port_of_valencia_01 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_manorialism } + scope:holder.culture ?= { has_innovation = innovation_manorialism } scope:holder = { highest_held_title_tier >= tier_duchy } } @@ -3178,7 +3178,7 @@ port_of_valencia_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 02 } } @@ -3229,7 +3229,7 @@ port_of_valencia_03 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -3283,7 +3283,7 @@ fortified_port_of_porto_01 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_manorialism } + scope:holder.culture ?= { has_innovation = innovation_manorialism } scope:holder = { highest_held_title_tier >= tier_duchy } } @@ -3340,7 +3340,7 @@ fortified_port_of_porto_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 02 } } @@ -3397,7 +3397,7 @@ fortified_port_of_porto_03 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -3465,7 +3465,7 @@ fortress_pamplona_01 = { } can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } @@ -3520,7 +3520,7 @@ fortified_port_of_malaga_01 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_manorialism } + scope:holder.culture ?= { has_innovation = innovation_manorialism } scope:holder = { highest_held_title_tier >= tier_duchy } } @@ -3577,7 +3577,7 @@ fortified_port_of_malaga_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 02 } } @@ -3635,7 +3635,7 @@ fortified_port_of_malaga_03 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -3956,7 +3956,7 @@ mountain_fortress_lugano_01 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_castle_baileys } + scope:holder.culture ?= { has_innovation = innovation_castle_baileys } building_requirement_castle_city_church = { LEVEL = 02 } } @@ -4003,7 +4003,7 @@ mountain_fortress_lugano_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_castle_baileys } + scope:holder.culture ?= { has_innovation = innovation_castle_baileys } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -4056,7 +4056,7 @@ mountain_fortress_bolzano_01 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_castle_baileys } + scope:holder.culture ?= { has_innovation = innovation_castle_baileys } building_requirement_castle_city_church = { LEVEL = 02 } } @@ -4103,7 +4103,7 @@ mountain_fortress_bolzano_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_castle_baileys } + scope:holder.culture ?= { has_innovation = innovation_castle_baileys } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -4156,7 +4156,7 @@ mountain_fortress_innsbruck_01 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_castle_baileys } + scope:holder.culture ?= { has_innovation = innovation_castle_baileys } building_requirement_castle_city_church = { LEVEL = 02 } } @@ -4203,7 +4203,7 @@ mountain_fortress_innsbruck_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_castle_baileys } + scope:holder.culture ?= { has_innovation = innovation_castle_baileys } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -4300,7 +4300,7 @@ plaza_de_toros_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -4441,7 +4441,7 @@ galleria_vittorio_emanuele_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -4486,7 +4486,7 @@ galleria_vittorio_emanuele_03 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_cranes } + scope:holder.culture ?= { has_innovation = innovation_cranes } building_requirement_castle_city_church = { LEVEL = 04 } } @@ -5197,7 +5197,7 @@ port_of_bari_01 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_manorialism } + scope:holder.culture ?= { has_innovation = innovation_manorialism } scope:holder = { highest_held_title_tier >= tier_duchy } } @@ -5247,7 +5247,7 @@ port_of_bari_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 02 } } @@ -5298,7 +5298,7 @@ port_of_bari_03 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -5352,7 +5352,7 @@ fortified_port_of_ajaccio_01 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_manorialism } + scope:holder.culture ?= { has_innovation = innovation_manorialism } scope:holder = { highest_held_title_tier >= tier_duchy } } @@ -5409,7 +5409,7 @@ fortified_port_of_ajaccio_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 02 } } @@ -5466,7 +5466,7 @@ fortified_port_of_ajaccio_03 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -5526,7 +5526,7 @@ fortified_port_of_genoa_01 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_manorialism } + scope:holder.culture ?= { has_innovation = innovation_manorialism } scope:holder = { highest_held_title_tier >= tier_duchy } } @@ -5583,7 +5583,7 @@ fortified_port_of_genoa_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 02 } } @@ -5640,7 +5640,7 @@ fortified_port_of_genoa_03 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -5697,7 +5697,7 @@ castel_nuovo_01 = { type_icon = "icon_building_legendary_palace.dds" can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } @@ -5754,7 +5754,7 @@ castel_nuovo_02 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_castle_baileys } } @@ -5814,7 +5814,7 @@ mountain_fortress_imperia_01 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_castle_baileys } + scope:holder.culture ?= { has_innovation = innovation_castle_baileys } building_requirement_castle_city_church = { LEVEL = 02 } } @@ -5861,7 +5861,7 @@ mountain_fortress_imperia_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_castle_baileys } + scope:holder.culture ?= { has_innovation = innovation_castle_baileys } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -5928,7 +5928,7 @@ duomo_florence_n3ow_01 = { } } can_construct = { - scope:holder.culture = { has_innovation = innovation_cranes } + scope:holder.culture ?= { has_innovation = innovation_cranes } } cost_gold = 1000 @@ -5980,7 +5980,7 @@ brescia_mines_01 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 01 } - culture = { + culture ?= { has_innovation = innovation_crop_rotation } } @@ -6033,7 +6033,7 @@ brescia_mines_02 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - culture = { + culture ?= { has_innovation = innovation_manorialism } } @@ -6086,7 +6086,7 @@ brescia_mines_03 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - culture = { + culture ?= { has_innovation = innovation_windmills } } @@ -6139,7 +6139,7 @@ brescia_mines_04 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - culture = { + culture ?= { has_innovation = innovation_cranes } } @@ -6194,7 +6194,7 @@ cagliari_mines_01 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 01 } - culture = { + culture ?= { has_innovation = innovation_crop_rotation } } @@ -6246,7 +6246,7 @@ cagliari_mines_02 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - culture = { + culture ?= { has_innovation = innovation_manorialism } } @@ -6298,7 +6298,7 @@ cagliari_mines_03 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - culture = { + culture ?= { has_innovation = innovation_windmills } } @@ -6350,7 +6350,7 @@ cagliari_mines_04 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - culture = { + culture ?= { has_innovation = innovation_cranes } } @@ -6405,7 +6405,7 @@ iglesias_mines_01 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 01 } - culture = { + culture ?= { has_innovation = innovation_crop_rotation } } @@ -6454,7 +6454,7 @@ iglesias_mines_02 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - culture = { + culture ?= { has_innovation = innovation_manorialism } } @@ -6503,7 +6503,7 @@ iglesias_mines_03 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - culture = { + culture ?= { has_innovation = innovation_windmills } } @@ -6554,7 +6554,7 @@ iglesias_mines_04 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - culture = { + culture ?= { has_innovation = innovation_cranes } } @@ -6607,7 +6607,7 @@ monte_amiata_mines_01 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 01 } - culture = { + culture ?= { has_innovation = innovation_crop_rotation } } @@ -6661,7 +6661,7 @@ monte_amiata_mines_02 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - culture = { + culture ?= { has_innovation = innovation_manorialism } } @@ -6716,7 +6716,7 @@ monte_amiata_mines_03 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - culture = { + culture ?= { has_innovation = innovation_windmills } } @@ -6771,7 +6771,7 @@ monte_amiata_mines_04 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - culture = { + culture ?= { has_innovation = innovation_cranes } } @@ -6868,7 +6868,7 @@ croke_park_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -6982,7 +6982,7 @@ westminster_pyramids_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_manorialism } + scope:holder.culture ?= { has_innovation = innovation_manorialism } building_requirement_castle_city_church = { LEVEL = 02 } } @@ -7041,7 +7041,7 @@ westminster_pyramids_03 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -7156,7 +7156,7 @@ the_tower_of_london_02 = { } can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings has_innovation = innovation_castle_baileys } @@ -7194,7 +7194,7 @@ the_tower_of_london_02 = { modifier = { factor = 5 scope:holder = { - culture = { + culture ?= { has_cultural_parameter = ai_more_likely_to_castle } } @@ -7324,7 +7324,7 @@ harlech_castle_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_castle_baileys } + scope:holder.culture ?= { has_innovation = innovation_castle_baileys } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -7382,7 +7382,7 @@ edinburgh_castle_01 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_castle_baileys } } @@ -7615,7 +7615,7 @@ holy_site_canterbury_cathedral_03 = { } } scope:holder = { - culture = { + culture ?= { has_innovation = innovation_windmills } } @@ -7750,7 +7750,7 @@ portsmouth_royal_dockyard_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -8014,7 +8014,7 @@ krowfymply_castle_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_castle_baileys } + scope:holder.culture ?= { has_innovation = innovation_castle_baileys } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -8069,7 +8069,7 @@ fortified_port_of_bristol_01 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_manorialism } + scope:holder.culture ?= { has_innovation = innovation_manorialism } scope:holder = { highest_held_title_tier >= tier_duchy } } @@ -8126,7 +8126,7 @@ fortified_port_of_bristol_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 02 } } @@ -8184,7 +8184,7 @@ fortified_port_of_bristol_03 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -8245,7 +8245,7 @@ port_of_belfast_01 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_manorialism } + scope:holder.culture ?= { has_innovation = innovation_manorialism } scope:holder = { highest_held_title_tier >= tier_duchy } } @@ -8295,7 +8295,7 @@ port_of_belfast_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 02 } } @@ -8346,7 +8346,7 @@ port_of_belfast_03 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -8597,7 +8597,7 @@ port_of_liverpool_01 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_manorialism } + scope:holder.culture ?= { has_innovation = innovation_manorialism } scope:holder = { highest_held_title_tier >= tier_duchy } } @@ -8647,7 +8647,7 @@ port_of_liverpool_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 02 } } @@ -8698,7 +8698,7 @@ port_of_liverpool_03 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -9058,7 +9058,7 @@ loch_ness_02 = { #Make the lake safer } can_construct = { - scope:holder.culture = { has_innovation = household_soldiers } + scope:holder.culture ?= { has_innovation = household_soldiers } } cost_gold = 800 @@ -9111,7 +9111,7 @@ bone_temple_melar_01 = { } can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_city_planning } } @@ -9298,7 +9298,7 @@ birmingham_grand_market_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -9343,7 +9343,7 @@ birmingham_grand_market_03 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_cranes } + scope:holder.culture ?= { has_innovation = innovation_cranes } building_requirement_castle_city_church = { LEVEL = 04 } } @@ -9629,8 +9629,8 @@ prague_castle_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } - scope:holder.culture = { has_innovation = innovation_battlements } + scope:holder.culture ?= { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_battlements } } cost_gold = 1500 @@ -9686,8 +9686,8 @@ prague_castle_03 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_cranes } - scope:holder.culture = { has_innovation = innovation_machicolations } + scope:holder.culture ?= { has_innovation = innovation_cranes } + scope:holder.culture ?= { has_innovation = innovation_machicolations } } cost_gold = 3000 @@ -9865,7 +9865,7 @@ grand_porcelain_works_01 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_guilds } + scope:holder.culture ?= { has_innovation = innovation_guilds } } cost_gold = 800 @@ -9991,7 +9991,7 @@ konigsberg_cathedral_01 = { } } scope:holder = { - culture = { + culture ?= { has_innovation = innovation_city_planning } } @@ -10068,7 +10068,7 @@ konigsberg_cathedral_02 = { } } scope:holder = { - culture = { + culture ?= { has_innovation = innovation_manorialism } } @@ -10348,8 +10348,8 @@ bascarsija_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_development_02 } - scope:holder.culture = { has_innovation = innovation_manorialism } + scope:holder.culture ?= { has_innovation = innovation_development_02 } + scope:holder.culture ?= { has_innovation = innovation_manorialism } } cost_gold = 500 @@ -10396,8 +10396,8 @@ bascarsija_03 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_guilds } - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_guilds } + scope:holder.culture ?= { has_innovation = innovation_windmills } } cost_gold = 500 @@ -10491,7 +10491,7 @@ jajce_citadel_02 = { } can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } @@ -10699,7 +10699,7 @@ smederevo_fortress_02 = { } can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } @@ -10862,8 +10862,8 @@ ljubljana_castle_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } - scope:holder.culture = { has_innovation = innovation_battlements } + scope:holder.culture ?= { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_battlements } } cost_gold = 1000 @@ -11037,7 +11037,7 @@ bor_mines_01 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 01 } - culture = { + culture ?= { has_innovation = innovation_crop_rotation } } @@ -11088,7 +11088,7 @@ bor_mines_02 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - culture = { + culture ?= { has_innovation = innovation_manorialism } } @@ -11139,7 +11139,7 @@ bor_mines_03 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - culture = { + culture ?= { has_innovation = innovation_windmills } } @@ -11190,7 +11190,7 @@ bor_mines_04 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - culture = { + culture ?= { has_innovation = innovation_cranes } } @@ -11243,7 +11243,7 @@ zenica_iron_mines_01 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 01 } - culture = { + culture ?= { has_innovation = innovation_crop_rotation } } @@ -11296,7 +11296,7 @@ zenica_iron_mines_02 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - culture = { + culture ?= { has_innovation = innovation_manorialism } } @@ -11349,7 +11349,7 @@ zenica_iron_mines_03 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - culture = { + culture ?= { has_innovation = innovation_windmills } } @@ -11402,7 +11402,7 @@ zenica_iron_mines_04 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - culture = { + culture ?= { has_innovation = innovation_cranes } } @@ -11452,7 +11452,7 @@ fortified_port_of_kotor_01 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_manorialism } + scope:holder.culture ?= { has_innovation = innovation_manorialism } scope:holder = { highest_held_title_tier >= tier_duchy } } @@ -11509,7 +11509,7 @@ fortified_port_of_kotor_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 02 } } @@ -11567,7 +11567,7 @@ fortified_port_of_kotor_03 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -11628,7 +11628,7 @@ port_of_split_01 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_manorialism } + scope:holder.culture ?= { has_innovation = innovation_manorialism } scope:holder = { highest_held_title_tier >= tier_duchy } } @@ -11678,7 +11678,7 @@ port_of_split_02 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 02 } } @@ -11729,7 +11729,7 @@ port_of_split_03 = { } can_construct = { - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } scope:holder = { highest_held_title_tier >= tier_duchy } building_requirement_castle_city_church = { LEVEL = 03 } } @@ -11800,7 +11800,7 @@ nistrenian_palace_01 = { prestige_level >= 4 highest_held_title_tier >= tier_duchy } - scope:holder.culture = { has_innovation = innovation_manorialism } + scope:holder.culture ?= { has_innovation = innovation_manorialism } building_requirement_tribal = no } @@ -11859,7 +11859,7 @@ winter_palace_01 = { prestige_level >= 4 highest_held_title_tier >= tier_duchy } - scope:holder.culture = { has_innovation = innovation_manorialism } + scope:holder.culture ?= { has_innovation = innovation_manorialism } building_requirement_tribal = no } @@ -11916,7 +11916,7 @@ winter_palace_02 = { prestige_level >= 4 highest_held_title_tier >= tier_duchy } - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } } effect_desc = feast_cost_discount_max_desc @@ -11975,7 +11975,7 @@ petropavlovskaya_krepost_01 = { prestige_level >= 4 highest_held_title_tier >= tier_duchy } - scope:holder.culture = { has_innovation = innovation_manorialism } + scope:holder.culture ?= { has_innovation = innovation_manorialism } building_requirement_tribal = no } @@ -12035,7 +12035,7 @@ petropavlovskaya_krepost_02 = { prestige_level >= 4 highest_held_title_tier >= tier_duchy } - scope:holder.culture = { has_innovation = innovation_windmills } + scope:holder.culture ?= { has_innovation = innovation_windmills } } cost_gold = 2500 @@ -12136,7 +12136,7 @@ smolensk_walls_02 = { } can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_hoardings } } @@ -12610,7 +12610,7 @@ communal_settlement_01 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 01 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_barracks } } @@ -12670,7 +12670,7 @@ communal_settlement_02 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 02 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_castle_baileys } } @@ -12744,7 +12744,7 @@ communal_settlement_03 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 03 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_castle_baileys } } @@ -12800,7 +12800,7 @@ communal_settlement_04 = { can_construct = { building_requirement_castle_city_church = { LEVEL = 04 } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_royal_armory } } @@ -13057,7 +13057,7 @@ channel_tunnel_01 = { } can_construct = { - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } diff --git a/common/buildings/temple_citadel_buildings.txt b/common/buildings/temple_citadel_buildings.txt index e87f4f072..bb6ece192 100644 --- a/common/buildings/temple_citadel_buildings.txt +++ b/common/buildings/temple_citadel_buildings.txt @@ -632,7 +632,7 @@ temple_citadel_01 = { scope:holder = { OR = { government_has_flag = government_is_mandala - faith = { has_doctrine_parameter = NEOW_can_build_citadels } + faith ?= { has_doctrine_parameter = NEOW_can_build_citadels } } } } @@ -641,7 +641,7 @@ temple_citadel_01 = { scope:holder = { OR = { government_has_flag = government_is_mandala - faith = { has_doctrine_parameter = NEOW_can_build_citadels } + faith ?= { has_doctrine_parameter = NEOW_can_build_citadels } } } } @@ -736,7 +736,7 @@ temple_citadel_01 = { county.holder = { if = { limit = { - culture = { + culture ?= { has_cultural_parameter = renown_from_temple_construction } exists = dynasty @@ -746,7 +746,7 @@ temple_citadel_01 = { if = { limit = { - culture = { + culture ?= { has_cultural_parameter = extra_piety_from_temple_construction } } @@ -761,9 +761,9 @@ temple_citadel_01 = { if = { limit = { - culture = { has_cultural_parameter = more_fervor_on_church_construction } + culture ?= { has_cultural_parameter = more_fervor_on_church_construction } } - faith = { + faith ?= { change_fervor = { value = notable_fervor_gain desc = fervor_gain_built_temple_holding @@ -771,7 +771,7 @@ temple_citadel_01 = { } } else = { - faith = { + faith ?= { change_fervor = { value = trivial_fervor_gain desc = fervor_gain_built_temple_holding @@ -781,7 +781,7 @@ temple_citadel_01 = { if = { limit = { - culture = { has_cultural_parameter = prestige_from_temple_construction } + culture ?= { has_cultural_parameter = prestige_from_temple_construction } } add_prestige = massive_prestige_gain } @@ -870,7 +870,7 @@ temple_citadel_01 = { county = { if = { limit = { - holder.culture = { has_cultural_parameter = warmonger_city_founders } + holder.culture ?= { has_cultural_parameter = warmonger_city_founders } } change_county_control = 100 } @@ -934,7 +934,7 @@ temple_citadel_01 = { scope:holder = { NOR = { government_has_flag = government_is_mandala - faith = { has_doctrine_parameter = NEOW_can_build_citadels } + faith ?= { has_doctrine_parameter = NEOW_can_build_citadels } } } } @@ -1557,17 +1557,17 @@ temple_citadel_02 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = temple_next_level } } } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } trigger_else = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = temple_next_level has_innovation = innovation_city_planning } @@ -1654,7 +1654,7 @@ temple_citadel_02 = { county.holder = { if = { limit = { - culture = { + culture ?= { has_cultural_parameter = renown_from_temple_construction } exists = dynasty @@ -1663,11 +1663,11 @@ temple_citadel_02 = { } if = { limit = { - culture = { + culture ?= { has_cultural_parameter = more_fervor_on_church_construction } } - faith = { + faith ?= { change_fervor = { value = small_fervor_gain desc = fervor_gain_upgraded_temple_holding_culture_parameter @@ -1745,11 +1745,11 @@ temple_citadel_02 = { ai_general_building_modifier = yes modifier = { add = 1 - scope:holder.culture = { has_cultural_parameter = ai_more_likely_to_castle } + scope:holder.culture ?= { has_cultural_parameter = ai_more_likely_to_castle } } modifier = { add = 10 - scope:holder.culture = { has_cultural_era_or_later = culture_era_high_medieval } + scope:holder.culture ?= { has_cultural_era_or_later = culture_era_high_medieval } } modifier = { factor = 3 @@ -2390,17 +2390,17 @@ temple_citadel_03 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = temple_next_level } } } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_windmills } } trigger_else = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = temple_next_level has_innovation = innovation_manorialism } @@ -2487,7 +2487,7 @@ temple_citadel_03 = { county.holder = { if = { limit = { - culture = { + culture ?= { has_cultural_parameter = renown_from_temple_construction } exists = dynasty @@ -2496,11 +2496,11 @@ temple_citadel_03 = { } if = { limit = { - culture = { + culture ?= { has_cultural_parameter = more_fervor_on_church_construction } } - faith = { + faith ?= { change_fervor = { value = small_fervor_gain desc = fervor_gain_upgraded_temple_holding_culture_parameter @@ -2563,11 +2563,11 @@ temple_citadel_03 = { ai_general_building_modifier = yes modifier = { add = 1 - scope:holder.culture = { has_cultural_parameter = ai_more_likely_to_castle } + scope:holder.culture ?= { has_cultural_parameter = ai_more_likely_to_castle } } modifier = { add = 10 - scope:holder.culture = { has_cultural_era_or_later = culture_era_late_medieval } + scope:holder.culture ?= { has_cultural_era_or_later = culture_era_late_medieval } } modifier = { factor = 3 @@ -3202,17 +3202,17 @@ temple_citadel_04 = { trigger_if = { limit = { NOT = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = temple_next_level } } } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_cranes } } trigger_else = { - scope:holder.culture = { + scope:holder.culture ?= { has_cultural_parameter = temple_next_level has_innovation = innovation_windmills } @@ -3298,7 +3298,7 @@ temple_citadel_04 = { county.holder = { if = { limit = { - culture = { + culture ?= { has_cultural_parameter = renown_from_temple_construction } exists = dynasty @@ -3307,11 +3307,11 @@ temple_citadel_04 = { } if = { limit = { - culture = { + culture ?= { has_cultural_parameter = more_fervor_on_church_construction } } - faith = { + faith ?= { change_fervor = { value = small_fervor_gain desc = fervor_gain_upgraded_temple_holding_culture_parameter @@ -3375,7 +3375,7 @@ temple_citadel_04 = { ai_general_building_modifier = yes modifier = { add = 1 - scope:holder.culture = { has_cultural_parameter = ai_more_likely_to_castle } + scope:holder.culture ?= { has_cultural_parameter = ai_more_likely_to_castle } } modifier = { factor = 3 @@ -3466,7 +3466,7 @@ citadel_shrine_02 = { can_construct_showing_failures_only = { building_requirement_tribal = no - culture = { + culture ?= { has_innovation = innovation_city_planning } } @@ -3512,7 +3512,7 @@ citadel_shrine_03 = { can_construct = { has_building_or_higher = temple_citadel_02 - culture = { + culture ?= { has_innovation = innovation_manorialism } } @@ -3562,7 +3562,7 @@ citadel_shrine_04 = { can_construct = { has_building_or_higher = temple_citadel_02 - culture = { + culture ?= { has_innovation = innovation_manorialism } } @@ -3612,7 +3612,7 @@ citadel_shrine_05 = { can_construct = { has_building_or_higher = temple_citadel_03 - culture = { + culture ?= { has_innovation = innovation_windmills } } @@ -3662,7 +3662,7 @@ citadel_shrine_06 = { can_construct = { has_building_or_higher = temple_citadel_03 - culture = { + culture ?= { has_innovation = innovation_windmills } } @@ -3712,7 +3712,7 @@ citadel_shrine_07 = { can_construct = { has_building_or_higher = temple_citadel_04 - culture = { + culture ?= { has_innovation = innovation_cranes } } @@ -3762,7 +3762,7 @@ citadel_shrine_08 = { can_construct = { has_building_or_higher = temple_citadel_03 - culture = { + culture ?= { has_innovation = innovation_cranes } } @@ -3885,17 +3885,17 @@ sacred_pool_02 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = may_build_sacred_pools_ahead_of_time } } } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_city_planning } } trigger_else = { - culture = { + culture ?= { has_cultural_parameter = may_build_sacred_pools_ahead_of_time } } @@ -3951,20 +3951,20 @@ sacred_pool_03 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = may_build_sacred_pools_ahead_of_time } } } - culture = { + culture ?= { has_innovation = innovation_manorialism } } trigger_else = { - culture = { + culture ?= { has_cultural_parameter = may_build_sacred_pools_ahead_of_time } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_city_planning } } @@ -4024,20 +4024,20 @@ sacred_pool_04 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = may_build_sacred_pools_ahead_of_time } } } - culture = { + culture ?= { has_innovation = innovation_manorialism } } trigger_else = { - culture = { + culture ?= { has_cultural_parameter = may_build_sacred_pools_ahead_of_time } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_city_planning } } @@ -4097,20 +4097,20 @@ sacred_pool_05 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = may_build_sacred_pools_ahead_of_time } } } - culture = { + culture ?= { has_innovation = innovation_windmills } } trigger_else = { - culture = { + culture ?= { has_cultural_parameter = may_build_sacred_pools_ahead_of_time } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } @@ -4170,20 +4170,20 @@ sacred_pool_06 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = may_build_sacred_pools_ahead_of_time } } } - culture = { + culture ?= { has_innovation = innovation_windmills } } trigger_else = { - culture = { + culture ?= { has_cultural_parameter = may_build_sacred_pools_ahead_of_time } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_manorialism } } @@ -4243,20 +4243,20 @@ sacred_pool_07 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = may_build_sacred_pools_ahead_of_time } } } - culture = { + culture ?= { has_innovation = innovation_cranes } } trigger_else = { - culture = { + culture ?= { has_cultural_parameter = may_build_sacred_pools_ahead_of_time } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_windmills } } @@ -4316,20 +4316,20 @@ sacred_pool_08 = { trigger_if = { limit = { NOT = { - culture = { + culture ?= { has_cultural_parameter = may_build_sacred_pools_ahead_of_time } } } - culture = { + culture ?= { has_innovation = innovation_cranes } } trigger_else = { - culture = { + culture ?= { has_cultural_parameter = may_build_sacred_pools_ahead_of_time } - scope:holder.culture = { + scope:holder.culture ?= { has_innovation = innovation_windmills } } @@ -4457,7 +4457,7 @@ vihara_halls_02 = { can_construct_showing_failures_only = { building_requirement_tribal = no - culture = { + culture ?= { has_innovation = innovation_city_planning } } @@ -4509,7 +4509,7 @@ vihara_halls_03 = { can_construct = { has_building_or_higher = temple_citadel_02 - culture = { + culture ?= { has_innovation = innovation_manorialism } } @@ -4565,7 +4565,7 @@ vihara_halls_04 = { can_construct = { has_building_or_higher = temple_citadel_02 - culture = { + culture ?= { has_innovation = innovation_manorialism } } @@ -4621,7 +4621,7 @@ vihara_halls_05 = { can_construct = { has_building_or_higher = temple_citadel_03 - culture = { + culture ?= { has_innovation = innovation_windmills } } @@ -4677,7 +4677,7 @@ vihara_halls_06 = { can_construct = { has_building_or_higher = temple_citadel_03 - culture = { + culture ?= { has_innovation = innovation_windmills } } @@ -4733,7 +4733,7 @@ vihara_halls_07 = { can_construct = { has_building_or_higher = temple_citadel_04 - culture = { + culture ?= { has_innovation = innovation_cranes } } @@ -4789,7 +4789,7 @@ vihara_halls_08 = { can_construct = { has_building_or_higher = temple_citadel_03 - culture = { + culture ?= { has_innovation = innovation_cranes } } diff --git a/common/casus_belli_groups/00_casus_belli_groups.txt b/common/casus_belli_groups/00_casus_belli_groups.txt new file mode 100644 index 000000000..4e2d27d5c --- /dev/null +++ b/common/casus_belli_groups/00_casus_belli_groups.txt @@ -0,0 +1,199 @@ +religious = { + allowed_for_character = { + OR = { # Cannot Holy War if your Liege(s) are of a different Faith than you. + top_liege = this + any_liege_or_above = { + faith = prev.faith + count = all + } + } + faith ?= { + NOR = { + has_doctrine_parameter = unreformed # Unreformed Pagans cannot Holy War + AND = { + has_doctrine_parameter = holy_wars_forbidden # Pacifists cannot Holy War + NOT = { prev = { has_character_flag = bonus_major_holy_war } } #...unless they got the legend bonus + } + } + } + herders_and_tributary_constraints = yes + pam_personal_pacifism_offensive_war_ban_trigger = yes + tgp_dynastic_cycle_offensive_wars_ban_trigger = yes + tgp_war_ban_all_ministers_trigger = yes + } +} + +#Holy wars that should be restricted if your liege disagrees, or your faith does, but which don't require organised religion. E.g., human sacrifice raids. +religious_disorganised = { + allowed_for_character = { + OR = { # Cannot Holy War if your Liege(s) are of a different Faith than you. + top_liege = this + any_liege_or_above = { + faith = prev.faith + count = all + } + } + faith ?= { + NOT = { has_doctrine_parameter = holy_wars_forbidden } # Pacifists cannot Holy War + } + herders_and_tributary_constraints = yes + pam_personal_pacifism_offensive_war_ban_trigger = yes + tgp_dynastic_cycle_offensive_wars_ban_trigger = yes + tgp_war_ban_all_ministers_trigger = yes + } +} + +religious_script_only = { + should_check_for_interface_availability = no + can_only_start_via_script = yes # Only fired by event + allowed_for_character = { + herders_and_tributary_constraints = yes + tgp_dynastic_cycle_offensive_wars_ban_trigger = yes + tgp_war_ban_all_ministers_trigger = yes + } +} + +de_jure = { + allowed_for_character = { + herders_and_tributary_constraints = yes + pam_personal_pacifism_offensive_war_ban_trigger = yes + tgp_dynastic_cycle_offensive_wars_ban_trigger = yes + tgp_war_ban_all_ministers_trigger = yes + NOT = { government_has_flag = government_is_theocracy } + } +} + +debug = { + debug = yes + should_check_for_interface_availability = no + allowed_for_character = { + herders_and_tributary_constraints = yes + NOT = { government_has_flag = government_is_theocracy } + } +} + +claim = { + allowed_for_character = { + herders_and_tributary_constraints = yes + pam_personal_pacifism_offensive_war_ban_trigger = yes + tgp_dynastic_cycle_offensive_wars_ban_trigger = yes + tgp_war_ban_all_ministers_trigger = yes + NOT = { government_has_flag = government_is_theocracy } + } +} + +civil_war = { + should_check_for_interface_availability = no + can_only_start_via_script = yes # Only fired by event + allowed_for_character = { + herders_and_tributary_constraints = yes + } +} + +invasion = { + allowed_for_character = { + herders_and_tributary_constraints = yes + pam_personal_pacifism_offensive_war_ban_trigger = yes + tgp_dynastic_cycle_offensive_wars_ban_trigger = yes + tgp_war_ban_all_ministers_trigger = yes + NOT = { government_has_flag = government_is_theocracy } + } +} + +vassalization = { + allowed_for_character = { + herders_and_tributary_constraints = yes + pam_personal_pacifism_offensive_war_ban_trigger = yes + tgp_dynastic_cycle_offensive_wars_ban_trigger = yes + tgp_war_ban_all_ministers_trigger = yes + NOT = { government_has_flag = government_is_theocracy } + } +} + +conquest = { + allowed_for_character = { + herders_and_tributary_constraints = yes + pam_personal_pacifism_offensive_war_ban_trigger = yes + tgp_dynastic_cycle_offensive_wars_ban_trigger = yes + tgp_war_ban_all_ministers_trigger = yes + NOT = { government_has_flag = government_is_theocracy } + } +} + +struggle = { + allowed_for_character = { + can_use_struggle_cbs_trigger = yes + herders_and_tributary_constraints = yes + pam_personal_pacifism_offensive_war_ban_trigger = yes + tgp_dynastic_cycle_offensive_wars_ban_trigger = yes + tgp_war_ban_all_ministers_trigger = yes + NOT = { government_has_flag = government_is_theocracy } + } +} + +subjugation = { + allowed_for_character = { + herders_and_tributary_constraints = yes + pam_personal_pacifism_offensive_war_ban_trigger = yes + tgp_dynastic_cycle_offensive_wars_ban_trigger = yes + tgp_war_ban_all_ministers_trigger = yes + OR = { + NOT = { government_has_flag = government_is_theocracy } + AND = { + government_has_flag = government_is_theocracy + has_variable = koh_subjugation_cb_allowed + } + } + } +} + +independence = { + allowed_for_character = { + pam_personal_pacifism_offensive_war_ban_trigger = yes + } +} + +event = { + should_check_for_interface_availability = no + can_only_start_via_script = yes # Only fired by event + allowed_for_character = { + herders_and_tributary_constraints = yes + } +} + +artifact = { + allowed_for_character = { + herders_and_tributary_constraints = yes + pam_personal_pacifism_offensive_war_ban_trigger = yes + } +} + +migration = { + should_check_for_interface_availability = no + can_only_start_via_script = yes # Only fired by event +} + +humiliation = { + allowed_for_character = { + herders_and_tributary_constraints = yes + pam_personal_pacifism_offensive_war_ban_trigger = yes + NOT = { government_has_flag = government_is_theocracy } + } +} + +mandala = { + allowed_for_character = { + herders_and_tributary_constraints = yes + pam_personal_pacifism_offensive_war_ban_trigger = yes + NOT = { government_has_flag = government_is_theocracy } + } +} + +celestial = { + allowed_for_character = { + herders_and_tributary_constraints = yes + pam_personal_pacifism_offensive_war_ban_trigger = yes + tgp_war_ban_civilian_ministers_trigger = yes + NOT = { government_has_flag = government_is_theocracy } + } +} diff --git a/common/casus_belli_types/00_conquest.txt b/common/casus_belli_types/00_conquest.txt new file mode 100644 index 000000000..8f4d0965a --- /dev/null +++ b/common/casus_belli_types/00_conquest.txt @@ -0,0 +1,1653 @@ +county_conquest_cb = { + icon = county_conquest_cb + group = conquest + + combine_into_one = yes + should_show_war_goal_subview = yes + mutually_exclusive_titles = { always = yes } + + allowed_for_character = { + can_use_conquest_cbs_trigger = yes + NOT = { + government_has_flag = government_is_landless_adventurer + } + } + + allowed_for_character_display_regardless = { + # Struggle constraint - Note: This is the CB you get in FP2 opportunity, if you need to debug, test it here first. + custom_tooltip = { + text = struggle_involvement_cb_check_failure + struggle_blocks_invasion_conquest_cb_trigger = yes + } + tgp_japan_offensive_wars_ban_trigger = yes + } + + allowed_against_character = { + scope:attacker = { + ALL_FALSE = { + top_liege = scope:defender.top_liege + liege = scope:defender + } + trigger_if = { + limit = { + government_has_flag = government_is_nomadic + } + scope:defender = { + NOT = { + government_has_flag = government_is_nomadic + } + } + } + } + } + target_titles = all + target_title_tier = county + ignore_effect = change_title_holder + + attacker_score_from_occupation_scale = 150 + attacker_score_from_battles_scale = 150 + defender_score_from_battles_scale = 150 + + ai_can_target_all_titles = { + can_use_viking_invasion_cbs_trigger = yes + } + ai_score_mult = { + value = viking_conquest_ai_score_value + + # As a feudal gov, do not attack owner of tribal holdings if you have a tribal holding to convert already + add = { + every_in_list = { + list = target_titles + if = { + limit = { feudal_clan_tribal_conquest_constraints = yes } + add = -1000 + } + } + } + # HOUSE RELATIONS + add = house_relation_ai_score_value + # AI in struggles act insularly for wars that don't have a familial or legal basis. + multiply = struggle_wars_prioritise_struggle_targets_value + # Tell the Romans to stop going adventuring into the steppe for no gods-damned reason. + multiply = byzantium_conquests_ai_score_value + + multiply = pam_peace_of_god_coreligionist_war_ai_score_value + multiply = zealous_war_on_head_of_faith_ai_score_value + add = frankokratia_leader_protection_value #Set back to 0. Declaring war on the frankokratia leader can really ruin the whole thing + } + + valid_to_start = { + scope:target = { + is_landless_type_title = no + neighboring_county_or_viking_conquest_trigger = { CHARACTER = root } + } + } + + should_invalidate = { + NOT = { + any_in_list = { + list = target_titles + any_in_de_jure_hierarchy = { + tier = tier_county + holder = { + OR = { + this = scope:defender + target_is_liege_or_above = scope:defender + } + } + } + } + } + } + + on_invalidated_desc = msg_county_conquest_war_invalidated_message + on_invalidated = {} + + cost = { + piety = { + value = 0 + if = { + limit = { + scope:defender.faith = scope:attacker.faith + } + add = { + value = 25 + desc = CB_SAME_FAITH_COST + } + add = { + value = 5 + multiply = scope:attacker.realm_size + desc = CB_REALM_SIZE_COST + max = 75 + } + } + multiply = common_cb_piety_cost_multiplier + } + prestige = { + value = 0 + if = { + limit = { + scope:defender.faith != scope:attacker.faith + } + add = { + value = 50 + desc = CB_COST_DIFFERENT_FAITH + } + add = { + value = 5 + multiply = scope:attacker.realm_size + desc = CB_REALM_SIZE_COST + max = 100 + } + } + multiply = common_cb_prestige_cost_multiplier + } + } + + on_declaration = { + on_declared_war = yes + } + + on_victory_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:attacker = { is_local_player = yes } } + desc = county_conquest_cb_victory_desc_attacker + } + desc = county_conquest_cb_victory_desc + } + } + + on_victory = { + scope:attacker = { show_pow_release_message_effect = yes } + + # Legitimacy + add_legitimacy_attacker_victory_effect = yes + + # Influence + add_influence_attacker_victory_effect = yes + + #EP2 accolade glory gain for winning against higher ranked enemy + scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } + + create_title_and_vassal_change = { + type = conquest + save_scope_as = change + add_claim_on_loss = yes + } + + # EP3 Laamp possibility warning + scope:defender = { ep3_war_loss_adventurer_tt_effect = yes } + + #As this is just a county conquest, simply grab the designated county. + every_in_list = { + list = target_titles + change_title_holder = { + holder = scope:attacker + change = scope:change + } + } + + resolve_title_and_vassal_change = scope:change + + # Prestige Progress for the Attacker + every_in_list = { + list = target_titles + scope:attacker = { + add_prestige_experience = minor_prestige_value + } + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:attacker + FAME_BASE = minor_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + # Truce + add_truce_attacker_victory_effect = yes + + # FP1: note the victory for future memorialisation via stele (if applicable). + scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + + #Mandalas gain or lose piety/devotion depending on Decree + mandala_war_victory_effects = yes + } + + on_white_peace_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = county_conquest_cb_white_peace_desc_defender + } + desc = county_conquest_cb_white_peace_desc + } + } + + on_white_peace = { + scope:attacker = { show_pow_release_message_effect = yes } + # Prestige loss for the attacker + scope:attacker = { + add_prestige = { + value = minor_prestige_value + multiply = -1.0 + } + stress_and_fulfillment_impact = { + ambitious = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:attacker # Not important as the scales are identical + FAME_BASE = minor_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + scope:defender = { + stress_and_fulfillment_impact = { + arrogant = medium_stress_impact_gain + } + } + + add_truce_white_peace_effect = yes + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + } + + on_defeat_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = county_conquest_cb_defeat_desc_defender + } + triggered_desc = { + trigger = { + scope:attacker = { + is_local_player = yes + has_targeting_faction = yes + } + } + desc = county_conquest_cb_defeat_desc_attacker + } + desc = county_conquest_cb_defeat_desc + } + } + + on_defeat = { + scope:attacker = { show_pow_release_message_effect = yes } + + # Legitimacy + add_legitimacy_attacker_defeat_effect = yes + + # Influence + add_influence_attacker_defeat_effect = yes + + scope:defender = { + mandala_peacemaker_perk_serenity_effect = yes + #EP2 accolade glory gain for winning against higher ranked enemy + accolade_defender_war_end_glory_gain_low_effect = yes + # Prestige for Defender + add_prestige_war_defender_effect = { + PRESTIGE_VALUE = medium_prestige_value + } + } + + # Prestige loss for the attacker + scope:attacker = { + pay_short_term_gold_reparations_effect = { + GOLD_VALUE = 2 + } + add_prestige = medium_prestige_loss + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:defender + FAME_BASE = minor_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + add_truce_attacker_defeat_effect = yes + + scope:attacker = { + save_temporary_scope_as = loser + } + on_lost_aggression_war_discontent_loss = yes + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + + #Mandalas gain or lose piety/devotion depending on Decree + mandala_war_defeat_effects = yes + } + + transfer_behavior = transfer + + on_primary_attacker_death = inherit + on_primary_defender_death = inherit + + attacker_allies_inherit = yes + defender_allies_inherit = yes + + war_name = "CONQUEST_WAR_NAME" + war_name_base = "CONQUEST_WAR_NAME_BASE" + cb_name = "CONQUEST_COUNTY_CB_NAME" + + interface_priority = 79 + + use_de_jure_wargoal_only = yes + + attacker_wargoal_percentage = 0.8 + + max_defender_score_from_occupation = 150 + max_attacker_score_from_occupation = 150 +} + +duchy_conquest_cb = { + icon = duchy_conquest_cb + group = conquest + + combine_into_one = yes + should_show_war_goal_subview = yes + mutually_exclusive_titles = { always = yes } + + attacker_score_from_occupation_scale = 150 + attacker_score_from_battles_scale = 150 + defender_score_from_battles_scale = 150 + + allowed_for_character = { + can_use_conquest_cbs_trigger = yes + NOT = { + government_has_flag = government_is_landless_adventurer + } + } + + allowed_for_character_display_regardless = { + trigger_if = { + limit = { + highest_held_title_tier >= tier_kingdom + } + prestige_level > -1 + } + trigger_else = { + trigger_if = { + limit = { + government_has_flag = government_is_clan + house ?= { + has_house_unity_stage = antagonistic + } + culture ?= { + has_cultural_parameter = cb_lower_prestige_level_requirement + } + } + prestige_level >= 1 + } + trigger_else_if = { + limit = { + OR = { + AND = { + government_has_flag = government_is_clan + house ?= { + has_house_unity_stage = antagonistic + } + } + culture ?= { + has_cultural_parameter = cb_lower_prestige_level_requirement + } + } + } + prestige_level >= 2 + } + trigger_else = { + prestige_level >= 3 + } + } + + # Struggle constraint + custom_tooltip = { + text = struggle_involvement_cb_check_failure + struggle_blocks_invasion_conquest_cb_trigger = yes + } + tgp_japan_offensive_wars_ban_trigger = yes + } + + allowed_against_character = { + scope:attacker = { + ALL_FALSE = { + top_liege = scope:defender.top_liege + liege = scope:defender + } + trigger_if = { + limit = { + government_has_flag = government_is_nomadic + } + scope:defender = { + NOT = { + government_has_flag = government_is_nomadic + } + } + } + } + } + target_titles = all + target_title_tier = duchy + target_de_jure_regions_above = yes + ignore_effect = change_title_holder + + ai_can_target_all_titles = { + can_use_viking_invasion_cbs_trigger = yes + } + ai_score_mult = { + value = viking_conquest_ai_score_value + + # As a feudal gov, do not attack tribal + add = { + every_in_list = { + list = target_titles + if = { + limit = { feudal_clan_tribal_conquest_constraints = yes } + add = -1000 + } + } + } + # HOUSE RELATIONS + add = house_relation_ai_score_value + # AI in struggles act insularly for wars that don't have a familial or legal basis. + multiply = struggle_wars_prioritise_struggle_targets_value + # Tell the Romans to stop going adventuring into the steppe for no gods-damned reason. + multiply = byzantium_conquests_ai_score_value + multiply = muslim_invasions_prefer_nonmuslims_ai_score_value + + multiply = pam_peace_of_god_coreligionist_war_ai_score_value + multiply = zealous_war_on_head_of_faith_ai_score_value + add = frankokratia_leader_protection_value #Set back to 0. Declaring war on the frankokratia leader can really ruin the whole thing + } + + valid_to_start = { + scope:target = { + is_landless_type_title = no + any_in_de_jure_hierarchy = { + tier = tier_county + neighboring_county_or_viking_conquest_trigger = { CHARACTER = root } + } + } + scope:target = { + trigger_if = { + limit = { + scope:attacker = { + is_ai = yes + } + } + any_in_de_jure_hierarchy = { + continue = { tier > tier_county } + count >= 2 + tier = tier_county + holder ?= { + OR = { + this = scope:defender + is_vassal_or_below_of = scope:defender + } + } + } + } + } + } + + should_invalidate = { + NOT = { + any_in_list = { + list = target_titles + any_in_de_jure_hierarchy = { + tier = tier_county + holder = { + target_is_same_character_or_above = scope:defender + } + } + } + } + } + + on_invalidated_desc = msg_religious_war_invalidation_region_message + + on_invalidated = { + } + + cost = { + piety = { + add = common_cb_impious_piety_cost + if = { + limit = { + scope:defender.faith = scope:attacker.faith + } + add = { + value = 100 + desc = CB_SAME_FAITH_COST + } + add = { + value = 10 + multiply = scope:attacker.realm_size + desc = CB_REALM_SIZE_COST + max = 800 + } + } + multiply = common_cb_piety_cost_multiplier + } + prestige = { + value = 0 + if = { + limit = { + scope:defender.faith != scope:attacker.faith + } + add = { + value = 150 + desc = CB_COST_DIFFERENT_FAITH + } + add = { + value = 10 + multiply = scope:attacker.realm_size + desc = CB_REALM_SIZE_COST + max = 800 + } + } + multiply = common_cb_prestige_cost_multiplier + if = { + limit = { + scope:attacker.house = { + OR = { + has_house_modifier = fp2_struggle_hostility_house_culture_modifier + has_house_modifier = fp2_struggle_hostility_house_combined_modifier + } + } + any_in_global_list = { + variable = fp2_struggle_ending_culture_list + this = scope:attacker.culture + } + any_in_global_list = { + variable = fp2_struggle_ending_culture_list + this = scope:defender.culture + } + } + divide = { + value = 2 + desc = CB_COST_FP2_STRUGGLE_HOSTILITY_CULTURE_DISCOUNT + } + } + if = { + limit = { + has_global_variable = fp2_struggle_compromise_ending + any_in_global_list = { + variable = fp2_struggle_ending_culture_list + this = scope:attacker.culture + } + any_in_global_list = { + variable = fp2_struggle_ending_culture_list + this = scope:defender.culture + } + } + multiply = { + value = 2 + desc = CB_COST_FP2_STRUGGLE_COMPROMISE_MULTIPLIER + } + } + } + } + + on_declaration = { + on_declared_war = yes + } + + on_victory_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:attacker = { is_local_player = yes } } + desc = county_conquest_cb_victory_desc_attacker + } + desc = county_conquest_cb_victory_desc + } + } + + on_victory = { + scope:attacker = { show_pow_release_message_effect = yes } + + # Legitimacy + add_legitimacy_attacker_victory_effect = yes + + #EP2 accolade glory gain for winning against higher ranked enemy + scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } + + create_title_and_vassal_change = { + type = conquest + save_scope_as = change + add_claim_on_loss = yes + } + + # EP3 Laamp possibility warning + scope:defender = { ep3_war_loss_adventurer_tt_effect = yes } + + # go through the dejure hierarchy under target titles, transfer eligible vassals and sieze counties from ineligible ones + every_in_list = { + list = target_titles + custom_tooltip = CONQUEST_CB_TITLE + + conquest_cb_title_transfer = { + RELIGIOUS_WAR = no + } + } + + every_in_list = { + list = vassals_taken + change_liege = { + liege = scope:attacker + change = scope:change + } + } + + every_in_list = { + list = titles_taken + change_title_holder = { + holder = scope:attacker + change = scope:change + take_baronies = yes + } + } + + resolve_title_and_vassal_change = scope:change + + # Prestige Progress for the Attacker + every_in_list = { + list = target_titles + scope:attacker = { + add_prestige_experience = medium_prestige_value + } + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:attacker + FAME_BASE = medium_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + # Truce + add_truce_attacker_victory_effect = yes + + # FP1: note the victory for future memorialisation via stele (if applicable). + scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } + + if = { # Warning that only counties are changing hands + limit = { + any_in_list = { + list = target_titles + tier = tier_duchy + } + } + random_in_list = { + list = target_titles + limit = { tier = tier_duchy } + save_scope_as = de_jure_target + } + } + if = { + limit = { + any_in_list = { + list = target_titles + tier = tier_duchy + holder = scope:defender + } + } + if = { + limit = { + scope:defender = { + any_held_title = { + title_tier = county + NOT = { target_is_de_jure_liege_or_above = scope:de_jure_target } + } + } + } + custom_tooltip = conquest_title_not_transferred_tt + } + else = { custom_tooltip = conquest_title_destroyed_tt } + } + else = { + if = { + limit = { + any_in_list = { + list = target_titles + tier = tier_duchy + is_title_created = yes + } + } + custom_tooltip = conquest_title_usurp_tt + } + else = { custom_tooltip = conquest_title_create_tt } + } + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + + #Mandalas gain or lose piety/devotion depending on Decree + mandala_war_victory_effects = yes + } + + on_white_peace_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = county_conquest_cb_white_peace_desc_defender + } + desc = county_conquest_cb_white_peace_desc + } + } + + on_white_peace = { + scope:attacker = { show_pow_release_message_effect = yes } + # Prestige loss for the attacker + + #EP2 accolade glory gain for doing pretty good against higher ranked enemy + scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } + + scope:attacker = { + add_prestige = { + value = minor_prestige_value + multiply = -1.0 + } + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:attacker # not impactful as the scale are identical + FAME_BASE = medium_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + add_truce_white_peace_effect = yes + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + } + + on_defeat_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = county_conquest_cb_defeat_desc_defender + } + triggered_desc = { + trigger = { + scope:attacker = { + is_local_player = yes + has_targeting_faction = yes + } + } + desc = county_conquest_cb_defeat_desc_attacker + } + desc = county_conquest_cb_defeat_desc + } + } + + on_defeat = { + scope:attacker = { show_pow_release_message_effect = yes } + + # Legitimacy + add_legitimacy_attacker_defeat_effect = yes + + scope:defender = { + mandala_peacemaker_perk_serenity_effect = yes + #EP2 accolade glory gain for winning against higher ranked enemy + accolade_defender_war_end_glory_gain_med_effect = yes + # Prestige for Defender + add_prestige_war_defender_effect = { + PRESTIGE_VALUE = major_prestige_value + } + } + + # Prestige loss for the attacker + scope:attacker = { + pay_short_term_gold_reparations_effect = { + GOLD_VALUE = 3 + } + add_prestige = { + value = major_prestige_value + multiply = -1.0 + } + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:defender + FAME_BASE = medium_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + add_truce_attacker_defeat_effect = yes + + scope:attacker = { + save_temporary_scope_as = loser + } + on_lost_aggression_war_discontent_loss = yes + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + + #Mandalas gain or lose piety/devotion depending on Decree + mandala_war_defeat_effects = yes + } + + transfer_behavior = transfer + + on_primary_attacker_death = inherit + on_primary_defender_death = inherit + + attacker_allies_inherit = yes + defender_allies_inherit = yes + + war_name = "CONQUEST_WAR_NAME" + war_name_base = "CONQUEST_WAR_NAME_BASE" + cb_name = "CONQUEST_DUCHY_CB_NAME" + + interface_priority = 79 + + use_de_jure_wargoal_only = yes + + attacker_wargoal_percentage = 0.8 + + max_defender_score_from_occupation = 150 + max_attacker_score_from_occupation = 150 +} + +ducal_conquest_cb = { + icon = county_conquest_cb + group = conquest + + combine_into_one = yes + should_show_war_goal_subview = yes + mutually_exclusive_titles = { always = yes } + + attacker_score_from_occupation_scale = 150 + attacker_score_from_battles_scale = 150 + defender_score_from_battles_scale = 150 + + allowed_for_character = { + has_perk = ducal_conquest_perk + can_use_conquest_cbs_trigger = no + NOR = { + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_nomadic + } + } + + allowed_against_character = { + #scope:attacker = { + # ALL_FALSE = { + # top_liege = scope:defender.top_liege + # liege = scope:defender + # } + #} + } + target_titles = neighbor_land + target_title_tier = all + target_de_jure_regions_above = yes + ignore_effect = change_title_holder + + valid_to_start = { + scope:target = { + is_landless_type_title = no + tier = tier_county + } + scope:attacker = { # The attacker has a County in an uncreated Duchy + any_sub_realm_title = { + tier = tier_county + duchy = { + is_title_created = no + any_in_de_jure_hierarchy = { + this = scope:target + } + } + } + } + } + + allowed_for_character_display_regardless = { + # Struggle constraint + custom_tooltip = { + text = struggle_involvement_cb_check_failure + struggle_blocks_invasion_conquest_cb_trigger = yes + } + tgp_japan_offensive_wars_ban_trigger = yes + } + + should_invalidate = { + NOT = { + any_in_list = { + list = target_titles + any_in_de_jure_hierarchy = { + tier = tier_county + holder = { + OR = { + this = scope:defender + target_is_liege_or_above = scope:defender + } + } + } + } + } + } + + on_invalidated_desc = msg_county_conquest_war_invalidated_message + + on_invalidated = { + } + + cost = { + piety = { + value = 0 + add = common_cb_impious_piety_cost + } + prestige = { + value = 0 + if = { + limit = { + scope:attacker.primary_title.tier <= tier_county + } + add = { + value = 50 + desc = CB_BASE_COST + } + } + else = { + add = { + value = 100 + desc = CB_BASE_COST + } + } + + multiply = common_cb_prestige_cost_multiplier + } + } + + on_declaration = { + on_declared_war = yes + } + + on_victory_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:attacker = { is_local_player = yes } } + desc = ducal_conquest_cb_victory_desc_attacker + } + desc = ducal_conquest_cb_victory_desc + } + } + + on_victory = { + scope:attacker = { show_pow_release_message_effect = yes } + + # Legitimacy + add_legitimacy_attacker_victory_effect = yes + + #EP2 accolade glory gain for winning against higher ranked enemy + scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } + + create_title_and_vassal_change = { + type = conquest + save_scope_as = change + add_claim_on_loss = yes + } + + # EP3 Laamp possibility warning + scope:defender = { ep3_war_loss_adventurer_tt_effect = yes } + + # go through the dejure hierarchy under target titles, transfer titles with same or worse tolerance holders (their religion equaly or less tolerated than the defender's), + # take the holder as vassal otherwise and don't go deeper + every_in_list = { + list = target_titles + custom_tooltip = CONQUEST_CB_TITLE + every_in_de_jure_hierarchy = { + continue = { + OR = { + NOT = { + exists = holder + } + NOT = { + holder = { + target_is_liege_or_above = scope:defender + } + } + AND = { + scope:attacker.faith = { + faith_hostility_level_comparison = { + prev.holder.faith <= scope:defender.faith + } + } + holder = { + OR = { + this = scope:defender + target_is_liege_or_above = scope:defender + } + } + } + } + tier > tier_county + } + limit = { + tier = tier_county + holder ?= { + OR = { + this = scope:defender + target_is_liege_or_above = scope:defender + } + } + } + + if = { + limit = { + OR = { + scope:attacker.faith = { + faith_hostility_level_comparison = { + prev.holder.faith >= scope:defender.faith + } + } + holder.primary_title.tier >= scope:attacker.primary_title.tier + } + } + add_to_temporary_list = titles_taken + } + else = { + holder = { + add_to_temporary_list = vassals_taken + } + } + } + } + + every_in_list = { + list = titles_taken + change_title_holder = { + holder = scope:attacker + change = scope:change + take_baronies = yes + } + } + + every_in_list = { + list = vassals_taken + change_liege = { + liege = scope:attacker + change = scope:change + } + } + + resolve_title_and_vassal_change = scope:change + + # Prestige Progress for the Attacker + every_in_list = { + list = target_titles + scope:attacker = { + add_prestige_experience = minor_prestige_value + } + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:attacker + FAME_BASE = minor_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + # Truce + add_truce_attacker_victory_effect = yes + + # FP1: note the victory for future memorialisation via stele (if applicable). + scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + + #Mandalas gain or lose piety/devotion depending on Decree + mandala_war_victory_effects = yes + } + + on_white_peace_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = ducal_conquest_cb_white_peace_desc_defender + } + desc = ducal_conquest_cb_white_peace_desc + } + } + + on_white_peace = { + scope:attacker = { show_pow_release_message_effect = yes } + # Prestige loss for the attacker + scope:attacker = { + add_prestige = { + value = minor_prestige_value + multiply = -1.0 + } + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:attacker # not important as scale values are identical + FAME_BASE = minor_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + add_truce_white_peace_effect = yes + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + } + + on_defeat_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = ducal_conquest_cb_defeat_desc_defender + } + triggered_desc = { + trigger = { + scope:attacker = { + is_local_player = yes + has_targeting_faction = yes + } + } + desc = ducal_conquest_cb_defeat_desc_attacker + } + desc = ducal_conquest_cb_defeat_desc + } + } + + on_defeat = { + scope:attacker = { show_pow_release_message_effect = yes } + + # Legitimacy + add_legitimacy_attacker_defeat_effect = yes + + scope:defender = { + mandala_peacemaker_perk_serenity_effect = yes + #EP2 accolade glory gain for winning against higher ranked enemy + accolade_defender_war_end_glory_gain_low_effect = yes + # Prestige for Defender + add_prestige_war_defender_effect = { + PRESTIGE_VALUE = medium_prestige_value + } + } + + # Prestige loss for the attacker + scope:attacker = { + pay_short_term_gold_reparations_effect = { + GOLD_VALUE = 2 + } + add_prestige = { + value = medium_prestige_value + multiply = -1.0 + } + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:defender + FAME_BASE = minor_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + add_truce_attacker_defeat_effect = yes + + scope:attacker = { + save_temporary_scope_as = loser + } + on_lost_aggression_war_discontent_loss = yes + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + + #Mandalas gain or lose piety/devotion depending on Decree + mandala_war_defeat_effects = yes + } + + transfer_behavior = transfer + + on_primary_attacker_death = inherit + on_primary_defender_death = inherit + + attacker_allies_inherit = yes + defender_allies_inherit = yes + + war_name = "DUCAL_CONQUEST_WAR_NAME" + war_name_base = "DUCAL_CONQUEST_WAR_NAME_BASE" + cb_name = "DUCAL_CONQUEST_CB_NAME" + + interface_priority = 79 + + use_de_jure_wargoal_only = yes + + attacker_wargoal_percentage = 0.8 + + max_defender_score_from_occupation = 150 + max_attacker_score_from_occupation = 150 + + max_ai_diplo_distance_to_title = 1500 + + ai_score_mult = { + value = 1 + multiply = pam_peace_of_god_coreligionist_war_ai_score_value + multiply = zealous_war_on_head_of_faith_ai_score_value + add = frankokratia_leader_protection_value #Set back to 0. Declaring war on the frankokratia leader can really ruin the whole thing + } +} + +ireland_laudabiliter_conquest_cb = { + icon = county_conquest_cb + group = conquest + + combine_into_one = yes + should_show_war_goal_subview = yes + mutually_exclusive_titles = { always = yes } + + attacker_score_from_occupation_scale = 150 + attacker_score_from_battles_scale = 150 + defender_score_from_battles_scale = 150 + + allowed_for_character = { + exists = scope:attacker.house + scope:attacker.house = { #Laudabiliter modifier allows conquest on Ireland region. + has_house_modifier = ireland_laudabiliter_modifier + } + } + + allowed_against_character = { + scope:attacker = { + ALL_FALSE = { + top_liege = scope:defender.top_liege + liege = scope:defender + } + } + } + target_titles = all + target_title_tier = all + target_de_jure_regions_above = yes + ignore_effect = change_title_holder + ai_only_against_neighbors = yes + + valid_to_start = { + scope:target = { + tier = tier_county + is_landless_type_title = no + scope:attacker.house = { # + has_house_modifier = ireland_laudabiliter_modifier + } + title_province = { geographical_region = custom_roman_hibernia } + } + } + + allowed_for_character_display_regardless = { + # Struggle constraint + custom_tooltip = { + text = struggle_involvement_cb_check_failure + struggle_blocks_invasion_conquest_cb_trigger = yes + } + tgp_japan_offensive_wars_ban_trigger = yes + } + + should_invalidate = { + NOT = { + any_in_list = { + list = target_titles + any_in_de_jure_hierarchy = { + tier = tier_county + holder = { + OR = { + this = scope:defender + target_is_liege_or_above = scope:defender + } + } + } + } + } + } + + on_invalidated = { + } + + cost = { + piety = { + value = 0 + add = common_cb_impious_piety_cost + if = { + limit = { + scope:defender.faith = scope:attacker.faith + } + add = { + value = 25 + desc = CB_SAME_FAITH_COST + } + } + multiply = common_cb_piety_cost_multiplier + } + prestige = { + value = 0 + if = { + limit = { + scope:defender.faith != scope:attacker.faith + } + add = { + value = 50 + desc = CB_COST_DIFFERENT_FAITH + } + } + multiply = common_cb_prestige_cost_multiplier + } + } + + on_declaration = { + on_declared_war = yes + } + + on_victory_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:attacker = { is_local_player = yes } } + desc = ireland_laudabiliter_conquest_cb_victory_desc_attacker + } + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = ireland_laudabiliter_conquest_cb_victory_desc_defender + } + desc = ireland_laudabiliter_conquest_cb_victory_desc + } + } + + on_victory = { + scope:attacker = { show_pow_release_message_effect = yes } + + # Legitimacy + add_legitimacy_attacker_victory_effect = yes + + #EP2 accolade glory gain for winning against higher ranked enemy + scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } + + create_title_and_vassal_change = { + type = conquest + save_scope_as = change + add_claim_on_loss = yes + } + + # EP3 Laamp possibility warning + scope:defender = { ep3_war_loss_adventurer_tt_effect = yes } + + # go through the dejure hierarchy under target titles, transfer titles with same or worse tolerance holders (their religion equaly or less tolerated than the defender's), + # take the holder as vassal otherwise and don't go deeper + every_in_list = { + list = target_titles + custom_tooltip = CONQUEST_CB_TITLE + every_in_de_jure_hierarchy = { + continue = { + OR = { + NOT = { + exists = holder + } + NOT = { + holder = { + target_is_liege_or_above = scope:defender + } + } + AND = { + scope:attacker.faith = { + faith_hostility_level_comparison = { + prev.holder.faith <= scope:defender.faith + } + } + holder = { + OR = { + this = scope:defender + target_is_liege_or_above = scope:defender + } + } + } + } + tier > tier_county + } + limit = { + tier = tier_county + holder ?= { + OR = { + this = scope:defender + target_is_liege_or_above = scope:defender + } + } + } + + if = { + limit = { + OR = { + scope:attacker.faith = { + faith_hostility_level_comparison = { + prev.holder.faith >= scope:defender.faith + } + } + holder.primary_title.tier >= scope:attacker.primary_title.tier + } + } + add_to_temporary_list = titles_taken + } + else = { + holder = { + add_to_temporary_list = vassals_taken + } + } + } + } + + every_in_list = { + list = titles_taken + change_title_holder = { + holder = scope:attacker + change = scope:change + take_baronies = yes + } + } + + every_in_list = { + list = vassals_taken + change_liege = { + liege = scope:attacker + change = scope:change + } + } + + resolve_title_and_vassal_change = scope:change + + # Prestige Progress for the Attacker + every_in_list = { + list = target_titles + scope:attacker = { + add_prestige_experience = minor_prestige_value + } + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:attacker + FAME_BASE = minor_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + # Truce + add_truce_attacker_victory_effect = yes + + # FP1: note the victory for future memorialisation via stele (if applicable). + scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + + #Mandalas gain or lose piety/devotion depending on Decree + mandala_war_victory_effects = yes + } + + on_white_peace_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = ireland_laudabiliter_conquest_cb_white_peace_desc_defender + } + desc = ireland_laudabiliter_conquest_cb_white_peace_desc + } + } + + on_white_peace = { + scope:attacker = { show_pow_release_message_effect = yes } + # Prestige loss for the attacker + scope:attacker = { + add_prestige = { + value = minor_prestige_value + multiply = -1.0 + } + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:attacker # not important as the scales are identical + FAME_BASE = minor_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + add_truce_white_peace_effect = yes + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + } + + on_defeat_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = ireland_laudabiliter_conquest_cb_defeat_desc_defender + } + triggered_desc = { + trigger = { + scope:attacker = { + is_local_player = yes + has_targeting_faction = yes + } + } + desc = ireland_laudabiliter_conquest_cb_defeat_desc_attacker + } + desc = ireland_laudabiliter_conquest_cb_defeat_desc + } + } + + on_defeat = { + scope:attacker = { show_pow_release_message_effect = yes } + + # Legitimacy + add_legitimacy_attacker_defeat_effect = yes + + + scope:defender = { + mandala_peacemaker_perk_serenity_effect = yes + #EP2 accolade glory gain for winning against higher ranked enemy + accolade_defender_war_end_glory_gain_low_effect = yes + # Prestige for Defender + add_prestige_war_defender_effect = { + PRESTIGE_VALUE = medium_prestige_value + } + } + + # Prestige loss for the attacker + scope:attacker = { + pay_short_term_gold_reparations_effect = { + GOLD_VALUE = 2 + } + add_prestige = { + value = medium_prestige_value + multiply = -1.0 + } + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:defender + FAME_BASE = minor_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + add_truce_attacker_defeat_effect = yes + + scope:attacker = { + save_temporary_scope_as = loser + } + on_lost_aggression_war_discontent_loss = yes + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + + #Mandalas gain or lose piety/devotion depending on Decree + mandala_war_defeat_effects = yes + } + + on_invalidated_desc = msg_county_conquest_war_invalidated_message + + transfer_behavior = transfer + + on_primary_attacker_death = inherit + on_primary_defender_death = inherit + + attacker_allies_inherit = yes + defender_allies_inherit = yes + + war_name = "LAUDABILITER_CONQUEST_WAR_NAME" + war_name_base = "LAUDABILITER_CONQUEST_WAR_NAME_BASE" + cb_name = "LAUDABILITER_CONQUEST_CB_NAME" + + interface_priority = 80 + + use_de_jure_wargoal_only = yes + + attacker_wargoal_percentage = 0.8 + + max_defender_score_from_occupation = 150 + max_attacker_score_from_occupation = 150 + + max_ai_diplo_distance_to_title = 500 + + ai_score_mult = { + value = 1 + multiply = pam_peace_of_god_coreligionist_war_ai_score_value + multiply = zealous_war_on_head_of_faith_ai_score_value + add = frankokratia_leader_protection_value #Set back to 0. Declaring war on the frankokratia leader can really ruin the whole thing + } +} diff --git a/common/casus_belli_types/00_dejure_war.txt b/common/casus_belli_types/00_dejure_war.txt index 95e9b8b54..eeb4f46a5 100644 --- a/common/casus_belli_types/00_dejure_war.txt +++ b/common/casus_belli_types/00_dejure_war.txt @@ -5,7 +5,7 @@ allowed_for_character = { scope:attacker = { - culture = { + culture ?= { has_innovation = innovation_divine_right } NOR = { @@ -321,7 +321,7 @@ individual_county_de_jure_cb = { allowed_for_character = { scope:attacker = { - culture = { + culture ?= { has_innovation = innovation_casus_belli } NOT = { government_has_flag = government_is_nomadic } @@ -660,7 +660,7 @@ individual_duchy_de_jure_cb = { allowed_for_character = { scope:attacker = { - culture = { + culture ?= { has_innovation = innovation_casus_belli } NOT = { government_has_flag = government_is_nomadic } diff --git a/common/casus_belli_types/00_invasion_war.txt b/common/casus_belli_types/00_invasion_war.txt new file mode 100644 index 000000000..2d6f8de4f --- /dev/null +++ b/common/casus_belli_types/00_invasion_war.txt @@ -0,0 +1,2190 @@ +invasion_war = { + icon = invasion + group = invasion + + combine_into_one = yes + should_show_war_goal_subview = yes + mutually_exclusive_titles = { always = yes } + allow_hostages = no + + allowed_for_character = { + OR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + rite ?= { + rite_has_parameter = invasion_cb_enabled + } + has_character_flag = bp2_inspired_culture_for_conquest + has_variable = mpo_desperate_stance_invasion_cb_enable_var + ai_should_get_extreme_conqueror_bonuses = yes + AND = { + house ?= { has_house_head_parameter = has_mandala_invasion_cb } + is_house_head = yes + } + } + trigger_if = { + limit = { ai_should_get_extreme_conqueror_bonuses = no } + NOT = { has_character_flag = used_lifetime_invasion } + } + NOT = { government_has_flag = government_is_landless_adventurer } + } + + allowed_for_character_display_regardless = { + trigger_if = { + limit = { + has_character_flag = bp2_inspired_culture_for_conquest + ai_should_get_extreme_conqueror_bonuses = no + } + prestige_level >= 0 + } + trigger_else_if = { + limit = { + government_has_flag = government_is_clan + house ?= { + has_house_unity_stage = antagonistic + } + culture ?= { + has_cultural_parameter = cb_lower_prestige_level_requirement + } + ai_should_get_extreme_conqueror_bonuses = no + } + prestige_level >= 2 + } + trigger_else_if = { + limit = { + OR = { + AND = { + government_has_flag = government_is_clan + house ?= { + has_house_unity_stage = antagonistic + } + } + culture ?= { + has_cultural_parameter = cb_lower_prestige_level_requirement + } + } + ai_should_get_extreme_conqueror_bonuses = no + } + prestige_level >= 3 + } + trigger_else_if = { + limit = { ai_should_get_extreme_conqueror_bonuses = yes } + } + trigger_else = { + prestige_level >= 4 + } + + custom_tooltip = { + text = struggle_involvement_cb_check_failure + struggle_blocks_invasion_conquest_cb_trigger = yes + } + tgp_japan_offensive_wars_ban_trigger = yes + } + + allowed_against_character = { + scope:attacker = { + ALL_FALSE = { + top_liege = scope:defender.top_liege + liege = scope:defender + } + } + } + target_titles = all + target_title_tier = kingdom + target_de_jure_regions_above = yes + ignore_effect = change_title_holder + + ai_can_target_all_titles = { + can_use_viking_invasion_cbs_trigger = yes + } + ai_score_mult = { + value = viking_conquest_ai_score_value + # HOUSE RELATIONS + add = house_relation_ai_score_value + # AI in struggles act insularly for wars that don't have a familial or legal basis. + multiply = struggle_wars_prioritise_struggle_targets_value + # Tell the Romans to stop going adventuring into the steppe for no gods-damned reason. + multiply = byzantium_conquests_ai_score_value + multiply = muslim_invasions_prefer_nonmuslims_ai_score_value + + multiply = pam_peace_of_god_coreligionist_war_ai_score_value + multiply = zealous_war_on_head_of_faith_ai_score_value + add = frankokratia_leader_protection_value #Set back to 0. Declaring war on the frankokratia leader can really ruin the whole thing + } + + valid_to_start = { + scope:target = { + any_in_de_jure_hierarchy = { + tier = tier_county + neighboring_county_or_viking_conquest_trigger = { CHARACTER = root } + } + } + scope:target = { + trigger_if = { + limit = { + scope:attacker = { + is_ai = yes + } + } + any_in_de_jure_hierarchy = { + continue = { tier > tier_county } + count >= 4 + tier = tier_county + holder ?= { + OR = { + this = scope:defender + is_vassal_or_below_of = scope:defender + } + } + } + } + } + } + + should_invalidate = { + NOT = { + any_in_list = { + list = target_titles + any_in_de_jure_hierarchy = { + tier = tier_county + holder = { + target_is_same_character_or_above = scope:defender + } + } + } + } + } + + on_invalidated_desc = msg_invasion_war_invalidated_message + + on_invalidated = { + scope:attacker = { + if = { + limit = { + is_alive = yes + } + remove_character_flag = used_lifetime_invasion # If the war is invalidated, you should be permitted to try again + } + } + } + + cost = { + piety = { + if = { + limit = { + scope:attacker = { + NOT = { + government_has_flag = government_is_mandala + house ?= { has_house_head_parameter = has_mandala_invasion_cb } + is_house_head = yes + } + } + } + value = common_cb_impious_piety_cost + } + else = { + value = { + value = 2000 + desc = CB_BASE_COST + } + multiply = common_cb_piety_cost_multiplier + } + } + prestige = { + if = { + limit = { + scope:attacker = { + government_has_flag = government_is_mandala + house ?= { has_house_head_parameter = has_mandala_invasion_cb } + is_house_head = yes + } + } + value = 0 + } + else = { + value = { + value = 2000 + desc = CB_BASE_COST + } + multiply = common_cb_prestige_cost_multiplier + } + } + } + + on_declaration = { + on_declared_war = yes + scope:attacker = { + add_character_flag = used_lifetime_invasion + } + } + + on_victory_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:attacker = { is_local_player = yes } } + desc = invasion_war_victory_desc_attacker + } + desc = invasion_war_victory_desc + } + triggered_desc = { + trigger = { scope:attacker = { is_local_player = yes } } + desc = invasion_war_warning_desc + } + } + + on_victory = { + scope:attacker = { show_pow_release_message_effect = yes } + + # Legitimacy + add_legitimacy_attacker_victory_effect = yes + + # Influence + add_influence_attacker_victory_effect = yes + + #EP2 accolade glory gain for winning against higher ranked enemy + scope:attacker = { accolade_attacker_war_end_glory_gain_high_effect = yes } + + create_title_and_vassal_change = { + type = conquest + save_scope_as = change + add_claim_on_loss = yes + } + + show_as_tooltip = { + every_in_list = { + list = target_titles + custom_tooltip = invasion_title_transfer_tt + custom_tooltip = invasion_title_transfer_2_tt + every_in_de_jure_hierarchy = { + limit = { holder.top_liege = scope:defender } + change_title_holder = { + holder = scope:attacker + change = scope:change + } + } + } + scope:defender = { + every_sub_realm_county = { + limit = { + county_controller = scope:attacker + } + change_title_holder = { + holder = scope:attacker + change = scope:change + } + } + } + } + + hidden_effect = { + setup_invasion_cb = { + titles = target_titles + attacker = scope:attacker + defender = scope:defender + change = scope:change + take_occupied = yes + } + resolve_title_and_vassal_change = scope:change + } + + # Attacker gets Prestige Experience, Defender loses Prestige, all other participants gain Prestige based on their war contribution. + modify_all_participants_fame_values = { + WINNER = scope:attacker + LOSER = scope:defender + FAME_BASE = scope:cb_prestige_factor # Set by 'setup_invasion_cb' + IS_RELIGIOUS_WAR = no + WINNER_FAME_SCALE = 10 + LOSER_FAME_SCALE = -10 + WINNER_ALLY_FAME_SCALE = 10 + LOSER_ALLY_FAME_SCALE = 10 + } + + # Truce + add_truce_attacker_victory_effect = yes + + # FP1: note the victory for future memorialisation via stele (if applicable). + scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + + #Mandalas gain or lose piety/devotion depending on Decree + mandala_war_victory_effects = yes + } + + on_white_peace_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = invasion_war_white_peace_desc_defender + } + desc = invasion_war_white_peace_desc + } + } + + on_white_peace = { + scope:attacker = { show_pow_release_message_effect = yes } + + #EP2 accolade glory gain for doing ok against higher ranked enemy + scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } + scope:defender = { accolade_defender_war_end_glory_gain_med_effect = yes } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:attacker # Not important as the scales are identical + FAME_BASE = major_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + # Truce + add_truce_white_peace_effect = yes + + scope:attacker = { + add_prestige = mongol_invasion_cb_prestige_white_peace + stress_and_fulfillment_impact = { + ambitious = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + } + + scope:defender = { + stress_and_fulfillment_impact = { + arrogant = medium_stress_impact_gain + } + } + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + } + + on_defeat_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = invasion_war_white_peace_desc_defender + } + desc = invasion_war_white_peace_desc + } + } + + on_defeat = { + scope:attacker = { show_pow_release_message_effect = yes } + + # Legitimacy + add_legitimacy_attacker_defeat_effect = yes + + # Influence + add_influence_attacker_defeat_effect = yes + + scope:defender = { + mandala_peacemaker_perk_serenity_effect = yes + #EP2 accolade glory gain for winning against higher ranked enemy + accolade_defender_war_end_glory_gain_high_effect = yes + } + + # Prestige loss for the attacker + scope:attacker = { + pay_short_term_gold_reparations_effect = { + GOLD_VALUE = 5 + } + add_prestige = { + value = massive_prestige_value + multiply = -1.0 + } + } + + setup_invasion_cb = { + titles = target_titles + attacker = scope:attacker + defender = scope:defender + claimant = scope:claimant + victory = no + } + + # Attacker loses Prestige, all other war participants gain Prestige (Defender gains full prestige, all allies on both sides gain based on war contribution). + modify_all_participants_fame_values = { + WINNER = scope:defender + LOSER = scope:attacker + FAME_BASE = scope:cb_prestige_factor # Set by 'setup_claim_cb' + IS_RELIGIOUS_WAR = no + WINNER_FAME_SCALE = scale_10_war_defender_win + LOSER_FAME_SCALE = -10 + WINNER_ALLY_FAME_SCALE = 10 + LOSER_ALLY_FAME_SCALE = 10 + } + + add_truce_attacker_defeat_effect = yes + + scope:attacker = { + save_temporary_scope_as = loser + } + on_lost_aggression_war_discontent_loss = yes + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + + #Mandalas gain or lose piety/devotion depending on Decree + mandala_war_defeat_effects = yes + } + + transfer_behavior = transfer + + on_primary_attacker_death = inherit + on_primary_defender_death = inherit + + attacker_allies_inherit = yes + defender_allies_inherit = yes + + war_name = "INVASION_WAR_NAME" + war_name_base = "INVASION_WAR_NAME_BASE" + cb_name = "INVASION_CB_NAME" + + interface_priority = 100 + + use_de_jure_wargoal_only = yes + + attacker_wargoal_percentage = 0.8 + + max_defender_score_from_occupation = 150 + max_attacker_score_from_occupation = 150 +} + +clan_invasion_war = { + icon = vassalization + group = invasion + + combine_into_one = yes + should_show_war_goal_subview = yes + mutually_exclusive_titles = { always = yes } + + allow_hostages = no + allowed_for_character = { + government_has_flag = government_is_clan + NAND = { + house ?= { + has_house_unity_parameter = unity_disable_invasions + } + } + trigger_if = { + limit = { + house ?= { + has_house_unity_parameter = unity_multiple_invasions + } + } + NOT = { has_character_flag = unity_invasion_cooldown } + } + trigger_else_if = { + limit = { + house ?= { + has_house_unity_parameter = unity_unlimited_invasions + } + } + always = yes + } + trigger_else = { + has_none_of_variables = { + name = used_lifetime_invasion + name = pending_lifetime_invasion + } + } + } + + allowed_for_character_display_regardless = { + trigger_if = { + limit = { + government_has_flag = government_is_clan + house ?= { + has_house_unity_stage = antagonistic + } + culture ?= { + has_cultural_parameter = cb_lower_prestige_level_requirement + } + } + prestige_level >= 2 + } + trigger_else_if = { + limit = { + OR = { + AND = { + government_has_flag = government_is_clan + house ?= { + has_house_unity_stage = antagonistic + } + } + culture ?= { + has_cultural_parameter = cb_lower_prestige_level_requirement + } + } + } + prestige_level >= 3 + } + trigger_else = { + prestige_level >= 4 + } + + custom_tooltip = { + text = struggle_involvement_cb_check_failure + struggle_blocks_invasion_conquest_cb_trigger = yes + } + tgp_japan_offensive_wars_ban_trigger = yes + } + + allowed_against_character = { + scope:attacker = { + ALL_FALSE = { + top_liege = scope:defender.top_liege + liege = scope:defender + } + } + } + target_titles = all + target_title_tier = all + target_de_jure_regions_above = yes + ignore_effect = change_title_holder + ai_only_against_neighbors = yes + + ai_score_mult = { + value = 1 + # HOUSE RELATIONS + add = house_relation_ai_score_value + # AI in struggles act insularly for wars that don't have a familial or legal basis. + multiply = struggle_wars_prioritise_struggle_targets_value + # Tell the Romans to stop going adventuring into the steppe for no gods-damned reason. + multiply = byzantium_conquests_ai_score_value + multiply = muslim_invasions_prefer_nonmuslims_ai_score_value + + multiply = pam_peace_of_god_coreligionist_war_ai_score_value + multiply = zealous_war_on_head_of_faith_ai_score_value + add = frankokratia_leader_protection_value #Set back to 0. Declaring war on the frankokratia leader can really ruin the whole thing + } + + valid_to_start = { + scope:target = { + tier = tier_kingdom + } + scope:target = { + trigger_if = { + limit = { + scope:attacker = { + is_ai = yes + } + } + any_in_de_jure_hierarchy = { + continue = { tier > tier_county } + count >= 5 + tier = tier_county + holder ?= { + OR = { + this = scope:defender + is_vassal_or_below_of = scope:defender + } + } + } + } + } + } + + should_invalidate = { + NOT = { + any_in_list = { + list = target_titles + any_in_de_jure_hierarchy = { + tier = tier_county + holder = { + OR = { + this = scope:defender + target_is_liege_or_above = scope:defender + } + } + } + } + } + } + + on_invalidated_desc = msg_invasion_war_invalidated_message + + on_invalidated = { + scope:attacker = { + remove_character_flag = pending_lifetime_invasion # If the war is invalidated, you should be permitted to try again + remove_character_flag = unity_invasion_cooldown # Reset cooldown as well + } + } + + cost = { + piety = { + value = 0 + add = common_cb_impious_piety_cost + } + prestige = { + add = { + value = 200 + desc = CB_BASE_COST + } + add = { + value = 20 + multiply = scope:attacker.realm_size + desc = CB_REALM_SIZE_COST + max = 5000 + } + + multiply = common_cb_prestige_cost_multiplier + } + } + + on_declaration = { + on_declared_war = yes + scope:attacker = { + add_character_flag = pending_lifetime_invasion + add_character_flag = { + flag = unity_invasion_cooldown + years = unity_antagonistic_invasion_cooldown_value + } + } + } + + on_victory_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:attacker = { is_local_player = yes } } + desc = clan_invasion_war_victory_desc_attacker + } + desc = clan_invasion_war_victory_desc + } + triggered_desc = { + trigger = { + scope:attacker = { + is_local_player = yes + #Let's not display this warning if you have unlimited invasions + NOT = { + house ?= { has_house_unity_parameter = unity_unlimited_invasions } + } + } + } + desc = invasion_war_warning_desc + } + } + + on_victory = { + scope:attacker = { show_pow_release_message_effect = yes } + + # Legitimacy + add_legitimacy_attacker_victory_effect = yes + + #EP2 accolade glory gain for winning against higher ranked enemy + scope:attacker = { accolade_attacker_war_end_glory_gain_high_effect = yes } + + create_title_and_vassal_change = { + type = conquest + save_scope_as = change + add_claim_on_loss = yes + } + + hidden_effect = { + setup_invasion_cb = { + titles = target_titles + attacker = scope:attacker + defender = scope:defender + change = scope:change + take_occupied = yes + } + } + + show_as_tooltip = { + every_in_list = { + list = target_titles + if = { + limit = { + scope:defender.primary_title.tier >= scope:attacker.primary_title.tier + } + custom_tooltip = invasion_title_transfer_tt + custom_tooltip = invasion_title_transfer_2_tt + } + every_in_de_jure_hierarchy = { + limit = { + holder.top_liege = scope:defender + } + change_title_holder = { + holder = scope:attacker + change = scope:change + } + } + } + scope:defender = { + every_sub_realm_county = { + limit = { + county_controller = scope:attacker + } + change_title_holder = { + holder = scope:attacker + change = scope:change + } + } + # Vassal transfer tooltip for display + every_vassal = { + limit = { + primary_title = { + any_this_title_or_de_jure_above = { + is_in_list = target_titles + } + } + } + custom = invasion_vassal_transfer_tt + change_liege = { + liege = scope:attacker + change = scope:change + } + } + } + } + + #If target is lower tier, vassalise them. + if = { + limit = { + scope:defender.primary_title.tier < scope:attacker.primary_title.tier + } + scope:defender = { + change_liege = { + liege = scope:attacker + change = scope:change + } + } + } + + #If target has any personally-held titles of equal tier, excepting empires take them. + #If target is equal tier, + if = { + limit = { + #Conquering, or indirectly butchering, an entire empire in one war is a bit much. + scope:defender.primary_title.tier < tier_empire + scope:defender.primary_title.tier = scope:attacker.primary_title.tier + } + every_in_list = { + list = target_titles + limit = { + holder.top_liege = scope:defender + } + change_title_holder = { + holder = scope:attacker + change = scope:change + } + } + } + + hidden_effect = { resolve_title_and_vassal_change = scope:change } + + # Attacker gets Prestige Experience, Defender loses Prestige, all other participants gain Prestige based on their war contribution. + # Prestige level progress for the attacker + scope:attacker = { + add_prestige_experience = { + value = major_prestige_value + } + add_character_flag = used_lifetime_invasion + remove_character_flag = pending_lifetime_invasion + } + + # Prestige loss for the defender + scope:defender = { + add_prestige = { + value = major_prestige_value + multiply = -1.0 + } + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:attacker + FAME_BASE = major_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + # Truce + add_truce_attacker_victory_effect = yes + + # FP1: note the victory for future memorialisation via stele (if applicable). + scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + + #Mandalas gain or lose piety/devotion depending on Decree + mandala_war_victory_effects = yes + } + + on_white_peace_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = invasion_war_white_peace_desc_defender + } + desc = invasion_war_white_peace_desc + } + } + + on_white_peace = { + scope:attacker = { show_pow_release_message_effect = yes } + + #EP2 accolade glory gain for doing ok against higher ranked enemy + scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } + scope:defender = { accolade_defender_war_end_glory_gain_med_effect = yes } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:attacker # Not important as the scales are identical + FAME_BASE = major_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + # Truce + add_truce_white_peace_effect = yes + + scope:attacker = { + add_prestige = mongol_invasion_cb_prestige_white_peace + stress_and_fulfillment_impact = { + ambitious = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + add_character_flag = used_lifetime_invasion + remove_character_flag = pending_lifetime_invasion + } + + scope:defender = { + stress_and_fulfillment_impact = { + arrogant = medium_stress_impact_gain + } + } + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + } + + on_defeat_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = invasion_war_white_peace_desc_defender + } + desc = invasion_war_white_peace_desc + } + } + + on_defeat = { + scope:attacker = { show_pow_release_message_effect = yes } + + # Legitimacy + add_legitimacy_attacker_defeat_effect = yes + + scope:defender = { + mandala_peacemaker_perk_serenity_effect = yes + #EP2 accolade glory gain for winning against higher ranked enemy + accolade_defender_war_end_glory_gain_high_effect = yes + } + + # Prestige loss for the attacker + scope:attacker = { + pay_short_term_gold_reparations_effect = { + GOLD_VALUE = 5 + } + add_prestige = { + value = massive_prestige_value + multiply = -1.0 + } + } + + setup_invasion_cb = { + titles = target_titles + attacker = scope:attacker + defender = scope:defender + claimant = scope:claimant + victory = no + } + + # Attacker loses Prestige, all other war participants gain Prestige (Defender gains full prestige, all allies on both sides gain based on war contribution). + modify_all_participants_fame_values = { + WINNER = scope:defender + LOSER = scope:attacker + FAME_BASE = scope:cb_prestige_factor # Set by 'setup_claim_cb' + IS_RELIGIOUS_WAR = no + WINNER_FAME_SCALE = scale_10_war_defender_win + LOSER_FAME_SCALE = -10 + WINNER_ALLY_FAME_SCALE = 10 + LOSER_ALLY_FAME_SCALE = 10 + } + + add_truce_attacker_defeat_effect = yes + + scope:attacker = { + save_temporary_scope_as = loser + add_character_flag = used_lifetime_invasion + remove_character_flag = pending_lifetime_invasion + } + on_lost_aggression_war_discontent_loss = yes + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + + #Mandalas gain or lose piety/devotion depending on Decree + mandala_war_defeat_effects = yes + } + + transfer_behavior = transfer + + on_primary_attacker_death = inherit + on_primary_defender_death = inherit + + attacker_allies_inherit = yes + defender_allies_inherit = yes + + war_name = "INVASION_WAR_NAME" + war_name_base = "INVASION_WAR_NAME_BASE" + cb_name = "CLAN_INVASION_CB_NAME" + + interface_priority = 100 + + use_de_jure_wargoal_only = yes + + attacker_wargoal_percentage = 0.8 + max_defender_score_from_occupation = 150 + max_attacker_score_from_occupation = 150 + + max_ai_diplo_distance_to_title = 500 +} + +#mongol_invasion_war = { +# icon = invasion +# group = invasion +# +# combine_into_one = yes +# should_show_war_goal_subview = yes +# mutually_exclusive_titles = { always = yes } +# +# allow_hostages = no +# allowed_for_character = { +# this = title:e_mongol_empire.holder +# prestige_level >= 1 +# has_mpo_dlc_trigger = no +# } +# +# allowed_for_character_display_regardless = { +# tgp_japan_offensive_wars_ban_trigger = yes +# } +# +# allowed_against_character = { +# scope:attacker = { +# ALL_FALSE = { +# top_liege = scope:defender.top_liege +# liege = scope:defender +# } +# } +# } +# target_titles = neighbor_land_or_water +# target_title_tier = all +# target_de_jure_regions_above = yes +# ignore_effect = change_title_holder +# +# valid_to_start = { +# scope:target = { +# tier = tier_kingdom +# } +# } +# +# should_invalidate = { +# NOT = { +# any_in_list = { +# list = target_titles +# any_in_de_jure_hierarchy = { +# tier = tier_county +# holder = { +# OR = { +# this = scope:defender +# target_is_liege_or_above = scope:defender +# } +# } +# } +# } +# } +# } +# +# on_invalidated_desc = msg_mongol_invasion_war_invalidated_message +# +# on_invalidated = { +# } +# +# cost = { +# piety = { +# value = 0 +# add = common_cb_impious_piety_cost +# } +# prestige = { +# add = { +# value = 200 +# desc = CB_BASE_COST +# } +# +# multiply = common_cb_prestige_cost_multiplier +# +# # Genghis Khan gets it for free +# if = { +# limit = { scope:attacker = { has_character_flag = is_temujin } } +# multiply = 0 +# } +# } +# } +# +# on_declaration = { +# on_declared_war = yes +# } +# +# on_victory_desc = { +# first_valid = { +# triggered_desc = { +# trigger = { scope:attacker = { is_local_player = yes } } +# desc = mongol_invasion_war_victory_desc_attacker +# } +# desc = mongol_invasion_war_victory_desc +# } +# } +# +# on_victory = { +# scope:attacker = { show_pow_release_message_effect = yes } +# +# # Legitimacy +# add_legitimacy_attacker_victory_effect = yes +# +# #EP2 accolade glory gain for winning against higher ranked enemy +# scope:attacker = { accolade_attacker_war_end_glory_gain_high_effect = yes } +# +# create_title_and_vassal_change = { +# type = conquest +# save_scope_as = change +# add_claim_on_loss = yes +# } +# +# +# # go through the dejure hierarchy under target titles, transfer titles with same or worse tolerance holders (their religion equaly or less tolerated than the defender's), +# # take the holder as vassal otherwise and don't go deeper +# every_in_list = { +# list = target_titles +# custom_tooltip = CONQUEST_CB_TITLE +# every_in_de_jure_hierarchy = { +# continue = { +# OR = { +# NOT = { +# exists = holder +# } +# NOT = { +# holder = { +# target_is_liege_or_above = scope:defender +# } +# } +# AND = { +# scope:attacker.faith = { +# faith_hostility_level_comparison = { +# prev.holder.faith <= scope:defender.faith +# } +# } +# holder = { +# OR = { +# this = scope:defender +# target_is_liege_or_above = scope:defender +# } +# } +# } +# } +# tier > tier_county +# } +# limit = { +# #tier = tier_county +# holder ?= { +# OR = { +# this = scope:defender +# target_is_liege_or_above = scope:defender +# } +# } +# } +# +# if = { +# limit = { +# OR = { +# scope:attacker.faith = { +# faith_hostility_level_comparison = { +# prev.holder.faith >= scope:defender.faith +# } +# } +# holder.primary_title.tier >= scope:attacker.primary_title.tier +# } +# } +# add_to_temporary_list = titles_taken +# } +# else = { +# holder = { +# add_to_temporary_list = vassals_taken +# } +# } +# } +# } +# +# every_in_list = { +# list = titles_taken +# change_title_holder = { +# holder = scope:attacker +# change = scope:change +# take_baronies = yes +# } +# } +# +# every_in_list = { +# list = vassals_taken +# change_liege = { +# liege = scope:attacker +# change = scope:change +# } +# } +# +# hidden_effect = { resolve_title_and_vassal_change = scope:change } +# +# # Allies on both sides get full prestige value for helping in the war, based on their war participation. +# modify_allies_of_participants_fame_values = { +# WINNER = scope:attacker +# FAME_BASE = mongol_invasion_cb_ally_prestige +# IS_RELIGIOUS_WAR = no +# WINNER_ALLY_FAME_SCALE = 1 +# LOSER_ALLY_FAME_SCALE = 1 +# } +# +# # Prestige level progress for the attacker +# scope:attacker = { +# add_prestige_experience = { +# value = mongol_invasion_cb_prestige_experience_gain +# } +# } +# +# # Truce +# add_truce_attacker_victory_effect = yes +# +# # FP1: note the victory for future memorialisation via stele (if applicable). +# scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } +# +# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold +# laamp_as_mercenary_payout_tooltip_effect = yes +# +# #Mandalas gain or lose piety/devotion depending on Decree +# mandala_war_victory_effects = yes +# } +# +# on_white_peace_desc = { +# first_valid = { +# triggered_desc = { +# trigger = { scope:defender = { is_local_player = yes } } +# desc = invasion_war_white_peace_desc_defender +# } +# desc = invasion_war_white_peace_desc +# } +# } +# +# on_white_peace = { +# scope:attacker = { show_pow_release_message_effect = yes } +# +# #EP2 accolade glory gain for doing ok against higher ranked enemy +# scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } +# scope:defender = { accolade_defender_war_end_glory_gain_med_effect = yes } +# +# # Allies on both sides get full prestige value for helping in the war, based on their war participation. +# modify_allies_of_participants_fame_values = { +# WINNER = scope:attacker # Not important as the scales are identical +# FAME_BASE = mongol_invasion_cb_ally_prestige +# IS_RELIGIOUS_WAR = no +# WINNER_ALLY_FAME_SCALE = 1 +# LOSER_ALLY_FAME_SCALE = 1 +# } +# +# add_truce_white_peace_effect = yes +# +# scope:attacker = { +# add_prestige = mongol_invasion_cb_prestige_white_peace +# stress_and_fulfillment_impact = { +# ambitious = medium_stress_impact_gain +# arrogant = medium_stress_impact_gain +# } +# } +# +# scope:defender = { +# stress_and_fulfillment_impact = { +# arrogant = medium_stress_impact_gain +# } +# } +# +# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold +# laamp_as_mercenary_payout_tooltip_effect = yes +# } +# +# on_defeat_desc = { +# first_valid = { +# triggered_desc = { +# trigger = { scope:defender = { is_local_player = yes } } +# desc = invasion_war_white_peace_desc_defender +# } +# desc = invasion_war_white_peace_desc +# } +# } +# +# on_defeat = { +# scope:attacker = { show_pow_release_message_effect = yes } +# +# # Legitimacy +# add_legitimacy_attacker_defeat_effect = yes +# +# scope:defender = { +# mandala_peacemaker_perk_serenity_effect = yes +# #EP2 accolade glory gain for winning against higher ranked enemy +# accolade_defender_war_end_glory_gain_high_effect = yes +# } +# +# # Allies on both sides get full prestige value for helping in the war, based on their war participation. +# modify_allies_of_participants_fame_values = { +# WINNER = scope:defender # Not important as the scales are identical +# FAME_BASE = mongol_invasion_cb_ally_prestige +# IS_RELIGIOUS_WAR = no +# WINNER_ALLY_FAME_SCALE = 1 +# LOSER_ALLY_FAME_SCALE = 1 +# } +# +# # Truce +# add_truce_attacker_defeat_effect = yes +# +# # piety change +# every_in_list = { +# list = target_titles +# +# scope:defender = { +# add_prestige = mongol_invasion_cb_prestige_gain +# } +# +# scope:attacker = { +# if = { +# limit = { +# scope:defender = { is_ai = no } +# } +# if = { +# limit = { +# monthly_character_income > 0 +# } +# pay_short_term_income = { +# years = 3 +# target = scope:defender +# } +# } +# else = { +# pay_short_term_gold = { +# target = scope:defender +# gold = medium_gold_value +# } +# } +# } +# } +# } +# +# scope:attacker = { +# every_vassal = { +# custom = custom.every_vassal +# add_opinion = { +# modifier = liege_lost_mongol_invasion_war +# target = prev +# } +# } +# } +# +# scope:attacker = { +# save_temporary_scope_as = loser +# } +# on_lost_aggression_war_discontent_loss = yes +# +# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold +# laamp_as_mercenary_payout_tooltip_effect = yes +# +# #Mandalas gain or lose piety/devotion depending on Decree +# mandala_war_defeat_effects = yes +# } +# +# transfer_behavior = transfer +# +# on_primary_attacker_death = inherit +# on_primary_defender_death = inherit +# +# attacker_allies_inherit = yes +# defender_allies_inherit = yes +# +# war_name = "MONGOL_INVASION_WAR_NAME" +# cb_name = "MONGOL_INVASION_KINGDOM_CB_NAME" +# +# interface_priority = 100 +# +# use_de_jure_wargoal_only = yes +# +# attacker_wargoal_percentage = 0.8 +# max_defender_score_from_occupation = 150 +# max_attacker_score_from_occupation = 150 +# +# max_ai_diplo_distance_to_title = 500 +# +# ai_score_mult = { +# value = 1 +# multiply = pam_peace_of_god_coreligionist_war_ai_score_value +# multiply = zealous_war_on_head_of_faith_ai_score_value +# add = frankokratia_leader_protection_value #Set back to 0. Declaring war on the frankokratia leader can really ruin the whole thing +# } +#} +# +#mongol_realm_invasion_war = { +# icon = invasion +# group = invasion +# +# combine_into_one = yes +# should_show_war_goal_subview = yes +# mutually_exclusive_titles = { always = yes } +# +# allow_hostages = no +# allowed_for_character = { +# this = title:e_mongol_empire.holder +# is_ai = yes # To keep it clean and simple for players +# prestige_level >= 1 +# } +# +# allowed_for_character_display_regardless = { +# tgp_japan_offensive_wars_ban_trigger = yes +# } +# +# allowed_against_character = { +# scope:defender.top_liege != scope:attacker +# scope:attacker = { +# ALL_FALSE = { +# top_liege = scope:defender.top_liege +# liege = scope:defender +# } +# } +# } +# target_titles = neighbor_land_or_water +# target_title_tier = all +# target_de_jure_regions_above = yes +# use_de_jure_wargoal_only = yes +# ignore_effect = change_title_holder +# +# valid_to_start = { +# scope:target = { +# tier = tier_empire +# } +# } +# +# should_invalidate = { +# NOT = { +# any_in_list = { +# list = target_titles +# any_in_de_jure_hierarchy = { +# tier = tier_county +# holder = { +# OR = { +# this = scope:defender +# target_is_liege_or_above = scope:defender +# } +# } +# } +# } +# } +# } +# +# on_invalidated_desc = msg_mongol_invasion_war_invalidated_message +# +# on_invalidated = { +# } +# +# cost = { +# piety = { +# value = 0 +# add = common_cb_impious_piety_cost +# } +# prestige = { +# add = { +# value = 200 +# desc = CB_BASE_COST +# } +# +# multiply = common_cb_prestige_cost_multiplier +# +# # Genghis Khan gets it for free +# if = { +# limit = { scope:attacker = { has_character_flag = is_temujin } } +# multiply = { +# value = 0 +# desc = CB_GENGHIS_KHAN_COST +# } +# } +# +# # If fired by the Mongol Invasion story, don't charge a cost +# if = { +# limit = { scope:attacker = { has_character_flag = free_mongol_cb } } +# multiply = { +# value = 0 +# desc = CB_MONGOL_INVASIONS_COST +# } +# } +# } +# } +# +# on_declaration = { +# on_declared_war = yes +# } +# +# on_victory_desc = { +# first_valid = { +# triggered_desc = { +# trigger = { scope:attacker = { is_local_player = yes } } +# desc = invasion_war_victory_desc_attacker +# } +# desc = invasion_war_victory_desc +# } +# } +# +# on_victory = { +# scope:attacker = { show_pow_release_message_effect = yes } +# +# # Legitimacy +# add_legitimacy_attacker_victory_effect = yes +# +# #EP2 accolade glory gain for winning against higher ranked enemy +# scope:attacker = { accolade_attacker_war_end_glory_gain_very_high_effect = yes } +# +# create_title_and_vassal_change = { +# type = conquest +# save_scope_as = change +# add_claim_on_loss = yes +# } +# +# # Target titles + dominant empires only +# scope:defender = { +# # Check whether any additional empires should be considered target titles +# # First check for the primary defender +# every_realm_de_jure_empire = { +# limit = { +# any_in_de_jure_hierarchy = { # Then check how many de jure counties are in the Mongol Emperor's realm +# count >= 8 # This number determines how many counties activates the threshold for taking these titles +# continue = { +# tier > tier_county +# } +# exists = this +# tier = tier_county +# exists = holder +# holder.top_liege = scope:attacker +# } +# } +# add_to_temporary_list = target_titles +# } +# # Mark any empire-level titles for destruction after transfer +# every_realm_de_jure_empire = { +# limit = { +# holder = scope:defender +# is_in_list = target_titles +# } +# add_to_list = titles_to_destroy +# } +# } +# +# show_as_tooltip = { +# every_in_list = { +# list = target_titles +# if = { +# limit = { +# scope:defender.primary_title.tier >= scope:attacker.primary_title.tier +# } +# custom_tooltip = invasion_title_transfer_tt +# custom_tooltip = invasion_title_transfer_2_tt +# } +# every_in_de_jure_hierarchy = { +# limit = { +# holder.top_liege = scope:defender +# } +# change_title_holder = { +# holder = scope:attacker +# change = scope:change +# } +# } +# } +# scope:defender = { +# every_sub_realm_county = { +# limit = { +# county_controller = scope:attacker +# } +# change_title_holder = { +# holder = scope:attacker +# change = scope:change +# } +# } +# # Vassal transfer tooltip for display +# every_vassal = { +# limit = { +# primary_title = { +# any_this_title_or_de_jure_above = { +# is_in_list = target_titles +# } +# } +# } +# custom = invasion_vassal_transfer_tt +# change_liege = { +# liege = scope:attacker +# change = scope:change +# } +# } +# } +# } +# +# # Most of the title transfers are handled here +# hidden_effect = { +# setup_invasion_cb = { +# titles = target_titles +# attacker = scope:attacker +# defender = scope:defender +# change = scope:change +# take_occupied = yes +# } +# } +# +# scope:defender = { +# # Loot tooltip for display +# every_held_county = { +# custom = mongol_invasion_loot_county_tt +# random = { +# chance = scope:attacker.martial +# custom_tooltip = mongol_invasion_loot_gold_tt +# custom_tooltip = mongol_invasion_loot_development_tt +# custom_tooltip = mongol_invasion_loot_dread_tt +# } +# } +# hidden_effect = { +# # Sub realm looting +# every_sub_realm_county = { +# custom = mongol_invasion_loot_chance_tt +# limit = { +# duchy.kingdom.empire = { is_in_list = target_titles } +# } +# mongol_invasion_county_looting_chance_effect = yes +# } +# # Vassal sub realm looting +# every_vassal_or_below = { +# every_sub_realm_county = { +# limit = { +# holder = { is_ai = yes } +# duchy.kingdom.empire = { is_in_list = target_titles } +# } +# mongol_invasion_county_looting_chance_effect = yes +# } +# } +# } +# } +# +# resolve_title_and_vassal_change = scope:change +# +# # Destroy any titles that should be destroyed +# every_in_list = { +# list = titles_to_destroy +# custom = invasion_titles_destroyed_tt +# save_scope_as = title_to_destroy +# scope:attacker = { destroy_title = scope:title_to_destroy } +# } +# # If the defender was vassalised, take any Kingdom title they hold +# scope:defender = { +# if = { +# limit = { +# target_is_liege_or_above = scope:attacker +# any_held_title = { +# title_tier = kingdom +# } +# } +# create_title_and_vassal_change = { +# type = conquest +# save_scope_as = change_two +# add_claim_on_loss = yes +# } +# every_held_title = { +# title_tier = kingdom +# change_title_holder = { +# holder = scope:attacker +# change = scope:change_two +# } +# } +# resolve_title_and_vassal_change = scope:change_two +# } +# } +# +# # Allies on both sides get full prestige value for helping in the war, based on their war participation. +# modify_allies_of_participants_fame_values = { +# WINNER = scope:attacker +# FAME_BASE = mongol_invasion_cb_ally_prestige +# IS_RELIGIOUS_WAR = no +# WINNER_ALLY_FAME_SCALE = 1 +# LOSER_ALLY_FAME_SCALE = 1 +# } +# +# # Prestige level progress for the attacker +# scope:attacker = { +# add_prestige_experience = { +# value = mongol_invasion_cb_prestige_experience_gain +# } +# } +# +# # Truce +# add_truce_attacker_victory_effect = yes +# +# # FP1: note the victory for future memorialisation via stele (if applicable). +# scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } +# +# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold +# laamp_as_mercenary_payout_tooltip_effect = yes +# +# #Mandalas gain or lose piety/devotion depending on Decree +# mandala_war_victory_effects = yes +# } +# +# on_white_peace_desc = { +# first_valid = { +# triggered_desc = { +# trigger = { scope:defender = { is_local_player = yes } } +# desc = invasion_war_white_peace_desc_defender +# } +# desc = invasion_war_white_peace_desc +# } +# } +# +# on_white_peace = { +# scope:attacker = { show_pow_release_message_effect = yes } +# +# #EP2 accolade glory gain for doing ok against higher ranked enemy +# scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } +# scope:defender = { accolade_defender_war_end_glory_gain_high_effect = yes } +# +# # Allies on both sides get full prestige value for helping in the war, based on their war participation. +# modify_allies_of_participants_fame_values = { +# WINNER = scope:attacker # Not important as the scales are identical +# FAME_BASE = mongol_invasion_cb_ally_prestige +# IS_RELIGIOUS_WAR = no +# WINNER_ALLY_FAME_SCALE = 1 +# LOSER_ALLY_FAME_SCALE = 1 +# } +# +# add_truce_white_peace_effect = yes +# +# scope:attacker = { +# add_prestige = mongol_invasion_cb_prestige_white_peace +# stress_and_fulfillment_impact = { +# ambitious = medium_stress_impact_gain +# arrogant = medium_stress_impact_gain +# } +# } +# +# scope:defender = { +# stress_and_fulfillment_impact = { +# arrogant = medium_stress_impact_gain +# } +# } +# +# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold +# laamp_as_mercenary_payout_tooltip_effect = yes +# } +# +# on_defeat_desc = { +# first_valid = { +# triggered_desc = { +# trigger = { scope:defender = { is_local_player = yes } } +# desc = invasion_war_white_peace_desc_defender +# } +# desc = invasion_war_white_peace_desc +# } +# } +# +# on_defeat = { +# scope:attacker = { show_pow_release_message_effect = yes } +# +# # Legitimacy +# add_legitimacy_attacker_defeat_effect = yes +# +# scope:defender = { +# mandala_peacemaker_perk_serenity_effect = yes +# #EP2 accolade glory gain for winning against higher ranked enemy +# accolade_defender_war_end_glory_gain_high_effect = yes +# } +# +# # Allies on both sides get full prestige value for helping in the war, based on their war participation. +# modify_allies_of_participants_fame_values = { +# WINNER = scope:defender +# FAME_BASE = mongol_invasion_cb_ally_prestige +# IS_RELIGIOUS_WAR = no +# WINNER_ALLY_FAME_SCALE = 1 +# LOSER_ALLY_FAME_SCALE = 1 +# } +# +# # Truce +# add_truce_attacker_defeat_effect = yes +# +# # piety change +# every_in_list = { +# list = target_titles +# +# scope:defender = { +# add_prestige = mongol_invasion_cb_prestige_gain +# } +# +# scope:attacker = { +# if = { +# limit = { +# scope:defender = { is_ai = no } +# } +# if = { +# limit = { +# monthly_character_income > 0 +# } +# pay_short_term_income = { +# years = 3 +# target = scope:defender +# } +# } +# else = { +# pay_short_term_gold = { +# target = scope:defender +# gold = medium_gold_value +# } +# } +# } +# } +# } +# +# scope:attacker = { +# custom_tooltip = { +# text = mongol_invasion_vassal_disapproves_defeat +# +# +# every_vassal = { +# custom = custom.every_vassal +# add_opinion = { +# modifier = liege_lost_mongol_invasion_war +# target = prev +# } +# } +# } +# } +# +# scope:attacker = { +# save_temporary_scope_as = loser +# } +# on_lost_aggression_war_discontent_loss = yes +# +# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold +# laamp_as_mercenary_payout_tooltip_effect = yes +# +# #Mandalas gain or lose piety/devotion depending on Decree +# mandala_war_defeat_effects = yes +# } +# +# transfer_behavior = transfer +# +# on_primary_attacker_death = inherit +# on_primary_defender_death = inherit +# +# attacker_allies_inherit = yes +# defender_allies_inherit = yes +# +# war_name = "MONGOL_INVASION_WAR_NAME" +# cb_name = "MONGOL_INVASION_EMPIRE_CB_NAME" +# +# interface_priority = 100 +# +# use_de_jure_wargoal_only = yes +# +# attacker_wargoal_percentage = 0.8 +# max_defender_score_from_occupation = 150 +# max_attacker_score_from_occupation = 150 +# +# max_ai_diplo_distance_to_title = 500 +# +# ai_score_mult = { +# value = 1 +# multiply = pam_peace_of_god_coreligionist_war_ai_score_value +# multiply = zealous_war_on_head_of_faith_ai_score_value +# add = frankokratia_leader_protection_value #Set back to 0. Declaring war on the frankokratia leader can really ruin the whole thing +# } +#} +# +#pax_romana_invasion_war = { +# icon = invasion +# group = invasion +# +# combine_into_one = yes +# should_show_war_goal_subview = yes +# mutually_exclusive_titles = { always = yes } +# +# allow_hostages = no +# allowed_for_character = { +# is_roman_emperor_excluding_byzantium_trigger = yes +# government_has_flag = government_is_administrative +# any_owned_story = { type = ep3_story_cycle_restoring_rome } +# prestige_level >= 1 +# } +# +# allowed_for_character_display_regardless = { +# tgp_japan_offensive_wars_ban_trigger = yes +# } +# +# allowed_against_character = { +# scope:attacker = { top_liege != scope:defender.top_liege } +# } +# target_titles = neighbor_land_or_water +# target_title_tier = all +# target_de_jure_regions_above = yes +# ignore_effect = change_title_holder +# +# valid_to_start = { +# scope:target = { +# tier = tier_empire +# } +# } +# +# should_invalidate = { +# NOT = { +# any_in_list = { +# list = target_titles +# any_in_de_jure_hierarchy = { +# tier = tier_county +# holder = { +# OR = { +# this = scope:defender +# target_is_liege_or_above = scope:defender +# } +# } +# } +# } +# } +# } +# +# on_invalidated_desc = msg_pax_romana_invasion_war_invalidated_message +# +# on_invalidated = {} +# +# cost = { +# piety = { +# value = 0 +# add = common_cb_impious_piety_cost +# } +# prestige = { +# add = { +# value = 200 +# desc = CB_BASE_COST +# } +# +# multiply = common_cb_prestige_cost_multiplier +# } +# } +# +# on_declaration = { +# on_declared_war = yes +# } +# +# on_victory_desc = { +# first_valid = { +# triggered_desc = { +# trigger = { scope:attacker = { is_local_player = yes } } +# desc = pax_romana_invasion_war_victory_desc_attacker +# } +# desc = pax_romana_invasion_war_victory_desc +# } +# } +# +# on_victory = { +# scope:attacker = { show_pow_release_message_effect = yes } +# +# # Legitimacy +# add_legitimacy_attacker_victory_effect = yes +# +# #EP2 accolade glory gain for winning against higher ranked enemy +# scope:attacker = { accolade_attacker_war_end_glory_gain_high_effect = yes } +# +# create_title_and_vassal_change = { +# type = conquest +# save_scope_as = change +# add_claim_on_loss = yes +# } +# +# +# # go through the dejure hierarchy under target titles, transfer titles with same or worse tolerance holders (their religion equaly or less tolerated than the defender's), +# # take the holder as vassal otherwise and don't go deeper +# every_in_list = { +# list = target_titles +# custom_tooltip = CONQUEST_CB_TITLE +# every_in_de_jure_hierarchy = { +# continue = { +# OR = { +# NOT = { +# exists = holder +# } +# NOT = { +# holder = { +# target_is_liege_or_above = scope:defender +# } +# } +# AND = { +# scope:attacker.faith = { +# faith_hostility_level_comparison = { +# prev.holder.faith <= scope:defender.faith +# } +# } +# holder = { +# OR = { +# this = scope:defender +# target_is_liege_or_above = scope:defender +# } +# } +# } +# } +# tier > tier_county +# } +# limit = { +# holder ?= { +# OR = { +# this = scope:defender +# target_is_liege_or_above = scope:defender +# } +# } +# } +# +# if = { +# limit = { +# OR = { +# scope:attacker.faith = { +# faith_hostility_level_comparison = { +# prev.holder.faith >= scope:defender.faith +# } +# } +# holder.primary_title.tier >= scope:attacker.primary_title.tier +# } +# } +# add_to_temporary_list = titles_taken +# } +# else = { +# holder = { +# add_to_temporary_list = vassals_taken +# } +# } +# } +# } +# +# every_in_list = { +# list = titles_taken +# change_title_holder = { +# holder = scope:attacker +# change = scope:change +# take_baronies = yes +# } +# } +# +# every_in_list = { +# list = vassals_taken +# change_liege = { +# liege = scope:attacker +# change = scope:change +# } +# } +# +# hidden_effect = { resolve_title_and_vassal_change = scope:change } +# +# # Allies on both sides get full prestige value for helping in the war, based on their war participation. +# modify_allies_of_participants_fame_values = { +# WINNER = scope:attacker +# FAME_BASE = mongol_invasion_cb_ally_prestige +# IS_RELIGIOUS_WAR = no +# WINNER_ALLY_FAME_SCALE = 1 +# LOSER_ALLY_FAME_SCALE = 1 +# } +# +# # Prestige level progress for the attacker +# scope:attacker = { +# add_prestige_experience = { +# value = mongol_invasion_cb_prestige_experience_gain +# } +# } +# +# # Truce +# add_truce_attacker_victory_effect = yes +# +# # FP1: note the victory for future memorialisation via stele (if applicable). +# scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } +# +# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold +# laamp_as_mercenary_payout_tooltip_effect = yes +# +# #Mandalas gain or lose piety/devotion depending on Decree +# mandala_war_victory_effects = yes +# } +# +# on_white_peace_desc = { +# first_valid = { +# triggered_desc = { +# trigger = { scope:defender = { is_local_player = yes } } +# desc = invasion_war_white_peace_desc_defender +# } +# desc = invasion_war_white_peace_desc +# } +# } +# +# on_white_peace = { +# scope:attacker = { show_pow_release_message_effect = yes } +# +# #EP2 accolade glory gain for doing ok against higher ranked enemy +# scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } +# scope:defender = { accolade_defender_war_end_glory_gain_med_effect = yes } +# +# # Allies on both sides get full prestige value for helping in the war, based on their war participation. +# modify_allies_of_participants_fame_values = { +# WINNER = scope:attacker # Not important as the scales are identical +# FAME_BASE = mongol_invasion_cb_ally_prestige +# IS_RELIGIOUS_WAR = no +# WINNER_ALLY_FAME_SCALE = 1 +# LOSER_ALLY_FAME_SCALE = 1 +# } +# +# add_truce_white_peace_effect = yes +# +# scope:attacker = { +# add_prestige = mongol_invasion_cb_prestige_white_peace +# stress_and_fulfillment_impact = { +# ambitious = medium_stress_impact_gain +# arrogant = medium_stress_impact_gain +# } +# } +# +# scope:defender = { +# stress_and_fulfillment_impact = { +# arrogant = medium_stress_impact_gain +# } +# } +# +# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold +# laamp_as_mercenary_payout_tooltip_effect = yes +# } +# +# on_defeat_desc = { +# first_valid = { +# triggered_desc = { +# trigger = { scope:defender = { is_local_player = yes } } +# desc = invasion_war_white_peace_desc_defender +# } +# desc = invasion_war_white_peace_desc +# } +# } +# +# on_defeat = { +# scope:attacker = { show_pow_release_message_effect = yes } +# +# # Legitimacy +# add_legitimacy_attacker_defeat_effect = yes +# +# scope:defender = { +# mandala_peacemaker_perk_serenity_effect = yes +# #EP2 accolade glory gain for winning against higher ranked enemy +# accolade_defender_war_end_glory_gain_high_effect = yes +# } +# +# # Allies on both sides get full prestige value for helping in the war, based on their war participation. +# modify_allies_of_participants_fame_values = { +# WINNER = scope:defender # Not important as the scales are identical +# FAME_BASE = mongol_invasion_cb_ally_prestige +# IS_RELIGIOUS_WAR = no +# WINNER_ALLY_FAME_SCALE = 1 +# LOSER_ALLY_FAME_SCALE = 1 +# } +# +# # Truce +# add_truce_attacker_defeat_effect = yes +# +# # piety change +# every_in_list = { +# list = target_titles +# +# scope:defender = { +# add_prestige = mongol_invasion_cb_prestige_gain +# } +# +# scope:attacker = { +# if = { +# limit = { +# scope:defender = { is_ai = no } +# } +# if = { +# limit = { +# monthly_character_income > 0 +# } +# pay_short_term_income = { +# years = 3 +# target = scope:defender +# } +# } +# else = { +# pay_short_term_gold = { +# target = scope:defender +# gold = medium_gold_value +# } +# } +# } +# } +# } +# +# scope:attacker = { +# every_vassal = { +# custom = custom.every_vassal +# add_opinion = { +# modifier = liege_lost_mongol_invasion_war +# target = prev +# } +# } +# } +# +# scope:attacker = { +# save_temporary_scope_as = loser +# } +# on_lost_aggression_war_discontent_loss = yes +# +# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold +# laamp_as_mercenary_payout_tooltip_effect = yes +# +# #Mandalas gain or lose piety/devotion depending on Decree +# mandala_war_defeat_effects = yes +# } +# +# transfer_behavior = transfer +# +# on_primary_attacker_death = inherit +# on_primary_defender_death = inherit +# +# attacker_allies_inherit = yes +# defender_allies_inherit = yes +# +# war_name = "PAX_ROMANA_INVASION_WAR_NAME" +# cb_name = "PAX_ROMANA_INVASION_EMPIRE_CB_NAME" +# +# interface_priority = 100 +# +# use_de_jure_wargoal_only = yes +# +# attacker_wargoal_percentage = 0.8 +# max_defender_score_from_occupation = 150 +# max_attacker_score_from_occupation = 150 +# +# max_ai_diplo_distance_to_title = 500 +# +# ai_score_mult = { +# value = 1 +# multiply = pam_peace_of_god_coreligionist_war_ai_score_value +# multiply = zealous_war_on_head_of_faith_ai_score_value +# add = frankokratia_leader_protection_value #Set back to 0. Declaring war on the frankokratia leader can really ruin the whole thing +# } +#} diff --git a/common/casus_belli_types/00_religious_war.txt b/common/casus_belli_types/00_religious_war.txt index 7e727b83a..e0b74ac3b 100644 --- a/common/casus_belli_types/00_religious_war.txt +++ b/common/casus_belli_types/00_religious_war.txt @@ -18,7 +18,7 @@ # Already defined in 00_casus_belli_groups.txt allowed_for_character = { - scope:attacker.faith = { + scope:attacker.faith ?= { NOT = { has_doctrine_parameter = unreformed } NOT = { has_doctrine_parameter = holy_wars_forbidden } } @@ -54,7 +54,7 @@ trigger_if = { limit = { OR = { - culture = { + culture ?= { has_cultural_parameter = cb_lower_piety_level_requirement } # Iberian Struggle Hostility Reward @@ -76,7 +76,7 @@ trigger_if = { limit = { OR = { - culture = { + culture ?= { has_cultural_parameter = cb_lower_piety_level_requirement } # Iberian Struggle Hostility Reward @@ -305,7 +305,7 @@ first_valid = { triggered_desc = { trigger = { - scope:attacker.rite = { + scope:attacker.rite ?= { rite_has_doctrine = doctrine_pluralism_pluralistic } } @@ -382,7 +382,7 @@ add = religious_cb_piety_gain_county if = { limit = { - scope:attacker.faith = { + scope:attacker.faith ?= { has_doctrine_parameter = bonus_holy_war_piety_active } } @@ -400,13 +400,13 @@ save_scope_as = war_goal_title } - scope:attacker.faith = { + scope:attacker.faith ?= { change_fervor = { value = trivial_fervor_gain desc = fervor_loss_religious_war } } - scope:defender.faith = { + scope:defender.faith ?= { change_fervor = { value = modest_fervor_gain desc = fervor_gain_religious_war @@ -510,7 +510,7 @@ add = religious_cb_piety_gain_county if = { limit = { - scope:defender.faith = { + scope:defender.faith ?= { has_doctrine_parameter = bonus_holy_war_piety_active } } @@ -598,7 +598,7 @@ religious_war = { # Additional requirements to the defines in 00_casus_belli_groups.txt allowed_for_character = { - scope:attacker.faith = { + scope:attacker.faith ?= { NOR = { has_doctrine_parameter = unreformed has_doctrine_parameter = holy_wars_forbidden @@ -635,7 +635,7 @@ religious_war = { trigger_if = { limit = { OR = { - culture = { + culture ?= { has_cultural_parameter = cb_lower_piety_level_requirement } # Iberian Struggle Hostility Reward @@ -657,7 +657,7 @@ religious_war = { trigger_if = { limit = { OR = { - culture = { + culture ?= { has_cultural_parameter = cb_lower_piety_level_requirement } # Iberian Struggle Hostility Reward @@ -903,7 +903,7 @@ religious_war = { first_valid = { triggered_desc = { trigger = { - scope:attacker.rite = { + scope:attacker.rite ?= { rite_has_doctrine = doctrine_pluralism_pluralistic } } @@ -980,7 +980,7 @@ religious_war = { add = religious_cb_piety_gain_duchy if = { limit = { - scope:attacker.faith = { + scope:attacker.faith ?= { has_doctrine_parameter = bonus_holy_war_piety_active } } @@ -998,13 +998,13 @@ religious_war = { save_scope_as = war_goal_title } - scope:attacker.faith = { + scope:attacker.faith ?= { change_fervor = { value = small_fervor_gain desc = fervor_loss_religious_war } } - scope:defender.faith = { + scope:defender.faith ?= { change_fervor = { value = slight_fervor_gain desc = fervor_gain_religious_war @@ -1100,7 +1100,7 @@ religious_war = { add = religious_cb_piety_gain_duchy if = { limit = { - scope:defender.faith = { + scope:defender.faith ?= { has_doctrine_parameter = bonus_holy_war_piety_active } } @@ -1238,7 +1238,7 @@ major_religious_war = { # Additional requirements to the defines in 00_casus_belli_groups.txt allowed_for_character = { - scope:attacker.faith = { + scope:attacker.faith ?= { NOT = { has_doctrine_parameter = unreformed } } NOR = { @@ -1265,7 +1265,7 @@ major_religious_war = { trigger_if = { limit = { OR = { - culture = { + culture ?= { has_cultural_parameter = cb_lower_piety_level_requirement } # Iberian Struggle Hostility Reward @@ -1289,7 +1289,7 @@ major_religious_war = { trigger_if = { limit = { OR = { - culture = { + culture ?= { has_cultural_parameter = cb_lower_piety_level_requirement } # Iberian Struggle Hostility Reward @@ -1312,7 +1312,7 @@ major_religious_war = { } trigger_if = { limit = { - culture = { + culture ?= { NOT = { has_cultural_parameter = no_limit_to_kingdom_level_holy_wars } @@ -1524,7 +1524,7 @@ major_religious_war = { first_valid = { triggered_desc = { trigger = { - scope:attacker.rite = { + scope:attacker.rite ?= { rite_has_doctrine = doctrine_pluralism_pluralistic } } @@ -1626,7 +1626,7 @@ major_religious_war = { add = religious_cb_piety_gain_kingdom if = { limit = { - scope:attacker.faith = { + scope:attacker.faith ?= { has_doctrine_parameter = bonus_holy_war_piety_active } } @@ -1644,13 +1644,13 @@ major_religious_war = { save_scope_as = war_goal_title } - scope:attacker.faith = { + scope:attacker.faith ?= { change_fervor = { value = modest_fervor_gain desc = fervor_loss_religious_war } } - scope:defender.faith = { + scope:defender.faith ?= { change_fervor = { value = notable_fervor_gain desc = fervor_gain_religious_war @@ -1747,7 +1747,7 @@ major_religious_war = { add = religious_cb_piety_gain_kingdom if = { limit = { - scope:defender.faith = { + scope:defender.faith ?= { has_doctrine_parameter = bonus_holy_war_piety_active } } @@ -1888,7 +1888,7 @@ excommunication_war = { has_trait = excommunicated top_liege = this faith = scope:attacker.faith - rite = { rite_has_parameter = excommunication_active } + rite ?= { rite_has_parameter = excommunication_active } } scope:attacker = { @@ -2199,7 +2199,7 @@ flowery_war_cb = { allow_hostages = no allowed_for_character = { - faith = { has_doctrine_parameter = flower_war_cb_active } + faith ?= { has_doctrine_parameter = flower_war_cb_active } NOT = { #Must not have any leftover sacrificial prisoners/easy ability to get any. any_prisoner = { has_character_modifier = designated_human_sacrifice_modifier } } @@ -2235,10 +2235,10 @@ flowery_war_cb = { should_invalidate = { OR = { AND = { #A formal flowery war only invalidates if neither side is an interested participant. - scope:attacker.faith = { + scope:attacker.faith ?= { NOT = { has_doctrine_parameter = human_sacrifice_active } } - scope:defender.faith = { + scope:defender.faith ?= { NOT = { has_doctrine_parameter = human_sacrifice_active } } } @@ -2286,7 +2286,7 @@ flowery_war_cb = { scope:attacker = { if = { #If the attacker enjoys human sacrifice, then this was sacred. limit = { - faith = { has_doctrine_parameter = human_sacrifice_active } + faith ?= { has_doctrine_parameter = human_sacrifice_active } } add_piety = { value = scope:defender.tier_scaled_piety_value @@ -2318,7 +2318,7 @@ flowery_war_cb = { scope:attacker = { #If the attacker has the appropriate tenet, grab some suitable courtiers from the defender. if = { limit = { - faith = { has_doctrine_parameter = human_sacrifice_active } + faith ?= { has_doctrine_parameter = human_sacrifice_active } } custom_tooltip = flowery_war_cb_prisoners.tt_attacker hidden_effect = { @@ -2665,7 +2665,7 @@ flowery_war_cb = { scope:attacker = { #Piety loss for the attacker if appropriate, otherwise prestige loss. if = { limit = { - faith = { has_doctrine_parameter = human_sacrifice_active } + faith ?= { has_doctrine_parameter = human_sacrifice_active } } add_piety = religious_cb_piety_white_peace } @@ -2719,7 +2719,7 @@ flowery_war_cb = { scope:attacker = { if = { #If the attacker shares the faith of the defender, and both still enjoy human sacrifice, then this war was at least sacred for them. limit = { - faith = { + faith ?= { this = scope:defender.faith has_doctrine_parameter = human_sacrifice_active } @@ -2739,7 +2739,7 @@ flowery_war_cb = { scope:defender = { if = { #If the defender has the same faith as the attacker, and that faith still enjoys human sacrifice, then this was sacred. limit = { - faith = { + faith ?= { this = scope:attacker.faith has_doctrine_parameter = human_sacrifice_active } @@ -2757,7 +2757,7 @@ flowery_war_cb = { scope:defender = { #If the defender has the appropriate tenet, and doesn't already have sacrificial victims, grab some suitable courtiers from the attacker. if = { limit = { - faith = { has_doctrine_parameter = human_sacrifice_active } + faith ?= { has_doctrine_parameter = human_sacrifice_active } NOT = { #Must not have any leftover sacrificial prisoners, lest the defender get borked sacrifice-accounting events. any_prisoner = { has_character_modifier = designated_human_sacrifice_modifier } } @@ -3200,7 +3200,7 @@ undirected_great_holy_war = { any_in_de_jure_hierarchy = { #Any ruler in the dejure of the targeted Kingdom follows a Rite that the HoF's Rite is hostile enough to Holy War against. continue = { tier > tier_county } tier = tier_county - scope:attacker.rite = { + scope:attacker.rite ?= { is_hostile_enough_for_holy_war_trigger = { RITE = prev.holder.top_liege.rite } } } @@ -3232,7 +3232,7 @@ undirected_great_holy_war = { scope:defender = { save_scope_as = ghw_defender } - scope:attacker.faith = { + scope:attacker.faith ?= { save_scope_as = the_faith } scope:attacker.faith.great_holy_war = { @@ -3334,7 +3334,7 @@ undirected_great_holy_war = { scope:defender = { save_scope_as = ghw_defender } - scope:attacker.faith = { + scope:attacker.faith ?= { save_scope_as = the_faith } scope:attacker.faith.great_holy_war = { @@ -3405,7 +3405,7 @@ undirected_great_holy_war = { scope:defender = { save_scope_as = ghw_defender } - scope:attacker.faith = { + scope:attacker.faith ?= { save_scope_as = the_faith } scope:attacker.faith.great_holy_war = { @@ -3472,11 +3472,11 @@ undirected_great_holy_war = { save_scope_as = title_recipient gender_female_chance = { if = { - limit = { scope:the_faith = { main_rite = { rite_has_doctrine = doctrine_gender_male_dominated } } } + limit = { scope:the_faith ?= { main_rite ?= { rite_has_doctrine = doctrine_gender_male_dominated } } } add = 0 } else_if = { - limit = { scope:the_faith = { main_rite = { rite_has_doctrine = doctrine_gender_female_dominated } } } + limit = { scope:the_faith ?= { main_rite ?= { rite_has_doctrine = doctrine_gender_female_dominated } } } add = 100 } else = { @@ -3828,7 +3828,7 @@ undirected_great_holy_war = { #Set 30 years cooldown. hidden_effect = { - scope:attacker.faith = { + scope:attacker.faith ?= { set_variable = { name = variable_ghw_cooldown value = yes @@ -3858,13 +3858,13 @@ undirected_great_holy_war = { save_scope_as = war_goal_title } - scope:attacker.faith = { + scope:attacker.faith ?= { change_fervor = { value = substantial_fervor_gain desc = fervor_loss_great_holy_war } } - scope:defender.faith = { + scope:defender.faith ?= { change_fervor = { value = significant_fervor_gain desc = fervor_gain_great_holy_war @@ -3924,7 +3924,7 @@ undirected_great_holy_war = { scope:defender = { save_scope_as = ghw_defender } - scope:attacker.faith = { + scope:attacker.faith ?= { save_scope_as = the_faith } scope:attacker.faith.great_holy_war = { @@ -3932,14 +3932,14 @@ undirected_great_holy_war = { } scope:attacker = { - faith = { + faith ?= { change_fervor = { value = significant_fervor_gain desc = fervor_loss_lost_great_holy_war } } } - scope:defender.faith = { + scope:defender.faith ?= { change_fervor = { value = significant_fervor_gain desc = fervor_gain_great_holy_war @@ -4002,7 +4002,7 @@ undirected_great_holy_war = { } } } - scope:attacker.faith = { + scope:attacker.faith ?= { set_variable = { name = variable_ghw_cooldown value = yes @@ -4068,7 +4068,7 @@ directed_great_holy_war = { transfer_behavior = transfer allowed_for_character = { - faith = { + faith ?= { exists = religious_head suitable_faith_for_directed_ghw_trigger = yes #Right Doctrines OR = { @@ -4086,19 +4086,19 @@ directed_great_holy_war = { allowed_for_character_display_regardless = { custom_description = { text = great_holy_war_cooldown - NOT = { scope:attacker.faith = { exists = var:variable_ghw_cooldown }} + NOT = { scope:attacker.faith ?= { exists = var:variable_ghw_cooldown }} } tgp_japan_offensive_wars_ban_trigger = yes } allowed_against_character = { - scope:attacker.rite = { + scope:attacker.rite ?= { is_hostile_enough_for_holy_war_trigger = { RITE = scope:defender.rite } } } valid_to_start = { - scope:attacker.faith = { + scope:attacker.faith ?= { NOR = { # No active GHW already. exists = great_holy_war @@ -4123,7 +4123,7 @@ directed_great_holy_war = { continue = { tier > tier_county } count >= 5 # The AI doesn't Jihad for an area of less than 5 Counties, for reference, Jerusalem is 8 Counties tier = tier_county - scope:attacker.rite = { + scope:attacker.rite ?= { is_hostile_enough_for_holy_war_trigger = { RITE = prev.holder.top_liege.rite } } } @@ -4132,7 +4132,7 @@ directed_great_holy_war = { any_in_de_jure_hierarchy = { #Any ruler in the dejure of the targeted Kingdom follows a Rite that the Caliph's Rite is hostile enough to Holy War against. continue = { tier > tier_county } tier = tier_county - scope:attacker.rite = { + scope:attacker.rite ?= { is_hostile_enough_for_holy_war_trigger = { RITE = prev.holder.top_liege.rite } } } @@ -4149,7 +4149,7 @@ directed_great_holy_war = { save_scope_as = target } hidden_effect = { - scope:attacker.faith = { + scope:attacker.faith ?= { start_great_holy_war = { target_character = scope:defender target_title = scope:target @@ -4179,10 +4179,10 @@ directed_great_holy_war = { scope:defender = { save_scope_as = ghw_defender } - scope:defender.faith = { + scope:defender.faith ?= { save_scope_as = target_faith } - scope:attacker.faith = { + scope:attacker.faith ?= { save_scope_as = the_faith } scope:attacker.faith.great_holy_war = { @@ -4214,12 +4214,12 @@ directed_great_holy_war = { } trigger_event = great_holy_war.0093 #AI counterpledging. } - scope:attacker.faith = { + scope:attacker.faith ?= { every_faith_holy_order = { trigger_event = great_holy_war.0090 # Military Orders always join } } - scope:defender.faith = { + scope:defender.faith ?= { every_faith_holy_order = { trigger_event = great_holy_war.0091 # Military Orders always join } @@ -4285,7 +4285,7 @@ directed_great_holy_war = { scope:defender = { save_scope_as = ghw_defender } - scope:attacker.faith = { + scope:attacker.faith ?= { save_scope_as = the_faith } scope:attacker.faith.great_holy_war = { @@ -4393,7 +4393,7 @@ directed_great_holy_war = { #Set 30 years cooldown. hidden_effect = { scope:attacker = { - faith = { + faith ?= { set_variable = { name = variable_ghw_cooldown value = yes @@ -4417,13 +4417,13 @@ directed_great_holy_war = { save_scope_as = war_goal_title } - scope:attacker.faith = { + scope:attacker.faith ?= { change_fervor = { value = substantial_fervor_gain desc = fervor_loss_great_holy_war } } - scope:defender.faith = { + scope:defender.faith ?= { change_fervor = { value = significant_fervor_gain desc = fervor_gain_great_holy_war @@ -4515,7 +4515,7 @@ directed_great_holy_war = { scope:defender = { save_scope_as = ghw_defender } - scope:attacker.faith = { + scope:attacker.faith ?= { save_scope_as = the_faith } scope:attacker.faith.great_holy_war = { @@ -4551,14 +4551,14 @@ directed_great_holy_war = { add_truce_attacker_defeat_effect = yes scope:attacker = { - faith = { + faith ?= { change_fervor = { value = significant_fervor_gain desc = fervor_loss_lost_great_holy_war } } } - scope:defender.faith = { + scope:defender.faith ?= { change_fervor = { value = significant_fervor_gain desc = fervor_gain_great_holy_war @@ -4568,7 +4568,7 @@ directed_great_holy_war = { #Set 30 years cooldown. hidden_effect = { scope:attacker = { - faith = { + faith ?= { set_variable = { name = variable_ghw_cooldown value = yes diff --git a/common/casus_belli_types/00_subjugation.txt b/common/casus_belli_types/00_subjugation.txt new file mode 100644 index 000000000..b3d399e1a --- /dev/null +++ b/common/casus_belli_types/00_subjugation.txt @@ -0,0 +1,595 @@ +tribal_subjugation_cb = { + icon = vassalization + group = subjugation + ai_only_against_neighbors = yes + + attacker_score_from_occupation_scale = 150 + attacker_score_from_battles_scale = 150 + defender_score_from_battles_scale = 150 + + allowed_for_character = { + OR = { + government_has_flag = government_is_tribal + has_variable = koh_subjugation_cb_allowed # Kingdom of Heaven allows this + AND = { + OR = { + faith.religious_head = this + pam_is_antipope_trigger = yes + } + faith ?= { has_doctrine = doctrine_temporal_head } + } + faith ?= { + has_doctrine = eastern_hostility_doctrine + } + house ?= { + has_variable = subjugations_expanded + } + } + NOR = { + government_has_flag = government_is_landless_adventurer + AND = { # FP3: Renewed Caliphate houses with subjugations_expanded bypass the admin restriction + government_has_mechanic = administrative + NOT = { + house ?= { + has_variable = subjugations_expanded + } + } + } + } + } + + # Root is the title + # scope:attacker is the attacker + # scope:defender is the defender + allowed_against_character_display_regardless = { + tgp_japan_offensive_wars_ban_trigger = yes + scope:attacker = { + trigger_if = { + limit = { + scope:attacker = { has_variable = koh_subjugation_cb_allowed } + } + scope:attacker.faith = scope:defender.faith + } + trigger_if = { + limit = { + faith.religion = religion:islam_religion + house ?= { + house_head = scope:attacker + has_variable = subjugations_expanded + } + scope:defender.faith.religion = religion:islam_religion + } + } + trigger_else = { + trigger_if = { + limit = { + government_has_flag = government_is_tribal + scope:defender = { + government_has_flag = government_is_tribal + } + } + trigger_if = { + limit = { + culture ?= { + has_cultural_parameter = cb_lower_prestige_level_requirement + } + } + prestige_level >= 1 + } + trigger_else = { + prestige_level >= 2 + } + } + trigger_else_if = { + limit = { + faith ?= { has_doctrine = doctrine_temporal_head } + OR = { + AND = { + faith.religious_head = scope:attacker + scope:defender.faith.religious_head ?= scope:attacker.faith.religious_head + } + AND = { + pam_is_antipope_trigger = yes + rite = scope:defender.rite + } + } + } + trigger_if = { + limit = { + OR = { + culture ?= { + has_cultural_parameter = cb_lower_piety_level_requirement + } + # Iberian Struggle Hostility Reward + AND = { + house ?= { + OR = { + has_house_modifier = fp2_struggle_hostility_house_faith_modifier + has_house_modifier = fp2_struggle_hostility_house_combined_modifier + } + } + } + } + } + piety_level >= 2 + } + trigger_else = { + piety_level >= 3 + } + } + trigger_else = { + trigger_if = { + limit = { + government_has_flag = government_is_clan + house ?= { + has_house_unity_stage = antagonistic + } + culture ?= { + has_cultural_parameter = cb_lower_prestige_level_requirement + } + } + prestige_level >= 2 + } + trigger_else_if = { + limit = { + OR = { + AND = { + government_has_flag = government_is_clan + house ?= { + has_house_unity_stage = antagonistic + } + } + culture ?= { + has_cultural_parameter = cb_lower_prestige_level_requirement + } + } + } + prestige_level >= 3 + } + trigger_else = { + prestige_level >= 4 + } + } + custom_description = { + text = has_used_lifetime_subjugation + subject = scope:attacker + NOT = { + scope:attacker = { + has_character_flag = used_lifetime_subjugation + } + } + } + } + } + } + + allowed_against_character = { + scope:attacker = { + OR = { + AND = { # Kingdom of Heaven Subjugation + has_variable = koh_subjugation_cb_allowed + faith = scope:defender.faith + } + AND = { # Tribal Subjugation + government_has_flag = government_is_tribal + scope:defender = { + government_has_flag = government_is_tribal + } + } + AND = { # Temporal Subjugation + faith ?= { has_doctrine = doctrine_temporal_head } + OR = { + AND = { + faith.religious_head = scope:attacker + scope:defender.faith.religious_head ?= scope:attacker.faith.religious_head + } + AND = { + pam_is_antipope_trigger = yes + rite = scope:defender.rite + } + } + } + AND = { # Indian Subjugation + faith ?= { + has_doctrine = eastern_hostility_doctrine + } + scope:defender.faith ?= { + has_doctrine = eastern_hostility_doctrine + } + } + AND = { + faith.religion = religion:islam_religion + house ?= { + house_head = scope:attacker + has_variable = subjugations_expanded + } + scope:defender.faith.religion = religion:islam_religion + } + } + } + + scope:defender = { + top_liege = this + trigger_if = { + limit = { scope:attacker = { is_ai = no } } # Already pre-filtered by the AI due to ai_only_against_neighbors = yes. any_neighboring_top_liege_realm_owner is expensive + scope:attacker = { + any_neighboring_top_liege_realm_owner = { + this = scope:defender + } + } + } + NOR = { # Can't subjugate Military Orders or Heads of Faith + any_held_title = { + is_holy_order = yes + } + faith.religious_head ?= root + } + } + } + + cost = { + prestige = tribal_subjugation_cb_prestige_cost + piety = { + value = 0 + # Explicit cost when attacking HoF in addition to the impious additions + if = { + limit = { + scope:attacker.faith.religious_head = scope:attacker + scope:defender.faith = scope:attacker.faith + } + add = { + value = 1000 + desc = CB_BASE_COST + } + } + add = common_cb_impious_piety_cost + multiply = common_cb_piety_cost_multiplier + # FP3: caliphal discounts. + ## We have to do this here as we otherwise can't select what the war is. + if = { + limit = { + scope:attacker = { + has_title = title:d_sunni + # We scope directly to the struggle because e_arabia might not actually be _in_ the struggle. + struggle:persian_struggle ?= { has_struggle_phase_parameter = fp3_caliph_gets_cheaper_subjugation_cb } + } + } + multiply = { + value = fp3_caliph_gets_cheaper_subjugation_cb_actual_value + desc = CB_STRUGGLE_PHASE_DISCOUNT + } + } + } + } + + should_invalidate = { + scope:defender = { + top_liege != this + } + } + + on_declaration = { + on_declared_war = yes + scope:attacker = { + add_character_flag = used_lifetime_subjugation + } + } + + on_invalidated_desc = msg_subjugation_war_invalidated_message + + on_invalidated = { + scope:attacker = { + if = { + limit = { + is_alive = yes + } + remove_character_flag = used_lifetime_subjugation # If the war is invalidated, you should be permitted to try again + # Refund their investment. + add_prestige_no_experience = tribal_subjugation_cb_prestige_cost + } + } + } + + on_victory_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender.primary_title.tier < scope:attacker.primary_title.tier } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:attacker = { is_local_player = yes } } + desc = vassalization_cb_victory_desc_attacker + } + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = vassalization_cb_victory_desc_defender + } + desc = vassalization_cb_victory_desc + } + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:attacker = { is_local_player = yes } } + desc = tribal_subjugation_cb_victory_desc_equal_tier_attacker + } + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = tribal_subjugation_cb_victory_desc_equal_tier_defender + } + desc = tribal_subjugation_cb_victory_desc_equal_tier + } + } + } + triggered_desc = { + trigger = { scope:attacker = { is_local_player = yes } } + desc = subjugation_war_warning_desc + } + } + + on_victory = { + scope:attacker = { show_pow_release_message_effect = yes } + + # Legitimacy + add_legitimacy_attacker_victory_effect = yes + + #EP2 accolade glory gain for winning against higher ranked enemy + scope:attacker = { accolade_attacker_war_end_glory_gain_high_effect = yes } + + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + add_claim_on_loss = no + } + + if = { + limit = { + scope:defender.primary_title.tier < scope:attacker.primary_title.tier + } + scope:defender = { + change_liege = { + liege = scope:attacker + change = scope:change + } + } + } + else = { + scope:defender = { + every_held_title = { + if = { + limit = { + tier = scope:defender.primary_title.tier + } + change_title_holder = { + holder = scope:attacker + change = scope:change + } + } + else_if = { + limit = { + OR = { + NOT = { exists = scope:secondary_title } + tier > scope:secondary_title.tier + } + } + save_temporary_scope_as = secondary_title + } + } + } + + scope:defender = { + if = { + limit = { + exists = scope:secondary_title + } + every_vassal = { + limit = { + primary_title.tier >= scope:secondary_title.tier + NOT = { + primary_title.tier = tier_barony + } + } + change_liege = { + liege = scope:attacker + change = scope:change + } + } + } + } + + scope:defender = { + change_liege = { + liege = scope:attacker + change = scope:change + } + } + } + + resolve_title_and_vassal_change = scope:change + + + # Prestige level progress for the attacker + scope:attacker = { + add_prestige_experience = { + value = major_prestige_value + } + } + + # Prestige loss for the defender + scope:defender = { + add_prestige = { + value = major_prestige_value + multiply = -1.0 + } + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:attacker + FAME_BASE = major_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + # Truce + add_truce_attacker_victory_effect = yes + + # FP1: note the victory for future memorialisation via stele (if applicable). + scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + + #Mandalas gain or lose piety/devotion depending on Decree + mandala_war_victory_effects = yes + } + + on_white_peace_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = tribal_subjugation_cb_white_peace_desc_defender + } + desc = tribal_subjugation_cb_white_peace_desc + } + } + + on_white_peace = { + scope:attacker = { show_pow_release_message_effect = yes } + + #EP2 accolade glory gain for doing ok against higher ranked enemy + scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } + scope:defender = { accolade_defender_war_end_glory_gain_med_effect = yes } + + # Prestige loss for the attacker + scope:attacker = { + add_prestige = { + value = medium_prestige_value + multiply = -1.0 + } + stress_and_fulfillment_impact = { + ambitious = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:attacker # Not important as the scales are identical + FAME_BASE = medium_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + scope:defender = { + stress_and_fulfillment_impact = { + arrogant = medium_stress_impact_gain + } + } + + add_truce_white_peace_effect = yes + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + } + + on_defeat_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = tribal_subjugation_cb_white_peace_desc_defender + } + triggered_desc = { + trigger = { + scope:attacker = { + is_local_player = yes + has_targeting_faction = yes + } + } + desc = tribal_subjugation_cb_defeat_desc_attacker + } + desc = tribal_subjugation_cb_white_peace_desc + } + } + + on_defeat = { + scope:attacker = { show_pow_release_message_effect = yes } + + # Legitimacy + add_legitimacy_attacker_defeat_effect = yes + + scope:defender = { + mandala_peacemaker_perk_serenity_effect = yes + #EP2 accolade glory gain for winning against higher ranked enemy + accolade_defender_war_end_glory_gain_high_effect = yes + # Prestige for Defender + add_prestige_war_defender_effect = { + PRESTIGE_VALUE = medium_prestige_value + } + } + + # Prestige loss for the attacker + scope:attacker = { + pay_short_term_gold_reparations_effect = { + GOLD_VALUE = 3 + } + add_prestige = { + value = major_prestige_value + multiply = -1.0 + } + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:defender + FAME_BASE = major_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + scope:attacker = { + save_temporary_scope_as = loser + } + + # Truce + add_truce_attacker_defeat_effect = yes + + on_lost_aggression_war_discontent_loss = yes + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + + #Mandalas gain or lose piety/devotion depending on Decree + mandala_war_defeat_effects = yes + } + + on_primary_attacker_death = inherit + on_primary_defender_death = inherit + + attacker_allies_inherit = yes + defender_allies_inherit = yes + + war_name = "SUBJUGATION_WAR_NAME" + war_name_base = "SUBJUGATION_WAR_NAME_BASE" + cb_name = "SUBJUGATION_CB_NAME" + interface_priority = 59 + + ticking_war_score_targets_entire_realm = yes + max_defender_score_from_occupation = 150 + max_attacker_score_from_occupation = 150 + attacker_ticking_warscore = 0 + attacker_wargoal_percentage = 0.8 + + max_ai_diplo_distance_to_title = 500 + + ai_score_mult = { + value = 1 + multiply = pam_peace_of_god_coreligionist_war_ai_score_value + multiply = zealous_war_on_head_of_faith_ai_score_value + add = frankokratia_leader_protection_value #Set back to 0. Declaring war on the frankokratia leader can really ruin the whole thing + } +} diff --git a/common/casus_belli_types/01_fp1_wars.txt b/common/casus_belli_types/01_fp1_wars.txt new file mode 100644 index 000000000..6438920c2 --- /dev/null +++ b/common/casus_belli_types/01_fp1_wars.txt @@ -0,0 +1,3 @@ +############################### +## Blanked to Prevent Errors ## +############################### \ No newline at end of file diff --git a/common/coat_of_arms/template_lists/coa_templates.txt b/common/coat_of_arms/template_lists/coa_templates.txt index 297c540f3..29f4ac0f1 100644 --- a/common/coat_of_arms/template_lists/coa_templates.txt +++ b/common/coat_of_arms/template_lists/coa_templates.txt @@ -56,18 +56,17 @@ # Pagan catch-all special_selection = { trigger = { - scope:faith.religion = { - save_temporary_scope_as = religion - } - - scope:religion = { is_in_family = rf_pagan } - NOR = { - scope:religion = religion:slavic_religion - scope:religion = religion:baltic_religion - scope:religion = religion:finnic_religion - scope:religion = religion:mediterranean_religion - scope:religion = religion:folk_germanic_religion - scope:religion = religion:zoroastrianism_religion + trigger_if = { + limit = { exists = scope:faith.religion } + scope:faith.religion = { save_temporary_scope_as = religion } + scope:religion = { is_in_family = rf_pagan } + NOR = { + scope:religion = religion:slavic_religion + scope:religion = religion:baltic_religion + scope:religion = religion:finnic_religion +# scope:religion = religion:mediterranean_religion + scope:religion = religion:folk_germanic_religion + scope:religion = religion:zoroastrianism_religion # scope:religion = religion:tengrism_religion # scope:religion = religion:akom_religion # scope:religion = religion:akom_religion @@ -76,7 +75,9 @@ # scope:religion = religion:west_african_bori_religion # scope:religion = religion:west_african_roog_religion # scope:religion = religion:west_african_orisha_religion + } } + trigger_else = { always = no } } 5000 = basic_charge_01 #50000 = basic_charge_02 @@ -84,15 +85,17 @@ # European Paganism - Single, Circle, Senester special_selection = { trigger = { - scope:faith.religion = { - save_temporary_scope_as = religion - } + trigger_if = { + limit = { exists = scope:faith.religion } + scope:faith.religion = { save_temporary_scope_as = religion } OR = { scope:religion = religion:slavic_religion scope:religion = religion:baltic_religion # scope:religion = religion:finnic_religion # scope:religion = religion:mediterranean_religion } + } + trigger_else = { always = no } } # Weights are temps 16000 = basic_pagan_template @@ -111,7 +114,11 @@ # Germanic Paganism special_selection = { trigger = { - scope:faith.religion = religion:folk_germanic_religion + trigger_if = { + limit = { exists = scope:faith.religion } + scope:faith.religion = religion:folk_germanic_religion + } + trigger_else = { always = no } } 5000 = basic_pagan_template 5000 = basic_pagan_template_inverted @@ -170,24 +177,24 @@ # Tamgha users - Circle/Roundel special_selection = { trigger = { - scope:faith.religion = { - save_temporary_scope_as = religion - } - AND = { - OR = { + trigger_if = { + limit = { exists = scope:faith.religion } + scope:faith.religion = { save_temporary_scope_as = religion } + AND = { + OR = { # scope:faith = faith:nestorian # scope:religion = religion:tengrism_religion - scope:religion = religion:zoroastrianism_religion - scope:religion = religion:mediterranean_religion - AND = { - scope:religion = religion:judaism_religion - scope:culture = { has_coa_gfx = turkic_group_coa_gfx } + scope:religion = religion:zoroastrianism_religion +# scope:religion = religion:mediterranean_religion + AND = { + scope:religion = religion:judaism_religion + scope:culture ?= { has_coa_gfx = turkic_group_coa_gfx } + } } - } - NOT = { - government_has_flag = government_is_in_steppe + NOT = { government_has_flag = government_is_in_steppe } } } + trigger_else = { always = no } } 5000 = basic_tamgha_template 5000 = basic_tamgha_template_inverted @@ -200,22 +207,24 @@ special_selection = { trigger = { - scope:faith.religion = { - save_temporary_scope_as = religion - } - AND = { - OR = { + trigger_if = { + limit = { exists = scope:faith.religion } + scope:faith.religion = { save_temporary_scope_as = religion } + AND = { + OR = { # scope:faith = faith:nestorian # scope:religion = religion:tengrism_religion - scope:religion = religion:zoroastrianism_religion - scope:religion = religion:mediterranean_religion - AND = { - scope:religion = religion:judaism_religion - scope:culture = { has_coa_gfx = turkic_group_coa_gfx } + scope:religion = religion:zoroastrianism_religion +# scope:religion = religion:mediterranean_religion + AND = { + scope:religion = religion:judaism_religion + scope:culture ?= { has_coa_gfx = turkic_group_coa_gfx } + } } + government_has_flag = government_is_nomadic } - government_has_flag = government_is_nomadic } + trigger_else = { always = no } } 5000 = triangle_tamgha_template 5000 = triangle_tamgha_template_inverted @@ -223,22 +232,24 @@ special_selection = { trigger = { - scope:faith.religion = { - save_temporary_scope_as = religion - } - AND = { - OR = { + trigger_if = { + limit = { exists = scope:faith.religion } + scope:faith.religion = { save_temporary_scope_as = religion } + AND = { + OR = { # scope:faith = faith:nestorian # scope:religion = religion:tengrism_religion - scope:religion = religion:zoroastrianism_religion - scope:religion = religion:mediterranean_religion - AND = { - scope:religion = religion:judaism_religion - scope:culture = { has_coa_gfx = turkic_group_coa_gfx } + scope:religion = religion:zoroastrianism_religion +# scope:religion = religion:mediterranean_religion + AND = { + scope:religion = religion:judaism_religion + scope:culture ?= { has_coa_gfx = turkic_group_coa_gfx } + } } + government_has_flag = government_is_herder } - government_has_flag = government_is_herder } + trigger_else = { always = no } } 5000 = basic_tamgha_herder_template 5000 = basic_tamgha_herder_template_inverted @@ -260,7 +271,7 @@ special_selection = { trigger = { OR = { scope:faith.religion = religion:eastern_orthodox_religion scope:faith.religion = religion:catholic_religion scope:faith.religion = religion:protestant_religion } - scope:culture = { has_coa_gfx = western_coa_gfx } + scope:culture ?= { has_coa_gfx = western_coa_gfx } } # A (main = charge) # Rougly 50% of all cases, 50% of it being from bestiary, 50% of said bestiary being lions. @@ -335,7 +346,7 @@ special_selection = { trigger = { OR = { scope:faith.religion = religion:eastern_orthodox_religion scope:faith.religion = religion:catholic_religion scope:faith.religion = religion:protestant_religion } - scope:culture = { has_coa_gfx = iberian_group_coa_gfx } + scope:culture ?= { has_coa_gfx = iberian_group_coa_gfx } } 1000 = hr_five_charges_template 1000 = hr_five_charges_template_inverted @@ -343,7 +354,7 @@ special_selection = { trigger = { OR = { scope:faith.religion = religion:eastern_orthodox_religion scope:faith.religion = religion:catholic_religion scope:faith.religion = religion:protestant_religion } - scope:culture = { has_coa_gfx = german_group_coa_gfx } + scope:culture ?= { has_coa_gfx = german_group_coa_gfx } } 500 = hr_single_charge_on_mount_template 500 = hr_single_charge_on_mount_template_inverted @@ -396,7 +407,7 @@ special_selection = { trigger = { OR = { scope:faith.religion = religion:eastern_orthodox_religion scope:faith.religion = religion:catholic_religion scope:faith.religion = religion:protestant_religion } - scope:culture = { has_coa_gfx = polish_coa_gfx } + scope:culture ?= { has_coa_gfx = polish_coa_gfx } } 2500 = hr_single_charge_template 2500 = hr_single_charge_template_inverted @@ -404,7 +415,7 @@ special_selection = { trigger = { OR = { scope:faith.religion = religion:eastern_orthodox_religion scope:faith.religion = religion:catholic_religion scope:faith.religion = religion:protestant_religion } - scope:culture = { + scope:culture ?= { OR = { has_coa_gfx = west_slavic_group_coa_gfx has_coa_gfx = south_slavic_group_coa_gfx @@ -437,7 +448,7 @@ special_selection = { trigger = { scope:faith.religion = religion:islam_religion - scope:culture = { + scope:culture ?= { OR = { has_coa_gfx = arabic_group_coa_gfx has_coa_gfx = berber_group_coa_gfx @@ -471,7 +482,7 @@ special_selection = { trigger = { - scope:culture = { has_coa_gfx = byzantine_group_coa_gfx } + scope:culture ?= { has_coa_gfx = byzantine_group_coa_gfx } } 500 = byzantine_circled_single_symbol 500 = byzantine_circled_single_symbol_inverted @@ -493,7 +504,7 @@ special_selection = { trigger = { - scope:culture = { has_coa_gfx = japanese_coa_gfx } + scope:culture ?= { has_coa_gfx = japanese_coa_gfx } } ### Radial Three @@ -630,7 +641,7 @@ special_selection = { trigger = { - scope:culture = { has_coa_gfx = chinese_group_coa_gfx } + scope:culture ?= { has_coa_gfx = chinese_group_coa_gfx } } 1 = chinese_seal_pictorial @@ -677,7 +688,7 @@ special_selection = { trigger = { - scope:culture = { has_coa_gfx = burman_group_coa_gfx } + scope:culture ?= { has_coa_gfx = burman_group_coa_gfx } } 1000 = khmer_central 1000 = khmer_central_inverted diff --git a/common/coat_of_arms/template_lists/color_lists.txt b/common/coat_of_arms/template_lists/color_lists.txt new file mode 100644 index 000000000..02fe2a3f4 --- /dev/null +++ b/common/coat_of_arms/template_lists/color_lists.txt @@ -0,0 +1,329 @@ +color_lists = { + all_color_list = { # PM : basically the average of medieval frequencies in roll of arms (strong bias towards 13th c), with values cut in half + 30 = "red" + 12 = "blue" + 1 = "green" + 14 = "black" + 0 = "purple" + 24 = "yellow" + 26 = "white" + } + + normal_colors = { + 30 = "red" + 12 = "blue" + 1 = "green" + 14 = "black" + 0 = "purple" + special_selection = { + trigger = { + coa_breton_trigger = yes + } + 25 = "red" + 13 = "blue" + 5 = "black" + 5 = "green" + } + special_selection = { + trigger = { + coa_byzantine_trigger = yes + } + 20 = "red" + 8 = "blue" + 7 = "black" + 9 = "green" + } + special_selection = { + trigger = { + scope:culture ?= { has_coa_gfx = latin_group_coa_gfx } + } + 20 = "red" + 8 = "blue" + 7 = "black" + 9 = "green" + } + special_selection = { + trigger = { + scope:culture ?= { + OR = { + has_coa_gfx = anglo_saxon_coa_gfx + has_coa_gfx = welsh_coa_gfx + } + } + } + 20 = "red" + 8 = "blue" + 16 = "black" + 9 = "green" + } + special_selection = { + trigger = { + coa_french_trigger = yes + } + 30 = "red" + 9 = "blue" + 6 = "black" + 2 = "green" + } + special_selection = { + trigger = { + scope:culture ?= { has_coa_gfx = occitan_coa_gfx } + } + 12 = "red" + 28 = "blue" + 1 = "black" + 3 = "green" + } + special_selection = { + trigger = { # PM : This can be split into South & North as there are stats for both + scope:culture ?= { + has_coa_gfx = german_group_coa_gfx + NOT = { has_coa_gfx = frisian_coa_gfx } + } + } + 27 = "red" + 10 = "blue" + 18 = "black" + 1 = "green" + } + special_selection = { + trigger = { + scope:culture ?= { + OR = { + has_coa_gfx = norse_coa_gfx + has_coa_gfx = norwegian_coa_gfx + has_coa_gfx = swedish_coa_gfx + has_coa_gfx = danish_coa_gfx + } + } + } + 13 = "red" + 22 = "blue" + 11 = "black" + 1 = "green" + } + special_selection = { + trigger = { + scope:culture ?= { + OR = { + has_coa_gfx = english_coa_gfx + has_coa_gfx = scottish_coa_gfx + } + } + } + 26 = "red" + 18 = "blue" + 9 = "black" + 1 = "green" + } + special_selection = { + trigger = { + scope:culture ?= { has_coa_gfx = frisian_coa_gfx } + } + 31 = "red" + 4 = "blue" + 14 = "black" + 2 = "green" + } + special_selection = { + trigger = { + scope:culture ?= { has_coa_gfx = norman_coa_gfx } + } + 34 = "red" + 11 = "blue" + 3 = "black" + 5 = "green" + } + special_selection = { + trigger = { + scope:culture ?= { has_coa_gfx = iberian_group_coa_gfx } + } + 38 = "red" + 3 = "blue" + 20 = "black" + } + special_selection = { + trigger = { + scope:culture ?= { + OR = { + has_coa_gfx = magyar_group_coa_gfx + has_coa_gfx = west_slavic_group_coa_gfx + } + } + } + 34 = "red" + 8 = "blue" + 13 = "black" + } + special_selection = { + trigger = { + coa_african_culture_trigger = yes + } + 30 = "green" + 30 = "black" + } + special_selection = { + trigger = { + coa_mena_trigger = yes + } + 18 = "blue" + 6 = "black" + 29 = "green" + } + special_selection = { + trigger = { + coa_irish_trigger = yes + } + 10 = "green" + } + special_selection = { + trigger = { + coa_leonese_trigger = yes + } + 10 = "purple" + } + special_selection = { + trigger = { + coa_polish_trigger = yes + } + 20 = "red" + } + special_selection = { + trigger = { + coa_indian_trigger = yes + } + 1000 = "red" + 1000 = "orange" + 1000 = "blue" + 1000 = "black" + 1000 = "purple" + 1000 = "green" + } + } + + metal_colors = { + 24 = "yellow" + 26 = "white" + special_selection = { + trigger = { + coa_indian_trigger = yes + } + 10 = "white" + } + special_selection = { + trigger = { + coa_polish_trigger = yes + } + 5 = "white" + } + special_selection = { + trigger = { + coa_breton_trigger = yes + } + 26 = "yellow" + 24 = "white" + } + special_selection = { + trigger = { + scope:culture ?= { has_coa_gfx = welsh_coa_gfx } + } + 16 = "yellow" + 34 = "white" + } + special_selection = { + trigger = { + coa_french_trigger = yes + } + 26 = "yellow" + 24 = "white" + } + special_selection = { + trigger = { + scope:culture ?= { has_coa_gfx = occitan_coa_gfx } + } + 31 = "yellow" + 19 = "white" + } + special_selection = { + trigger = { + scope:culture ?= { + has_coa_gfx = german_group_coa_gfx + NOT = { has_coa_gfx = frisian_coa_gfx } + } + } + 14 = "yellow" + 29 = "white" + } + special_selection = { + trigger = { + scope:culture ?= { + OR = { + has_coa_gfx = danish_coa_gfx + has_coa_gfx = norwegian_coa_gfx + has_coa_gfx = swedish_coa_gfx + } + } + } + 8 = "yellow" + 40 = "white" + } + special_selection = { + trigger = { + scope:culture ?= { + OR = { + has_coa_gfx = english_coa_gfx + has_coa_gfx = scottish_coa_gfx + } + } + } + 15 = "yellow" + 26 = "white" + } + special_selection = { + trigger = { + scope:culture ?= { has_coa_gfx = frisian_coa_gfx } + } + 20 = "yellow" + 26 = "white" + } + special_selection = { + trigger = { + scope:culture ?= { has_coa_gfx = norman_coa_gfx } + } + 20 = "yellow" + 16 = "white" + } + special_selection = { + trigger = { + scope:culture ?= { has_coa_gfx = iberian_group_coa_gfx } + } + 37 = "yellow" + 8 = "white" + } + special_selection = { + trigger = { + scope:culture ?= { + OR = { + has_coa_gfx = magyar_group_coa_gfx + has_coa_gfx = west_slavic_group_coa_gfx + } + } + } + 15 = "yellow" + 28 = "white" + } + special_selection = { + trigger = { + coa_mena_trigger = yes + } + 9 = "yellow" + 40 = "white" + } + special_selection = { + trigger = { + coa_african_culture_trigger = yes + } + 15 = "yellow" + } + } +} \ No newline at end of file diff --git a/common/coat_of_arms/template_lists/colored_emblem_lists.txt b/common/coat_of_arms/template_lists/colored_emblem_lists.txt index 582b4c681..32ef14c65 100644 --- a/common/coat_of_arms/template_lists/colored_emblem_lists.txt +++ b/common/coat_of_arms/template_lists/colored_emblem_lists.txt @@ -1,4 +1,4 @@ -colored_emblem_texture_lists = { +colored_emblem_texture_lists = { charge = { 10 = "ce_anchor.dds" @@ -196,7 +196,11 @@ colored_emblem_texture_lists = { # Christian special_selection = { trigger = { - OR = { scope:faith.religion = religion:eastern_orthodox_religion scope:faith.religion = religion:catholic_religion scope:faith.religion = religion:protestant_religion } + trigger_if = { + limit = { exists = scope:faith.religion } + OR = { scope:faith.religion = religion:eastern_orthodox_religion scope:faith.religion = religion:catholic_religion scope:faith.religion = religion:protestant_religion } + } + trigger_else = { always = no } } 10 = "ce_chi_rho.dds" 1 = "ce_crown_papal.dds" @@ -239,7 +243,11 @@ colored_emblem_texture_lists = { # Tribal/Pagan special_selection = { trigger = { - scope:faith.religion = { is_in_family = rf_pagan } + trigger_if = { + limit = { exists = scope:faith.religion } + scope:faith.religion = { is_in_family = rf_pagan } + } + trigger_else = { always = no } } 100 = "ce_star_07.dds" 100 = "ce_cross_auskelis.dds" @@ -349,7 +357,7 @@ colored_emblem_texture_lists = { # Iberian cross special_selection = { trigger = { - scope:culture = { has_coa_gfx = iberian_group_coa_gfx } + scope:culture ?= { has_coa_gfx = iberian_group_coa_gfx } coa_cross_trigger = yes } 50 = "ce_cross_alcantara.dds" @@ -376,7 +384,7 @@ colored_emblem_texture_lists = { special_selection = { trigger = { government_has_flag = government_is_feudal - culture = { + culture ?= { has_cultural_era_or_later = culture_era_late_medieval } } @@ -386,7 +394,11 @@ colored_emblem_texture_lists = { # Islamic special_selection = { trigger = { - scope:faith.religion = religion:islam_religion + trigger_if = { + limit = { exists = scope:faith.religion } + scope:faith.religion = religion:islam_religion + } + trigger_else = { always = no } } 50 = "ce_arabic_allah.dds" 50 = "ce_arabic_basmala_kufic.dds" @@ -396,7 +408,11 @@ colored_emblem_texture_lists = { # Norse special_selection = { trigger = { - scope:faith.religion = religion:folk_germanic_religion + trigger_if = { + limit = { exists = scope:faith.religion } + scope:faith.religion = religion:folk_germanic_religion + } + trigger_else = { always = no } coa_norse_trigger = yes } 100 = "ce_attire.dds" @@ -435,7 +451,7 @@ colored_emblem_texture_lists = { # Norse special_selection = { trigger = { - scope:culture = { + scope:culture ?= { OR = { has_coa_gfx = norse_coa_gfx has_coa_gfx = norwegian_coa_gfx @@ -450,7 +466,7 @@ colored_emblem_texture_lists = { # Persian special_selection = { trigger = { - scope:culture = { has_coa_gfx = iranian_group_coa_gfx } + scope:culture ?= { has_coa_gfx = iranian_group_coa_gfx } } 100 = "ce_lion_passant_sword.dds" 100 = "ce_simurgh.dds" @@ -896,132 +912,132 @@ colored_emblem_texture_lists = { religion_icons = { 1 = ce_star_08.dds # fallback - special_selection = { trigger = { scope:faith = { has_icon = "akanism" } } 10000000 = "ce_religion_akanism.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "akanism_reformed" } } 10000000 = "ce_religion_akanism.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "ari_buddhism" } } 10000000 = "ce_religion_buddhism_generic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "armenian" } } 10000000 = "ce_religion_christianity_nestorian.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "ashari" } } 10000000 = "ce_religion_islam_generic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "azariqa" } } 10000000 = "ce_religion_islam_iibadi.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "baltic" } } 10000000 = "ce_religion_pagan_romuva.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "baltic_custom" } } 10000000 = "ce_religion_pagan_romuva.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "baltic_reformed" } } 10000000 = "ce_religion_pagan_romuva.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "bon" } } 10000000 = "ce_religion_bon.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "buddhism" } } 10000000 = "ce_religion_buddhism_generic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "buddhism_custom" } } 10000000 = "ce_religion_buddhism_generic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "catholic" } } 10000000 = "ce_religion_christianity_catholic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "catholic_custom" } } 10000000 = "ce_religion_christianity_catholic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "christianity_armenian" } } 10000000 = "ce_religion_armenian.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "christianity_bogomilist" } } 10000000 = "ce_religion_bogomilist.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "christianity_cathar" } } 10000000 = "ce_religion_cathar.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "christianity_iconoclasm" } } 10000000 = "ce_religion_iconoclasm.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "christianity_lollard" } } 10000000 = "ce_religion_lollard.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "christianity_messalian" } } 10000000 = "ce_religion_messalian.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "christianity_paulicanism" } } 10000000 = "ce_religion_paulicanism.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "christianity_waldensian" } } 10000000 = "ce_religion_waldensian.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "coptic" } } 10000000 = "ce_religion_christianity_coptic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "coptic_custom" } } 10000000 = "ce_religion_christianity_coptic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "custom_faith_1" } } 10000000 = "ce_religion_custom_faith_1.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "custom_faith_2" } } 10000000 = "ce_religion_custom_faith_2.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "custom_faith_3" } } 10000000 = "ce_religion_custom_faith_3.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "custom_faith_4" } } 10000000 = "ce_religion_islam_ismailism.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "custom_faith_5" } } 10000000 = "ce_religion_custom_faith_5.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "custom_faith_6" } } 10000000 = "ce_religion_custom_faith_6.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "custom_faith_7" } } 10000000 = "ce_religion_custom_faith_7.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "custom_faith_8" } } 10000000 = "ce_religion_custom_faith_8.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "custom_faith_9" } } 10000000 = "ce_religion_custom_faith_9.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "custom_faith_10" } } 10000000 = "ce_religion_custom_faith_10.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "default" } } 10000000 = "ce_religion_pagan_generic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "default_custom" } } 10000000 = "ce_religion_pagan_generic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "donyipoloism" } } 10000000 = "ce_religion_pagan_zunist.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "dualism" } } 10000000 = "ce_religion_dualism.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "ari_buddhism" } } 10000000 = "ce_religion_buddhism_generic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "finno_ugric" } } 10000000 = "ce_religion_pagan_suomenusko.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "finno_ugric_custom" } } 10000000 = "ce_religion_pagan_suomenusko.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "finno_ugric_reformed" } } 10000000 = "ce_religion_pagan_suomenusko.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "germanic" } } 10000000 = "ce_religion_pagan_germanic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "germanic_custom" } } 10000000 = "ce_religion_pagan_germanic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "germanic_reformed" } } 10000000 = "ce_religion_pagan_germanic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "ghulat" } } 10000000 = "ce_religion_islam_asharism.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "hellenic" } } 10000000 = "ce_religion_pagan_hellenic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "hellenic_custom" } } 10000000 = "ce_religion_pagan_hellenic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "hellenic_reformed" } } 10000000 = "ce_religion_pagan_hellenic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "hinduism" } } 10000000 = "ce_religion_hinduism_generic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "hinduism_custom" } } 10000000 = "ce_religion_hinduism_generic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "iamaism_buddhism" } } 10000000 = "ce_religion_buddhism_generic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "ibadi" } } 10000000 = "ce_religion_islam_iibadi.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "ibadi_custom" } } 10000000 = "ce_religion_islam_asharism.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "icon_religion_catholicism" } } 10000000 = "ce_religion_christianity_catholic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "imami" } } 10000000 = "ce_religion_islam_asharism.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "islam_druze" } } 10000000 = "ce_religion_druze.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "jainism" } } 10000000 = "ce_religion_jain_generic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "jainism_custom" } } 10000000 = "ce_religion_jain_generic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "judaism" } } 10000000 = "ce_religion_judaism_generic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "judaism_custom" } } 10000000 = "ce_religion_judaism_generic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "kushism" } } 10000000 = "ce_religion_kushism.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "kushism_reformed" } } 10000000 = "ce_religion_kushism.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "lamaism_buddhism" } } 10000000 = "ce_religion_buddhism_generic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "manichean" } } 10000000 = "ce_religion_manichean.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "masmudi" } } 10000000 = "ce_religion_islam_iibadi.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "maturidi" } } 10000000 = "ce_religion_islam_generic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "melieism" } } 10000000 = "ce_religion_melieism.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "miaphysite" } } 10000000 = "ce_religion_christianity_coptic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "muhakkima" } } 10000000 = "ce_religion_islam_iibadi.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "muhakkima_1" } } 10000000 = "ce_religion_islam_iibadi.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "muhakkima_2" } } 10000000 = "ce_religion_islam_iibadi.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "muhakkima_3" } } 10000000 = "ce_religion_islam_iibadi.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "muhakkima_4" } } 10000000 = "ce_religion_islam_iibadi.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "muhakkima_5" } } 10000000 = "ce_religion_islam_iibadi.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "muhakkima_6" } } 10000000 = "ce_religion_islam_iibadi.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "mutazila" } } 10000000 = "ce_religion_islam_generic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "muwalladi" } } 10000000 = "ce_religion_islam_generic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "nadjat" } } 10000000 = "ce_religion_islam_iibadi.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "nestorian" } } 10000000 = "ce_religion_christianity_nestorian.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "nestorian_custom" } } 10000000 = "ce_religion_christianity_nestorian.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "orthodox" } } 10000000 = "ce_religion_christianity_orthodox.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "orthodox_custom" } } 10000000 = "ce_religion_christianity_orthodox.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "pagan" } } 10000000 = "ce_religion_pagan_generic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "pagan_default" } } 10000000 = "ce_religion_pagan_generic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "pagan_magyar" } } 10000000 = "ce_religion_magyar.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "pagan_reformed" } } 10000000 = "ce_religion_pagan_generic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "quranism" } } 10000000 = "ce_religion_islam_iibadi.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "rrmeaism" } } 10000000 = "ce_religion_rrmeaism.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "sedism" } } 10000000 = "ce_religion_sedism.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "shia" } } 10000000 = "ce_religion_islam_asharism.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "shia_custom" } } 10000000 = "ce_religion_islam_generic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "slavic" } } 10000000 = "ce_religion_pagan_slavic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "slavic_custom" } } 10000000 = "ce_religion_pagan_slavic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "slavic_reformed" } } 10000000 = "ce_religion_pagan_slavic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "spirit_bon" } } 10000000 = "ce_religion_bon.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "sufri" } } 10000000 = "ce_religion_islam_generic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "sunni" } } 10000000 = "ce_religion_islam_generic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "sunni_custom" } } 10000000 = "ce_religion_islam_generic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "taoism" } } 10000000 = "ce_religion_taoism.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "tengri" } } 10000000 = "ce_religion_pagan_tengri.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "tengri_custom" } } 10000000 = "ce_religion_pagan_tengri.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "tengri_reformed" } } 10000000 = "ce_religion_pagan_tengri.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "unselected" } } 10000000 = "ce_religion_christianity_catholic.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "mande" } } 10000000 = "ce_religion_vodun.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "waaqism" } } 10000000 = "ce_religion_waaqism.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "waaqism_reformed" } } 10000000 = "ce_religion_waaqism.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "west_african" } } 10000000 = "ce_religion_pagan_westafrican.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "west_african_bori" } } 10000000 = "ce_religion_west_african_bori.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "west_african_bori_reformed" } } 10000000 = "ce_religion_west_african_bori.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "west_african_custom" } } 10000000 = "ce_religion_pagan_westafrican.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "west_african_dogon" } } 10000000 = "ce_religion_west_african_bori.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "west_african_reformed" } } 10000000 = "ce_religion_pagan_westafrican.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "west_african_roog_sene" } } 10000000 = "ce_religion_african_roog_sene.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "west_african_roog_sene_reformed" } } 10000000 = "ce_religion_african_roog_sene.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "yazidism" } } 10000000 = "ce_religion_yazidism.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "yoruba" } } 10000000 = "ce_religion_yoruba.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "zoroastrian" } } 10000000 = "ce_religion_zoroastrianism_generic_faravahar.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "zoroastrian_custom" } } 10000000 = "ce_religion_zoroastrianism_generic_faravahar.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "zunist" } } 10000000 = "ce_religion_pagan_zunist.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "zunist_custom" } } 10000000 = "ce_religion_pagan_zunist.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "zunist_reformed" } } 10000000 = "ce_religion_pagan_zunist.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "akanism" } } 10000000 = "ce_religion_akanism.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "akanism_reformed" } } 10000000 = "ce_religion_akanism.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "ari_buddhism" } } 10000000 = "ce_religion_buddhism_generic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "armenian" } } 10000000 = "ce_religion_christianity_nestorian.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "ashari" } } 10000000 = "ce_religion_islam_generic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "azariqa" } } 10000000 = "ce_religion_islam_iibadi.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "baltic" } } 10000000 = "ce_religion_pagan_romuva.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "baltic_custom" } } 10000000 = "ce_religion_pagan_romuva.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "baltic_reformed" } } 10000000 = "ce_religion_pagan_romuva.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "bon" } } 10000000 = "ce_religion_bon.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "buddhism" } } 10000000 = "ce_religion_buddhism_generic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "buddhism_custom" } } 10000000 = "ce_religion_buddhism_generic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "catholic" } } 10000000 = "ce_religion_christianity_catholic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "catholic_custom" } } 10000000 = "ce_religion_christianity_catholic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "christianity_armenian" } } 10000000 = "ce_religion_armenian.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "christianity_bogomilist" } } 10000000 = "ce_religion_bogomilist.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "christianity_cathar" } } 10000000 = "ce_religion_cathar.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "christianity_iconoclasm" } } 10000000 = "ce_religion_iconoclasm.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "christianity_lollard" } } 10000000 = "ce_religion_lollard.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "christianity_messalian" } } 10000000 = "ce_religion_messalian.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "christianity_paulicanism" } } 10000000 = "ce_religion_paulicanism.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "christianity_waldensian" } } 10000000 = "ce_religion_waldensian.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "coptic" } } 10000000 = "ce_religion_christianity_coptic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "coptic_custom" } } 10000000 = "ce_religion_christianity_coptic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "custom_faith_1" } } 10000000 = "ce_religion_custom_faith_1.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "custom_faith_2" } } 10000000 = "ce_religion_custom_faith_2.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "custom_faith_3" } } 10000000 = "ce_religion_custom_faith_3.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "custom_faith_4" } } 10000000 = "ce_religion_islam_ismailism.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "custom_faith_5" } } 10000000 = "ce_religion_custom_faith_5.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "custom_faith_6" } } 10000000 = "ce_religion_custom_faith_6.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "custom_faith_7" } } 10000000 = "ce_religion_custom_faith_7.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "custom_faith_8" } } 10000000 = "ce_religion_custom_faith_8.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "custom_faith_9" } } 10000000 = "ce_religion_custom_faith_9.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "custom_faith_10" } } 10000000 = "ce_religion_custom_faith_10.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "default" } } 10000000 = "ce_religion_pagan_generic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "default_custom" } } 10000000 = "ce_religion_pagan_generic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "donyipoloism" } } 10000000 = "ce_religion_pagan_zunist.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "dualism" } } 10000000 = "ce_religion_dualism.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "ari_buddhism" } } 10000000 = "ce_religion_buddhism_generic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "finno_ugric" } } 10000000 = "ce_religion_pagan_suomenusko.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "finno_ugric_custom" } } 10000000 = "ce_religion_pagan_suomenusko.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "finno_ugric_reformed" } } 10000000 = "ce_religion_pagan_suomenusko.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "germanic" } } 10000000 = "ce_religion_pagan_germanic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "germanic_custom" } } 10000000 = "ce_religion_pagan_germanic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "germanic_reformed" } } 10000000 = "ce_religion_pagan_germanic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "ghulat" } } 10000000 = "ce_religion_islam_asharism.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "hellenic" } } 10000000 = "ce_religion_pagan_hellenic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "hellenic_custom" } } 10000000 = "ce_religion_pagan_hellenic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "hellenic_reformed" } } 10000000 = "ce_religion_pagan_hellenic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "hinduism" } } 10000000 = "ce_religion_hinduism_generic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "hinduism_custom" } } 10000000 = "ce_religion_hinduism_generic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "iamaism_buddhism" } } 10000000 = "ce_religion_buddhism_generic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "ibadi" } } 10000000 = "ce_religion_islam_iibadi.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "ibadi_custom" } } 10000000 = "ce_religion_islam_asharism.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "icon_religion_catholicism" } } 10000000 = "ce_religion_christianity_catholic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "imami" } } 10000000 = "ce_religion_islam_asharism.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "islam_druze" } } 10000000 = "ce_religion_druze.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "jainism" } } 10000000 = "ce_religion_jain_generic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "jainism_custom" } } 10000000 = "ce_religion_jain_generic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "judaism" } } 10000000 = "ce_religion_judaism_generic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "judaism_custom" } } 10000000 = "ce_religion_judaism_generic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "kushism" } } 10000000 = "ce_religion_kushism.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "kushism_reformed" } } 10000000 = "ce_religion_kushism.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "lamaism_buddhism" } } 10000000 = "ce_religion_buddhism_generic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "manichean" } } 10000000 = "ce_religion_manichean.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "masmudi" } } 10000000 = "ce_religion_islam_iibadi.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "maturidi" } } 10000000 = "ce_religion_islam_generic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "melieism" } } 10000000 = "ce_religion_melieism.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "miaphysite" } } 10000000 = "ce_religion_christianity_coptic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "muhakkima" } } 10000000 = "ce_religion_islam_iibadi.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "muhakkima_1" } } 10000000 = "ce_religion_islam_iibadi.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "muhakkima_2" } } 10000000 = "ce_religion_islam_iibadi.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "muhakkima_3" } } 10000000 = "ce_religion_islam_iibadi.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "muhakkima_4" } } 10000000 = "ce_religion_islam_iibadi.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "muhakkima_5" } } 10000000 = "ce_religion_islam_iibadi.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "muhakkima_6" } } 10000000 = "ce_religion_islam_iibadi.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "mutazila" } } 10000000 = "ce_religion_islam_generic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "muwalladi" } } 10000000 = "ce_religion_islam_generic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "nadjat" } } 10000000 = "ce_religion_islam_iibadi.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "nestorian" } } 10000000 = "ce_religion_christianity_nestorian.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "nestorian_custom" } } 10000000 = "ce_religion_christianity_nestorian.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "orthodox" } } 10000000 = "ce_religion_christianity_orthodox.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "orthodox_custom" } } 10000000 = "ce_religion_christianity_orthodox.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "pagan" } } 10000000 = "ce_religion_pagan_generic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "pagan_default" } } 10000000 = "ce_religion_pagan_generic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "pagan_magyar" } } 10000000 = "ce_religion_magyar.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "pagan_reformed" } } 10000000 = "ce_religion_pagan_generic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "quranism" } } 10000000 = "ce_religion_islam_iibadi.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "rrmeaism" } } 10000000 = "ce_religion_rrmeaism.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "sedism" } } 10000000 = "ce_religion_sedism.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "shia" } } 10000000 = "ce_religion_islam_asharism.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "shia_custom" } } 10000000 = "ce_religion_islam_generic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "slavic" } } 10000000 = "ce_religion_pagan_slavic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "slavic_custom" } } 10000000 = "ce_religion_pagan_slavic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "slavic_reformed" } } 10000000 = "ce_religion_pagan_slavic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "spirit_bon" } } 10000000 = "ce_religion_bon.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "sufri" } } 10000000 = "ce_religion_islam_generic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "sunni" } } 10000000 = "ce_religion_islam_generic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "sunni_custom" } } 10000000 = "ce_religion_islam_generic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "taoism" } } 10000000 = "ce_religion_taoism.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "tengri" } } 10000000 = "ce_religion_pagan_tengri.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "tengri_custom" } } 10000000 = "ce_religion_pagan_tengri.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "tengri_reformed" } } 10000000 = "ce_religion_pagan_tengri.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "unselected" } } 10000000 = "ce_religion_christianity_catholic.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "mande" } } 10000000 = "ce_religion_vodun.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "waaqism" } } 10000000 = "ce_religion_waaqism.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "waaqism_reformed" } } 10000000 = "ce_religion_waaqism.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "west_african" } } 10000000 = "ce_religion_pagan_westafrican.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "west_african_bori" } } 10000000 = "ce_religion_west_african_bori.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "west_african_bori_reformed" } } 10000000 = "ce_religion_west_african_bori.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "west_african_custom" } } 10000000 = "ce_religion_pagan_westafrican.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "west_african_dogon" } } 10000000 = "ce_religion_west_african_bori.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "west_african_reformed" } } 10000000 = "ce_religion_pagan_westafrican.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "west_african_roog_sene" } } 10000000 = "ce_religion_african_roog_sene.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "west_african_roog_sene_reformed" } } 10000000 = "ce_religion_african_roog_sene.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "yazidism" } } 10000000 = "ce_religion_yazidism.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "yoruba" } } 10000000 = "ce_religion_yoruba.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "zoroastrian" } } 10000000 = "ce_religion_zoroastrianism_generic_faravahar.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "zoroastrian_custom" } } 10000000 = "ce_religion_zoroastrianism_generic_faravahar.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "zunist" } } 10000000 = "ce_religion_pagan_zunist.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "zunist_custom" } } 10000000 = "ce_religion_pagan_zunist.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "zunist_reformed" } } 10000000 = "ce_religion_pagan_zunist.dds" } - special_selection = { trigger = { scope:faith = { main_rite = { rite_has_doctrine = muhammad_succession_sunni_doctrine } } } 50000 = "ce_religion_islam_generic.dds" } - special_selection = { trigger = { scope:faith = { main_rite = { rite_has_doctrine = muhammad_succession_shia_doctrine } } } 50000 = "ce_religion_islam_asharism.dds" } - special_selection = { trigger = { scope:faith = { main_rite = { rite_has_doctrine = muhammad_succession_muhakkima_doctrine } } } 50000 = "ce_religion_islam_iibadi.dds" } + special_selection = { trigger = { scope:faith ?= { main_rite ?= { rite_has_doctrine = muhammad_succession_sunni_doctrine } } } 50000 = "ce_religion_islam_generic.dds" } + special_selection = { trigger = { scope:faith ?= { main_rite ?= { rite_has_doctrine = muhammad_succession_shia_doctrine } } } 50000 = "ce_religion_islam_asharism.dds" } + special_selection = { trigger = { scope:faith ?= { main_rite ?= { rite_has_doctrine = muhammad_succession_muhakkima_doctrine } } } 50000 = "ce_religion_islam_iibadi.dds" } } # Symbol pools for the religious_title generator (dynamic holy orders & head of faith titles), one per religion family @@ -1048,20 +1064,20 @@ colored_emblem_texture_lists = { 100 = "ce_cross_potent.dds" 100 = "ce_crosslet_fitchy.dds" - special_selection = { trigger = { scope:faith = { has_icon = "christian_faith" } } 100 = "ce_religion_christianity_generic.dds" 100 = "ce_chi_rho.dds" 100 = "ce_cross_greek.dds" 100 = "ce_keys_crossed.dds" } - special_selection = { trigger = { scope:faith = { OR = { has_icon = "catholic" has_icon = "catholic_custom" has_icon = "icon_religion_catholicism" } } } 100 = "ce_religion_christianity_catholic.dds" 100 = "ce_keys_crossed.dds" } - special_selection = { trigger = { scope:faith = { OR = { has_icon = "orthodox" has_icon = "orthodox_custom" } } } 100 = "ce_religion_christianity_orthodox.dds" 100 = "ce_cross_patriarchal.dds" 100 = "ce_chi_rho.dds" 100 = "ce_cross_greek.dds" } - special_selection = { trigger = { scope:faith = { OR = { has_icon = "miaphysite" has_icon = "coptic" has_icon = "coptic_custom" } } } 100 = "ce_religion_christianity_coptic.dds" 100 = "ce_cross_coptic.dds" } - special_selection = { trigger = { scope:faith = { OR = { has_icon = "nestorian" has_icon = "nestorian_custom" } } } 100 = "ce_religion_christianity_nestorian.dds" 100 = "ce_nestorian_cross.dds" 100 = "ce_nestorian_cross_birds.dds" 100 = "ce_nestorian_cross_lotus.dds" } - special_selection = { trigger = { scope:faith = { OR = { has_icon = "armenian" has_icon = "christianity_armenian" } } } 100 = "ce_religion_armenian.dds" 100 = "ce_cross_armenian.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "christianity_cathar" } } 100 = "ce_religion_cathar.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "christianity_waldensian" } } 100 = "ce_religion_waldensian.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "christianity_lollard" } } 100 = "ce_religion_lollard.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "christianity_iconoclasm" } } 100 = "ce_religion_iconoclasm.dds" 100 = "ce_cross_greek.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "christianity_bogomilist" } } 100 = "ce_religion_bogomilist.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "christianity_paulicanism" } } 100 = "ce_religion_paulicanism.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "christianity_messalian" } } 100 = "ce_religion_messalian.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "christianity_chalice_01" } } 100 = "ce_chalice_01.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "christian_faith" } } 100 = "ce_religion_christianity_generic.dds" 100 = "ce_chi_rho.dds" 100 = "ce_cross_greek.dds" 100 = "ce_keys_crossed.dds" } + special_selection = { trigger = { scope:faith ?= { OR = { has_icon = "catholic" has_icon = "catholic_custom" has_icon = "icon_religion_catholicism" } } } 100 = "ce_religion_christianity_catholic.dds" 100 = "ce_keys_crossed.dds" } + special_selection = { trigger = { scope:faith ?= { OR = { has_icon = "orthodox" has_icon = "orthodox_custom" } } } 100 = "ce_religion_christianity_orthodox.dds" 100 = "ce_cross_patriarchal.dds" 100 = "ce_chi_rho.dds" 100 = "ce_cross_greek.dds" } + special_selection = { trigger = { scope:faith ?= { OR = { has_icon = "miaphysite" has_icon = "coptic" has_icon = "coptic_custom" } } } 100 = "ce_religion_christianity_coptic.dds" 100 = "ce_cross_coptic.dds" } + special_selection = { trigger = { scope:faith ?= { OR = { has_icon = "nestorian" has_icon = "nestorian_custom" } } } 100 = "ce_religion_christianity_nestorian.dds" 100 = "ce_nestorian_cross.dds" 100 = "ce_nestorian_cross_birds.dds" 100 = "ce_nestorian_cross_lotus.dds" } + special_selection = { trigger = { scope:faith ?= { OR = { has_icon = "armenian" has_icon = "christianity_armenian" } } } 100 = "ce_religion_armenian.dds" 100 = "ce_cross_armenian.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "christianity_cathar" } } 100 = "ce_religion_cathar.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "christianity_waldensian" } } 100 = "ce_religion_waldensian.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "christianity_lollard" } } 100 = "ce_religion_lollard.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "christianity_iconoclasm" } } 100 = "ce_religion_iconoclasm.dds" 100 = "ce_cross_greek.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "christianity_bogomilist" } } 100 = "ce_religion_bogomilist.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "christianity_paulicanism" } } 100 = "ce_religion_paulicanism.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "christianity_messalian" } } 100 = "ce_religion_messalian.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "christianity_chalice_01" } } 100 = "ce_chalice_01.dds" } } # Figurative charges have baked white detail, so they are only used by colored-field templates @@ -1084,10 +1100,10 @@ colored_emblem_texture_lists = { 100 = "ce_mena_sun.dds" 100 = "ce_star_08.dds" - special_selection = { trigger = { scope:faith = { main_rite = { rite_has_doctrine = muhammad_succession_sunni_doctrine } } } 100 = "ce_religion_islam_generic.dds" } - special_selection = { trigger = { scope:faith = { main_rite = { rite_has_doctrine = muhammad_succession_shia_doctrine } } } 100 = "ce_religion_islam_asharism.dds" } - special_selection = { trigger = { scope:faith = { main_rite = { rite_has_doctrine = muhammad_succession_muhakkima_doctrine } } } 100 = "ce_religion_islam_iibadi.dds" 100 = "ce_star_ibadi.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "islam_druze" } } 100 = "ce_religion_druze.dds" } + special_selection = { trigger = { scope:faith ?= { main_rite ?= { rite_has_doctrine = muhammad_succession_sunni_doctrine } } } 100 = "ce_religion_islam_generic.dds" } + special_selection = { trigger = { scope:faith ?= { main_rite ?= { rite_has_doctrine = muhammad_succession_shia_doctrine } } } 100 = "ce_religion_islam_asharism.dds" } + special_selection = { trigger = { scope:faith ?= { main_rite ?= { rite_has_doctrine = muhammad_succession_muhakkima_doctrine } } } 100 = "ce_religion_islam_iibadi.dds" 100 = "ce_star_ibadi.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "islam_druze" } } 100 = "ce_religion_druze.dds" } } dharmic_religious_icons = { @@ -1217,7 +1233,7 @@ colored_emblem_texture_lists = { special_selection = { trigger = { scope:faith.religion = religion:zoroastrianism_religion } 100 = "ce_religion_zoroastrianism_generic_faravahar.dds" 100 = "ce_zoroastrian_fire_altar.dds" } special_selection = { trigger = { scope:faith.religion = religion:yazidi_religion } 100 = "ce_religion_yazidism.dds" 100 = "ce_peacock_01.dds" } special_selection = { trigger = { scope:faith.religion = religion:dualism_religion } 100 = "ce_religion_dualism.dds" } - special_selection = { trigger = { scope:faith = { has_icon = "manichean" } } 100 = "ce_religion_manichean.dds" } + special_selection = { trigger = { scope:faith ?= { has_icon = "manichean" } } 100 = "ce_religion_manichean.dds" } } african_religious_icons = { @@ -1385,7 +1401,7 @@ colored_emblem_texture_lists = { special_selection = { trigger = { - scope:culture = { has_coa_gfx = sami_coa_gfx } + scope:culture ?= { has_coa_gfx = sami_coa_gfx } } 1000 = "ce_suomenusko_sun.dds" 1000 = "ce_suomenusko_sun_02.dds" @@ -1508,7 +1524,7 @@ colored_emblem_texture_lists = { } special_selection = { trigger = { - scope:culture = { has_coa_gfx = magyar_group_coa_gfx } + scope:culture ?= { has_coa_gfx = magyar_group_coa_gfx } } 1500 = "ce_stripes_horizontal_15.dds" 1000 = "ce_pily_barry.dds" @@ -1767,7 +1783,7 @@ colored_emblem_texture_lists = { special_selection = { # Mongols trigger = { - scope:culture = { has_coa_gfx = mongol_coa_gfx } + scope:culture ?= { has_coa_gfx = mongol_coa_gfx } } 1000 = "ce_tamgha_mongol_mengu_timur.dds" 1000 = "ce_tamgha_mongol_kaidu.dds" @@ -1868,7 +1884,7 @@ colored_emblem_texture_lists = { special_selection = { # Jewish Khazars trigger = { scope:faith.religion = religion:judaism_religion - scope:culture = { has_coa_gfx = turkic_group_coa_gfx } + scope:culture ?= { has_coa_gfx = turkic_group_coa_gfx } } 10000 = "ce_tamgha_khazar.dds" 10000 = "ce_tamgha_sarkel_01.dds" @@ -2079,7 +2095,7 @@ colored_emblem_texture_lists = { special_selection = { trigger = { - scope:culture = { has_coa_gfx = polish_coa_gfx } + scope:culture ?= { has_coa_gfx = polish_coa_gfx } } 30 = "ce_griffin_rampant.dds" 30 = "ce_stag.dds" @@ -2828,7 +2844,7 @@ colored_emblem_texture_lists = { 10 = "ce_cross_couped.dds" special_selection = { trigger = { - scope:culture = { has_coa_gfx = byzantine_group_coa_gfx } + scope:culture ?= { has_coa_gfx = byzantine_group_coa_gfx } } 50 = "ce_star_06.dds" 25 = "ce_star_05.dds" @@ -2907,7 +2923,7 @@ colored_emblem_texture_lists = { special_selection = { trigger = { - scope:culture = { has_coa_gfx = indo_aryan_group_coa_gfx } + scope:culture ?= { has_coa_gfx = indo_aryan_group_coa_gfx } } 50 = "ce_elephant.dds" } @@ -3056,7 +3072,7 @@ colored_emblem_texture_lists = { 100 = "ce_points_12.dds" special_selection = { trigger = { - scope:culture = { + scope:culture ?= { OR = { has_coa_gfx = arabic_group_coa_gfx has_coa_gfx = berber_group_coa_gfx diff --git a/common/coat_of_arms/template_lists/pattern_lists.txt b/common/coat_of_arms/template_lists/pattern_lists.txt index e114c3339..0837d4d6b 100644 --- a/common/coat_of_arms/template_lists/pattern_lists.txt +++ b/common/coat_of_arms/template_lists/pattern_lists.txt @@ -1,4 +1,4 @@ -pattern_texture_lists = { +pattern_texture_lists = { most_emblems_list = { 25 = "pattern_checkers_01.dds" 15 = "pattern_checkers_diagonal_01.dds" @@ -61,7 +61,7 @@ pattern_texture_lists = { 20 = "pattern_horizontal_split_01.dds" special_selection = { trigger = { - scope:culture = { has_coa_gfx = norse_coa_gfx } + scope:culture ?= { has_coa_gfx = norse_coa_gfx } } 40 = "pattern_diagonal_split_01.dds" } diff --git a/common/dynasty_house_motto_inserts/00_inserts.txt b/common/dynasty_house_motto_inserts/00_inserts.txt index 020e65892..850995b50 100644 --- a/common/dynasty_house_motto_inserts/00_inserts.txt +++ b/common/dynasty_house_motto_inserts/00_inserts.txt @@ -394,7 +394,7 @@ } } } - faith = { + faith ?= { trigger = { NOT = { has_trait = cynical } } @@ -1021,9 +1021,7 @@ adjective_immaterial = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 0.1 } @@ -1041,9 +1039,7 @@ adjective_immaterial = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 0.1 } @@ -1061,9 +1057,7 @@ adjective_immaterial = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 0.1 } @@ -1081,9 +1075,7 @@ adjective_immaterial = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 0.1 } @@ -1101,9 +1093,7 @@ adjective_immaterial = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 0.1 } @@ -1121,9 +1111,7 @@ adjective_immaterial = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 0.1 } @@ -1141,9 +1129,7 @@ adjective_immaterial = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 0.1 } @@ -1161,9 +1147,7 @@ adjective_immaterial = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 0.1 } @@ -1311,9 +1295,7 @@ adjective_immaterial = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 1.25 } @@ -1338,9 +1320,7 @@ adjective_immaterial = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 0.1 } @@ -1406,9 +1386,7 @@ adjective_immaterial = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 0.1 } @@ -1426,9 +1404,7 @@ adjective_immaterial = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 0.1 } @@ -1436,9 +1412,7 @@ adjective_immaterial = { } calm = { trigger = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } weight = { value = 1250 @@ -1593,9 +1567,7 @@ the_adjective_immaterial = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 0.1 } @@ -1613,9 +1585,7 @@ the_adjective_immaterial = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 0.1 } @@ -1633,9 +1603,7 @@ the_adjective_immaterial = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 0.1 } @@ -1653,9 +1621,7 @@ the_adjective_immaterial = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 0.1 } @@ -1673,9 +1639,7 @@ the_adjective_immaterial = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 0.1 } @@ -1693,9 +1657,7 @@ the_adjective_immaterial = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 0.1 } @@ -1713,9 +1675,7 @@ the_adjective_immaterial = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 0.1 } @@ -1733,9 +1693,7 @@ the_adjective_immaterial = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 0.1 } @@ -1883,9 +1841,7 @@ the_adjective_immaterial = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 1.25 } @@ -1982,9 +1938,7 @@ the_adjective_immaterial = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 0.1 } @@ -1992,9 +1946,7 @@ the_adjective_immaterial = { } the_calm = { trigger = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } weight = { value = 1250 @@ -2174,9 +2126,7 @@ adjective_immaterial_a_or_an = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 0.1 } @@ -2194,9 +2144,7 @@ adjective_immaterial_a_or_an = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 0.1 } @@ -2214,9 +2162,7 @@ adjective_immaterial_a_or_an = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 0.1 } @@ -2234,9 +2180,7 @@ adjective_immaterial_a_or_an = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 0.1 } @@ -2254,9 +2198,7 @@ adjective_immaterial_a_or_an = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 0.1 } @@ -2274,9 +2216,7 @@ adjective_immaterial_a_or_an = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 0.1 } @@ -2424,9 +2364,7 @@ adjective_immaterial_a_or_an = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 1.25 } @@ -2523,9 +2461,7 @@ adjective_immaterial_a_or_an = { } if = { limit = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } multiply = 0.1 } @@ -2533,9 +2469,7 @@ adjective_immaterial_a_or_an = { } a_calm = { trigger = { - faith = { - religion = { is_in_family = rf_eastern } - } + neow_faith_is_eastern_trigger = yes } weight = { value = 1250 @@ -2837,9 +2771,15 @@ weapon = { value = 3000 if = { limit = { - OR = { - culture = { has_cultural_pillar = heritage_mongolic } - culture = { has_cultural_pillar = heritage_turkic } + AND = { + exists = culture + trigger_if = { + limit = { exists = culture } + OR = { + culture ?= { has_cultural_pillar = heritage_mongolic } + culture ?= { has_cultural_pillar = heritage_turkic } + } + } } } multiply = 5 @@ -2909,10 +2849,14 @@ the_weapon = { value = 3000 if = { limit = { - OR = { - culture = { has_cultural_pillar = heritage_mongolic } - culture = { has_cultural_pillar = heritage_turkic } + trigger_if = { + limit = { exists = culture } + OR = { + culture ?= { has_cultural_pillar = heritage_mongolic } + culture ?= { has_cultural_pillar = heritage_turkic } + } } + trigger_else = { always = no } } multiply = 5 } @@ -2961,16 +2905,20 @@ creature = { } unicorn = { trigger = { - NOR = { - culture = { has_cultural_pillar = heritage_west_african } - culture = { has_cultural_pillar = heritage_central_african } - culture = { has_cultural_pillar = heritage_sahelian } - culture = { has_cultural_pillar = heritage_senegambian } - culture = { has_cultural_pillar = heritage_akan } - culture = { has_cultural_pillar = heritage_yoruba } - culture = { has_cultural_pillar = heritage_dravidian } - culture = { has_cultural_pillar = heritage_indo_aryan } + trigger_if = { + limit = { exists = culture } + NOR = { + culture ?= { has_cultural_pillar = heritage_west_african } + culture ?= { has_cultural_pillar = heritage_central_african } + culture ?= { has_cultural_pillar = heritage_sahelian } + culture ?= { has_cultural_pillar = heritage_senegambian } + culture ?= { has_cultural_pillar = heritage_akan } + culture ?= { has_cultural_pillar = heritage_yoruba } + culture ?= { has_cultural_pillar = heritage_dravidian } + culture ?= { has_cultural_pillar = heritage_indo_aryan } + } } + trigger_else = { always = no } } } dragon = { @@ -2988,28 +2936,38 @@ creature = { } tiger = { trigger = { - OR = { - culture = { has_cultural_pillar = heritage_dravidian } - culture = { has_cultural_pillar = heritage_indo_aryan } + trigger_if = { + limit = { exists = culture } + OR = { + culture ?= { has_cultural_pillar = heritage_dravidian } + culture ?= { has_cultural_pillar = heritage_indo_aryan } + } } + trigger_else = { always = no } } } elephant = { trigger = { - OR = { - culture = { has_cultural_pillar = heritage_dravidian } - culture = { has_cultural_pillar = heritage_indo_aryan } - culture = { has_cultural_pillar = heritage_sahelian } + trigger_if = { + limit = { exists = culture } + OR = { + culture ?= { has_cultural_pillar = heritage_dravidian } + culture ?= { has_cultural_pillar = heritage_indo_aryan } + culture ?= { has_cultural_pillar = heritage_sahelian } + } } + trigger_else = { always = no } } } hound = { trigger = { - faith = { - NOT = { - religion_tag = islam_religion + trigger_if = { + limit = { exists = faith } + faith ?= { + NOT = { religion_tag = islam_religion } } } + trigger_else = { always = no } } } horse = { @@ -3017,10 +2975,14 @@ creature = { value = 1000 if = { limit = { - OR = { - culture = { has_cultural_pillar = heritage_mongolic } - culture = { has_cultural_pillar = heritage_turkic } + trigger_if = { + limit = { exists = culture } + OR = { + culture ?= { has_cultural_pillar = heritage_mongolic } + culture ?= { has_cultural_pillar = heritage_turkic } + } } + trigger_else = { always = no } } multiply = 5 } @@ -3028,39 +2990,51 @@ creature = { } leopard = { trigger = { - OR = { - culture = { has_cultural_pillar = heritage_west_african } - culture = { has_cultural_pillar = heritage_sahelian } - culture = { has_cultural_pillar = heritage_senegambian } - culture = { has_cultural_pillar = heritage_central_african } + trigger_if = { + limit = { exists = culture } + OR = { + culture ?= { has_cultural_pillar = heritage_west_african } + culture ?= { has_cultural_pillar = heritage_sahelian } + culture ?= { has_cultural_pillar = heritage_senegambian } + culture ?= { has_cultural_pillar = heritage_central_african } + } } + trigger_else = { always = no } } } gazelle = { trigger = { - OR = { - culture = { has_cultural_pillar = heritage_west_african } - culture = { has_cultural_pillar = heritage_sahelian } - culture = { has_cultural_pillar = heritage_senegambian } - culture = { has_cultural_pillar = heritage_central_african } + trigger_if = { + limit = { exists = culture } + OR = { + culture ?= { has_cultural_pillar = heritage_west_african } + culture ?= { has_cultural_pillar = heritage_sahelian } + culture ?= { has_cultural_pillar = heritage_senegambian } + culture ?= { has_cultural_pillar = heritage_central_african } + } } + trigger_else = { always = no } } } hippopotamus = { trigger = { - OR = { - culture = { has_cultural_pillar = heritage_west_african } - culture = { has_cultural_pillar = heritage_sahelian } - culture = { has_cultural_pillar = heritage_senegambian } - culture = { has_cultural_pillar = heritage_central_african } + trigger_if = { + limit = { exists = culture } + OR = { + culture ?= { has_cultural_pillar = heritage_west_african } + culture ?= { has_cultural_pillar = heritage_sahelian } + culture ?= { has_cultural_pillar = heritage_senegambian } + culture ?= { has_cultural_pillar = heritage_central_african } + } } + trigger_else = { always = no } } } reindeer = { trigger = { OR = { - culture = { has_cultural_pillar = heritage_balto_finnic } - culture = { has_cultural_pillar = heritage_ugro_permian } + culture ?= { has_cultural_pillar = heritage_balto_finnic } + culture ?= { has_cultural_pillar = heritage_ugro_permian } } } weight = { @@ -3101,31 +3075,41 @@ the_creature = { } the_tiger = { trigger = { - OR = { - culture = { has_cultural_pillar = heritage_dravidian } - culture = { has_cultural_pillar = heritage_indo_aryan } + trigger_if = { + limit = { exists = culture } + OR = { + culture ?= { has_cultural_pillar = heritage_dravidian } + culture ?= { has_cultural_pillar = heritage_indo_aryan } + } } + trigger_else = { always = no } } } the_elephant = { trigger = { - OR = { - culture = { has_cultural_pillar = heritage_dravidian } - culture = { has_cultural_pillar = heritage_indo_aryan } - culture = { has_cultural_pillar = heritage_west_african } - culture = { has_cultural_pillar = heritage_west_african } - culture = { has_cultural_pillar = heritage_sahelian } - culture = { has_cultural_pillar = heritage_central_african } + trigger_if = { + limit = { exists = culture } + OR = { + culture ?= { has_cultural_pillar = heritage_dravidian } + culture ?= { has_cultural_pillar = heritage_indo_aryan } + culture ?= { has_cultural_pillar = heritage_west_african } + culture ?= { has_cultural_pillar = heritage_west_african } + culture ?= { has_cultural_pillar = heritage_sahelian } + culture ?= { has_cultural_pillar = heritage_central_african } + } } + trigger_else = { always = no } } } the_hound = { trigger = { - faith = { - NOT = { - religion_tag = islam_religion + trigger_if = { + limit = { exists = faith } + faith ?= { + NOT = { religion_tag = islam_religion } } } + trigger_else = { always = no } } } the_horse = { @@ -3133,10 +3117,14 @@ the_creature = { value = 1000 if = { limit = { - OR = { - culture = { has_cultural_pillar = heritage_mongolic } - culture = { has_cultural_pillar = heritage_turkic } + trigger_if = { + limit = { exists = culture } + OR = { + culture ?= { has_cultural_pillar = heritage_mongolic } + culture ?= { has_cultural_pillar = heritage_turkic } + } } + trigger_else = { always = no } } multiply = 5 } @@ -3144,39 +3132,63 @@ the_creature = { } the_leopard = { trigger = { - OR = { - culture = { has_cultural_pillar = heritage_west_african } - culture = { has_cultural_pillar = heritage_sahelian } - culture = { has_cultural_pillar = heritage_senegambian } - culture = { has_cultural_pillar = heritage_central_african } + trigger_if = { + limit = { exists = culture } + OR = { + culture ?= { has_cultural_pillar = heritage_west_african } + culture ?= { has_cultural_pillar = heritage_sahelian } + culture ?= { has_cultural_pillar = heritage_senegambian } + culture ?= { has_cultural_pillar = heritage_central_african } + } + } + trigger_else = { + always = no } } } the_gazelle = { trigger = { - OR = { - culture = { has_cultural_pillar = heritage_west_african } - culture = { has_cultural_pillar = heritage_sahelian } - culture = { has_cultural_pillar = heritage_senegambian } - culture = { has_cultural_pillar = heritage_central_african } + trigger_if = { + limit = { exists = culture } + OR = { + culture ?= { has_cultural_pillar = heritage_west_african } + culture ?= { has_cultural_pillar = heritage_sahelian } + culture ?= { has_cultural_pillar = heritage_senegambian } + culture ?= { has_cultural_pillar = heritage_central_african } + } + } + trigger_else = { + always = no } } } the_hippopotamus = { trigger = { - OR = { - culture = { has_cultural_pillar = heritage_west_african } - culture = { has_cultural_pillar = heritage_sahelian } - culture = { has_cultural_pillar = heritage_senegambian } - culture = { has_cultural_pillar = heritage_central_african } + trigger_if = { + limit = { exists = culture } + OR = { + culture ?= { has_cultural_pillar = heritage_west_african } + culture ?= { has_cultural_pillar = heritage_sahelian } + culture ?= { has_cultural_pillar = heritage_senegambian } + culture ?= { has_cultural_pillar = heritage_central_african } + } + } + trigger_else = { + always = no } } } the_reindeer = { trigger = { - OR = { - culture = { has_cultural_pillar = heritage_balto_finnic } - culture = { has_cultural_pillar = heritage_ugro_permian } + trigger_if = { + limit = { exists = culture } + OR = { + culture ?= { has_cultural_pillar = heritage_balto_finnic } + culture ?= { has_cultural_pillar = heritage_ugro_permian } + } + } + trigger_else = { + always = no } } weight = { diff --git a/common/dynasty_house_mottos/00_mottos.txt b/common/dynasty_house_mottos/00_mottos.txt index 6317850c1..a760f6778 100644 --- a/common/dynasty_house_mottos/00_mottos.txt +++ b/common/dynasty_house_mottos/00_mottos.txt @@ -72,8 +72,10 @@ for_our_foes_x_for_our_friends_y = { # For our Foes, the Sword - for our Friends value = 400 } trigger = { - faith = { - religion = { is_in_family = rf_pagan } + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { religion = { is_in_family = rf_pagan } } } } } @@ -85,8 +87,10 @@ break_your_x_upon_our_y = { # Break your Axe upon our Honor value = 400 } trigger = { - faith = { - religion = { is_in_family = rf_pagan } + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { religion = { is_in_family = rf_pagan } } } } } @@ -98,8 +102,10 @@ by_the_x_and_the_y = { # By the Axe and Spear value = 300 } trigger = { - faith = { - religion = { is_in_family = rf_pagan } + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { religion = { is_in_family = rf_pagan } } } } } @@ -112,8 +118,10 @@ with_the_x_i_y_z = { # With the Sword I Honor the Truthful value = 300 } trigger = { - faith = { - religion = { is_in_family = rf_pagan } + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { religion = { is_in_family = rf_pagan } } } } } @@ -125,8 +133,10 @@ with_x_I_seek_y = { # With the Axe I Seek Strength value = 1000 } trigger = { - faith = { - religion = { is_in_family = rf_pagan } + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { religion = { is_in_family = rf_pagan } } } } } @@ -138,10 +148,14 @@ the_spirit_of_x_grants_us_y = { # The Spirit of the Fox Grants Us Cunning value = 800 } trigger = { - faith = { - OR = { - has_doctrine = tenet_druidry - has_doctrine = tenet_takamin + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { + OR = { + has_doctrine = tenet_druidry + has_doctrine = tenet_takamin + } } } } @@ -154,8 +168,10 @@ through_x_mind_y = { # Through a Courageous Mind, Enlightenment value = 1500 } trigger = { - faith = { - religion = { is_in_family = rf_eastern } + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { religion = { is_in_family = rf_eastern } } } } } @@ -167,8 +183,10 @@ the_x_mind_knows_y = { # The Calm Mind Knows Peace value = 1500 } trigger = { - faith = { - religion = { is_in_family = rf_eastern } + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { religion = { is_in_family = rf_eastern } } } } } @@ -188,8 +206,10 @@ by_god_and_x = { # By God and Sword. Reads best with a single god, so restrictin } } trigger = { - faith = { - has_doctrine = doctrine_monotheist + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { has_doctrine = doctrine_monotheist } } } } @@ -399,8 +419,12 @@ x_as_y = { # Cunning as the Fox, Strong as the Bear insert = the_creature trigger = { NOT = { - faith = { - religion_tag = islam_religion + trigger_if = { + limit = { exists = faith } + faith ?= { religion_tag = islam_religion } + } + trigger_else = { + always = no } } } @@ -467,8 +491,12 @@ son_of_x = { value = 150 if = { limit = { - faith = { - religion = { is_in_family = rf_pagan } + AND = { + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { religion = { is_in_family = rf_pagan } } + } } } multiply = 2 @@ -593,8 +621,10 @@ we_swear_by_x = { value = 2000 } trigger = { - faith = { - religion = religion:folk_germanic_religion + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { religion = religion:folk_germanic_religion } } } } @@ -605,8 +635,10 @@ we_carve_runes_of_x = { value = 2000 } trigger = { - faith = { - religion = religion:folk_germanic_religion + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { religion = religion:folk_germanic_religion } } } } @@ -618,8 +650,10 @@ with_x_and_y = { value = 2000 } trigger = { - faith = { - religion = religion:folk_germanic_religion + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { religion = religion:folk_germanic_religion } } } } @@ -630,8 +664,10 @@ we_tell_tales_of_x = { value = 2000 } trigger = { - faith = { - religion = religion:folk_germanic_religion + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { religion = religion:folk_germanic_religion } } } } @@ -643,8 +679,10 @@ x_is_our_y = { value = 2000 } trigger = { - faith = { - religion = religion:folk_germanic_religion + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { religion = religion:folk_germanic_religion } } } } @@ -655,8 +693,10 @@ x_guides_us = { value = 2000 } trigger = { - faith = { - religion = religion:folk_germanic_religion + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { religion = religion:folk_germanic_religion } } } } @@ -667,8 +707,10 @@ house_was_forged_by_x = { value = 2000 } trigger = { - faith = { - religion = religion:folk_germanic_religion + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { religion = religion:folk_germanic_religion } } } } @@ -679,8 +721,10 @@ founder_shares_x = { value = 2000 } trigger = { - faith = { - religion = religion:folk_germanic_religion + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { religion = religion:folk_germanic_religion } } } } @@ -812,8 +856,10 @@ tree_endure = { } trigger = { broadly_jungle_dwelling_trigger = yes - faith = { - religion = religion:buddhism_religion + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { religion = religion:buddhism_religion } } } } diff --git a/common/dynasty_house_mottos/NEOW_mottos.txt b/common/dynasty_house_mottos/NEOW_mottos.txt index 54dc2dbe6..b9b0852ef 100644 --- a/common/dynasty_house_mottos/NEOW_mottos.txt +++ b/common/dynasty_house_mottos/NEOW_mottos.txt @@ -5,8 +5,10 @@ we_swear_by_x_theomach = { value = 2000 } trigger = { - faith = { - religion = religion:theomach_religion + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { religion = religion:theomach_religion } } } } @@ -18,8 +20,10 @@ with_x_and_y_theomach = { value = 2000 } trigger = { - faith = { - religion = religion:theomach_religion + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { religion = religion:theomach_religion } } } } @@ -30,8 +34,10 @@ we_tell_tales_of_x_theomach = { value = 2000 } trigger = { - faith = { - religion = religion:theomach_religion + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { religion = religion:theomach_religion } } } } @@ -43,8 +49,10 @@ x_is_our_y_theomach = { value = 2000 } trigger = { - faith = { - religion = religion:theomach_religion + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { religion = religion:theomach_religion } } } } @@ -55,8 +63,10 @@ x_guides_us_theomach = { value = 2000 } trigger = { - faith = { - religion = religion:theomach_religion + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { religion = religion:theomach_religion } } } } @@ -67,8 +77,10 @@ house_was_forged_by_x_theomach = { value = 2000 } trigger = { - faith = { - religion = religion:theomach_religion + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { religion = religion:theomach_religion } } } } @@ -79,8 +91,10 @@ founder_shares_x_theomach = { value = 2000 } trigger = { - faith = { - religion = religion:theomach_religion + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { religion = religion:theomach_religion } } } } \ No newline at end of file diff --git a/common/flavorization/00_title_holders.txt b/common/flavorization/00_title_holders.txt index d39885fa2..944c30fe8 100644 --- a/common/flavorization/00_title_holders.txt +++ b/common/flavorization/00_title_holders.txt @@ -2310,79 +2310,79 @@ emperor_theocracy_female_judaism_religion = { religions = { judaism_religion } } -# Magyarism -count_theocracy_male_magyarism_religion = { - type = character - gender = male - special = holder - tier = county - priority = 18 - flavourization_rules = { - top_liege = no - } - governments = { theocracy_government } - religions = { mediterranean_religion } -} -count_theocracy_female_magyarism_religion = { - type = character - gender = female - special = holder - tier = county - priority = 18 - flavourization_rules = { - top_liege = no - } - governments = { theocracy_government } - religions = { mediterranean_religion } -} -duke_theocracy_male_magyarism_religion = { - type = character - gender = male - special = holder - tier = duchy - priority = 27 - flavourization_rules = { - top_liege = no - } - governments = { theocracy_government } - religions = { mediterranean_religion } -} -duke_theocracy_female_magyarism_religion = { - type = character - gender = female - special = holder - tier = duchy - priority = 27 - flavourization_rules = { - top_liege = no - } - governments = { theocracy_government } - religions = { mediterranean_religion } -} -king_theocracy_male_magyarism_religion = { - type = character - gender = male - special = holder - tier = kingdom - priority = 47 - flavourization_rules = { - top_liege = no - } - governments = { theocracy_government } - religions = { mediterranean_religion } -} -king_theocracy_female_magyarism_religion = { - type = character - gender = female - special = holder - tier = kingdom - priority = 47 - flavourization_rules = { - top_liege = no - } - governments = { theocracy_government } - religions = { mediterranean_religion } -} +## Magyarism +#count_theocracy_male_magyarism_religion = { +# type = character +# gender = male +# special = holder +# tier = county +# priority = 18 +# flavourization_rules = { +# top_liege = no +# } +# governments = { theocracy_government } +# religions = { mediterranean_religion } +#} +#count_theocracy_female_magyarism_religion = { +# type = character +# gender = female +# special = holder +# tier = county +# priority = 18 +# flavourization_rules = { +# top_liege = no +# } +# governments = { theocracy_government } +# religions = { mediterranean_religion } +#} +#duke_theocracy_male_magyarism_religion = { +# type = character +# gender = male +# special = holder +# tier = duchy +# priority = 27 +# flavourization_rules = { +# top_liege = no +# } +# governments = { theocracy_government } +# religions = { mediterranean_religion } +#} +#duke_theocracy_female_magyarism_religion = { +# type = character +# gender = female +# special = holder +# tier = duchy +# priority = 27 +# flavourization_rules = { +# top_liege = no +# } +# governments = { theocracy_government } +# religions = { mediterranean_religion } +#} +#king_theocracy_male_magyarism_religion = { +# type = character +# gender = male +# special = holder +# tier = kingdom +# priority = 47 +# flavourization_rules = { +# top_liege = no +# } +# governments = { theocracy_government } +# religions = { mediterranean_religion } +#} +#king_theocracy_female_magyarism_religion = { +# type = character +# gender = female +# special = holder +# tier = kingdom +# priority = 47 +# flavourization_rules = { +# top_liege = no +# } +# governments = { theocracy_government } +# religions = { mediterranean_religion } +#} # Paganism baron_theocracy_male_paganism_religion = { @@ -2395,7 +2395,7 @@ baron_theocracy_male_paganism_religion = { top_liege = no } governments = { theocracy_government } - religions = { mediterranean_religion baltic_religion slavic_religion finnic_religion } #tengrism_religion + religions = { baltic_religion slavic_religion finnic_religion } #tengrism_religion } baron_theocracy_female_paganism_religion = { type = character @@ -2407,7 +2407,7 @@ baron_theocracy_female_paganism_religion = { top_liege = no } governments = { theocracy_government } - religions = { mediterranean_religion baltic_religion slavic_religion finnic_religion } # tengrism_religion # paganism_religion + religions = { baltic_religion slavic_religion finnic_religion } # tengrism_religion # paganism_religion } barony_theocracy_paganism_religion = { type = title @@ -2417,7 +2417,7 @@ barony_theocracy_paganism_religion = { } priority = 7 holding = church_holding - religions = { mediterranean_religion baltic_religion slavic_religion finnic_religion } #west_african_religion west_african_bori_religion west_african_roog_religion tengrism_religion paganism_religion + religions = { baltic_religion slavic_religion finnic_religion } #west_african_religion west_african_bori_religion west_african_roog_religion tengrism_religion paganism_religion } #count_theocracy_male_paganism_religion = { # type = character @@ -2451,7 +2451,7 @@ county_theocracy_paganism_religion = { } priority = 18 governments = { theocracy_government } - religions = { mediterranean_religion baltic_religion slavic_religion finnic_religion } #tengrism_religion west_african_religion west_african_bori_religion west_african_roog_religion paganism_religion + religions = { baltic_religion slavic_religion finnic_religion } #tengrism_religion west_african_religion west_african_bori_religion west_african_roog_religion paganism_religion } duke_theocracy_male_paganism_religion = { type = character @@ -2485,7 +2485,7 @@ duchy_theocracy_paganism_religion = { } priority = 27 governments = { theocracy_government } - religions = { mediterranean_religion baltic_religion slavic_religion finnic_religion folk_germanic_religion buddhism_religion hinduism_religion jainism_religion judaism_religion } #tengrism_religion west_african_religion west_african_bori_religion west_african_roog_religion zunism_religion zoroastrianism_religion bon_religion taoism_religion + religions = { baltic_religion slavic_religion finnic_religion folk_germanic_religion buddhism_religion hinduism_religion jainism_religion judaism_religion } #tengrism_religion west_african_religion west_african_bori_religion west_african_roog_religion zunism_religion zoroastrianism_religion bon_religion taoism_religion } king_theocracy_male_paganism_religion = { type = character @@ -2519,7 +2519,7 @@ kingdom_theocracy_paganism_religion = { } priority = 47 governments = { theocracy_government } - religions = { mediterranean_religion baltic_religion slavic_religion finnic_religion folk_germanic_religion theomach_religion zunism_religion zoroastrianism_religion bon_religion taoism_religion buddhism_religion hinduism_religion jainism_religion judaism_religion } #tengrism_religion west_african_religion west_african_bori_religion west_african_roog_religion + religions = { baltic_religion slavic_religion finnic_religion folk_germanic_religion theomach_religion zunism_religion zoroastrianism_religion bon_religion taoism_religion buddhism_religion hinduism_religion jainism_religion judaism_religion } #tengrism_religion west_african_religion west_african_bori_religion west_african_roog_religion } emperor_theocracy_male_paganism_religion = { type = character @@ -2531,7 +2531,7 @@ emperor_theocracy_male_paganism_religion = { top_liege = no } governments = { theocracy_government } - religions = { mediterranean_religion baltic_religion slavic_religion finnic_religion taoism_religion zoroastrianism_religion } #tengrism_religion west_african_religion west_african_bori_religion west_african_roog_religion + religions = { baltic_religion slavic_religion finnic_religion taoism_religion zoroastrianism_religion } #tengrism_religion west_african_religion west_african_bori_religion west_african_roog_religion } emperor_theocracy_female_paganism_religion = { type = character @@ -2543,7 +2543,7 @@ emperor_theocracy_female_paganism_religion = { top_liege = no } governments = { theocracy_government } - religions = { paganism_religion mediterranean_religion baltic_religion slavic_religion finnic_religion taoism_religion zoroastrianism_religion } #tengrism_religion west_african_religion west_african_bori_religion west_african_roog_religion + religions = { paganism_religion baltic_religion slavic_religion finnic_religion taoism_religion zoroastrianism_religion } #tengrism_religion west_african_religion west_african_bori_religion west_african_roog_religion } empire_theocracy_paganism_religion = { type = title @@ -2553,7 +2553,7 @@ empire_theocracy_paganism_religion = { } priority = 102 governments = { theocracy_government } - religions = { mediterranean_religion baltic_religion slavic_religion finnic_religion folk_germanic_religion theomach_religion taoism_religion zoroastrianism_religion judaism_religion } #tengrism_religion west_african_religion west_african_bori_religion west_african_roog_religion zunism_religion + religions = { baltic_religion slavic_religion finnic_religion folk_germanic_religion theomach_religion taoism_religion zoroastrianism_religion judaism_religion } #tengrism_religion west_african_religion west_african_bori_religion west_african_roog_religion zunism_religion } # Baltic diff --git a/common/governments/00_government_types.txt b/common/governments/00_government_types.txt index 4f0b5e0af..0cb773c08 100644 --- a/common/governments/00_government_types.txt +++ b/common/governments/00_government_types.txt @@ -48,7 +48,7 @@ feudal_government = { if = { limit = { pam_nomad_grant_settled_government_trigger = yes - faith = { + faith ?= { NOR = { religion = religion:islam_religion has_doctrine_parameter = unreformed @@ -90,15 +90,25 @@ urbanrepublic_government = { can_get_government = { NOR = { - culture = { - OR = { - has_cultural_tradition = tradition_farmer_republics - has_cultural_tradition = tradition_collective_lands - has_cultural_tradition = tradition_landstinget + AND = { + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { + OR = { + has_cultural_tradition = tradition_farmer_republics + has_cultural_tradition = tradition_collective_lands + has_cultural_tradition = tradition_landstinget + } + } + } + } + AND = { + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { has_doctrine = tenet_communal_possessions } } - } - faith = { - has_doctrine = tenet_communal_possessions } liege = { has_government = peasantrepublic_government @@ -187,15 +197,25 @@ peasantrepublic_government = { can_get_government = { OR = { - culture = { - OR = { - has_cultural_tradition = tradition_farmer_republics - has_cultural_tradition = tradition_collective_lands - has_cultural_tradition = tradition_landstinget + AND = { + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { + OR = { + has_cultural_tradition = tradition_farmer_republics + has_cultural_tradition = tradition_collective_lands + has_cultural_tradition = tradition_landstinget + } + } + } + } + AND = { + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { has_doctrine = tenet_communal_possessions } } - } - faith = { - has_doctrine = tenet_communal_possessions } liege = { has_government = peasantrepublic_government @@ -269,14 +289,24 @@ republic_government = { can_get_government = { NOR = { - culture = { - OR = { - has_cultural_tradition = tradition_farmer_republics - has_cultural_tradition = tradition_collective_lands - } + AND = { + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { + OR = { + has_cultural_tradition = tradition_farmer_republics + has_cultural_tradition = tradition_collective_lands + } + } + } } - faith = { - has_doctrine = tenet_egalite + AND = { + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { has_doctrine = tenet_egalite } + } } any_liege_or_above = { has_government = peasantrepublic_government @@ -400,7 +430,7 @@ clan_government = { if = { limit = { pam_nomad_grant_settled_government_trigger = yes - faith = { religion = religion:islam_religion } + faith ?= { religion = religion:islam_religion } } add = 10 } @@ -470,7 +500,7 @@ tribal_government = { if = { limit = { pam_nomad_grant_settled_government_trigger = yes - faith = { has_doctrine_parameter = unreformed } + faith ?= { has_doctrine_parameter = unreformed } } add = 10 } @@ -886,7 +916,7 @@ landless_minority_government = { title_tier = duchy is_landless_type_title = yes } - culture = { + culture ?= { OR = { has_cultural_tradition = tradition_diasporic has_cultural_tradition = tradition_itinerant_pastoralists diff --git a/common/governments/02_theocratic_government_types.txt b/common/governments/02_theocratic_government_types.txt index 17cc311d7..7abf506ee 100644 --- a/common/governments/02_theocratic_government_types.txt +++ b/common/governments/02_theocratic_government_types.txt @@ -21,7 +21,11 @@ theocracy_government = { royal_court = landed can_get_government = { - theocratic_lay_clergy_trigger = yes + exists = faith + trigger_if = { + limit = { exists = faith } + theocratic_lay_clergy_trigger = yes + } #The LAAMP Construct Holding decision trigger_if = { limit = { @@ -58,7 +62,7 @@ theocracy_government = { scope:title = { tier = tier_county } NOT = { has_variable = grant_vassal_government_cooldown } ai_zeal >= medium_positive_ai_value - rite = { + rite ?= { NOT = { rite_has_doctrine = doctrine_theocracy_lay_clergy } rite_has_doctrine = doctrine_theocracy_temporal } @@ -100,7 +104,11 @@ ecclesiastical_government = { } can_get_government = { - theocratic_lay_clergy_trigger = yes + exists = faith + trigger_if = { + limit = { exists = faith } + theocratic_lay_clergy_trigger = yes + } #The LAAMP Construct Holding decision trigger_if = { limit = { @@ -151,7 +159,7 @@ ecclesiastical_government = { scope:title = { tier = tier_county } NOT = { has_variable = grant_vassal_government_cooldown } ai_zeal >= medium_positive_ai_value - rite = { rite_has_doctrine = doctrine_theocracy_temporal } + rite ?= { rite_has_doctrine = doctrine_theocracy_temporal } realm_theocratic_county_share_ai_below_cap_trigger = yes } add = 10 diff --git a/common/lease_contracts/00_theocracy_lease.txt b/common/lease_contracts/00_theocracy_lease.txt new file mode 100644 index 000000000..53ceb24fb --- /dev/null +++ b/common/lease_contracts/00_theocracy_lease.txt @@ -0,0 +1,317 @@ +# Definition of lease used for organized churches. Required for the game to run. +theocracy_lease = { + hierarchy = { + type = vassal + ruler_valid = { + rite ?= { rite_has_doctrine = doctrine_theocracy_temporal } + NOT = { government_has_flag = government_is_theocracy } + } + liege_or_vassal_valid = { + faith = scope:target.faith + } + lessee = cp:councillor_court_chaplain + barony_valid = { + title_province = { has_holding_type = church_holding } + } + } + + government = theocracy_government + valid_holdings = { church_holding } + ruler_share_min_opinion_from_lessee = 1 + hook_strength_max_opinion = strong + + tax_split = { + lease_liege = 0.25 + ruler_max = 0.25 + ruler = { + if = { + limit = { + scope:lessee = { + court_chaplain_endorse_override_trigger = yes + } + } + add = { + desc = THEOCRATIC_LEASE_RATIO_STRONG_HOOK + value = 0.25 + } + } + else_if = { + limit = { is_ai = yes } + add = { + desc = THEOCRATIC_LEASE_RATIO_FROM_OPINION + value = { + scope:lessee = { value = "opinion(scope:ruler)" } + } + divide = 400 + } + } + + save_temporary_value_as = current_total + if = { + limit = { scope:current_total > 0.25 } + max = { + desc = THEOCRATIC_LEASE_RATIO_MAX_25 + value = 0.25 + } + } + } + } + + levy_split = { + lease_liege = 0.15 + ruler_max = 0.50 + ruler = { + if = { + limit = { + scope:lessee = { court_chaplain_endorse_override_trigger = yes } + } + add = { + desc = THEOCRATIC_LEASE_RATIO_STRONG_HOOK + value = 0.5 + } + } + else = { + add = { + desc = THEOCRATIC_LEASE_RATIO_FROM_OPINION + value = { + scope:lessee = { value = "opinion(scope:ruler)" } + } + divide = 200 + } + } + max = 0.5 + } + } +} + + +# Definition of lease used for Ecclesiastical churches (Christian) +ecclesiastical_lease = { + hierarchy = { + type = clerical_region + ruler_valid = { + rite = { rite_has_doctrine = doctrine_theocracy_temporal } + NOT = { government_has_flag = government_is_ecclesiastical } + } + liege_or_vassal_valid = { + faith = scope:target.faith + } + lessee = cp:councillor_court_chaplain # should be a councillor + + barony_valid = { + title_province = { + has_holding_type = church_holding + } + # Allow Ecclesiastical rulers to hold temples directly + NOT = { + county = { + holder = { + government_has_flag = government_is_ecclesiastical + } + } + } + } + } + + government = ecclesiastical_government + valid_holdings = { church_holding } + + ruler_share_min_opinion_from_lessee = 1 + hook_strength_max_opinion = strong + + tax_split = { + lease_liege = { + value = 0 + if = { + limit = { + scope:lease_liege = { + top_participant_group:the_christian_church ?= { + has_participant_group_parameter = the_christian_church_minimal_centralization + } + } + } + add = { + desc = THEOCRATIC_LEASE_RATIO_MINIMAL_CENTRALIZATION + value = 0.05 + } + } + else_if = { + limit = { + scope:lease_liege = { + OR = { + top_participant_group:the_christian_church ?= { + has_participant_group_parameter = the_christian_church_mild_centralization + } + # Default for Ecclesiasticals outside of the situation + NOT = { exists = top_participant_group:the_christian_church } + } + } + } + add = { + desc = THEOCRATIC_LEASE_RATIO_MILD_CENTRALIZATION + value = 0.1 + } + } + else_if = { + limit = { + scope:lease_liege = { + top_participant_group:the_christian_church ?= { + has_participant_group_parameter = the_christian_church_strong_centralization + } + } + } + add = { + desc = THEOCRATIC_LEASE_RATIO_STRONG_CENTRALIZATION + value = 0.20 + } + } + # Lessee Bishops don't pay hierarchical to the pope (they need a Clerical Region to exist) + if = { + limit = { + is_landed = no # Local bishop lessee + top_superior = scope:lease_liege # Head of Faith is superior + NOT = { exists = liege.capital_county.clerical_region_title } # We don't have a clerical region + } + max = { + desc = THEOCRATIC_LEASE_RATIO_MISSING_CLERICAL_REGION + value = 0.001 + } + } + } + top_lease_liege_direct = { + value = 0 + if = { + limit = { + scope:lease_liege = { + top_participant_group:the_christian_church ?= { + has_participant_group_parameter = the_christian_church_strong_centralization + } + } + } + add = { + desc = THEOCRATIC_LEASE_RATIO_STRONG_CENTRALIZATION + value = 0.01 + } + } + } + + ruler_max = 0.25 # Ceiling on the ruler's share, also quoted by the 'up to' tooltips. + ruler = { + value = 0 + if = { + limit = { + scope:lessee = { + court_chaplain_endorse_override_trigger = yes + } + scope:ruler = { + OR = { + top_participant_group:the_christian_church ?= { + has_participant_group_parameter = the_christian_church_personal_secular_obligations + } + # Default for Christians outside of the situation + NOT = { exists = top_participant_group:the_christian_church } + } + } + } + add = { + desc = THEOCRATIC_LEASE_RATIO_STRONG_HOOK + value = 0.25 + } + } + else_if = { + limit = { + scope:lessee = { + is_ai = yes + court_chaplain_endorse_override_trigger = no + } + scope:ruler = { + OR = { + top_participant_group:the_christian_church ?= { + has_participant_group_parameter = the_christian_church_personal_secular_obligations + } + # Default for Christians outside of the situation + NOT = { exists = top_participant_group:the_christian_church } + } + } + } + add = { + desc = THEOCRATIC_LEASE_RATIO_FROM_OPINION + value = { + scope:lessee = { value = "opinion(scope:ruler)" } + } + divide = 400 # Divide opinion -100/+100 with 400 gives range -0.25/+0.25 + } + } + else_if = { + limit = { + scope:ruler = { + top_participant_group:the_christian_church ?= { + has_participant_group_parameter = the_christian_church_fixed_secular_obligations + } + } + } + add = { + desc = THEOCRATIC_LEASE_RATIO_FIXED_OBLIGATIONS + value = 0.15 + } + } + if = { + limit = { + scope:ruler = { + top_participant_group:the_christian_church ?= { + has_participant_group_parameter = the_christian_church_local_secular_power + } + } + } + add = { + desc = THEOCRATIC_LEASE_RATIO_LOCAL_SECULAR_POWER + value = 0.10 + } + } + save_temporary_value_as = current_total + if = { + limit = { + scope:current_total > 0.25 + } + max = { + desc = THEOCRATIC_LEASE_RATIO_MAX_25 + value = 0.25 + } + } + } + } + + levy_split = { + lease_liege = 0.15 + + ruler_max = 0.50 # Ceiling on the ruler's share, also quoted by the 'up to' tooltips. + ruler = { + if = { + limit = { + scope:ruler = { + OR = { + has_strong_hook = scope:lessee + top_participant_group:the_christian_church ?= { + has_participant_group_parameter = the_christian_church_fixed_secular_obligations + } + } + } + } + add = { + desc = THEOCRATIC_LEASE_RATIO_STRONG_HOOK + value = 0.50 + } + } + else = { + add = { + desc = THEOCRATIC_LEASE_RATIO_FROM_OPINION + value = { + scope:lessee = { value = "opinion(scope:ruler)" } + } + divide = 200 # Divide opinion range -100/+100 with 200 gives range -0.5/+0.5 + } + } + max = 0.50 + } + } +} diff --git a/common/lifestyle_perks/00_diplomacy_3_family_tree_perks.txt b/common/lifestyle_perks/00_diplomacy_3_family_tree_perks.txt new file mode 100644 index 000000000..4f95faf05 --- /dev/null +++ b/common/lifestyle_perks/00_diplomacy_3_family_tree_perks.txt @@ -0,0 +1,345 @@ +befriend_perk = { + lifestyle = diplomacy_lifestyle + tree = family + position = { 0 0 } + icon = node_diplomacy + + auto_selection_weight = { + value = 11 + if = { + limit = { + has_education_diplomacy_trigger = yes + } + add = 1989 + } + if = { + limit = { + has_focus = diplomacy_family_focus + } + multiply = 5 + } + if = { + limit = { + can_start_new_lifestyle_tree_trigger = no + NOT = { has_perk = familial_familiar_perk } + } + multiply = 0 + } + } + + culture_character_modifier = { + parameter = automatic_befriend_access + befriend_scheme_phase_duration_add = medium_scheme_phase_duration_bonus_value + } + + effect = { + # Cultures with Ritualised Friendship get a different effect, so we filter them out. + if = { + limit = { + NOR = { + culture ?= { has_cultural_parameter = automatic_befriend_access } + government_has_flag = government_is_nomadic + } + } + custom_description_no_bullet = { + text = befriend_perk_effect + } + } + #Removes prestige cost for nomads + else_if = { + limit = { + government_has_flag = government_is_nomadic + NOR = { + has_perk = befriend_perk + culture ?= { has_cultural_parameter = automatic_befriend_access } + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = struggle_unlocks_befriend_schemes_for_everyone + } + } + } + custom_description_no_bullet = { + text = befriend_perk_prestige_cost_effect + } + } + # Everyone gets board games! + custom_description_no_bullet = { text = unlocks_board_games_interaction_effect } + } +} + +confidants_perk = { + lifestyle = diplomacy_lifestyle + tree = family + position = { 0 1.25 } + icon = node_diplomacy + + parent = befriend_perk + + effect = { + custom_description_no_bullet = { + text = confidants_perk_effect + } + hidden_effect = { + update_confidants_effect = yes + } + } +} + +flatterer_perk = { + lifestyle = diplomacy_lifestyle + tree = family + position = { 0 2.5 } + icon = node_diplomacy + + parent = confidants_perk + + character_modifier = { + befriend_scheme_phase_duration_add = medium_scheme_phase_duration_bonus_value + } + government_character_modifier = { + flag = government_is_landless_adventurer + befriend_scheme_phase_duration_add = monumental_scheme_phase_duration_bonus_value + } +} + +friendly_counsel_perk = { + lifestyle = diplomacy_lifestyle + tree = family + position = { 0 3.75 } + icon = node_diplomacy + + parent = flatterer_perk + + effect = { + custom_description_no_bullet = { + text = friendly_counsel_perk_effect + } + hidden_effect = { + every_relation = { + type = friend + add_to_temporary_list = friendly_counsel_friends + } + every_relation = { + type = best_friend + limit = { NOT = { is_in_list = friendly_counsel_friends } } + add_to_temporary_list = friendly_counsel_friends + } + every_in_list = { + list = friendly_counsel_friends + root = { + friendly_counsel_skill_gain_effect = yes + } + } + } + if = { + limit = { + government_has_flag = government_is_landless_adventurer + } + custom_tooltip = { + text = adventurer_friendly_counsel_perk_effect + } + } + if = { + limit = { + government_has_mechanic = administrative + } + custom_description_no_bullet = { + text = admin_friendly_counsel_perk_effect + } + } + if = { + limit = { + government_has_flag = government_is_nomadic + } + custom_description_no_bullet = { + text = friendly_counsel_perk_nomadic_effect + } + hidden_effect = { + every_relation = { + type = blood_brother + add_to_temporary_list = friendly_counsel_friends + } + every_relation = { + type = best_friend + limit = { NOT = { is_in_list = friendly_counsel_friends } } + add_to_temporary_list = friendly_counsel_friends + } + every_in_list = { + list = friendly_counsel_friends + root = { + friendly_counsel_skill_gain_effect = yes + } + } + } + } + } +} + +familial_familiar_perk = { + lifestyle = diplomacy_lifestyle + tree = family + position = { 2 0 } + icon = node_diplomacy + + character_modifier = { + close_relative_opinion = 15 + } + + effect = { + if = { + limit = { + has_ep3_dlc_trigger = yes + government_has_mechanic = administrative + } + custom_description_no_bullet = { + text = admin_familial_familiar_perk_effect + } + } + } + + auto_selection_weight = { + value = 11 + if = { + limit = { + has_education_diplomacy_trigger = yes + } + add = 1989 + } + if = { + limit = { + has_focus = diplomacy_family_focus + } + multiply = 5 + } + if = { + limit = { + can_start_new_lifestyle_tree_trigger = no + NOT = { has_perk = befriend_perk } + } + multiply = 0 + } + } +} + +groomed_to_rule_perk = { + lifestyle = diplomacy_lifestyle + tree = family + position = { 2 1.25 } + icon = node_diplomacy + + parent = familial_familiar_perk + + effect = { + custom_description_no_bullet = { + text = groomed_to_rule_perk_effect + } + # If a child has already gotten their childhood personality or education (and thus missed the skill gain), add it now. + hidden_effect = { + save_scope_as = parent + every_child = { + limit = { + OR = { + has_trait = curious + has_trait = rowdy + has_trait = charming + has_trait = pensive + has_trait = bossy + has_trait = education_martial + has_trait = education_intrigue + has_trait = education_stewardship + has_trait = education_learning + has_trait = education_diplomacy + } + } + groomed_to_rule_random_skills_effect = yes + } + } + if = { + limit = { + has_bp2_dlc_trigger = yes + } + custom_description_no_bullet = { + text = groomed_to_rule_perk_2_effect + } + } + } +} + +thicker_than_water_perk = { + lifestyle = diplomacy_lifestyle + tree = family + position = { 2 2.5 } + icon = node_diplomacy + + parent = groomed_to_rule_perk + + effect = { + custom_description_no_bullet = { + text = thicker_than_water_perk_effect + } + } + + government_character_modifier = { + flag = government_is_nomadic + blood_brother_prestige_mult = 0.05 + } +} + +sound_foundations_perk = { + lifestyle = diplomacy_lifestyle + tree = family + position = { 2 3.75 } + icon = node_diplomacy + + parent = thicker_than_water_perk + + effect = { + if = { + limit = { + government_has_flag = government_is_mandala + house ?= { has_house_aspiration_parameter = aspect_of_creation } + is_house_head = yes + } + custom_description_no_bullet = { text = mandala_sound_foundations_perk_effect } + } + else = { + custom_description_no_bullet = { text = sound_foundations_perk_effect } + } + hidden_effect = { + every_child = { + root = { + sound_foundations_skill_gain_effect = yes + } + } + } + } +} + +family_man_perk = { + lifestyle = diplomacy_lifestyle + tree = family + position = { 1 5 } + icon = trait_family_first + + name = { + first_valid = { + triggered_desc = { + trigger = { NOT = { exists = this } } + desc = family_man_perk_male_name + } + triggered_desc = { + trigger = { is_female = yes } + desc = family_man_perk_female_name + } + desc = family_man_perk_male_name + } + } + + parent = sound_foundations_perk + parent = friendly_counsel_perk + + trait = family_first + effect = { + add_trait_force_tooltip = family_first + } +} diff --git a/common/lifestyle_perks/00_intrigue_1_skulduggery_tree_perks.txt b/common/lifestyle_perks/00_intrigue_1_skulduggery_tree_perks.txt new file mode 100644 index 000000000..bbb1c44eb --- /dev/null +++ b/common/lifestyle_perks/00_intrigue_1_skulduggery_tree_perks.txt @@ -0,0 +1,274 @@ +truth_is_relative_perk = { + lifestyle = intrigue_lifestyle + tree = skulduggery + position = { 2 0 } + icon = node_intrigue + + auto_selection_weight = { + value = 11 + if = { + limit = { + has_education_intrigue_trigger = yes + } + add = 1989 + } + if = { + limit = { + has_focus = intrigue_skulduggery_focus + } + multiply = 5 + } + if = { + limit = { + can_start_new_lifestyle_tree_trigger = no + } + multiply = 0 + } + if = { # Conquerors go for the best stuff for war! + limit = { + has_variable = conqueror + } + add = 10000 + } + } + + can_be_picked = { + always = yes + } + + effect = { + custom_description_no_bullet = { + text = truth_is_relative_scheme_effect + } + if = { + limit = { + NOT = { government_has_flag = government_is_landless_adventurer } + } + custom_description_no_bullet = { + text = truth_is_relative_perk_effect + } + } + } +} + +digging_for_dirt_perk = { + lifestyle = intrigue_lifestyle + tree = skulduggery + position = { 0 1.25 } + icon = node_intrigue + + parent = truth_is_relative_perk + + can_be_picked = { + always = yes + } + + effect = { + if = { + limit = { + NOT = { government_has_flag = government_is_landless_adventurer } + } + custom_description_no_bullet = { + text = digging_for_dirt_perk_effect + } + } + if = { + limit = { + government_has_flag = government_is_landless_adventurer + } + custom_tooltip = { + text = adventurer_digging_for_dirt_perk_effect + } + } + } +} + +kidnapper_perk = { + lifestyle = intrigue_lifestyle + tree = skulduggery + position = { 0 2.5 } + icon = node_intrigue + + parent = digging_for_dirt_perk + + can_be_picked = { + always = yes + } + + effect = { + custom_description_no_bullet = { + text = kidnapper_perk_effect + } + if = { + limit = { government_has_flag = government_is_nomadic } + custom_description_no_bullet = { + text = kidnapper_perk_nomadic_effect + } + } + } +} + +court_of_shadows_perk = { + lifestyle = intrigue_lifestyle + tree = skulduggery + position = { 2 1.25 } + icon = node_intrigue + + parent = truth_is_relative_perk + + name = { + first_valid = { + triggered_desc = { + trigger = { has_government = landless_adventurer_government } + desc = court_of_shadows_perk_adventurer_name + } + desc = court_of_shadows_perk_name + } + } + + can_be_picked = { + always = yes + } + + government_character_modifier = { + flag = government_is_administrative + owned_political_scheme_success_chance_max_add = 10 + } + + effect = { + if = { + limit = { + NOT = { government_has_flag = government_is_landless_adventurer } + } + custom_description_no_bullet = { + text = court_of_shadows_perk_effect + } + custom_description_no_bullet = { text = court_of_shadows_perk_effect.increased_grace } + if = { + limit = { faith ?= { has_papacy_trigger = yes } } + custom_description_no_bullet = { text = court_of_shadows_perk_papal_vote_effect } + } + if = { + limit = { + has_pam_dlc_trigger = yes + faith ?= { has_papacy_trigger = yes } + } + custom_description_no_bullet = { text = court_of_shadows_perk_papabile_effect } + } + } + if = { + limit = { + government_has_flag = government_is_landless_adventurer + } + custom_tooltip = { + text = adventurer_court_of_shadows_perk_effect + } + custom_tooltip = court_of_shadows_perk_effect.increased_grace + } + } +} + +prepared_for_anything_perk = { + lifestyle = intrigue_lifestyle + tree = skulduggery + position = { 2 2.5 } + icon = node_intrigue + + parent = court_of_shadows_perk + + can_be_picked = { + always = yes + } + + character_modifier = { + enemy_hostile_scheme_success_chance_add = -25 + } + + effect = { + custom_description_no_bullet = { + text = prepared_for_anything_perk_bonus_effect + } + } +} + +swift_execution_perk = { + lifestyle = intrigue_lifestyle + tree = skulduggery + position = { 4 1.25 } + icon = node_intrigue + + parent = truth_is_relative_perk + + can_be_picked = { + always = yes + } + + government_character_modifier = { + flag = government_is_landless_adventurer + murder_scheme_phase_duration_add = monumental_scheme_phase_duration_bonus_value + } + + character_modifier = { + murder_scheme_phase_duration_add = medium_scheme_phase_duration_bonus_value + } +} + +a_job_done_right_perk = { + lifestyle = intrigue_lifestyle + tree = skulduggery + position = { 4 2.5 } + icon = node_intrigue + + parent = swift_execution_perk + + can_be_picked = { + always = yes + } + + character_modifier = { + owned_hostile_scheme_success_chance_add = 25 + owned_hostile_scheme_success_chance_max_add = 5 + } +} + +twice_schemed_perk = { + lifestyle = intrigue_lifestyle + tree = skulduggery + position = { 2 3.75 } + icon = node_intrigue + + parent = kidnapper_perk + parent = prepared_for_anything_perk + parent = a_job_done_right_perk + + can_be_picked = { + always = yes + } + + character_modifier = { + max_hostile_schemes_add = 1 + } + + government_character_modifier = { + flag = government_is_administrative + max_political_schemes_add = 1 + } +} + +schemer_perk = { + lifestyle = intrigue_lifestyle + tree = skulduggery + position = { 2 5 } + icon = trait_schemer + + parent = twice_schemed_perk + + can_be_picked = { + always = yes + } + + trait = schemer + effect = { + add_trait_force_tooltip = schemer + } +} diff --git a/common/lifestyle_perks/00_martial_3_chivalry_tree_perks.txt b/common/lifestyle_perks/00_martial_3_chivalry_tree_perks.txt new file mode 100644 index 000000000..1d264ce3b --- /dev/null +++ b/common/lifestyle_perks/00_martial_3_chivalry_tree_perks.txt @@ -0,0 +1,272 @@ +stalwart_leader_perk = { + lifestyle = martial_lifestyle + tree = chivalry + position = { 1 0 } + icon = node_martial + + auto_selection_weight = { + value = 11 + if = { + limit = { + has_education_martial_trigger = yes + } + add = 1989 + } + if = { + limit = { + has_focus = martial_chivalry_focus + } + multiply = 5 + } + if = { + limit = { + can_start_new_lifestyle_tree_trigger = no + } + multiply = 0 + } + } + + government_character_modifier = { + flag = government_is_landless_adventurer + trait_track_foot_xp_gain_mult = 0.2 + } + + character_modifier = { + prowess = 4 + trait_track_foot_xp_gain_mult = 0.05 + } + + effect = { + custom_description_no_bullet = { + text = stalwart_leader_perk_effect + } + if = { + limit = { government_has_flag = government_is_nomadic } + custom_description_no_bullet = { text = unlock_dueling_for_everyone_effect } + } + else_if = { + limit = { + culture ?= { has_cultural_parameter = stalwart_leader_non_admin_duels } + } + custom_description_no_bullet = { text = unlocks_stalwart_leader_non_admin_duels_effect } + } + else = { + custom_description_no_bullet = { text = unlock_dueling_rivals_effect } + } + + if = { + limit = { + government_has_flag = government_is_landless_adventurer + has_ep2_dlc_trigger = yes + } + custom_tooltip = { + text = adventurer_stalwart_leader_perk_effect + } + } + } +} + +courtship_perk = { + lifestyle = martial_lifestyle + tree = chivalry + position = { 0 1 } + icon = node_martial + + parent = stalwart_leader_perk + + government_character_modifier = { + flag = government_is_landless_adventurer + courting_scheme_phase_duration_add = monumental_scheme_phase_duration_bonus_value + elope_scheme_phase_duration_add = monumental_scheme_phase_duration_bonus_value + } + + character_modifier = { + courting_scheme_phase_duration_add = medium_scheme_phase_duration_bonus_value + elope_scheme_phase_duration_add = medium_scheme_phase_duration_bonus_value + } + effect = { + custom_description_no_bullet = { + text = courtship_perk_effect + } + } +} + +promising_prospects_perk = { + lifestyle = martial_lifestyle + tree = chivalry + position = { 0 2 } + icon = node_martial + + parent = courtship_perk + + effect = { + custom_description_no_bullet = { + text = promising_prospects_perk_effect + } + } +} + +loyalty_and_respect_perk = { + lifestyle = martial_lifestyle + tree = chivalry + position = { 0 3 } + icon = node_martial + + parent = promising_prospects_perk + + effect = { + if = { + limit = { + NOT = { government_has_flag = government_is_landless_adventurer } + } + custom_description_no_bullet = { + text = loyalty_and_respect_perk_stats_effect + } + } + if = { + limit = { + government_has_flag = government_is_nomadic + } + custom_description_no_bullet = { + text = loyalty_and_respect_perk_obedience_effect + } + } + if = { + limit = { + government_has_mechanic = administrative + government_allows = merit + } + custom_description_no_bullet = { + text = candidate_pool_loyalty_and_respect_perk_effect + } + } + } + + government_character_modifier = { + flag = government_is_landless_adventurer + trait_track_wit_xp_gain_mult = 0.25 + } + + character_modifier = { + spouse_opinion = 50 + } +} + +chivalric_dominance_perk = { + lifestyle = martial_lifestyle + tree = chivalry + position = { 2 1 } + icon = node_martial + + parent = stalwart_leader_perk + + government_character_modifier = { + flag = government_is_administrative + invert_check = yes + knight_effectiveness_mult = 0.75 + } + government_character_modifier = { + flag = government_is_landless_adventurer + invert_check = yes + accolade_glory_gain_mult = 0.1 + } + + government_character_modifier = { + flag = government_is_landless_adventurer + trait_track_horse_xp_gain_mult = 0.25 + } + government_character_modifier = { + flag = government_is_administrative + same_heritage_county_advantage_add = 5 + } + + effect = { + if = { + limit = { + has_pam_dlc_trigger = yes + actor_incite_holy_war_shown_trigger = yes + } + custom_description_no_bullet = { text = chivalric_dominance_perk_incite_war_effect } + } + } +} + +never_back_down_perk = { + lifestyle = martial_lifestyle + tree = chivalry + position = { 2 2 } + icon = node_martial + + parent = chivalric_dominance_perk + + character_modifier = { + advantage = 5 + hard_casualty_modifier = -0.2 + tourney_participant_xp_gain_mult = 0.1 + } +} + +kingsguard_perk = { + lifestyle = martial_lifestyle + tree = chivalry + position = { 2 3 } + icon = node_martial + + parent = never_back_down_perk + + government_character_modifier = { + flag = government_is_landless_adventurer + trait_track_bow_xp_gain_mult = 0.25 + } + + government_character_modifier = { + flag = government_is_administrative + invert_check = yes + knight_limit = 4 + } + government_character_modifier = { + flag = government_is_administrative + knight_limit = 2 + } + government_character_modifier = { + flag = government_is_theocracy + enemy_hostile_scheme_success_chance_add = -5 + character_travel_safety = 10 + } +} + +peacemaker_perk = { + lifestyle = martial_lifestyle + tree = chivalry + position = { 1 4 } + icon = node_martial + + parent = loyalty_and_respect_perk + parent = kingsguard_perk + + effect = { + custom_description_no_bullet = { text = peacemaker_perk_effect } + if = { + limit = { + government_has_flag = government_is_mandala + house ?= { has_house_aspiration_parameter = aspect_of_serenity } + is_house_head = yes + } + custom_description_no_bullet = { text = mandala_peacemaker_perk_serenity_effect } + } + } +} + +gallant_perk = { + lifestyle = martial_lifestyle + tree = chivalry + position = { 1 5 } + icon = trait_gallant + + parent = peacemaker_perk + + trait = gallant + effect = { + add_trait_force_tooltip = gallant + } +} diff --git a/common/men_at_arms_types/00_cultural_maa_types.txt b/common/men_at_arms_types/00_cultural_maa_types.txt index 8457a3109..32b97b09a 100644 --- a/common/men_at_arms_types/00_cultural_maa_types.txt +++ b/common/men_at_arms_types/00_cultural_maa_types.txt @@ -42,7 +42,7 @@ huscarl = { can_recruit = { valid_for_maa_trigger = { PARAMETER = unlock_maa_huscarls } NOT = { - culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } + culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } @@ -338,7 +338,7 @@ monaspa = { can_recruit = { valid_for_maa_trigger = { PARAMETER = unlock_maa_monaspa } NOT = { - culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } + culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } @@ -382,7 +382,7 @@ cataphract = { can_recruit = { valid_for_maa_trigger = { PARAMETER = unlock_maa_cataphract } NOT = { - culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } + culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } @@ -528,7 +528,7 @@ horse_archers = { has_perk = planned_cultivation_perk location.county.culture ?= { culture_has_archer_cavalry_maa = yes } } - culture = { has_cultural_parameter = unlock_maa_horse_archers } + culture ?= { has_cultural_parameter = unlock_maa_horse_archers } mpo_can_recruit_nomad_maa_trigger = yes } } @@ -562,7 +562,7 @@ ayyar = { can_recruit = { valid_for_maa_trigger = { PARAMETER = unlock_maa_ayyar } NOT = { - culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } + culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } @@ -593,7 +593,7 @@ mubarizun = { can_recruit = { valid_for_maa_trigger = { PARAMETER = unlock_maa_mubarizun } NOT = { - culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } + culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } @@ -728,7 +728,7 @@ druzhina = { can_recruit = { valid_for_maa_trigger = { PARAMETER = unlock_maa_druzhina } NOT = { - culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } + culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } @@ -902,7 +902,7 @@ garudas = { can_recruit = { valid_for_maa_trigger = { PARAMETER = unlock_maa_garudas } NOT = { - culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } + culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } @@ -933,7 +933,7 @@ khandayat = { can_recruit = { valid_for_maa_trigger = { PARAMETER = unlock_maa_khandayat } NOT = { - culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } + culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } @@ -974,7 +974,7 @@ mountaineer = { can_recruit = { valid_for_maa_trigger = { PARAMETER = unlock_maa_mountaineer } NOT = { - culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } + culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } @@ -1148,7 +1148,7 @@ zbrojnosh = { can_recruit = { valid_for_maa_trigger = { PARAMETER = unlock_maa_zbrojnosh } NOT = { - culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } + culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } @@ -1183,7 +1183,7 @@ palace_guards = { can_recruit = { valid_for_maa_trigger = { PARAMETER = unlock_maa_palace_guards } NOT = { - culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } + culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } @@ -1290,7 +1290,7 @@ teulu = { } can_recruit = { - culture = { + culture ?= { OR = { this = culture:welsh this = culture:cumbrian diff --git a/common/men_at_arms_types/00_maa_types.txt b/common/men_at_arms_types/00_maa_types.txt index a5c6daa83..38808d898 100644 --- a/common/men_at_arms_types/00_maa_types.txt +++ b/common/men_at_arms_types/00_maa_types.txt @@ -270,11 +270,11 @@ armored_footmen = { } can_recruit = { - culture = { + culture ?= { has_innovation = innovation_quilted_armor } NOT = { - culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } + culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } NOR = { government_has_flag = government_is_nomadic @@ -323,7 +323,7 @@ onager = { siege_value = 0.2 can_recruit = { - culture = { + culture ?= { has_innovation = innovation_catapult NOR = { has_cultural_pillar = heritage_chinese @@ -374,7 +374,7 @@ armored_horsemen = { } can_recruit = { - culture = { + culture ?= { has_innovation = innovation_arched_saddle } NOR = { @@ -382,13 +382,13 @@ armored_horsemen = { government_has_flag = government_is_true_herder } NOT = { - culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } + culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } should_show_when_unavailable = { government_allows = subject_men_at_arms - culture = { has_cultural_era_or_later = culture_era_early_medieval } + culture ?= { has_cultural_era_or_later = culture_era_early_medieval } NOT = { has_access_to_maa = nomad_lancers } } @@ -433,7 +433,7 @@ mangonel = { siege_value = 0.3 can_recruit = { - culture = { + culture ?= { has_innovation = innovation_mangonel NOR = { has_cultural_pillar = heritage_chinese @@ -449,7 +449,7 @@ mangonel = { should_show_when_unavailable = { government_allows = subject_men_at_arms - culture = { has_cultural_era_or_later = culture_era_early_medieval } + culture ?= { has_cultural_era_or_later = culture_era_early_medieval } } buy_cost = { gold = mangonel_recruitment_cost } @@ -484,7 +484,7 @@ crossbowmen = { } can_recruit = { - culture = { + culture ?= { has_innovation = innovation_advanced_bowmaking } NOR = { @@ -495,7 +495,7 @@ crossbowmen = { should_show_when_unavailable = { government_allows = subject_men_at_arms - culture = { has_cultural_era_or_later = culture_era_high_medieval } + culture ?= { has_cultural_era_or_later = culture_era_high_medieval } } buy_cost = { gold = crossbowmen_recruitment_cost } @@ -535,7 +535,7 @@ trebuchet = { siege_value = 0.4 can_recruit = { - culture = { + culture ?= { has_innovation = innovation_trebuchet NOR = { has_cultural_pillar = heritage_chinese @@ -552,7 +552,7 @@ trebuchet = { should_show_when_unavailable = { government_allows = subject_men_at_arms - culture = { has_cultural_era_or_later = culture_era_high_medieval } + culture ?= { has_cultural_era_or_later = culture_era_high_medieval } } buy_cost = { gold = trebuchet_recruitment_cost } @@ -577,7 +577,7 @@ bombard = { siege_value = 0.6 can_recruit = { - culture = { + culture ?= { has_cultural_parameter = unlock_bombards NOR = { has_cultural_pillar = heritage_chinese @@ -593,7 +593,7 @@ bombard = { should_show_when_unavailable = { government_allows = subject_men_at_arms - culture = { has_cultural_era_or_later = culture_era_late_medieval } + culture ?= { has_cultural_era_or_later = culture_era_late_medieval } } buy_cost = { gold = bombard_recruitment_cost } @@ -615,7 +615,7 @@ handgunners = { can_recruit = { gunpowder_raise_limit_existing_gunpowder_units < gunpowder_raise_limit_existing_gunpowder_buildings # one powder magazine must be owned to support three handgunner regiments, regardless of maa size - culture = { has_cultural_parameter = unlock_handgunners } + culture ?= { has_cultural_parameter = unlock_handgunners } } terrain_bonus = { @@ -651,7 +651,7 @@ house_guard = { has_dynasty_perk = warfare_legacy_5 } NOT = { - culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } + culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } diff --git a/common/men_at_arms_types/09_mpo_maa_types.txt b/common/men_at_arms_types/09_mpo_maa_types.txt index 10a027a70..213ad2829 100644 --- a/common/men_at_arms_types/09_mpo_maa_types.txt +++ b/common/men_at_arms_types/09_mpo_maa_types.txt @@ -252,7 +252,7 @@ nomad_lancers = { can_recruit = { mpo_can_recruit_nomad_heavy_cavalry_maa_trigger = yes NOT = { - culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } + culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } @@ -341,7 +341,7 @@ cataphract_archers = { valid_for_maa_trigger = { PARAMETER = unlock_maa_cataphract_archers } #Either non-nomadic or has some dominance NOT = { - culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } + culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } OR = { NOT = { diff --git a/common/men_at_arms_types/N3OW_dlc_maa_types.txt b/common/men_at_arms_types/N3OW_dlc_maa_types.txt new file mode 100644 index 000000000..629148e73 --- /dev/null +++ b/common/men_at_arms_types/N3OW_dlc_maa_types.txt @@ -0,0 +1,313 @@ +emishi_horse_archers = { + type = archer_cavalry + + damage = 28 + toughness = 12 + pursuit = 35 + screen = 30 + + terrain_bonus = { + forest = { damage = 12 pursuit = 12 } + plains = { damage = 6 pursuit = 8 } + hills = { damage = 6 pursuit = 8 } + terraced_hills = { damage = 4 toughness = 6 } + mountains = { damage = 4 pursuit = 6 } + } + + counters = { + heavy_infantry = 1 + } + + can_recruit = { + culture ?= { has_cultural_parameter = unlock_emishi_horse_archers_units } + } + + buy_cost = { gold = light_cavalry_recruitment_cost } + low_maintenance_cost = { gold = light_cavalry_low_maint_cost } + high_maintenance_cost = { gold = light_cavalry_high_maint_cost } + provision_cost = @provisions_cost_cavalry_cheap + + stack = 100 + ai_quality = { + value = @cultural_maa_extra_ai_score + add = 100 #I mean... they're horse archers + } + icon = emishi_horse_archers +} + +ballista = { + type = siege_weapon + fights_in_main_phase = no + + damage = 0 + toughness = 12 + + siege_tier = 1 + siege_value = 0.2 + + can_recruit = { + culture ?= { + has_innovation = innovation_catapult + culture_uses_eastern_siege_weapons_trigger = yes + } + NOT = { government_has_flag = government_is_in_steppe } + } + + should_show_when_unavailable = { + government_allows = subject_men_at_arms + } + + buy_cost = { gold = ballista_recruitment_cost } + low_maintenance_cost = { gold = ballista_low_maint_cost } + high_maintenance_cost = { gold = ballista_high_maint_cost } + provision_cost = @provisions_cost_special_cheap + + stack = 10 + allowed_in_hired_troops = no + icon = ballista +} + +cloud_ladder = { + type = siege_weapon + fights_in_main_phase = no + + damage = 0 + toughness = 12 + + siege_tier = 2 + siege_value = 0.3 + + can_recruit = { + culture ?= { + has_innovation = innovation_mangonel + culture_uses_eastern_siege_weapons_trigger = yes + } + NOT = { government_has_flag = government_is_in_steppe } + } + + should_show_when_unavailable = { + government_allows = subject_men_at_arms + culture ?= { has_cultural_era_or_later = culture_era_early_medieval } + } + + buy_cost = { gold = cloud_ladder_recruitment_cost } + low_maintenance_cost = { gold = cloud_ladder_low_maint_cost } + high_maintenance_cost = { gold = cloud_ladder_high_maint_cost } + provision_cost = @provisions_cost_special_moderate + + stack = 10 + allowed_in_hired_troops = no + icon = cloud_ladder +} + +siege_tower = { + type = siege_weapon + fights_in_main_phase = no + + damage = 0 + toughness = 12 + + siege_tier = 3 + siege_value = 0.4 + + can_recruit = { + culture ?= { + has_innovation = innovation_trebuchet + culture_uses_eastern_siege_weapons_trigger = yes + } + NOT = { government_has_flag = government_is_in_steppe } + } + + should_show_when_unavailable = { + government_allows = subject_men_at_arms + culture ?= { has_cultural_era_or_later = culture_era_high_medieval } + } + + buy_cost = { gold = siege_tower_recruitment_cost } + low_maintenance_cost = { gold = siege_tower_low_maint_cost } + high_maintenance_cost = { gold = siege_tower_high_maint_cost } + provision_cost = @provisions_cost_special_expensive + + stack = 10 + allowed_in_hired_troops = no + icon = siege_tower +} + +cannon = { + type = siege_weapon + fights_in_main_phase = no + + damage = 0 + toughness = 12 + + siege_tier = 4 + siege_value = 0.6 + + can_recruit = { + culture ?= { + has_cultural_parameter = unlock_late_medieval_gunpowder_units + culture_uses_eastern_siege_weapons_trigger = yes + } + NOT = { government_has_flag = government_is_in_steppe } + } + + should_show_when_unavailable = { + government_allows = subject_men_at_arms + culture ?= { has_cultural_era_or_later = culture_era_late_medieval } + } + + buy_cost = { gold = cannon_recruitment_cost } + low_maintenance_cost = { gold = cannon_low_maint_cost } + high_maintenance_cost = { gold = cannon_high_maint_cost } + provision_cost = @provisions_cost_special_bankrupting + + stack = 10 + allowed_in_hired_troops = no + icon = cannon +} + +tarkhan = { + type = heavy_cavalry + + damage = 110 + toughness = 30 + pursuit = 30 + screen = 10 + + terrain_bonus = { + oasis = { damage = 30 } + drylands = { damage = 25 } + desert = { damage = 10 pursuit = 10 } + mountains = { damage = -30 } + wetlands = { damage = -80 toughness = -15 pursuit = -20 } + } + + counters = { + heavy_infantry = 1 + heavy_cavalry = 0.5 + gunpowder = 1 + } + + winter_bonus = { + normal_winter = { damage = -10 toughness = -5 } + harsh_winter = { damage = -20 toughness = -5 } + } + + can_recruit = { + OR = { + AND = { + has_government = landless_adventurer_government + has_perk = planned_cultivation_perk + location.culture ?= { has_cultural_parameter = unlock_maa_tarkhan } + } + culture ?= { has_cultural_parameter = unlock_maa_tarkhan } + } + NOT = { + culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } + } + } + + buy_cost = { gold = cataphract_recruitment_cost } + low_maintenance_cost = { gold = cataphract_low_maint_cost } + high_maintenance_cost = { gold = cataphract_high_maint_cost } + provision_cost = @provisions_cost_cavalry_expensive + + stack = 50 + ai_quality = { value = @[cultural_maa_extra_ai_score + 60] } + icon = tarkhan + +} + +zupin_warrior = { + type = pikemen + + damage = 16 + toughness = 16 + pursuit = 0 + screen = 10 + + can_recruit = { + OR = { + AND = { + has_government = landless_adventurer_government + has_perk = planned_cultivation_perk + location.culture ?= { has_cultural_parameter = unlock_maa_zupin_warrior } + } + culture ?= { has_cultural_parameter = unlock_maa_zupin_warrior } + } + } + + terrain_bonus = { + mountains = { toughness = 12 } + desert_mountains = { toughness = 12 } + hills = { damage = 4 toughness = 8 } + forest = { damage = 4 toughness = 8 pursuit = 4 } + } + + counters = { + heavy_cavalry = 0.5 + heavy_infantry = 1 + light_cavalry = 1 + } + + winter_bonus = { + normal_winter = { damage = 4 pursuit = 5 } + } + + buy_cost = { gold = bondi_recruitment_cost } + low_maintenance_cost = { gold = bondi_low_maint_cost } + high_maintenance_cost = { gold = bondi_high_maint_cost } + provision_cost = @provisions_cost_infantry_moderate + + stack = 100 + ai_quality = { value = @[cultural_maa_extra_ai_score + 20] } + icon = zupin_spearmen +} + +tawashi = { + type = light_cavalry + + damage = 25 + toughness = 15 + pursuit = 30 + screen = 30 + + terrain_bonus = { + plains = { damage = 10 } + drylands = { damage = 10 } + hills = { damage = 10 } + mountains = { damage = 10 pursuit = 10 } + desert_mountains = { damage = 10 pursuit = 10 } + wetlands = { damage = -15 toughness = -10 pursuit = -30 screen = -30 } + } + + counters = { + archers = 1 + heavy_infantry = 1 + gunpowder = 1 + } + + can_recruit = { + OR = { + AND = { + has_government = landless_adventurer_government + has_perk = planned_cultivation_perk + location.culture ?= { has_cultural_parameter = unlock_maa_tawashi } + } + culture ?= { has_cultural_parameter = unlock_maa_tawashi } + } + } + + winter_bonus = { + harsh_winter = { damage = -5 toughness = -3 } + } + + buy_cost = { gold = tawashi_recruitment_cost } + low_maintenance_cost = { gold = tawashi_low_maint_cost } + high_maintenance_cost = { gold = tawashi_high_maint_cost } + provision_cost = @provisions_cost_cavalry_moderate + + stack = 100 + ai_quality = { value = @[cultural_maa_extra_ai_score + 40] } + icon = tawashi +} \ No newline at end of file diff --git a/common/men_at_arms_types/NEOW_maa_types.txt b/common/men_at_arms_types/NEOW_maa_types.txt index d0bebad10..384ca014c 100644 --- a/common/men_at_arms_types/NEOW_maa_types.txt +++ b/common/men_at_arms_types/NEOW_maa_types.txt @@ -70,7 +70,7 @@ redcoats = { can_recruit = { gunpowder_raise_limit_existing_gunpowder_units < gunpowder_raise_limit_existing_gunpowder_buildings # one powder magazine must be owned to support three handgunner regiments, regardless of maa size - culture = { + culture ?= { has_innovation = innovation_redcoats } } @@ -396,7 +396,7 @@ NEOW_militia = { limit = { exists = cp:councillor_marshal } cp:councillor_marshal = { martial = 13 } } - faith = { has_doctrine_parameter = allows_communal_settlement } + faith ?= { has_doctrine_parameter = allows_communal_settlement } } } @@ -503,7 +503,7 @@ carabineers = { can_recruit = { gunpowder_raise_limit_existing_gunpowder_units < gunpowder_raise_limit_existing_gunpowder_buildings # one powder magazine must be owned to support three handgunner regiments, regardless of maa size - culture = { has_cultural_parameter = unlock_late_medieval_gunpowder_units } + culture ?= { has_cultural_parameter = unlock_late_medieval_gunpowder_units } } buy_cost = { gold = horse_archers_recruitment_cost } @@ -548,7 +548,7 @@ cowboys = { can_recruit = { gunpowder_raise_limit_existing_gunpowder_units < gunpowder_raise_limit_existing_gunpowder_buildings # one powder magazine must be owned to support three handgunner regiments, regardless of maa size - culture = { has_cultural_parameter = unlock_maa_kuhjung } + culture ?= { has_cultural_parameter = unlock_maa_kuhjung } } buy_cost = { gold = horse_archers_recruitment_cost } @@ -583,7 +583,7 @@ full_plate_footmen = { } can_recruit = { - culture = { + culture ?= { has_innovation = innovation_plate_armor } NOR = { @@ -1088,7 +1088,7 @@ blauwegarde = { can_recruit = { gunpowder_raise_limit_existing_gunpowder_units < gunpowder_raise_limit_existing_gunpowder_buildings # one powder magazine must be owned to support three handgunner regiments, regardless of maa size - culture = { + culture ?= { has_innovation = innovation_blauwegarde } } @@ -1173,7 +1173,7 @@ karabiniers = { can_recruit = { gunpowder_raise_limit_existing_gunpowder_units < gunpowder_raise_limit_existing_gunpowder_buildings # one powder magazine must be owned to support three handgunner regiments, regardless of maa size - culture = { has_cultural_parameter = unlock_maa_karabiniers } + culture ?= { has_cultural_parameter = unlock_maa_karabiniers } } buy_cost = { gold = horse_archers_recruitment_cost } @@ -1345,7 +1345,7 @@ legionarios = { can_recruit = { gunpowder_raise_limit_existing_gunpowder_units < gunpowder_raise_limit_existing_gunpowder_buildings # one powder magazine must be owned to support three handgunner regiments, regardless of maa size - culture = { + culture ?= { has_innovation = innovation_legionarios } } diff --git a/common/modifier_definition_formats/NEOW_religion_definitions.txt b/common/modifier_definition_formats/NEOW_religion_definitions.txt index 0a09e4b1c..bbafc5c98 100644 --- a/common/modifier_definition_formats/NEOW_religion_definitions.txt +++ b/common/modifier_definition_formats/NEOW_religion_definitions.txt @@ -8,7 +8,6 @@ druidic_religion_opinion = { decimals = 0 } europeanist_religion_opinion = { decimals = 0 } finnic_religion_opinion = { decimals = 0 } folk_germanic_religion_opinion = { decimals = 0 } -mediterranean_religion_opinion = { decimals = 0 } novelist_religion_opinion = { decimals = 0 } eastern_orthodox_religion_opinion = { decimals = 0 } french_pantheon_religion_opinion = { decimals = 0 } diff --git a/common/on_action/title_on_actions.txt b/common/on_action/title_on_actions.txt index aeaf0147a..3564f2529 100644 --- a/common/on_action/title_on_actions.txt +++ b/common/on_action/title_on_actions.txt @@ -2058,6 +2058,7 @@ on_title_gain = { } if = { # Get legitimacy from Reception Hall House Bonus limit = { + exists = house house = { has_variable = ep3_legacy_legitimacy_counter } primary_title = scope:title } @@ -2305,7 +2306,7 @@ on_title_gain = { # TGP, bow before liege mandated if = { limit = { - culture = { has_cultural_parameter = must_pledge_loyalty_to_liege } + culture ?= { has_cultural_parameter = must_pledge_loyalty_to_liege } } if = { # if you are now the top liege, all your direct vassals with the same parameter who have not yet sworn fealty to you must swear fealty limit = { @@ -2315,7 +2316,7 @@ on_title_gain = { every_vassal = { if = { limit = { - culture = { has_cultural_parameter = must_pledge_loyalty_to_liege } + culture ?= { has_cultural_parameter = must_pledge_loyalty_to_liege } OR = { government_has_flag = government_is_feudal government_has_flag = government_is_clan @@ -2334,7 +2335,7 @@ on_title_gain = { } else_if = { # if you now have a new liege, and they also follow a culture with the Pay Homage requirement, you must swear continued fealty limit = { - liege.culture = { has_cultural_parameter = must_pledge_loyalty_to_liege } + liege.culture ?= { has_cultural_parameter = must_pledge_loyalty_to_liege } OR = { government_has_flag = government_is_feudal government_has_flag = government_is_clan @@ -3179,7 +3180,7 @@ on_title_lost = { if = { limit = { #We only want to grab tribal cultures. - culture = { + culture ?= { NOT = { has_cultural_era_or_later = culture_era_early_medieval } } #Must have lost their last piece of land. diff --git a/common/religion/broken_ass_old_religions/doctrine_types/30_core_tenets.txt b/common/religion/broken_ass_old_religions/doctrine_types/30_core_tenets.txt index 1e223e076..11ecc4790 100644 --- a/common/religion/broken_ass_old_religions/doctrine_types/30_core_tenets.txt +++ b/common/religion/broken_ass_old_religions/doctrine_types/30_core_tenets.txt @@ -3998,7 +3998,7 @@ } is_shown = { - religion_tag = mediterranean_religion + religion_tag = folk_germanic_religion } parameters = { diff --git a/common/script_values/00_dlc_fp3_script_values.txt b/common/script_values/00_dlc_fp3_script_values.txt new file mode 100644 index 000000000..92c15348c --- /dev/null +++ b/common/script_values/00_dlc_fp3_script_values.txt @@ -0,0 +1,1458 @@ +############# +# FP3 Scripted Values +############# + +################################################## +# Unity + +critical_house_unity = 20 +terrible_house_unity = 40 +low_house_unity = 60 +mediocre_house_unity = 80 +average_house_unity = 100 +decent_house_unity = 120 +good_house_unity = 140 +high_house_unity = 160 +very_high_house_unity = 180 + +opinion_thresholds_for_antagonistic_independence = -50 + +number_of_futuwaa_members = { + value = 0 + every_courtier = { + limit = { fp3_is_valid_futuwaa_member = { SPONSOR = root } } + add = 1 + } + house ?= { + every_house_member = { + limit = { + fp3_is_valid_futuwaa_member = { SPONSOR = root } + NOT = { is_courtier_of = root } + } + add = 1 + } + } +} + +number_of_madrasa_pupils = { + value = 0 + every_courtier = { + limit = { fp3_is_valid_madrasa_pupil = { SPONSOR = root } } + add = 1 + } + house ?= { + every_house_member = { + limit = { + fp3_is_valid_madrasa_pupil = { SPONSOR = root } + NOT = { is_courtier_of = root } + } + add = 1 + } + } +} + +################################################## +# Struggle + +fp3_house_modifier_concession_ending_duration = 100 +fp3_house_modifier_sunder_caliphate_duration = 100 + +fp3_concession_death_countdown = { + value = current_year + subtract = 866 + multiply = 1 +} + +fp3_persia_ownage_percentage_for_foundation = 0.20 + +fp3_persia_supporter_rulers_decimal_value = { + value = 50 + divide = 100 + max = 1 +} + +fp3_persia_supporter_rulers_max_value = { + value = 0 + struggle:persian_struggle ?= { + every_involved_ruler = { + limit = { + is_landed = yes + highest_held_title_tier >= tier_county + OR = { + NOT = { has_title = title:d_sunni } + OR = { + top_liege = this + is_vassal_of = title:d_sunni.holder + } + } + } + add = 1 + } + } +} + +fp3_persia_supporter_rulers_half_value = { + value = fp3_persia_supporter_rulers_max_value + divide = 2 + ceiling = yes +} + +fp3_persia_supporter_rulers_count_value = { + value = 0 + struggle:persian_struggle ?= { + every_involved_ruler = { + limit = { + is_landed = yes + highest_held_title_tier >= tier_county + OR = { + NOT = { has_title = title:d_sunni } + OR = { + top_liege = this + is_vassal_of = title:d_sunni.holder + } + } + # Trigger + has_trait = fp3_struggle_supporter + } + add = 1 + } + } + floor = yes +} + +fp3_persia_iranian_rulers_count_value = { + value = 0 + struggle:persian_struggle ?= { + every_involved_ruler = { + limit = { + is_landed = yes + highest_held_title_tier >= tier_county + culture = { has_cultural_pillar = heritage_iranian } + } + add = 1 + } + every_interloper_ruler = { + limit = { + is_landed = yes + highest_held_title_tier >= tier_county + culture = { has_cultural_pillar = heritage_iranian } + } + add = 1 + } + } + floor = yes +} + +fp3_persia_all_rulers_count_value = { + value = 0 + struggle:persian_struggle ?= { + every_involved_ruler = { + limit = { + is_landed = yes + highest_held_title_tier >= tier_county + } + add = 1 + } + every_interloper_ruler = { + limit = { + is_landed = yes + highest_held_title_tier >= tier_county + } + add = 1 + } + } + floor = yes +} + +fp3_persia_all_rulers_requirement_value = { + value = fp3_persia_all_rulers_count_value + multiply = 0.6 +} + +fp3_persia_all_rulers_percentage_value = { + value = fp3_persia_iranian_rulers_count_value + divide = { + value = fp3_persia_all_rulers_count_value + min = 1 + } +} + +fp3_persia_independent_detractor_rulers_count_value = { + value = 0 + struggle:persian_struggle ?= { + every_involved_ruler = { + limit = { + top_liege = this + is_landed = yes + highest_held_title_tier >= tier_duchy + has_trait = fp3_struggle_detractor + } + add = 1 + } + every_interloper_ruler = { + limit = { + top_liege = this + is_landed = yes + highest_held_title_tier >= tier_duchy + has_trait = fp3_struggle_detractor + } + add = 1 + } + } + floor = yes +} + +fp3_persia_independent_non_sunni_rulers_count_value = { + value = 0 + struggle:persian_struggle ?= { + every_involved_ruler = { + limit = { + top_liege = this + is_landed = yes + highest_held_title_tier >= tier_duchy + rite = { + NOT = { + rite_has_doctrine = muhammad_succession_sunni_doctrine + } + } + } + add = 1 + } + every_interloper_ruler = { + limit = { + top_liege = this + is_landed = yes + highest_held_title_tier >= tier_duchy + rite = { + NOT = { + rite_has_doctrine = muhammad_succession_sunni_doctrine + } + } + } + add = 1 + } + } + floor = yes +} + +fp3_iranian_sub_realm_counties_value = { + value = 0 + every_sub_realm_county = { + limit = { + culture = { has_cultural_pillar = heritage_iranian } + } + add = 1 + } + floor = yes +} + +fp3_persia_flame_of_iran_independent_value = { + value = 0 + struggle:persian_struggle ?= { + every_involved_ruler = { + limit = { + top_liege != this + culture = { has_cultural_pillar = heritage_iranian } + exists = liege + NOT = { + liege.culture = { has_cultural_pillar = heritage_iranian } + } + } + add = 1 + } + } +} + +# Paramameter for percentage of Persia you must control +fp3_persia_owned_for_rekindle_persia_percent_value = 30 + +# Uses above to plug in to script as a decimal +fp3_persia_owned_for_rekindle_persia_decimal_value = { + value = fp3_persia_owned_for_rekindle_persia_percent_value + divide = 100 + max = 1 +} + +fp3_iranian_current_owned_persia_value = { + value = 0 + every_county_in_region = { + region = world_persian_empire + limit = { + holder.top_liege = root + } + add = 1 + } + divide = { + value = 0 + every_county_in_region = { + region = world_persian_empire + add = 1 + } + } + multiply = 100 +} + +# Paramameter for percentage of Persia that must be iranian +fp3_iranian_culture_for_rekindle_persia_percent_value = 75 + +fp3_iranian_culture_for_rekindle_persia_decimal_value = { + value = fp3_iranian_culture_for_rekindle_persia_percent_value + divide = 100 + max = 1 +} + +fp3_iranian_culture_current_persian_culture_value = { + value = 0 + every_county_in_region = { + region = world_persian_empire + limit = { + culture = { has_cultural_pillar = heritage_iranian } + } + add = 1 + } + divide = { + value = 0 + every_county_in_region = { + region = world_persian_empire + add = 1 + } + } + multiply = 100 +} + +fp3_shia_caliphate_ending_conversion_chance_percent_value = 75 + +fp3_shia_caliphate_ending_conversion_chance_decimal_value = { + value = fp3_iranian_culture_for_rekindle_persia_percent_value + divide = 100 + max = 1 +} + +fp3_strengthen_caliphate_ending_conversion_chance_percent_value = 50 + +fp3_strengthen_caliphate_ending_conversion_chance_decimal_value = { + value = fp3_iranian_culture_for_rekindle_persia_percent_value + divide = 100 + max = 1 +} + +fp3_struggle_ending_conversion_modifier_value = 1.5 + +fp3_iranian_faith_for_rekindle_persia_conversion_chance_percent_value = 50 + +fp3_iranian_faith_for_rekindle_persia_conversion_chance_decimal_value = { + value = fp3_iranian_culture_for_rekindle_persia_percent_value + divide = 100 + max = 1 +} + +fp3_current_nb_ally_shia_caliphate = { + value = 0 + every_ally = { + limit = { highest_held_title_tier >= tier_kingdom } + add = 1 + } +} + +################################################## +# Tax Collector +tax_collector_aptitude_miniscule_increase = { value = 5 } + +tax_collector_aptitude_minor_increase = { value = 10 } + +tax_collector_aptitude_medium_increase = { value = 15 } + +tax_collector_aptitude_major_increase = { value = 20 } + +tax_collector_aptitude_massive_increase = { value = 25 } + +base_tax_collector_aptitude_score = { + value = 1 + add = { + value = diplomacy + max = 50 + desc = court_position_skill_diplomacy + } + add = { + value = martial + max = 50 + desc = court_position_skill_martial + } + add = { + value = stewardship + max = 50 + desc = court_position_skill_stewardship + } + add = { + value = intrigue + max = 50 + desc = court_position_skill_intrigue + } + add = { + value = learning + multiply = 2 + max = 50 + desc = court_position_skill_learning + } + + if = { + limit = { + has_trait = just + } + add = { + value = 10 + desc = court_position_just_trait + } + } + if = { + limit = { + has_trait = diplomat + } + add = { + value = 10 + desc = court_position_diplomat_trait + } + } + if = { + limit = { + has_trait = administrator + } + add = { + value = 10 + desc = court_position_administrator_trait + } + } + if = { + limit = { + has_trait = avaricious + } + add = { + value = 10 + desc = court_position_avaricious_trait + } + } + if = { + limit = { + has_character_modifier = fp3_capable_magistrates_modifier + } + add = { + value = tax_collector_aptitude_major_increase + desc = capable_magistrates_modifier + } + } + if = { + limit = { + has_character_flag = fp3_inspired_tax_collector + } + add = { + value = 20 + desc = fp3_inspired_tax_collector + } + } + # Opinion of liege + add = { + desc = opinion_of_liege + value = { + if = { + limit = { + save_temporary_opinion_value_as = { name = target_opinion target = liege } + } + } + if = { + limit = { + scope:target_opinion >= very_high_positive_opinion + } + add = 20 + } + else_if = { + limit = { + scope:target_opinion >= high_positive_opinion + } + add = 15 + } + else_if = { + limit = { + scope:target_opinion >= medium_positive_opinion + } + add = 10 + } + else_if = { + limit = { + scope:target_opinion >= low_positive_opinion + } + add = 5 + } + else = { + add = 0 + } + } + } + + # Cultural Tradition + if = { + limit = { + culture ?= { has_cultural_parameter = characters_are_better_tax_collector } + } + add = { + value = tax_collector_aptitude_medium_increase + desc = traditions_cheaper_value + } + } + + if = { + limit = { + is_landed = yes + } + add = { + value = -10 + desc = court_position_landed_penalty + } + } + + # Flag Check (for debug/event usage) - Use debug.9610 + if = { + limit = { has_character_flag = is_guaranteed_excellent_tax_collector } + add = 130 + } + + add = court_position_aptitude_family_business_value + add = court_position_aptitude_eunuch_tradition_value +} + +tax_collector_aptitude_score = { + value = base_tax_collector_aptitude_score + + # Viziers + if = { + limit = { + liege ?= { + exists = diarch + has_diarchy_active_parameter = diarch_aptitude_helps_tax_collectors_toggle + } + } + # Are we the vizier? If yes, we get a flat boost tied to our Scales of Power swing. + if = { + limit = { this = liege.diarch } + add = { + value = diarch_aptitude_helps_tax_collectors_buffed_by_swing_value + desc = diarchy_tax_collector_boost.scales_of_power + } + } + # Else we're someone different, so we get a fraction of the vizier's aptitude added to our own. + else = { + ## Plenty of vizier's aptitude. + if = { + limit = { + liege = { has_diarchy_active_parameter = diarch_aptitude_helps_tax_collectors_t4 } + } + add = { + value = { + value = liege.diarch.base_tax_collector_aptitude_score + # But remove the buff the vizier got from the SoP swing or things'll get ridiculous. + subtract = diarch_aptitude_helps_tax_collectors_buffed_by_swing_value + # Now, reduce according to the correct percentage. + multiply = diarch_aptitude_helps_tax_collectors_t4_value + # Just in case, let's min things. + min = 1 + } + desc = diarchy_tax_collector_boost.diarch_aptitude.t4 + } + } + ## Most of vizier's aptitude. + else_if = { + limit = { + liege = { has_diarchy_active_parameter = diarch_aptitude_helps_tax_collectors_t3 } + } + add = { + value = { + value = liege.diarch.base_tax_collector_aptitude_score + # But remove the buff the vizier got from the SoP swing or things'll get ridiculous. + subtract = diarch_aptitude_helps_tax_collectors_buffed_by_swing_value + # Now, reduce according to the correct percentage. + multiply = diarch_aptitude_helps_tax_collectors_t3_value + # Just in case, let's min things. + min = 1 + } + desc = diarchy_tax_collector_boost.diarch_aptitude.t3 + } + } + ## Some of vizier's aptitude. + else_if = { + limit = { + liege = { has_diarchy_active_parameter = diarch_aptitude_helps_tax_collectors_t2 } + } + add = { + value = { + value = liege.diarch.base_tax_collector_aptitude_score + # But remove the buff the vizier got from the SoP swing or things'll get ridiculous. + subtract = diarch_aptitude_helps_tax_collectors_buffed_by_swing_value + # Now, reduce according to the correct percentage. + multiply = diarch_aptitude_helps_tax_collectors_t2_value + # Just in case, let's min things. + min = 1 + } + desc = diarchy_tax_collector_boost.diarch_aptitude.t2 + } + } + ## A little of vizier's aptitude. + else_if = { + limit = { + liege = { has_diarchy_active_parameter = diarch_aptitude_helps_tax_collectors_t1 } + } + add = { + value = { + value = liege.diarch.base_tax_collector_aptitude_score + # But remove the buff the vizier got from the SoP swing or things'll get ridiculous. + subtract = diarch_aptitude_helps_tax_collectors_buffed_by_swing_value + # Now, reduce according to the correct percentage. + multiply = diarch_aptitude_helps_tax_collectors_t1_value + # Just in case, let's min things. + min = 1 + } + desc = diarchy_tax_collector_boost.diarch_aptitude.t1 + } + } + } + } +} + +diarch_aptitude_helps_tax_collectors_buffed_by_swing_multiplier_value = 0.5 +diarch_aptitude_helps_tax_collectors_buffed_by_swing_value = { + value = liege.diarchy_swing + multiply = diarch_aptitude_helps_tax_collectors_buffed_by_swing_multiplier_value +} +diarch_aptitude_helps_tax_collectors_t1_value = 0.1 +diarch_aptitude_helps_tax_collectors_t2_value = 0.2 +diarch_aptitude_helps_tax_collectors_t3_value = 0.4 +diarch_aptitude_helps_tax_collectors_t4_value = 0.6 + + +preferred_tax_collector_modifier = { + value = 0 + if = { # Let's prioritize any close family members (cause that's more interesting) + add = 25 + limit = { + is_close_family_of = root + } + } +} +################################################## + +################################################## +# Decisions +embellish_capital_gold_cost = { value = major_gold_value } + +claim_the_imamate_decision_same_faith_county_count = 5 + +claim_the_imamate_decision_same_faith_greater_county_count = 15 + +claim_the_imamate_decision_own_max_sins = 1 + +promote_persian_scripture_piety_cost = { value = major_piety_value } + +promote_persian_scripture_conversion_modifier_value = 1.5 + +promote_persian_scripture_fundamentalist_stress_value = { value = major_stress_gain } + +consulted_house_councillors_percentage = 10 + +favour_skilled_outsiders_decision_prestige_cost_value = { + # Scales to tier. + ## Counts pay basically nothing. + if = { + limit = { highest_held_title_tier = tier_county } + add = minor_prestige_value + } + ## Dukes pay a bit. + else_if = { + limit = { highest_held_title_tier = tier_duchy } + add = medium_prestige_value + } + ## Kings pay a moderate amount. + else_if = { + limit = { highest_held_title_tier = tier_kingdom } + add = 225 + } + ## Emperors pay a substantial amount. + else_if = { + limit = { highest_held_title_tier = tier_empire } + add = 300 + } + else_if = { + limit = { highest_held_title_tier = tier_hegemony } + add = 450 + } +} + + +favour_skilled_outsiders_decision_skill_threshold_value = high_skill_rating + +favour_skilled_outsiders_decision_tally_offended_courtlies_value = { + value = 0 + every_vassal = { + limit = { favour_skilled_outsiders_decision_grab_courtlies_trigger = yes } + } + add = 1 +} + +favour_skilled_outsiders_decision_tally_offended_landless_councillors_value = { + value = 0 + every_councillor = { + limit = { favour_skilled_outsiders_decision_grab_landless_councillors_trigger = yes } + } + add = 1 +} + +favour_skilled_outsiders_decision_tally_offended_non_courtlies_value = { + value = 0 + every_vassal = { + limit = { favour_skilled_outsiders_decision_non_courtlies_trigger = yes } + } + add = 1 +} + +fp3_skilled_outsider_template_diplomacy_min_value = { + # Is this a primary skill for this outsider? + if = { + limit = { scope:outsider_diplomacy_martial = yes } + # Guarantee a nice minimum rather than using the usual variance rules. + add = high_skill_rating + } + # Is this a secondary skill for this outsider? + else_if = { + limit = { scope:outsider_stewardship_diplomacy = yes } + # And again, guarantee a nice minimum without variance. + add = decent_skill_rating + } + # Otherwise, this is an irrelevant skill for this outsider. + else = { add = min_template_low_skill } +} + +fp3_skilled_outsider_template_diplomacy_max_value = { + # Is this a primary skill for this outsider? + if = { + limit = { scope:outsider_diplomacy_martial = yes } + add = max_template_high_skill + } + # Is this a secondary skill for this outsider? + else_if = { + limit = { scope:outsider_stewardship_diplomacy = yes } + add = max_template_decent_skill + } + # Otherwise, this is an irrelevant skill for this outsider. + else = { add = max_template_low_skill } +} + +fp3_skilled_outsider_template_martial_min_value = { + # Is this a primary skill for this outsider? + if = { + limit = { scope:outsider_martial_prowess = yes } + # Guarantee a nice minimum rather than using the usual variance rules. + add = high_skill_rating + } + # Is this a secondary skill for this outsider? + else_if = { + limit = { scope:outsider_diplomacy_martial = yes } + # And again, guarantee a nice minimum without variance. + add = decent_skill_rating + } + # Otherwise, this is an irrelevant skill for this outsider. + else = { add = min_template_low_skill } +} + +fp3_skilled_outsider_template_martial_max_value = { + # Is this a primary skill for this outsider? + if = { + limit = { scope:outsider_martial_prowess = yes } + add = max_template_high_skill + } + # Is this a secondary skill for this outsider? + else_if = { + limit = { scope:outsider_diplomacy_martial = yes } + add = max_template_decent_skill + } + # Otherwise, this is an irrelevant skill for this outsider. + else = { add = max_template_low_skill } +} + +fp3_skilled_outsider_template_stewardship_min_value = { + # Is this a primary skill for this outsider? + if = { + limit = { scope:outsider_stewardship_diplomacy = yes } + # Guarantee a nice minimum rather than using the usual variance rules. + add = high_skill_rating + } + # Is this a secondary skill for this outsider? + else_if = { + limit = { scope:outsider_intrigue_stewardship = yes } + # And again, guarantee a nice minimum without variance. + add = decent_skill_rating + } + # Otherwise, this is an irrelevant skill for this outsider. + else = { add = min_template_low_skill } +} + +fp3_skilled_outsider_template_stewardship_max_value = { + # Is this a primary skill for this outsider? + if = { + limit = { scope:outsider_stewardship_diplomacy = yes } + add = max_template_high_skill + } + # Is this a secondary skill for this outsider? + else_if = { + limit = { scope:outsider_intrigue_stewardship = yes } + add = max_template_decent_skill + } + # Otherwise, this is an irrelevant skill for this outsider. + else = { add = max_template_low_skill } +} + +fp3_skilled_outsider_template_intrigue_min_value = { + # Is this a primary skill for this outsider? + if = { + limit = { scope:outsider_intrigue_stewardship = yes } + # Guarantee a nice minimum rather than using the usual variance rules. + add = high_skill_rating + } + # Is this a secondary skill for this outsider? + else_if = { + limit = { scope:outsider_learning_intrigue = yes } + # And again, guarantee a nice minimum without variance. + add = decent_skill_rating + } + # Otherwise, this is an irrelevant skill for this outsider. + else = { add = min_template_low_skill } +} + +fp3_skilled_outsider_template_intrigue_max_value = { + # Is this a primary skill for this outsider? + if = { + limit = { scope:outsider_intrigue_stewardship = yes } + add = max_template_high_skill + } + # Is this a secondary skill for this outsider? + else_if = { + limit = { scope:outsider_learning_intrigue = yes } + add = max_template_decent_skill + } + # Otherwise, this is an irrelevant skill for this outsider. + else = { add = max_template_low_skill } +} + +fp3_skilled_outsider_template_learning_min_value = { + # Is this a primary skill for this outsider? + if = { + limit = { scope:outsider_learning_intrigue = yes } + # Guarantee a nice minimum rather than using the usual variance rules. + add = high_skill_rating + } + # Is this a secondary skill for this outsider? + else_if = { + limit = { scope:outsider_prowess_learning = yes } + # And again, guarantee a nice minimum without variance. + add = decent_skill_rating + } + # Otherwise, this is an irrelevant skill for this outsider. + else = { add = min_template_low_skill } +} + +fp3_skilled_outsider_template_learning_max_value = { + # Is this a primary skill for this outsider? + if = { + limit = { scope:outsider_learning_intrigue = yes } + add = max_template_high_skill + } + # Is this a secondary skill for this outsider? + else_if = { + limit = { scope:outsider_prowess_learning = yes } + add = max_template_decent_skill + } + # Otherwise, this is an irrelevant skill for this outsider. + else = { add = max_template_low_skill } +} + +fp3_skilled_outsider_template_prowess_min_value = { + # Is this a primary skill for this outsider? + if = { + limit = { scope:outsider_prowess_learning = yes } + # Guarantee a nice minimum rather than using the usual variance rules. + add = high_skill_rating + } + # Is this a secondary skill for this outsider? + else_if = { + limit = { scope:outsider_martial_prowess = yes } + # And again, guarantee a nice minimum without variance. + add = decent_skill_rating + } + # Otherwise, this is an irrelevant skill for this outsider. + else = { add = min_template_low_skill } +} + +fp3_skilled_outsider_template_prowess_max_value = { + # Is this a primary skill for this outsider? + if = { + limit = { scope:outsider_prowess_learning = yes } + add = max_template_high_skill + } + # Is this a secondary skill for this outsider? + else_if = { + limit = { scope:outsider_martial_prowess = yes } + add = max_template_decent_skill + } + # Otherwise, this is an irrelevant skill for this outsider. + else = { add = max_template_low_skill } +} + +fp3_skilled_outsider_minimum_main_skill_batch_b_char1_value = { + # Three points above... + value = 3 + if = { + limit = { scope:outsider_diplomacy_martial = yes } + add = diplomacy + } + if = { + limit = { scope:outsider_martial_prowess = yes } + add = martial + } + if = { + limit = { scope:outsider_prowess_learning = yes } + add = prowess + } + if = { + limit = { scope:outsider_learning_intrigue = yes } + add = learning + } + if = { + limit = { scope:outsider_intrigue_stewardship = yes } + add = intrigue + } + if = { + limit = { scope:outsider_stewardship_diplomacy = yes } + add = stewardship + } +} + +fp3_skilled_outsider_minimum_main_skill_batch_b_char2_value = { + # Two points below... + value = -2 + if = { + limit = { scope:outsider_diplomacy_martial = yes } + add = diplomacy + } + if = { + limit = { scope:outsider_martial_prowess = yes } + add = martial + } + if = { + limit = { scope:outsider_prowess_learning = yes } + add = prowess + } + if = { + limit = { scope:outsider_learning_intrigue = yes } + add = learning + } + if = { + limit = { scope:outsider_intrigue_stewardship = yes } + add = intrigue + } + if = { + limit = { scope:outsider_stewardship_diplomacy = yes } + add = stewardship + } +} + +################################################## +# Military +fp3_realm_based_mercenary_cost = { + # Sample formula + # X * (Y + (Z/10) # Real example: 1162 * (0.6 + (4 / 10)) = 1162, meaning that if you have 4 counties, you get no discount, but no increase either. + # X is the initial cost. It is not in the operation above because it is applied post-facto as a modifier. + # Y is our base value, since we want to make the initial cost cheaper with a multiplication, it is a decimal. I chose 0.6, but it can be tweaked. + # Z is realm size. We turn it into a decimal so that it can then be added to our base value (Y), increasing the cost to either a lesser discount or an upsell based on size. + value = 0.6 + add = { + value = sub_realm_size + divide = 10 + } +} + +fp3_request_invasion_troop_value_estimate = { + value = scope:recipient.max_military_strength + subtract = scope:secondary_recipient.max_military_strength + divide = 20 + round = yes +} + +fp3_request_invasion_troop_value_bonus_troops = { + value = scope:recipient.max_military_strength + subtract = scope:secondary_recipient.max_military_strength + divide = 500 + round = yes + min = 1 + max = 10 +} + +fp3_request_invasion_troop_value_bonus_levy_troops = { + value = fp3_request_invasion_troop_value_bonus_troops + multiply = 100 +} + +fp3_request_invasion_troop_value_bonus_levy_nomads = { + value = fp3_request_invasion_troop_value_bonus_troops +} + + + +# The cost in gold of sponsoring a new research project +fp3_research_base_cost = { + value = medium_gold_value +} + + +################################################## +# Seljuk invaion + +fp3_seljuk_chance_of_appearance = 10 +fp3_chance_female_leader = { + value = 0 + if = { + limit = { has_game_rule = inversed_gender_equality } + add = 100 + } + else_if = { + limit = { has_game_rule = full_gender_equality } + add = 50 + } + else = { + add = 0 + } +} + +fp3_seljuk_invasion_troop_gain_minor = 1 +fp3_seljuk_invasion_troop_gain_small = 2 +fp3_seljuk_invasion_troop_gain_medium = 3 +fp3_seljuk_invasion_troop_gain_major = 4 +fp3_seljuk_invasion_troop_gain_massive = 5 + +fp3_seljuk_stack_miniscule_value = 0.6 +fp3_seljuk_stack_minor_value = 0.8 +fp3_seljuk_stack_medium_value = 1 +fp3_seljuk_stack_major_value = 1.25 +fp3_seljuk_stack_massive_value = 1.5 +fp3_seljuk_stack_monumental_value = 2 + +seljuk_invasion_nomad_strength_score_levy = { + value = 0 + if = { + limit = { has_variable = seljuk_invasion_nomad_strength_score } + add = var:seljuk_invasion_nomad_strength_score + } + multiply = 100 +} + +seljuk_invasion_nomad_strength_score_siege_weapon = { + value = 0 + if = { + limit = { has_variable = seljuk_invasion_nomad_strength_score } + add = var:seljuk_invasion_nomad_strength_score + } + multiply = 0.5 +} + +# Zanj Rebellion + +zanj_rebellion_strength_score_levy = { + value = 0 + if = { + limit = { has_variable = zanj_rebellion_strength_score } + add = var:zanj_rebellion_strength_score + } + multiply = 200 +} + +zanj_rebellion_strength_score_skirmishers = { + value = 0 + if = { + limit = { has_variable = zanj_rebellion_strength_score } + add = var:zanj_rebellion_strength_score + } +} + +zanj_rebellion_strength_score_bowmen = { + value = 0 + if = { + limit = { has_variable = zanj_rebellion_strength_score } + add = var:zanj_rebellion_strength_score + } + multiply = 0.5 +} + +zanj_rebellion_strength_score_pikemen = { + value = 0 + if = { + limit = { has_variable = zanj_rebellion_strength_score } + add = var:zanj_rebellion_strength_score + } + multiply = 0.5 +} + +rescue_house_members_cb_house_unity_gain = { + scope:defender = { + every_prisoner = { + limit = { house ?= scope:attacker.house } + add = medium_unity_gain + } + } + + max = 20 +} + +fp3_struggle_switch_sides_value = { + value = 0 + if = { + limit = { + has_trait = fp3_struggle_supporter + NAND = { + rite = { rite_has_doctrine = muhammad_succession_sunni_doctrine } + has_trait = zealous + } + exists = title:d_sunni.holder + NOR = { + this = title:d_sunni.holder + has_relation_friend = title:d_sunni.holder + has_relation_lover = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value >= 50 + } + } + } + if = { + limit = { + has_trait = ambitious + } + add = 10 + } + if = { + limit = { + has_trait = cynical + } + add = 20 + } + if = { + limit = { + has_trait = vengeful + } + add = 5 + } + if = { + limit = { + has_trait = arrogant + } + add = 10 + } + if = { + limit = { + has_trait = arbitrary + } + add = 5 + } + if = { + limit = { + has_trait = disloyal + } + add = 30 + } + if = { + limit = { + has_trait = fickle + } + add = 5 + } + if = { + limit = { + culture = { has_cultural_pillar = heritage_turkic } + } + add = 50 + } + if = { + limit = { + NOT = { + rite = { rite_has_doctrine = muhammad_succession_sunni_doctrine } + } + } + add = 200 + } + if = { + limit = { + ai_zeal < 0 + } + add = { + value = ai_zeal + multiply = -1 + divide = 4 + } + } + if = { + limit = { + exists = title:d_sunni.holder + has_relation_rival = title:d_sunni.holder + } + add = 200 + } + if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value <= -75 + } + } + add = 50 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value <= -50 + } + } + add = 40 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value <= -30 + } + } + add = 30 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value <= -10 + } + } + add = 20 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value <= 0 + } + } + add = 10 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value >= 40 + } + } + add = -30 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value >= 30 + } + } + add = -20 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value >= 20 + } + } + add = -10 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value >= 10 + } + } + add = -5 + } + } + else_if = { + limit = { + has_trait = fp3_struggle_detractor + exists = title:d_sunni.holder + NOR = { + has_relation_rival = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value <= -50 + } + } + } + if = { + limit = { + has_trait = content + } + add = 20 + } + if = { + limit = { + has_trait = zealous + } + add = 30 + } + if = { + limit = { + has_trait = trusting + } + add = 10 + } + if = { + limit = { + has_trait = just + } + add = 10 + } + if = { + limit = { + has_trait = humble + } + add = 20 + } + if = { + limit = { + has_trait = loyal + } + add = 30 + } + if = { + limit = { + culture = { has_cultural_pillar = heritage_turkic } + } + add = -50 + } + if = { + limit = { + NOT = { + rite = { rite_has_doctrine = muhammad_succession_sunni_doctrine } + } + } + add = -200 + } + if = { + limit = { + ai_zeal > 0 + rite = { rite_has_doctrine = muhammad_succession_sunni_doctrine } + } + add = { + value = ai_zeal + multiply = -1 + divide = 4 + } + } + if = { + limit = { + exists = title:d_sunni.holder + OR = { + has_relation_friend = title:d_sunni.holder + has_relation_lover = title:d_sunni.holder + } + } + add = 200 + } + if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value >= 75 + } + } + add = 50 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value >= 50 + } + } + add = 40 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value >= 30 + } + } + add = 20 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value >= 10 + } + } + add = 5 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value <= -40 + } + } + add = -50 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value <= -30 + } + } + add = -40 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value <= -20 + } + } + add = -30 + } + else_if = { + limit = { + exists = title:d_sunni.holder + opinion = { + target = title:d_sunni.holder + value <= 0 + } + } + add = -20 + } + } +} diff --git a/common/script_values/00_legitimacy_values.txt b/common/script_values/00_legitimacy_values.txt new file mode 100644 index 000000000..e7f19070b --- /dev/null +++ b/common/script_values/00_legitimacy_values.txt @@ -0,0 +1,1357 @@ +###################### +# Legitimacy +###################### + +# Tier 1-4 +legitimacy_title_tier_value = { + # County = 1 + # Duchy = 2 + # Kingdom = 3 + # Empire = 4 + value = highest_held_title_tier + subtract = 1 + min = 1 +} + +# Era 1-4 +legitimacy_era_value = { + # Tribal = 1 + # Early = 2 + # High = 3 + # Late = 4 + value = 1 + culture ?= { + if = { + limit = { has_cultural_era_or_later = culture_era_late_medieval } + add = 3 + } + else_if = { + limit = { has_cultural_era_or_later = culture_era_high_medieval } + add = 2 + } + else_if = { + limit = { has_cultural_era_or_later = culture_era_early_medieval } + add = 1 + } + } + min = 1 +} + +# Combined Era + Tier 1-8 +legitimacy_title_era_value = { + value = 0 + add = legitimacy_era_value # 1-4 + add = legitimacy_title_tier_value # 1-4 + min = 2 # 1 per era, 1 per title +} + +# Tier Values +# These must be kept as simple as possible for performance's sake + +legitimacy_level_1 = 0 + +# Gap of at least 60 +legitimacy_level_2 = { # 60-240 + value = 30 + multiply = legitimacy_title_era_value +} + +# Gap of at least 80 +legitimacy_level_3 = { # 140-560 + value = 70 + multiply = legitimacy_title_era_value +} + +# Gap of at least 100 +legitimacy_level_4 = { # 240-960 + value = 120 + multiply = legitimacy_title_era_value +} + +# Gap of at least 160 +legitimacy_level_5 = { # 400-1600 + value = 200 + multiply = legitimacy_title_era_value +} + +# Gap of at least 200 +legitimacy_level_6 = { # 600-2400 + value = 300 + multiply = legitimacy_title_era_value +} + +# Gap of at least 300 ( 900 - 600 = 300 ) +legitimacy_level_7 = { # 900-3600 + value = 450 #( 900/2(min multiply) = 450 ) + multiply = legitimacy_title_era_value #(max * 8) +} + +# Gap of at least 400 +legitimacy_level_8 = { # 1300-5200 + value = 650 + multiply = legitimacy_title_era_value +} + +# Gap of at least 700 +legitimacy_level_9 = { # 2000-8000 + value = 1000 + multiply = legitimacy_title_era_value +} + +legitimacy_max = { # 690-2760 + value = legitimacy_level_6 + multiply = 1.15 + round_to = 100 +} + +mandate_legitimacy_max = { # 3450-13800 + value = legitimacy_level_8 + multiply = 1.15 + round_to = 100 +} + +mandala_legitimacy_level_1 = 0 + +# Gap of at least 200 +mandala_legitimacy_level_2 = { # 200-800 + value = 100 #200 + multiply = legitimacy_title_era_value +} + +# Gap of at least 220 +mandala_legitimacy_level_3 = { # 420-1680 + value = 210 #420 + multiply = legitimacy_title_era_value +} + +# Gap of at least 220 +mandala_legitimacy_level_4 = { # 640-2560 + value = 320 #640 + multiply = legitimacy_title_era_value +} + +# Gap of at least 270 +mandala_legitimacy_level_5 = { # 910-3640 + value = 455 #910 + multiply = legitimacy_title_era_value +} + +# Gap of at least 330 +mandala_legitimacy_level_6 = { # 1240-4960 + value = 620 #1240 + multiply = legitimacy_title_era_value +} + +# Gap of at least 390 ( 900 - 600 = 300 ) +mandala_legitimacy_level_7 = { # 1650-6600 + value = 825 #1650 + multiply = legitimacy_title_era_value #(max * 8) +} + +# Gap of at least 550 +mandala_legitimacy_level_8 = { # 2200-8800 + value = 1100 #2200 + multiply = legitimacy_title_era_value +} + +# Gap of at least 800 +mandala_legitimacy_level_9 = { # 3000-12000 + value = 1500 #3000 + multiply = legitimacy_title_era_value +} + +mandala_legitimacy_max = { # 3450-13800 + value = mandala_legitimacy_level_9 + multiply = 1.15 + round_to = 100 +} + +### GAIN/LOSS VALUES + +miniscule_legitimacy_gain = 20 +minor_legitimacy_gain = 50 +medium_legitimacy_gain = 100 +major_legitimacy_gain = 200 +massive_legitimacy_gain = 300 +monumental_legitimacy_gain = 500 + +miniscule_legitimacy_loss = { + value = 0 + subtract = miniscule_legitimacy_gain +} +minor_legitimacy_loss = { + value = 0 + subtract = minor_legitimacy_gain +} +medium_legitimacy_loss = { + value = 0 + subtract = medium_legitimacy_gain +} +major_legitimacy_loss = { + value = 0 + subtract = major_legitimacy_gain +} +massive_legitimacy_loss = { + value = 0 + subtract = massive_legitimacy_gain +} +monumental_legitimacy_loss = { + value = 0 + subtract = monumental_legitimacy_gain +} + +tier_scaled_legitimacy_value = { + switch = { + trigger = primary_title.tier + tier_county = { value = minor_legitimacy_gain } + tier_duchy = { value = medium_legitimacy_gain } + tier_kingdom = { value = major_legitimacy_gain } + tier_empire = { value = massive_legitimacy_gain } + tier_hegemony = { value = monumental_legitimacy_gain } + tier_barony = { value = miniscule_legitimacy_gain } # should not use this tho + } +} + +tier_scaled_legitimacy_value_low = { + switch = { + trigger = primary_title.tier + tier_county = { value = miniscule_legitimacy_gain } + tier_duchy = { value = minor_legitimacy_gain } + tier_kingdom = { value = medium_legitimacy_gain } + tier_empire = { value = major_legitimacy_gain } + tier_hegemony = { value = massive_legitimacy_gain } + } +} + +### BASE CALCULATION VALUES + +# COURT GRANDEUR +base_legitimacy_per_court_grandeur_level_value = 30 +# DYNASTY RENOWN +base_legitimacy_per_dynasty_prestige_level_value = 50 +# DYNASTY PERKS +base_legitimacy_per_legitimacy_track_perk_value = 50 +# DYNASTY OF PREDECESSOR +base_legitimacy_dynasty_of_previous_value = 100 +# RELATION TO PREDECESSOR +succession_legitimacy_ancestor_per_tier_value = 50 +base_legitimacy_predecessor_primary_heir_value = 30 +base_legitimacy_predecessor_child_value = 25 +base_legitimacy_predecessor_close_family_value = 20 +base_legitimacy_predecessor_spouse_value = 15 +base_legitimacy_predecessor_extended_family_value = 10 +# SEX +base_legitimacy_sidelined_sex_value = -15 +# BASTARDRY +base_legitimacy_bastardry_high_value = -50 +base_legitimacy_bastardry_medium_value = -25 +base_legitimacy_bastardry_low_value = -10 +# YEARS AS RULER +base_legitimacy_per_year_as_ruler_value = 20 +# SPECIAL TRAITS +base_legitimacy_per_special_traits_value = 50 + +# Base legitimacy calculation - used for game start and in code +# root - ruler that gets legitimacy +base_legitimacy_value = { # Split into separate values for easy debugging/visibility + value = 0 + + # TIER + add = base_legitimacy_tier_value + + # COURT GRANDEUR + add = base_legitimacy_court_grandeur_value + + # DYNASTY RENOWN + add = base_legitimacy_dynasty_prestige_level_value + + # LEGITIMACY BLOODLINE DYNASTY PERKS + add = base_legitimacy_track_perks_value + + # COUNTY OPINION - derived from average of held counties + add = base_legitimacy_county_opinion_value + + # PREVIOUS HOLDER DYNASTY + add = base_legitimacy_dynasty_of_predecessor_value + + # PREVIOUS HOLDER CHILD + add = base_legitimacy_relation_to_predecessor_value + + # SIDELINED SEX + add = base_legitimacy_sex_value + + # BASTARDRY + add = base_legitimacy_bastardry_value + + # YEARS AS RULER - bonus for startup rulers + add = base_legitimacy_years_as_ruler_value + + # SPECIAL TRAITS + add = base_legitimacy_special_traits_value + + # DIPLOMACY SKILLS + add = base_legitimacy_diplomacy_value + + # ADMINISTRATIVE + if = { + limit = { + exists = this + government_has_mechanic = administrative + } + multiply = 0.75 # To reduce the overall base values + add = base_legitimacy_admin_value # And add anything admin specific + } + + min = 100 # No one starts with Level 0 + round = yes +} + +# SUCESSION LEGITIMACY CALCULATION - USED AS THE INITIAL LEGITIMACY OF NON GAME START CHARACTERS and in code +# root - ruler that gets legitimacy +succession_legitimacy_value = { # Split into separate values for easy debugging/visibility + value = 0 + + # TIER + add = base_legitimacy_tier_value + + # COURT GRANDEUR + add = base_legitimacy_court_grandeur_value + + # DYNASTY RENOWN - new value to avoid Splendor bloating + add = succession_legitimacy_dynasty_prestige_level_value + + # LEGITIMACY BLOODLINE DYNASTY PERKS + add = base_legitimacy_track_perks_value + + # COUNTY OPINION - derived from average of held counties + add = base_legitimacy_county_opinion_value + + # PREVIOUS HOLDER DYNASTY + add = base_legitimacy_dynasty_of_predecessor_value + + # WHO WAS YOUR PARENT + add = succession_legitimacy_ancestor_tier_value + + # PREVIOUS HOLDER CHILD + add = base_legitimacy_relation_to_predecessor_value + + # SIDELINED SEX + add = base_legitimacy_sex_value + + # BASTARDRY + add = base_legitimacy_bastardry_value + + # YEARS AS RULER - bonus for startup rulers + add = base_legitimacy_years_as_ruler_value + + # SPECIAL TRAITS + add = base_legitimacy_special_traits_value + + # DIPLOMACY SKILLS + add = base_legitimacy_diplomacy_value + + # ADMINISTRATIVE + if = { + limit = { + exists = this + government_has_mechanic = administrative + } + multiply = 0.75 # To reduce the overall base values + add = base_legitimacy_admin_value # And add anything admin specific + } + + # ACH HEIR PREPARATION OATH + if = { + limit = { + has_character_modifier = oath_heir_preparation_heir + } + multiply = 1.25 + } + + min = 0 + round = yes +} + +# TIER +base_legitimacy_tier_value = { + value = 0 + if = { + limit = { highest_held_title_tier = tier_county } + add = 0 + } + else_if = { + limit = { highest_held_title_tier = tier_duchy } + add = 50 + } + else_if = { + limit = { highest_held_title_tier = tier_kingdom } + add = 150 + } + else_if = { + limit = { highest_held_title_tier = tier_empire } + add = 400 + } +} + +# COURT GRANDEUR +base_legitimacy_court_grandeur_value = { + value = 0 + if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + } + if = { + limit = { + court_grandeur_current_level >= 9_levels_above_expected_level #you meet expectations + } + add = { + value = base_legitimacy_per_court_grandeur_level_value + multiply = 3 + } + } + else_if = { + limit = { + court_grandeur_current_level >= 7_levels_above_expected_level + } + add = { + value = base_legitimacy_per_court_grandeur_level_value + multiply = 2 + } + } + else_if = { + limit = { + court_grandeur_current_level >= 5_levels_above_expected_level + } + add = { + value = base_legitimacy_per_court_grandeur_level_value + multiply = 1.5 + } + } + else_if = { + limit = { + court_grandeur_current_level >= 3_levels_above_expected_level + } + add = { + value = base_legitimacy_per_court_grandeur_level_value + multiply = 1.25 + } + } + else_if = { + limit = { + court_grandeur_current_level >= 1_levels_above_expected_level + } + add = { + value = base_legitimacy_per_court_grandeur_level_value + } + } + else_if = { + limit = { + court_grandeur_current_level <= 1_levels_below_expected_level + } + subtract = base_legitimacy_per_court_grandeur_level_value + } + else_if = { + limit = { + court_grandeur_current_level <= 3_levels_below_expected_level + } + subtract = { + value = base_legitimacy_per_court_grandeur_level_value + multiply = 1.25 + } + } + else_if = { + limit = { + court_grandeur_current_level <= 5_levels_below_expected_level + } + subtract = { + value = base_legitimacy_per_court_grandeur_level_value + multiply = 1.5 + } + } + else_if = { + limit = { + court_grandeur_current_level <= 7_levels_below_expected_level + } + subtract = { + value = base_legitimacy_per_court_grandeur_level_value + multiply = 2 + } + } + else_if = { + limit = { + court_grandeur_current_level <= 9_levels_below_expected_level + } + subtract = { + value = base_legitimacy_per_court_grandeur_level_value + multiply = 3 + } + } + } +} + +# DYNASTY RENOWN +base_legitimacy_dynasty_prestige_level_value = { + value = 0 + if = { + limit = { + highest_held_title_tier = tier_county + } + add = { + value = base_legitimacy_per_dynasty_prestige_level_value + multiply = dynasty.dynasty_prestige_level + } + } + else_if = { + limit = { + highest_held_title_tier = tier_duchy + } + add = { + value = base_legitimacy_per_dynasty_prestige_level_value + multiply = dynasty.dynasty_prestige_level + multiply = 1.5 + } + } + else_if = { + limit = { + highest_held_title_tier = tier_kingdom + } + add = { + value = base_legitimacy_per_dynasty_prestige_level_value + multiply = dynasty.dynasty_prestige_level + multiply = 2 + } + } + else_if = { + limit = { + highest_held_title_tier = tier_empire + } + add = { + value = base_legitimacy_per_dynasty_prestige_level_value + multiply = dynasty.dynasty_prestige_level + multiply = 2.25 + } + } + if = { # We lower everything if you're in 867 + limit = { + culture ?= { NOT = { has_cultural_era_or_later = culture_era_early_medieval } } + } + multiply = 0.5 + } +} + +succession_legitimacy_dynasty_prestige_level_value = { + value = 0 + if = { + limit = { + highest_held_title_tier = tier_county + } + add = { + value = base_legitimacy_per_dynasty_prestige_level_value + multiply = dynasty.dynasty_prestige_level + multiply = 0.25 + } + } + else_if = { + limit = { + highest_held_title_tier = tier_duchy + } + add = { + value = base_legitimacy_per_dynasty_prestige_level_value + multiply = dynasty.dynasty_prestige_level + multiply = 0.5 + } + } + else_if = { + limit = { + highest_held_title_tier = tier_kingdom + } + add = { + value = base_legitimacy_per_dynasty_prestige_level_value + multiply = dynasty.dynasty_prestige_level + multiply = 0.75 + } + } + else_if = { + limit = { + highest_held_title_tier = tier_empire + } + add = { + value = base_legitimacy_per_dynasty_prestige_level_value + multiply = dynasty.dynasty_prestige_level + } + } + else_if = { + limit = { + highest_held_title_tier = tier_hegemony + } + add = { + value = base_legitimacy_per_dynasty_prestige_level_value + multiply = dynasty.dynasty_prestige_level + multiply = 1.25 + } + } + if = { # We lower everything if you're in 867 + limit = { + culture ?= { NOT = { has_cultural_era_or_later = culture_era_early_medieval } } + } + multiply = 0.5 + } +} + +# LEGITIMACY BLOODLINE DYNASTY PERKS +base_legitimacy_track_perks_value = { + value = 0 + if = { + limit = { dynasty.ce1_legitimacy_legacy_track_perks >= 1 } + add = { + value = base_legitimacy_per_legitimacy_track_perk_value + multiply = dynasty.ce1_legitimacy_legacy_track_perks + } + } +} + +# COUNTY OPINION +base_legitimacy_county_opinion_value = { + value = 0 + if = { # Average of popular opinion in all held counties divided 4 (max 25) + limit = { + any_held_title = { title_tier = county } + } + every_held_title = { + title_tier = county + add = { + value = county_opinion + multiply = 2 + } + } + divide = base_legitimacy_county_opinion_county_count_value + divide = 4 + ceiling = yes + } +} + +base_legitimacy_county_opinion_county_count_value = { + value = 0 + if = { + limit = { + any_held_county = { tier = tier_county } + } + every_held_title = { + title_tier = county + add = 1 + } + } +} + +# PREDECESSOR DYNASTY +base_legitimacy_dynasty_of_predecessor_value = { + value = 0 + if = { + limit = { primary_title.previous_holder.dynasty ?= dynasty } + if = { + limit = { + highest_held_title_tier = tier_county + } + add = base_legitimacy_dynasty_of_previous_value + } + else_if = { + limit = { + highest_held_title_tier = tier_duchy + } + add = { + value = base_legitimacy_dynasty_of_previous_value + multiply = 1.5 + } + } + else_if = { + limit = { + highest_held_title_tier = tier_kingdom + } + add = { + value = base_legitimacy_dynasty_of_previous_value + multiply = 2 + } + } + else_if = { + limit = { + highest_held_title_tier = tier_empire + } + add = { + value = base_legitimacy_dynasty_of_previous_value + multiply = 2.25 + } + } + # How many previous holders were of your same dynasty? + primary_title = { + every_past_holder = { + limit = { + dynasty ?= dynasty + } + add = { + value = base_legitimacy_dynasty_of_previous_value + multiply = 0.05 + } + } + } + if = { # We lower everything if you're in 867 + limit = { + culture ?= { NOT = { has_cultural_era_or_later = culture_era_early_medieval } } + } + multiply = 0.5 + } + } +} + +# SUCCESSION - WHO WAS YOUR DAD/MOM +succession_legitimacy_ancestor_tier_value = { + value = 0 + if = { + limit = { + any_parent = { + is_ruler = yes + highest_held_title_tier = tier_empire + } + } + add = { + value = succession_legitimacy_ancestor_per_tier_value + multiply = 3 + } + } + else_if = { + limit = { + any_parent = { + is_ruler = yes + highest_held_title_tier = tier_kingdom + } + } + add = { + value = succession_legitimacy_ancestor_per_tier_value + multiply = 2 + } + } + else_if = { + limit = { + any_parent = { + is_ruler = yes + highest_held_title_tier = tier_duchy + } + } + add = { + value = succession_legitimacy_ancestor_per_tier_value + multiply = 1.5 + } + } + else_if = { + limit = { + any_parent = { + is_ruler = yes + highest_held_title_tier = tier_county + } + } + add = succession_legitimacy_ancestor_per_tier_value + } + if = { # We lower everything if you're in 867 + limit = { + culture ?= { NOT = { has_cultural_era_or_later = culture_era_early_medieval } } + } + multiply = 0.5 + } +} + + +# RELATION TO PREDECESSOR +base_legitimacy_relation_to_predecessor_value = { + value = 0 + if = { + limit = { exists = primary_title.previous_holder } + if = { + limit = { is_primary_heir_of = primary_title.previous_holder } + if = { + limit = { + highest_held_title_tier = tier_county + } + add = base_legitimacy_predecessor_primary_heir_value + } + else_if = { + limit = { + highest_held_title_tier = tier_duchy + } + add = { + value = base_legitimacy_predecessor_primary_heir_value + multiply = 1.5 + } + } + else_if = { + limit = { + highest_held_title_tier = tier_kingdom + } + add = { + value = base_legitimacy_predecessor_primary_heir_value + multiply = 2 + } + } + else_if = { + limit = { + highest_held_title_tier = tier_empire + } + add = { + value = base_legitimacy_predecessor_primary_heir_value + multiply = 2.25 + } + } + if = { # We lower everything if you're in 867 + limit = { + culture ?= { NOT = { has_cultural_era_or_later = culture_era_early_medieval } } + } + multiply = 0.5 + } + } + if = { + limit = { is_child_of = primary_title.previous_holder } + add = base_legitimacy_predecessor_child_value + } + else_if = { + limit = { is_close_family_of = primary_title.previous_holder } + add = base_legitimacy_predecessor_close_family_value + } + else_if = { + limit = { is_spouse_of = primary_title.previous_holder } + add = base_legitimacy_predecessor_spouse_value + } + else_if = { + limit = { is_extended_family_of = primary_title.previous_holder } + add = base_legitimacy_predecessor_extended_family_value + } + } +} + +# SEX +base_legitimacy_sex_value = { + value = 0 + if = { + limit = { + OR = { + AND = { + is_male = yes + faith_dominant_gender_male_or_equal = no + } + AND = { + is_female = yes + faith_dominant_gender_female_or_equal = no + } + } + } + add = base_legitimacy_sidelined_sex_value + } +} + +# BASTARDRY +base_legitimacy_bastardry_value = { + value = 0 + if = { + limit = { has_trait = bastard } + add = base_legitimacy_bastardry_high_value + } + if = { + limit = { has_trait = disputed_heritage } + add = base_legitimacy_bastardry_medium_value + } + if = { + limit = { + OR = { + has_trait = legitimized_bastard + has_trait = wild_oat + has_trait = child_of_concubine + } + } + add = base_legitimacy_bastardry_low_value + } +} + +# YEARS AS RULER +base_legitimacy_years_as_ruler_value = { + value = 0 + ordered_held_title = { + limit = { tier = prev.highest_held_title_tier } + order_by = title_held_years + add = title_held_years + divide = 2 + } + ceiling = yes +} + +# SPECIAL TRAITS +base_legitimacy_special_traits_value = { + value = 0 + if = { + limit = { has_trait = sayyid } + add = { + value = base_legitimacy_per_special_traits_value + multiply = 2 + } + } + if = { + limit = { has_trait = golden_lineage } + add = { + value = base_legitimacy_per_special_traits_value + multiply = 2 + } + } + if = { + limit = { has_trait = born_in_the_purple } + add = { + value = base_legitimacy_per_special_traits_value + multiply = 2 + } + } + if = { + limit = { has_trait = august } + add = { + value = base_legitimacy_per_special_traits_value + multiply = 2 + } + } + if = { + limit = { has_trait = just } + add = { + value = base_legitimacy_per_special_traits_value + multiply = 2 + } + } + if = { + limit = { num_virtuous_traits >= 1 } + add = { + value = base_legitimacy_per_special_traits_value + multiply = num_virtuous_traits + } + } + if = { + limit = { num_sinful_traits >= 1 } + add = { + value = base_legitimacy_per_special_traits_value + multiply = num_sinful_traits + multiply = -1 + } + } + if = { + limit = { + has_trait = inbred + } + add = { + value = base_legitimacy_per_special_traits_value + multiply = -2 + } + } +} + +# DIPLOMACY SKILLS +base_legitimacy_diplomacy_value = { + value = 0 + add = { + value = diplomacy + multiply = 2 #to make it matter + } +} + +# ADMINISTRATIVE +base_legitimacy_admin_value = { + value = 0 + + + # Am I a dominant or powerful family? + if = { + limit = { + house ?= { is_dominant_family = yes } + } + add = { + value = house.house_power_score + multiply = 1.5 + round = yes + } + } + else_if = { + limit = { + house ?= { is_powerful_family = yes } + NOT = { primary_title.previous_holder.house ?= house } + } + add = { + value = house.house_power_score + } + } + + # Am I allied to any other powerful families? + if = { + limit = { + any_ally = { + house ?= { + house_head = prev + is_powerful_family = yes + } + top_liege = prev.top_liege + } + } + every_ally = { + limit = { + house ?= { + house_head = prev + is_powerful_family = yes + } + top_liege = prev.top_liege + } + add = { + value = 10 + multiply = influence_level + } + } + } + + # What is my Level of Influence? + if = { + limit = { + influence_level >= 2 + } + add = { + value = 5 + multiply = influence_level + } + } + + # What is the popular opinion in the capital? + if = { + limit = { + capital_province.county = { + county_opinion != 0 + } + } + add = { + value = capital_province.county.county_opinion + multiply = 2 + } + } + + # What level is the main building in my Estate? + if = { + limit = { + domicile ?= { has_domicile_building_or_higher = estate_main_02 } + } + if = { + limit = { + domicile ?= { has_domicile_building_or_higher = estate_main_05 } + } + add = 40 + } + else_if = { + limit = { + domicile ?= { has_domicile_building_or_higher = estate_main_04 } + } + add = 30 + } + else_if = { + limit = { + domicile ?= { has_domicile_building_or_higher = estate_main_03 } + } + add = 20 + } + else_if = { + limit = { + domicile ?= { has_domicile_building_or_higher = estate_main_02 } + } + add = 10 + } + } +} + +### EXPECTATIONS + +# AI Expected Legitimacy +default_ai_legitimacy_expectation = { + value = 1 + # De Jure Vassal + if = { + limit = { + scope:liege = { is_rightful_liege_of = root } + } + subtract = 1 + } + # Powerful Vassals expect more + if = { + limit = { + is_powerful_vassal_of = scope:liege + } + add = 1 + } + # How long have you been under this dynasty? + if = { + limit = { + days_since_vassal_contract_liege_dynasty_reign_start >= 18250 #50 years + } + subtract = 1 + } + if = { + limit = { + days_since_vassal_contract_liege_dynasty_reign_start >= 36500 #100 years + } + subtract = 1 + } + # Vassal Stance + if = { + limit = { was_preferred_heir = scope:liege } + subtract = 1 + } + # Relations + if = { + limit = { + scope:liege = { + OR = { + is_spouse_of = root + is_close_family_of = root + } + } + } + subtract = 1 + } + # Tier - more legitimacy required for higher tiers + if = { + limit = { + scope:liege.highest_held_title_tier >= tier_county + } + add = 1 + } + if = { + limit = { + scope:liege.highest_held_title_tier >= tier_duchy + } + add = 1 + } + if = { + limit = { + scope:liege.highest_held_title_tier >= tier_kingdom + } + add = 2 + } + if = { + limit = { + scope:liege.highest_held_title_tier >= tier_empire + } + add = 2 + } + # Era - more legitimacy required as time goes on + if = { + limit = { + scope:liege.culture ?= { has_cultural_era_or_later = culture_era_tribal } + } + subtract = 1 + } + else_if = { + limit = { + scope:liege.culture ?= { has_cultural_era_or_later = culture_era_high_medieval } + } + add = 2 + } + else_if = { + limit = { + scope:liege.culture ?= { has_cultural_era_or_later = culture_era_late_medieval } + } + add = 2 + } + # PAM: you are a theocratic gov with an Apostolic Succession tenet + if = { + limit = { + scope:liege.faith = root.faith + government_has_flag = government_is_theocracy + scope:liege.rite ?= { rite_has_parameter = tenet_apostolic_succession_bishop_legitimacy } + } + subtract = 2 + } + min = 1 + max = 4 +} + +default_legitimacy_opinion_penalty = -10 + +default_ai_mandala_legitimacy_expectation = { + value = 1 + # De Jure Vassal + if = { + limit = { + scope:liege = { is_rightful_liege_of = root } + } + subtract = 1 + } + # Powerful Vassals expect more + if = { + limit = { + is_powerful_vassal_of = scope:liege + } + add = 1 + } + # How long have you been under this dynasty? + if = { + limit = { + days_since_vassal_contract_liege_dynasty_reign_start >= 18250 #50 years + } + subtract = 1 + } + if = { + limit = { + days_since_vassal_contract_liege_dynasty_reign_start >= 36500 #100 years + } + subtract = 1 + } + # Vassal Stance + if = { + limit = { was_preferred_heir = scope:liege } + subtract = 1 + } + # Relations + if = { + limit = { + scope:liege = { + OR = { + is_spouse_of = root + is_close_family_of = root + } + } + } + subtract = 1 + } + # Tier - more legitimacy required for higher tiers + if = { + limit = { + scope:liege.highest_held_title_tier >= tier_county + } + add = 1 + } + if = { + limit = { + scope:liege.highest_held_title_tier >= tier_duchy + } + add = 1 + } + if = { + limit = { + scope:liege.highest_held_title_tier >= tier_kingdom + } + add = 2 + } + if = { + limit = { + scope:liege.highest_held_title_tier >= tier_empire + } + add = 3 + } + # Era - more legitimacy required as time goes on + if = { + limit = { + scope:liege.culture = { has_cultural_era_or_later = culture_era_tribal } + } + subtract = 1 + } + else_if = { + limit = { + scope:liege.culture = { has_cultural_era_or_later = culture_era_high_medieval } + } + add = 2 + } + else_if = { + limit = { + scope:liege.culture = { has_cultural_era_or_later = culture_era_late_medieval } + } + add = 2 + } + #Piety level + if = { + limit = { + scope:liege.piety_level >= very_high_piety_level + } + add = 1 + } + if = { + limit = { + scope:liege.piety_level >= max_piety_level + } + add = 1 + } + if = { + limit = { + scope:liege.piety_level >= max_piety_level_plus_1 + } + add = 1 + } + if = { + limit = { + scope:liege.piety_level >= max_piety_level_plus_2 + } + add = 1 + } + if = { + limit = { + scope:liege.piety_level >= max_piety_level_plus_3 + } + add = 1 + } + min = 1 + max = 7 +} + +### EFFECTS + +legitimacy_regent_swing_scale_multipler_value = { + value = 1 + # LEGITIMACY OF RULER AFFECTS COSTS + if = { + limit = { + scope:actor = { has_legitimacy_flag = massively_increased_swing_scales_cost } + } + multiply = 1.75 + } + if = { + limit = { + scope:actor = { has_legitimacy_flag = very_increased_swing_scales_cost } + } + multiply = 1.5 + } + if = { + limit = { + scope:actor = { has_legitimacy_flag = increased_swing_scales_cost } + } + multiply = 1.25 + } + if = { + limit = { + scope:actor = { has_legitimacy_flag = reduced_swing_scales_cost } + } + multiply = 0.85 + } + if = { + limit = { + scope:actor = { has_legitimacy_flag = very_reduced_swing_scales_cost } + } + multiply = 0.75 + } + if = { + limit = { + scope:actor = { has_legitimacy_flag = extra_reduced_swing_scales_cost } + } + multiply = 0.5 + } +} + +nomadic_legitimacy_claimant_multiplier = { + value = 1 + if = { + limit = { + scope:the_claimant = { government_has_flag = government_is_nomadic } + } + multiply = 1.5 + } +} + +max_legitimacy_level_value = { + value = 5 + if = { + limit = { government_has_flag = government_is_mandala } + add = 3 + } +} diff --git a/common/script_values/00_men_at_arms_values.txt b/common/script_values/00_men_at_arms_values.txt index 6627ec023..62e858ad5 100644 --- a/common/script_values/00_men_at_arms_values.txt +++ b/common/script_values/00_men_at_arms_values.txt @@ -451,7 +451,7 @@ culture_ai_weight_skirmishers = { if = { # Cultures that favours skirmishers limit = { - culture = { + culture ?= { OR = { has_cultural_pillar = heritage_baltic has_cultural_pillar = heritage_ugro_permian @@ -463,7 +463,7 @@ culture_ai_weight_skirmishers = { } if = { # Cultures that dislike skirmishers limit = { - culture = { + culture ?= { OR = { has_cultural_pillar = heritage_central_germanic has_cultural_pillar = heritage_frankish @@ -477,7 +477,7 @@ culture_ai_weight_skirmishers = { if = { # Cultures with a special MaA of that type should avoid the base version of the unit limit = { - culture = { + culture ?= { culture_has_skirmisher_maa = yes } } @@ -490,7 +490,7 @@ culture_ai_weight_archers = { if = { # Cultures that favours archers limit = { - culture = { + culture ?= { OR = { has_cultural_pillar = heritage_west_germanic has_cultural_pillar = heritage_brythonic @@ -507,8 +507,8 @@ culture_ai_weight_archers = { if = { # Cultures that dislike archers limit = { OR = { - culture = { has_cultural_pillar = heritage_central_germanic } - culture = { has_cultural_pillar = heritage_frankish } + culture ?= { has_cultural_pillar = heritage_central_germanic } + culture ?= { has_cultural_pillar = heritage_frankish } } } add = -60 @@ -516,7 +516,7 @@ culture_ai_weight_archers = { if = { # Cultures with a special MaA of that type should avoid the base version of the unit limit = { - culture = { + culture ?= { culture_has_archer_maa = yes } } @@ -529,7 +529,7 @@ culture_ai_weight_heavy_infantry = { if = { # Cultures that favours heavy infantry limit = { - culture = { + culture ?= { OR = { has_cultural_pillar = heritage_central_germanic has_cultural_pillar = heritage_north_germanic @@ -544,7 +544,7 @@ culture_ai_weight_heavy_infantry = { if = { # Cultures with a special MaA of that type should avoid the base version of the unit limit = { OR = { - culture = { + culture ?= { culture_has_heavy_infantry_maa = yes } @@ -563,8 +563,8 @@ culture_ai_weight_pikemen = { if = { # Cultures that favours spearmen limit = { OR = { - culture = { has_cultural_pillar = heritage_central_germanic } - culture = { has_cultural_pillar = heritage_latin } + culture ?= { has_cultural_pillar = heritage_central_germanic } + culture ?= { has_cultural_pillar = heritage_latin } } } add = 40 @@ -572,7 +572,7 @@ culture_ai_weight_pikemen = { if = { # Cultures with a special MaA of that type should avoid the base version of the unit limit = { - culture = { + culture ?= { culture_has_pikemen_maa = yes } } @@ -587,7 +587,7 @@ culture_ai_weight_light_cavalry = { limit = { mpo_can_recruit_nomad_maa_trigger = no OR = { - culture = { has_cultural_pillar = heritage_iranian } + culture ?= { has_cultural_pillar = heritage_iranian } } } add = 80 @@ -595,7 +595,7 @@ culture_ai_weight_light_cavalry = { if = { # Cultures that favours light cavalry limit = { mpo_can_recruit_nomad_maa_trigger = no - culture = { + culture ?= { OR = { has_cultural_pillar = heritage_arabic has_cultural_pillar = heritage_berber @@ -611,11 +611,11 @@ culture_ai_weight_light_cavalry = { if = { # Cultures that dislike light cavalry limit = { OR = { - culture = { has_cultural_pillar = heritage_central_germanic } - culture = { has_cultural_pillar = heritage_tibetan } - culture = { has_cultural_pillar = heritage_baltic } - culture = { has_cultural_pillar = heritage_burman } - culture = { has_cultural_pillar = heritage_somalian } + culture ?= { has_cultural_pillar = heritage_central_germanic } + culture ?= { has_cultural_pillar = heritage_tibetan } + culture ?= { has_cultural_pillar = heritage_baltic } + culture ?= { has_cultural_pillar = heritage_burman } + culture ?= { has_cultural_pillar = heritage_somalian } } } add = -60 @@ -623,7 +623,7 @@ culture_ai_weight_light_cavalry = { if = { # Cultures with a special MaA of that type should avoid the base version of the unit limit = { - culture = { + culture ?= { culture_has_light_cavalry_maa = yes } } @@ -632,12 +632,12 @@ culture_ai_weight_light_cavalry = { if = { # Cultures with a preference for Camel Riders should buy those over normal light cavalry limit = { - culture = { + culture ?= { has_innovation = innovation_war_camels } OR = { - culture = { has_cultural_pillar = heritage_arabic } - culture = { has_cultural_pillar = heritage_berber } + culture ?= { has_cultural_pillar = heritage_arabic } + culture ?= { has_cultural_pillar = heritage_berber } } } add = -200 @@ -651,11 +651,11 @@ culture_ai_weight_heavy_cavalry = { limit = { mpo_can_recruit_nomad_maa_trigger = no OR = { - culture = { has_cultural_pillar = heritage_iranian } + culture ?= { has_cultural_pillar = heritage_iranian } # Steppe cultures - culture = { has_cultural_pillar = heritage_turkic } - culture = { has_cultural_pillar = heritage_mongolic } + culture ?= { has_cultural_pillar = heritage_turkic } + culture ?= { has_cultural_pillar = heritage_mongolic } } } add = 80 @@ -664,16 +664,16 @@ culture_ai_weight_heavy_cavalry = { limit = { mpo_can_recruit_nomad_maa_trigger = no OR = { - culture = { has_cultural_pillar = heritage_central_germanic } - culture = { has_cultural_pillar = heritage_frankish } - culture = { has_cultural_pillar = heritage_indo_aryan } + culture ?= { has_cultural_pillar = heritage_central_germanic } + culture ?= { has_cultural_pillar = heritage_frankish } + culture ?= { has_cultural_pillar = heritage_indo_aryan } } } add = 40 } if = { # Cultures that dislike heavy cavalry limit = { - culture = { + culture ?= { OR = { has_cultural_pillar = heritage_tibetan has_cultural_pillar = heritage_baltic @@ -693,7 +693,7 @@ culture_ai_weight_heavy_cavalry = { if = { # Cultures with a special MaA of that type should avoid the base version of the unit limit = { - culture = { + culture ?= { culture_has_heavy_cavalry_maa = yes } } @@ -707,8 +707,8 @@ culture_ai_weight_camels = { if = { # Cultures that favours camel riders limit = { OR = { - culture = { has_cultural_pillar = heritage_arabic } - culture = { has_cultural_pillar = heritage_berber } + culture ?= { has_cultural_pillar = heritage_arabic } + culture ?= { has_cultural_pillar = heritage_berber } } } add = 80 @@ -721,9 +721,9 @@ culture_ai_weight_elephants = { if = { # Cultures that favours war elephants limit = { OR = { - culture = { has_cultural_pillar = heritage_dravidian } - culture = { has_cultural_pillar = heritage_indo_aryan } - culture = { has_cultural_pillar = heritage_burman } + culture ?= { has_cultural_pillar = heritage_dravidian } + culture ?= { has_cultural_pillar = heritage_indo_aryan } + culture ?= { has_cultural_pillar = heritage_burman } } } add = 60 @@ -808,7 +808,7 @@ counter_synergy_ai_weight_gunpowder = { value = 200 # Since these are hard-limited elsewhere, prefer them highly if = { limit = { - culture = { has_cultural_era_or_later = culture_era_late_medieval } + culture ?= { has_cultural_era_or_later = culture_era_late_medieval } number_maa_regiments_of_base_type = { type = pikemen value >= 3 @@ -824,7 +824,7 @@ counter_synergy_ai_weight_gunpowder = { } if = { limit = { - culture = { has_cultural_pillar = heritage_chinese } + culture ?= { has_cultural_pillar = heritage_chinese } } add = 10 # more gun } @@ -854,7 +854,7 @@ culture_ai_weight_crossbowmen = { if = { # Cultures with a special MaA of that type should avoid the base version of the unit limit = { - culture = { + culture ?= { culture_has_improved_crossbowmen = yes } } diff --git a/common/script_values/01_dynamic_values.txt b/common/script_values/01_dynamic_values.txt new file mode 100644 index 000000000..ad5796f6b --- /dev/null +++ b/common/script_values/01_dynamic_values.txt @@ -0,0 +1,2348 @@ + +# Can't reference a named value that hasn't been defined yet, so this file is late in the load order +# Feel free to use other files as well, but be careful about load order +# Please remove the example formulas once there's a few real formulas + + + + +#GOLD + +#Based on income + limits + +tiny_gold_value = { #To be used as flavor (paying a stablehand, throwing coins in a wishing well) + value = monthly_character_income + multiply = tiny_income_multiplier_value # 1.2 months + if = { + limit = { + has_treasury = yes + this != top_liege + is_landed = yes + } + multiply = 0.25 + } + min = tiny_gold_min_value + max = tiny_gold_max_value + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +tiny_gold_value_static_max = { #To be used as flavor (paying a stablehand, throwing coins in a wishing well) + value = monthly_character_income + multiply = tiny_income_multiplier_value # 1.2 months + if = { + limit = { + has_treasury = yes + this != top_liege + is_landed = yes + } + multiply = 0.25 + } + min = tiny_gold_min_value + max = tiny_gold_max_value_static + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +minor_gold_value = { #To be used as a run-of-the-mill amount + value = monthly_character_income + multiply = minor_income_multiplier_value # 3 months + if = { + limit = { + has_treasury = yes + this != top_liege + is_landed = yes + } + multiply = 0.25 + } + min = minor_gold_min_value + max = minor_gold_max_value + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +minor_gold_value_static_max = { #To be used as a run-of-the-mill amount + value = monthly_character_income + multiply = minor_income_multiplier_value # 3 months + if = { + limit = { + has_treasury = yes + this != top_liege + is_landed = yes + } + multiply = 0.25 + } + min = minor_gold_min_value + max = minor_gold_max_value_static + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +medium_gold_value = { + value = monthly_character_income + multiply = medium_income_multiplier_value # 6 months + if = { + limit = { + has_treasury = yes + this != top_liege + is_landed = yes + } + multiply = 0.25 + } + min = medium_gold_min_value + max = medium_gold_max_value + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +medium_gold_value_static_max = { + value = monthly_character_income + multiply = medium_income_multiplier_value # 6 months + if = { + limit = { + has_treasury = yes + this != top_liege + is_landed = yes + } + multiply = 0.25 + } + min = medium_gold_min_value + max = medium_gold_max_value_static + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +major_gold_value = { + value = monthly_character_income + multiply = major_income_multiplier_value # 12 months, a year + if = { + limit = { + has_treasury = yes + this != top_liege + is_landed = yes + } + multiply = 0.25 + } + min = major_gold_min_value + max = major_gold_max_value + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +major_gold_value_static_max = { + value = monthly_character_income + multiply = major_income_multiplier_value # 12 months, a year + if = { + limit = { + has_treasury = yes + this != top_liege + is_landed = yes + } + multiply = 0.25 + } + min = major_gold_min_value + max = major_gold_max_value_static + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +massive_gold_value = { #Highest gold to be used in events, very rare + value = monthly_character_income + multiply = massive_income_multiplier_value # 18 months, one and a half years + if = { + limit = { + has_treasury = yes + this != top_liege + is_landed = yes + } + multiply = 0.25 + } + min = massive_gold_min_value + max = massive_gold_max_value + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +massive_gold_value_static_max = { #Highest gold to be used in events, very rare + value = monthly_character_income + multiply = massive_income_multiplier_value # 18 months, one and a half years + if = { + limit = { + has_treasury = yes + this != top_liege + is_landed = yes + } + multiply = 0.25 + } + min = massive_gold_min_value + max = massive_gold_max_value_static + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +monumental_gold_value = { # Only to be used in extreme cases, primarily for player-initiated actions. + value = monthly_character_income + multiply = monumental_income_multiplier_value # 36 months, three years + if = { + limit = { + has_treasury = yes + this != top_liege + is_landed = yes + } + multiply = 0.25 + } + min = monumental_gold_min_value + max = monumental_gold_max_value + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +monumental_gold_value_static_max = { # Only to be used in extreme cases, primarily for player-initiated actions. + value = monthly_character_income + multiply = monumental_income_multiplier_value # 36 months, three years + if = { + limit = { + has_treasury = yes + this != top_liege + is_landed = yes + } + multiply = 0.25 + } + min = monumental_gold_min_value + max = monumental_gold_max_value_static + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +## Negative Gold Values +tiny_gold_value_negative = { + value = tiny_gold_value + multiply = -1 +} + +minor_gold_value_negative = { + value = minor_gold_value + multiply = -1 +} + +medium_gold_value_negative = { + value = medium_gold_value + multiply = -1 +} + +major_gold_value_negative = { + value = major_gold_value + multiply = -1 +} + +massive_gold_value_negative = { + value = massive_gold_value + multiply = -1 +} + +monumental_gold_value_negative = { + value = monumental_gold_value + multiply = -1 +} +## End negative gold values + +tiny_gold_loss = { + add = tiny_gold_value + multiply = -1 +} + +minor_gold_loss = { + add = minor_gold_value + multiply = -1 +} + +medium_gold_loss = { + add = medium_gold_value + multiply = -1 +} + +major_gold_loss = { + add = major_gold_value + multiply = -1 +} + +massive_gold_loss = { + add = massive_gold_value + multiply = -1 +} + +monumental_gold_loss = { + add = monumental_gold_value + multiply = -1 +} + +gift_interaction_cutoff = { + value = yearly_character_income + multiply = 3 + min = 10 + max = 300 +} + +head_of_faith_gold_value = { + value = monthly_character_income + multiply = massive_income_multiplier_value + min = medium_gold_min_value + max = monumental_gold_max_value +} + +head_of_faith_treasury_value = { + value = monthly_character_treasury_variable_income + multiply = massive_income_multiplier_value + min = medium_treasury_min_value + max = monumental_treasury_max_value +} + +head_of_faith_treasury_or_gold_value = { + value = 0 + if = { + limit = { + has_treasury = yes + } + add = head_of_faith_treasury_value + } + else = { + add = head_of_faith_gold_value + } +} + +# Paying cleric is the scope +# The ask itself scales off the petitioner +hof_ask_for_gold_request_value = { + value = scope:actor.head_of_faith_treasury_or_gold_value + max = hof_ask_for_gold_cleric_capacity_value + min = medium_gold_min_value +} + +hof_ask_for_gold_cleric_capacity_value = { + value = 0 + if = { + limit = { + has_treasury = yes + } + add = treasury + } + else = { + add = gold + } + multiply = 0.5 +} + +tiny_treasury_value = { + value = monthly_character_treasury_variable_income + multiply = tiny_income_multiplier_value # 1.2 months + min = tiny_treasury_min_value + max = tiny_treasury_max_value + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +minor_treasury_value = { + value = monthly_character_treasury_variable_income + min = minor_treasury_min_value + max = minor_treasury_max_value + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +medium_treasury_value = { + value = monthly_character_treasury_variable_income + multiply = minor_income_multiplier_value # 3 months + min = medium_treasury_min_value + max = medium_treasury_max_value + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +major_treasury_value = { + value = monthly_character_treasury_variable_income + multiply = medium_income_multiplier_value # 6 months + min = major_treasury_min_value + max = major_treasury_max_value + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +massive_treasury_value = { + value = monthly_character_treasury_variable_income + multiply = major_income_multiplier_value # 12 months, a year + min = massive_treasury_min_value + max = massive_treasury_max_value + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +monumental_treasury_value = { + value = monthly_character_treasury_variable_income + multiply = monumental_income_multiplier_value # 36 months, three years + min = monumental_treasury_min_value + max = monumental_treasury_max_value + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +tiny_treasury_or_gold_value = { + value = 0 + if = { + limit = { + has_treasury = yes + } + add = tiny_treasury_value + } + else = { + add = tiny_gold_value + } +} + +minor_treasury_or_gold_value = { + value = 0 + if = { + limit = { + has_treasury = yes + } + add = minor_treasury_value + } + else = { + add = minor_gold_value + } +} + +medium_treasury_or_gold_value = { + value = 0 + if = { + limit = { + has_treasury = yes + } + add = medium_treasury_value + } + else = { + add = medium_gold_value + } +} + +major_treasury_or_gold_value = { + value = 0 + if = { + limit = { + has_treasury = yes + } + add = major_treasury_value + } + else = { + add = major_gold_value + } +} + +massive_treasury_or_gold_value = { + value = 0 + if = { + limit = { + has_treasury = yes + } + add = massive_treasury_value + } + else = { + add = massive_gold_value + } +} + +monumental_treasury_or_gold_value = { + value = 0 + if = { + limit = { + has_treasury = yes + } + add = monumental_treasury_value + } + else = { + add = monumental_gold_value + } +} + +seek_indulgences_major_criminal_trait_value = { + value = head_of_faith_gold_value + multiply = 2.5 +} +seek_indulgences_medium_criminal_trait_value = { + value = head_of_faith_gold_value + multiply = 2.0 +} +seek_indulgences_minor_criminal_trait_value = { + value = head_of_faith_gold_value + multiply = 1.5 +} +seek_indulgences_buy_piety_value = { + value = head_of_faith_gold_value + # Base price of the indulgence, paid on every petition. Absolving a sin is charged on top through the criminal-trait values above, so this stays modest. + multiply = 0.25 + min = medium_gold_min_value + if = { + limit = { + situation:the_christian_church ?= { + has_situation_top_phase_parameter = the_christian_church_better_indulgences + } + } + multiply = 0.75 + } +} + +seek_indulgences_antipope_buy_piety_value = { + value = seek_indulgences_buy_piety_value + multiply = 0.3 # 30% of what you would normally pay +} + +holy_order_gold_value = { + value = monthly_character_income + multiply = major_income_multiplier_value + min = medium_gold_max_value + max = massive_gold_max_value +} + +create_duchy_title_value = { + add = 300 + multiply = { + value = 1 + #Legitimacy discounts + if = { + limit = { legitimacy_level = 5 } + subtract = 0.35 + } + if = { + limit = { legitimacy_level = 4 } + subtract = 0.25 + } + if = { + limit = { legitimacy_level = 3 } + subtract = 0.2 + } + if = { + limit = { legitimacy_level = 2 } + subtract = 0.15 + } + if = { + limit = { has_perk = ducal_conquest_perk } # Ducal Conquest + subtract = 0.2 + } + if = { + limit = { + culture = { has_innovation = innovation_divine_right } # Divine Right + } + subtract = 0.2 + } + if = { + limit = { government_has_flag = government_is_tribal } # Tribal + subtract = 0.5 + } + if = { + limit = { government_has_flag = government_is_nomadic } # Nomads + subtract = 0.5 + } + if = { + limit = { + rite = { rite_has_tenet = tenet_pursuit_of_power } # Pursuit of Power + } + subtract = 0.5 + } + if = { + limit = { + culture = { has_cultural_pillar = ethos_courtly } # Courtly + } + subtract = 0.15 + } + if = { + limit = { + culture = { has_cultural_tradition = tradition_legalistic } # Legalistic + } + subtract = 0.3 + } + if = { + limit = { + dynasty ?= { has_dynasty_perk = law_legacy_2 } # Faithful Magistrates + } + subtract = 0.2 + } + min = 0.2 # 80% max discount from defines + } +} + +create_kingdom_title_value = { + add = 600 + multiply = { + value = 1 + #Legitimacy discounts + if = { + limit = { legitimacy_level = 5 } + subtract = 0.35 + } + if = { + limit = { legitimacy_level = 4 } + subtract = 0.25 + } + if = { + limit = { legitimacy_level = 3 } + subtract = 0.2 + } + if = { + limit = { legitimacy_level = 2 } + subtract = 0.15 + } + if = { + limit = { has_perk = ducal_conquest_perk } # Ducal Conquest + subtract = 0.2 + } + if = { + limit = { + culture = { has_innovation = innovation_divine_right } # Divine Right + } + subtract = 0.2 + } + if = { + limit = { government_has_flag = government_is_tribal } # Tribal + subtract = 0.5 + } + if = { + limit = { government_has_flag = government_is_nomadic } # Nomads + subtract = 0.5 + } + if = { + limit = { + rite = { rite_has_tenet = tenet_pursuit_of_power } # Pursuit of Power + } + subtract = 0.5 + } + if = { + limit = { + culture = { has_cultural_pillar = ethos_courtly } # Courtly + } + subtract = 0.15 + } + if = { + limit = { + culture = { has_cultural_tradition = tradition_legalistic } # Legalistic + } + subtract = 0.3 + } + if = { + limit = { + dynasty = { has_dynasty_perk = law_legacy_2 } # Faithful Magistrates + } + subtract = 0.2 + } + min = 0.2 # 80% max discount from defines + } +} + +create_empire_title_value = { + add = 1200 + multiply = { + value = 1 + #Legitimacy discounts + if = { + limit = { legitimacy_level = 5 } + subtract = 0.35 + } + if = { + limit = { legitimacy_level = 4 } + subtract = 0.25 + } + if = { + limit = { legitimacy_level = 3 } + subtract = 0.2 + } + if = { + limit = { legitimacy_level = 2 } + subtract = 0.15 + } + if = { + limit = { has_perk = ducal_conquest_perk } # Ducal Conquest + subtract = 0.2 + } + if = { + limit = { + culture = { has_innovation = innovation_divine_right } # Divine Right + } + subtract = 0.2 + } + if = { + limit = { government_has_flag = government_is_tribal } # Tribal + subtract = 0.5 + } + if = { + limit = { government_has_flag = government_is_nomadic } # Nomads + subtract = 0.5 + } + if = { + limit = { + rite = { rite_has_tenet = tenet_pursuit_of_power } # Pursuit of Power + } + subtract = 0.5 + } + if = { + limit = { + culture = { has_cultural_pillar = ethos_courtly } # Courtly + } + subtract = 0.15 + } + if = { + limit = { + culture = { has_cultural_tradition = tradition_legalistic } # Legalistic + } + subtract = 0.3 + } + if = { + limit = { + dynasty = { has_dynasty_perk = law_legacy_2 } # Faithful Magistrates + } + subtract = 0.2 + } + min = 0.2 # 80% max discount from defines + } +} + +create_hegemony_title_value = { + add = 2400 + multiply = { + value = 1 + #Legitimacy discounts + if = { + limit = { legitimacy_level = 5 } + subtract = 0.35 + } + if = { + limit = { legitimacy_level = 4 } + subtract = 0.25 + } + if = { + limit = { legitimacy_level = 3 } + subtract = 0.2 + } + if = { + limit = { legitimacy_level = 2 } + subtract = 0.15 + } + if = { + limit = { has_perk = ducal_conquest_perk } # Ducal Conquest + subtract = 0.2 + } + if = { + limit = { + culture = { has_innovation = innovation_divine_right } # Divine Right + } + subtract = 0.2 + } + if = { + limit = { government_has_flag = government_is_tribal } # Tribal + subtract = 0.5 + } + if = { + limit = { + rite = { rite_has_tenet = tenet_pursuit_of_power } # Pursuit of Power + } + subtract = 0.5 + } + if = { + limit = { + culture = { has_cultural_pillar = ethos_courtly } # Courtly + } + subtract = 0.15 + } + if = { + limit = { + culture = { has_cultural_tradition = tradition_legalistic } # Legalistic + } + subtract = 0.3 + } + if = { + limit = { + dynasty = { has_dynasty_perk = law_legacy_2 } # Faithful Magistrates + } + subtract = 0.2 + } + min = 0.2 # 80% max discount from defines + } +} + + +#DUEL +duel_skill_multiplier_base = { #How many more skill points an extremely skilled character has than the averagely skilled character + add = extremely_high_skill_rating + subtract = medium_skill_rating +} + +#When used in a duel_value compare modifier, where the duel character has extremely good skill and the target has avarage skill, these modifiers will add... + +#10 +tiny_positive_duel_skill_multiplier = { + add = 10 + divide = duel_skill_multiplier_base +} + +#25 +low_positive_duel_skill_multiplier = { + add = 25 + divide = duel_skill_multiplier_base +} + +#50 +medium_positive_duel_skill_multiplier = { + add = 50 + divide = duel_skill_multiplier_base +} + +#75 +high_positive_duel_skill_multiplier = { + add = 75 + divide = duel_skill_multiplier_base +} + +#10 +tiny_negative_duel_skill_multiplier = { + add = -10 + divide = duel_skill_multiplier_base +} + +#-25 +low_negative_duel_skill_multiplier = { + add = -25 + divide = duel_skill_multiplier_base +} + +#-50 +medium_negative_duel_skill_multiplier = { + add = -50 + divide = duel_skill_multiplier_base +} + +#-75 +high_negative_duel_skill_multiplier = { + add = -75 + divide = duel_skill_multiplier_base +} + + +# Referenced by code. Amount of gold gained by the winning side per 1000 men who died in battle (hard casualties) +# Root is the winner main participant +# scope:enemy_battle_owner is the main enemy participant +# scope:combat is the combat itself +battle_winner_gold_gain = { + value = 0 + + if = { # Cultural tradition + limit = { + culture = { + has_cultural_parameter = gain_gold_from_battles + } + } + add = 10 + } + + if = { # Bonus for legacy + limit = { + dynasty ?= { + has_dynasty_perk = fp1_pillage_legacy_4 + } + } + add = 50 + } + + if = { # Master of Spoils Camp Officer + limit = { + employs_court_position = master_of_spoils_camp_officer + } + add = { + value = court_position:master_of_spoils_camp_officer.aptitude:master_of_spoils_camp_officer + add = 1 + multiply = 10 + } + } +} + +# Referenced by code. Amount of prestige gained by the winning side per 1000 men who died in battle (hard casualties) +# Root is the winner main participant +# scope:enemy_battle_owner is the main enemy participant +# scope:combat is the combat itself +battle_winner_prestige_gain = { + value = 75 + + if = { # Bonus for tribals + limit = { + government_has_flag = government_is_tribal + } + add = 75 + } + + if = { # Leading the troops yourself adds a bit + limit = { + OR = { + scope:combat = { + combat_attacker = { + side_commander ?= { + this = root + } + } + } + scope:combat = { + combat_defender = { + side_commander ?= { + this = root + } + } + } + } + } + add = 40 + } + + if = { # Bonus for legacy + limit = { + dynasty ?= { + has_dynasty_perk = fp1_pillage_legacy_1 + } + } + multiply = 2 + } + + if = { # Cultural tradition + limit = { + culture = { + has_cultural_parameter = less_prestige_from_battles + } + } + multiply = 0.1 + } + + # Fighting Peasants Rebellion + if = { + limit = { + scope:enemy_battle_owner = { has_variable = rebel_leader_peasants } + } + multiply = 0.25 # to test + } + + if = { # Reduced for LAAMPs + limit = { + has_government = landless_adventurer_government + } + multiply = 0.75 + } + + if = { # Master of Spoils Camp Officer + limit = { + employs_court_position = master_of_spoils_camp_officer + } + add = { + value = court_position:master_of_spoils_camp_officer.aptitude:master_of_spoils_camp_officer + add = 1 + multiply = 10 + } + } + + if = { # BP3 - Kings of the Wilds Perk + limit = { + has_perk = personal_touch_perk + landless_inspector_king_of_the_wilds = yes + } + multiply = 1.5 + } +} + +# Referenced by code. Amount of piety gained by the winning side per 1000 men who died in battle (hard casualties) +# Root is the winner main participant +# scope:enemy_battle_owner is the main enemy participant +# scope:combat is the combat itself +battle_winner_piety_gain = { + value = 0 + if = { + limit = { + faith = { + faith_hostility_level = { + target = scope:enemy_battle_owner.faith + value >= religious_cb_enabled_hostility_level + } + } + } + value = 35 + + if = { # Bonus for tribals + limit = { + government_has_flag = government_is_tribal + } + add = 50 + } + + if = { # Leading the troops yourself adds a bit + limit = { + OR = { + scope:combat = { + combat_attacker = { + side_commander ?= { + this = root + } + } + } + scope:combat = { + combat_defender = { + side_commander ?= { + this = root + } + } + } + } + } + add = 20 + } + + if = { # Master of Spoils Camp Officer + limit = { + employs_court_position = master_of_spoils_camp_officer + } + add = { + value = court_position:master_of_spoils_camp_officer.aptitude:master_of_spoils_camp_officer + add = 1 + multiply = 10 + } + } + } + + # Fighting Peasants Rebellion + if = { + limit = { + scope:enemy_battle_owner = { has_variable = rebel_leader_peasants } + } + multiply = 0.25 # to test + } + + if = { # Reduced for LAAMPs + limit = { + has_government = landless_adventurer_government + } + multiply = 0.75 + } +} + +# Referenced by code. Chance 0-100 that a randomly created ruler will be female +# Root is the new liege or previous holder of the title +random_ruler_chance_for_female = { + value = 0 + faith ?= { + if = { + limit = { has_dominant_ruling_gender = dummy_female } # if faith allows females to rule, then add 50% chance + add = 50 + } + if = { + limit = { NOT = { has_dominant_ruling_gender = dummy_male } } # if faith forbids males to rule, then add 50% chance + add = 50 + } + } +} + +# Referenced by code. Chance 0-100 that a randomly created ruler for a temple will be female +# Root is the new liege or previous holder of the title +random_theocratic_ruler_chance_for_female = { + value = 0 + rite ?= { + if = { + limit = { rite_has_doctrine = doctrine_clerical_gender_female_only } + add = 100 + } + if = { + limit = { rite_has_doctrine = doctrine_clerical_gender_male_only } + add = 0 + } + if = { + limit = { rite_has_doctrine = doctrine_clerical_gender_either } + add = 50 + } + } +} + +age_compared_to_root_plus_ten = { + add = age + subtract = root.age + add = 10 +} + +age_compared_to_root_minus_ten = { + add = age + subtract = root.age + subtract = 10 +} + +age_compared_to_root_plus_ten_always_adult = { + add = age + subtract = root.age + add = 10 + if = { + limit = { + is_male = yes + } + min = define:NCharacter|MALE_ADULT_AGE + } + if = { + limit = { + is_female = yes + } + min = define:NCharacter|FEMALE_ADULT_AGE + } +} + +age_compared_to_root_minus_ten_always_adult = { + add = age + subtract = root.age + subtract = 10 + if = { + limit = { + is_male = yes + } + min = define:NCharacter|MALE_ADULT_AGE + } + if = { + limit = { + is_female = yes + } + min = define:NCharacter|FEMALE_ADULT_AGE + } +} + + +#EXAMPLES +example_total_family_age = { + add = age + add = father.age + add = mother.age + modulo = 10 +} + +example_fancy_gold = { + add = gold + multiply = 3 + divide = 2 + subtract = 500 + max = 2500 + min = 1000 +} + +example_age_based_gold = { + add = 1000 + if = { + limit = { age > 30 } + divide = 2 + } + else_if = { + limit = { age < 20 } + divide = 4 + } + else = { + divide = 8 + } +} + +genetic_character_value = { + value = 0 + #BEAUTY + if = { + limit = { has_trait = beauty_bad_1 } + add = -1 + } + if = { + limit = { has_trait = beauty_bad_2 } + add = -2 + } + if = { + limit = { has_trait = beauty_bad_3 } + add = -3 + } + if = { + limit = { has_trait = beauty_good_1 } + add = 1 + } + if = { + limit = { has_trait = beauty_good_2 } + add = 2 + } + if = { + limit = { has_trait = beauty_good_3 } + add = 3 + } + #INTELLECT + if = { + limit = { has_trait = intellect_bad_1 } + add = -1 + } + if = { + limit = { has_trait = intellect_bad_2 } + add = -2 + } + if = { + limit = { has_trait = intellect_bad_3 } + add = -3 + } + if = { + limit = { has_trait = intellect_good_1 } + add = 1 + } + if = { + limit = { has_trait = intellect_good_2 } + add = 2 + } + if = { + limit = { has_trait = intellect_good_3 } + add = 3 + } + #PHYSIQUE + if = { + limit = { has_trait = physique_bad_1 } + add = -1 + } + if = { + limit = { has_trait = physique_bad_2 } + add = -2 + } + if = { + limit = { has_trait = physique_bad_3 } + add = -3 + } + if = { + limit = { has_trait = physique_good_1 } + add = 1 + } + if = { + limit = { has_trait = physique_good_2 } + add = 2 + } + if = { + limit = { has_trait = physique_good_3 } + add = 3 + } + #MISC GOOD GENETIC + if = { + limit = { has_trait = fecund } + add = 1 + } + #MISC BAD GENETIC + if = { + limit = { has_trait = clubfooted } + add = -1 + } + if = { + limit = { has_trait = hunchbacked } + add = -1 + } + if = { + limit = { has_trait = lisping } + add = -1 + } + if = { + limit = { has_trait = stuttering } + add = -1 + } + if = { + limit = { has_trait = giant } + add = -1 + } + if = { + limit = { has_trait = inbred } + add = -3 + } + if = { + limit = { has_trait = spindly } + add = -1 + } + if = { + limit = { has_trait = scaly } + add = -1 + } + if = { + limit = { has_trait = albino } + add = -1 + } + if = { + limit = { has_trait = wheezing } + add = -1 + } + if = { + limit = { has_trait = bleeder } + add = -1 + } + if = { + limit = { has_trait = infertile } + add = -1 + } + if = { + limit = { has_trait = depressed_genetic } + add = -1 + } + if = { + limit = { has_trait = lunatic_genetic } + add = -1 + } + if = { + limit = { has_trait = possessed_genetic } + add = -1 + } +} + +individual_recruit_guest_interaction_cost = { + add = 15 + + ###CLAIMS### + if = { + limit = { + save_temporary_scope_as = claim_holder + any_claim = { + courtier_or_guest_claim_trigger = { RULER = scope:claim_holder.host } + } + } + if = { + limit = { + save_temporary_scope_as = claim_holder + any_claim = { + courtier_or_guest_claim_trigger = { RULER = scope:claim_holder.host } + tier >= tier_duchy + } + } + add = 50 + } + else_if = { + limit = { + save_temporary_scope_as = claim_holder + any_claim = { + courtier_or_guest_claim_trigger = { RULER = scope:claim_holder.host } + tier = tier_county + } + } + add = 25 + } + } + + ###DYNASTY### + if = { + limit = { exists = dynasty } + add = { + value = dynasty.dynasty_prestige_level #0-10 + multiply = 5 #Max 50 + } + } + + ###GENETIC TRAITS### + add = { + value = genetic_character_value + multiply = 3 + min = -15 + max = 15 + } + + ###COMMANDER TRAITS### + if = { + limit = { number_of_commander_traits >= 1 } + add = { + value = number_of_commander_traits + multiply = 5 + min = 0 + } + + } + + ###COURT PHYSICIAN TRAITS### + if = { + limit = { + OR = { + AND = { + has_trait = lifestyle_physician + has_trait_xp = { + trait = lifestyle_physician + value >= 100 + } + } + AND = { + has_trait = lifestyle_mystic + has_trait_xp = { + trait = lifestyle_mystic + value >= 100 + } + } + } + } + add = 20 + } + else_if = { + limit = { + OR = { + has_trait = lifestyle_herbalist + AND = { + has_trait = lifestyle_physician + has_trait_xp = { + trait = lifestyle_physician + value >= 50 + } + } + AND = { + has_trait = lifestyle_mystic + has_trait_xp = { + trait = lifestyle_mystic + value >= 50 + } + } + } + } + add = 15 + } + else_if = { + limit = { + OR = { + has_trait = lifestyle_physician + has_trait = lifestyle_mystic + } + } + add = 10 + } + + ###SKILLS### + if = { + limit = { diplomacy >= good_skill_level } + add = 5 + } + if = { + limit = { martial >= good_skill_level } + add = 5 + } + if = { + limit = { stewardship >= good_skill_level } + add = 5 + } + if = { + limit = { intrigue >= good_skill_level } + add = 5 + } + if = { + limit = { learning >= good_skill_level } + add = 5 + } + if = { + limit = { prowess >= good_skill_level } + add = 5 + } + + ###PERSONALITY MULTIPLIER### + if = { + limit = { + OR = { + ai_greed >= high_positive_ai_value + has_trait = arrogant + } + } + multiply = 1.2 + } + else_if = { + limit = { + OR = { + ai_greed <= high_negative_ai_value + has_trait = humble + } + } + multiply = 0.8 + } + + ###AMENITIES MULTIPLIER### + if = { + limit = { + host = { + has_royal_court = yes + has_dlc_feature = royal_court + court_owner = { + amenity_level = { target = court_servants value = medium_amenity_level } + } + } + } + multiply = 0.8 + } + else_if = { + limit = { + host = { + has_royal_court = yes + has_dlc_feature = royal_court + court_owner = { + amenity_level = { target = court_servants value = high_amenity_level } + } + } + } + multiply = 0.7 + } + else_if = { + limit = { + host = { + has_royal_court = yes + has_dlc_feature = royal_court + court_owner = { + amenity_level = { target = court_servants value = very_high_amenity_level } + } + } + } + multiply = 0.6 + } + else_if = { + limit = { + host = { + has_royal_court = yes + has_dlc_feature = royal_court + court_owner = { + amenity_level = { target = court_servants value = max_amenity_level } + } + } + } + multiply = 0.5 + } + + min = 10 + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 + + if = { # Cultural Traditions + limit = { + host = { + culture = { + has_cultural_parameter = cheaper_guest_recruitment + } + } + } + multiply = 0.8 + min = 8 + } + + if = { # Dynasty legacy + limit = { + host = { + dynasty ?= { + has_dynasty_perk = erudition_legacy_1 + } + } + } + multiply = 0.7 + min = 7 + } + + if = { # Japanese Manor upgrade + limit = { + host = { + domicile ?= { has_domicile_parameter = japanese_manor_recruit_guest_discount } + } + } + multiply = 0.7 + min = 7 + } + + if = { # Tribal rulers pay less + limit = { + host = { + government_has_flag = government_is_tribal + } + } + multiply = 0.5 + min = 10 + } +} + +recruit_guest_interaction_cost = { + value = 0 + every_traveling_family_member = { + add = individual_recruit_guest_interaction_cost + } +} +recruit_guest_interaction_cost_with_list = { + value = 0 + every_in_list = { + list = recruiting_family + add = individual_recruit_guest_interaction_cost + } + if = { + limit = { + scope:actor = { + is_ai = yes + } + OR = { + has_game_rule = hard_difficulty + has_game_rule = very_hard_difficulty + } + } + multiply = 0 + } + if = { + limit = { + scope:actor.culture = { + has_cultural_parameter = frugal_blacksmith_cheaper_recruit_to_court + } + } + multiply = 0.5 + } +} + +root_attraction_based_female_chance = { + if = { + limit = { + root = { + is_attracted_to_women = yes + is_attracted_to_men = no + } + } + add = 100 + } + else_if = { + limit = { + root = { + is_attracted_to_women = yes + is_attracted_to_men = yes + } + } + add = 50 + } + else = { + add = 0 + } +} + +scope_attraction_based_female_chance = { + if = { + limit = { + scope:attraction_check = { + is_attracted_to_women = yes + is_attracted_to_men = no + } + } + add = 100 + } + else_if = { + limit = { + scope:attraction_check = { + is_attracted_to_women = yes + is_attracted_to_men = yes + } + } + add = 50 + } + else = { + add = 0 + } +} + +root_faith_clergy_gender_female_chance = { + if = { + limit = { + root.rite = { rite_has_parameter = clergy_must_be_male } + } + add = 0 + } + else_if = { + limit = { + root.rite = { rite_has_parameter = clergy_must_be_female } + } + add = 100 + } + else = { + add = 50 + } +} + +scope_actor_faith_clergy_gender_female_chance = { + if = { + limit = { + scope:actor.rite = { rite_has_parameter = clergy_must_be_male } + } + add = 0 + } + else_if = { + limit = { + scope:actor.rite = { rite_has_parameter = clergy_must_be_female } + } + add = 100 + } + else = { + add = 50 + } +} + +scope_monk_employer_faith_clergy_gender_female_chance = { + if = { + limit = { + scope:monk_employer.rite = { rite_has_parameter = clergy_must_be_male } + } + add = 0 + } + else_if = { + limit = { + scope:monk_employer.rite = { rite_has_parameter = clergy_must_be_female } + } + add = 100 + } + else = { + add = 50 + } +} + +scope_value_target_soldier_female_chance = { + if = { + limit = { + NOT = { + dummy_female = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:value_target } + } + } + dummy_male = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:value_target } + } + } + add = 0 + } + else_if = { + limit = { + dummy_female = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:value_target } + } + NOT = { + dummy_male = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:value_target } + } + } + } + add = 100 + } + else = { + add = 50 + } +} + +root_soldier_female_chance = { + if = { + limit = { + NOT = { dummy_female = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } } } + dummy_male = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } } + } + add = 0 + } + else_if = { + limit = { + dummy_female = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } } + NOT = { dummy_male = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } } } + } + add = 100 + } + else = { + add = 50 + } +} + +root_non_combatant_female_chance = { + if = { + limit = { + NOT = { dummy_female = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } } } + dummy_male = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } } + } + add = 100 + } + else_if = { + limit = { + dummy_female = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } } + NOT = { dummy_male = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } } } + } + add = 0 + } + else = { + add = 50 + } +} + +host_soldier_female_chance = { + if = { + limit = { + NOT = { dummy_female = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } } } + dummy_male = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } } + } + add = 0 + } + else_if = { + limit = { + dummy_female = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } } + NOT = { dummy_male = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } } } + } + add = 100 + } + else = { + add = 50 + } +} + +host_non_combatant_female_chance = { + if = { + limit = { + NOT = { dummy_female = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } } } + dummy_male = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } } + } + add = 100 + } + else_if = { + limit = { + dummy_female = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } } + NOT = { dummy_male = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } } } + } + add = 0 + } + else = { + add = 50 + } +} + +actor_soldier_female_chance = { + if = { + limit = { + NOT = { dummy_female = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:actor } } } + dummy_male = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:actor } } + } + add = 0 + } + else_if = { + limit = { + dummy_female = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:actor } } + NOT = { dummy_male = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:actor } } } + } + add = 100 + } + else = { + add = 50 + } +} + +recipient_soldier_female_chance = { + if = { + limit = { + NOT = { dummy_female = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:recipient } } } + dummy_male = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:recipient } } + } + add = 0 + } + else_if = { + limit = { + dummy_female = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:recipient } } + NOT = { dummy_male = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:recipient } } } + } + add = 100 + } + else = { + add = 50 + } +} + +root_faith_dominant_gender_female_chance = { + if = { + limit = { root.rite = { rite_has_doctrine = doctrine_gender_male_dominated } } + add = 0 + } + else_if = { + limit = { root.rite = { rite_has_doctrine = doctrine_gender_female_dominated } } + add = 100 + } + else = { + add = 50 + } +} + +activity_location_faith_dominant_gender_female_chance = { + if = { + limit = { scope:activity.activity_location.rite = { rite_has_doctrine = doctrine_gender_male_dominated } } + add = 0 + } + else_if = { + limit = { scope:activity.activity_location.rite = { rite_has_doctrine = doctrine_gender_female_dominated } } + add = 100 + } + else = { + add = 50 + } +} + +location_faith_dominant_gender_female_chance = { + if = { + limit = { location.rite = { rite_has_doctrine = doctrine_gender_male_dominated } } + add = 0 + } + else_if = { + limit = { location.rite = { rite_has_doctrine = doctrine_gender_female_dominated } } + add = 100 + } + else = { + add = 50 + } +} + +# Variant for landed_title scopes (e.g. county titles in faction outcome effects) +title_faith_dominant_gender_female_chance = { + if = { + limit = { rite = { rite_has_doctrine = doctrine_gender_male_dominated } } + add = 0 + } + else_if = { + limit = { rite = { rite_has_doctrine = doctrine_gender_female_dominated } } + add = 100 + } + else = { + add = 50 + } +} + +root_faith_dominant_gender_female_reversed_chance = { + if = { + limit = { root.rite = { rite_has_doctrine = doctrine_gender_male_dominated } } + add = 100 + } + else_if = { + limit = { root.rite = { rite_has_doctrine = doctrine_gender_female_dominated } } + add = 0 + } + else = { + add = 50 + } +} + +root_faith_dominant_gender_adjusted_female_chance = { + if = { + limit = { root.rite ?= { rite_has_doctrine = doctrine_gender_male_dominated } } + add = 20 + } + else_if = { + limit = { root.rite ?= { rite_has_doctrine = doctrine_gender_female_dominated } } + add = 80 + } + else = { + add = 50 + } +} + +root_self_based_female_chance = { + if = { + limit = { + root = { + is_female = yes + } + } + add = 100 + } + else = { + add = 0 + } +} + +root_self_based_reverse_female_chance = { + if = { + limit = { + root = { + is_male = yes + } + } + add = 100 + } + else = { + add = 0 + } +} + +marriage_gender_adjusted_female_chance = { + if = { + limit = { + allowed_to_marry_same_sex_trigger = yes + is_female = yes + is_attracted_to_women = yes + is_attracted_to_men = no + OR = { #Already have an heir of their dynasty or don't care + AND = { + exists = primary_heir + dynasty ?= primary_heir.dynasty + } + is_lowborn = yes + } + } + add = 100 + } + else_if = { + limit = { + allowed_to_marry_same_sex_trigger = yes + is_female = yes + is_attracted_to_women = yes + is_attracted_to_men = yes + OR = { #Already have an heir of their dynasty or don't care + AND = { + exists = primary_heir + dynasty ?= primary_heir.dynasty + } + is_lowborn = yes + } + } + add = 50 + } + else_if = { + limit = { + is_female = yes + } + add = 0 + } + else_if = { + limit = { + allowed_to_marry_same_sex_trigger = yes + is_male = yes + is_attracted_to_men = yes + is_attracted_to_women = no + OR = { #Already have an heir of their dynasty or don't care + AND = { + exists = primary_heir + dynasty ?= primary_heir.dynasty + } + is_lowborn = yes + } + } + add = 0 + } + else_if = { + limit = { + allowed_to_marry_same_sex_trigger = yes + is_male = yes + is_attracted_to_men = yes + is_attracted_to_women = yes + OR = { #Already have an heir of their dynasty or don't care + AND = { + exists = primary_heir + dynasty ?= primary_heir.dynasty + } + is_lowborn = yes + } + } + add = 50 + } + else = { + add = 100 + } +} + +root_sexuality_female_chance = { + if = { + limit = { + root = { + is_attracted_to_women = yes + is_attracted_to_men = no + } + } + add = 100 + } + else_if = { + limit = { + root = { + is_attracted_to_women = no + is_attracted_to_men = yes + } + } + add = 0 + } + else = { # Asexual/bi + add = 50 + } +} + +# Referenced by code when auto-assigning perks. Root is a character. Supports the use of randomization +num_perk_points = { + add = age + subtract = 16 + + divide = 3 + min = 0 + max = 20 +} + +stewardship_wealth_5002_investment_duration = 30 +stewardship_wealth_5002_good_tax_increase = 0.1 +stewardship_wealth_5002_great_tax_increase = 0.2 + +stewardship_wealth_5002_payment = { + value = capital_province.monthly_income + multiply = 12 + multiply = stewardship_wealth_5002_investment_duration + multiply = stewardship_wealth_5002_good_tax_increase #Now we're at the amount of extra tax you'd make + divide = 3 + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +stewardship_wealth_5002_one_time_gain = { + value = stewardship_wealth_5002_payment + divide = 2 + + #Rounds up to the closest number divisible by 5 + divide = 5 + ceiling = yes + multiply = 5 +} + +infidelity_event_delay = 3 + +half_monthly_character_income = { + value = monthly_character_income + multiply = 0.5 +} + +monthly_character_income_minus_expenses = { + value = monthly_character_income + subtract = monthly_character_expenses +} + +monthly_character_expenses_plus_fourty_percent = { + value = monthly_character_expenses + multiply = 1.4 +} + +monthly_character_expenses_times_three = { + value = monthly_character_expenses + multiply = 3 +} + +ai_war_chest_desired_gold_value = { + value = yearly_character_income + multiply = 3 + min = 100 + max = 2000 +} + +ai_inspiration_desired_gold_value = { + value = yearly_character_income + min = basic_fund_inspiration_cost + max = 2000 +} + +ai_war_chest_defender_holy_war_gold_value = { + value = yearly_character_income + multiply = 2 + min = 50 + max = 2000 +} + +steward_convert_culture_value = { + value = yearly_character_income + multiply = 3 + min = 100 +} + +steward_increase_development_value = { + value = yearly_character_income + multiply = 2 + min = 50 +} + +minimum_ai_gold_value_for_tyranny_wars = { + value = yearly_character_income + min = 10 +} + +comfortable_ai_gold_value_for_tyranny_wars = { + value = yearly_character_income + multiply = 3 + min = 25 +} + +minimum_ai_treasury_value_for_tyranny_wars = { + value = year_character_treasury_variable_income + min = 10 +} + +comfortable_ai_treasury_value_for_tyranny_wars = { + value = year_character_treasury_variable_income + multiply = 3 + min = 25 +} + +uncomfortable_ai_bancruptcy_for_wars = { + value = yearly_character_income + multiply = -2 +} + +very_uncomfortable_ai_bancruptcy_for_wars = { + value = yearly_character_income + multiply = -4 +} + +ai_economic_preference_value = { + value = 1 + if = { + limit = { + scope:holder.capital_province = this + free_building_slots <= 0 + } + add = 1 + } + if = { + limit = { + has_building_or_higher = tax_assessor_01 + free_building_slots <= 0 + } + add = 1 + } +} + +ai_piety_preference_value = { + value = 1 + if = { + limit = { + scope:holder = { + government_has_flag = government_is_mandala + capital_province = prev + } + free_building_slots <= 0 + } + add = 1 + } + if = { + limit = { + scope:holder = { + OR = { + AND = { + OR = { + is_tributary = yes + is_independent_ruler = no + } + overlord = { has_realm_law_flag = subjects_appear_more_pious } + } + has_realm_law_flag = subjects_appear_more_pious + } + } + free_building_slots <= 0 + } + add = 1 + } +} + +dislikes_maa_value = -9 +compensate_conflict_maa_bonus = 9 +likes_maa_value = 1 +stationed_maa_bonus = 3 +non_stationed_maa_bonus = -3 +really_likes_maa_value = 2 +stacking_bonus_value = 4 +anti_synergy_penalty_value = -9 + +fp2_2007_calculate_architect_competence = { # Intended for use with fp2_2007 in specific, not for general architects. + value = 0 + if = { limit = { culture = { has_cultural_parameter = architect_trait_prestige } } add = 15 } # Collapsed into one line for compactness + if = { limit = { has_trait = organizer } add = 2 } + if = { limit = { has_trait = logistician } add = 5 } + if = { limit = { has_trait = military_engineer } add = 15 } + if = { limit = { has_trait = strategist } add = 4 } + if = { limit = { has_trait = shrewd } add = 5 } + if = { limit = { has_trait = diligent } add = 5 } + if = { limit = { has_trait = temperate } add = 3 } + if = { limit = { has_trait = patient } add = 2 } + if = { limit = { has_trait = paranoid } add = 2 } + if = { limit = { has_trait = erudite } add = 1 } + if = { limit = { has_trait = architect } add = 12 } + if = { limit = { has_trait = content } subtract = 1 } + if = { limit = { has_trait = fickle } subtract = 5 } + if = { limit = { has_trait = arrogant } subtract = 10 } + if = { limit = { has_trait = lazy } subtract = 4 } + if = { limit = { has_trait = impatient } subtract = 5 } + if = { limit = { has_trait = greedy } subtract = 2 } + if = { limit = { has_trait = avaricious } subtract = 1 } + if = { limit = { has_trait = dull } subtract = 10 } +} + +activity_host_faith_dominant_gender_adjusted_female_chance = { + if = { + limit = { + scope:activity.activity_host.rite = { rite_has_doctrine = doctrine_gender_male_dominated } + } + add = 20 + } + else_if = { + limit = { + scope:activity.activity_host.rite = { rite_has_doctrine = doctrine_gender_female_dominated } + } + add = 80 + } + else = { add = 50 } +} + +activity_host_clergy_gender_female_chance = { + if = { + limit = { + scope:activity.activity_host.rite = { rite_has_parameter = clergy_must_be_male } + } + add = 0 + } + else_if = { + limit = { + scope:activity.activity_host.rite = { rite_has_parameter = clergy_must_be_female } + } + add = 100 + } + else = { add = 50 } +} + +five_times_monumental_value = { + add = monumental_gold_value + multiply = 5 +} diff --git a/common/script_values/02_religion_values.txt b/common/script_values/02_religion_values.txt index f6a3e304a..cc36bfdc0 100644 --- a/common/script_values/02_religion_values.txt +++ b/common/script_values/02_religion_values.txt @@ -1292,42 +1292,42 @@ great_holy_war_target_kingdom_weight = { } add = ghw_target_fringe } - # Magyar heartlands - else_if = { - limit = { - scope:the_faith.religion = religion:mediterranean_religion - title_capital_county.title_province = { geographical_region = ghw_region_hungary } - } - add = ghw_target_heartlands - } - # Magyar frontier - else_if = { - limit = { - scope:the_faith.religion = religion:mediterranean_religion - title_capital_county.title_province = { - OR = { - geographical_region = ghw_region_balkans - geographical_region = ghw_region_crimea - geographical_region = ghw_region_poland_bohemia_bavaria - geographical_region = ghw_region_southern_russia - } - } - } - add = ghw_target_frontier - } - # Magyar fringe - else_if = { - limit = { - scope:the_faith.religion = religion:mediterranean_religion - title_capital_county.title_province = { - OR = { - geographical_region = ghw_region_mainland_greece - geographical_region = ghw_region_baltic - } - } - } - add = ghw_target_fringe - } +# # Magyar heartlands +# else_if = { +# limit = { +# scope:the_faith.religion = religion:mediterranean_religion +# title_capital_county.title_province = { geographical_region = ghw_region_hungary } +# } +# add = ghw_target_heartlands +# } +# # Magyar frontier +# else_if = { +# limit = { +# scope:the_faith.religion = religion:mediterranean_religion +# title_capital_county.title_province = { +# OR = { +# geographical_region = ghw_region_balkans +# geographical_region = ghw_region_crimea +# geographical_region = ghw_region_poland_bohemia_bavaria +# geographical_region = ghw_region_southern_russia +# } +# } +# } +# add = ghw_target_frontier +# } +# # Magyar fringe +# else_if = { +# limit = { +# scope:the_faith.religion = religion:mediterranean_religion +# title_capital_county.title_province = { +# OR = { +# geographical_region = ghw_region_mainland_greece +# geographical_region = ghw_region_baltic +# } +# } +# } +# add = ghw_target_fringe +# } # # Bon/Qiangicism/Donyipoloism/Mundhumism heartlands # else_if = { # limit = { @@ -2060,22 +2060,22 @@ great_holy_war_target_kingdom_weight = { multiply = ghw_target_distance_01_reduction } } - # Taltosist Paganism - else_if = { - limit = { scope:the_faith.religion = religion:mediterranean_religion } - if = { - limit = { - title_capital_county = { - squared_distance = { - target = title:c_visegrad - value >= ghw_target_distance_01_threshold - } - } - } - multiply = ghw_target_distance_01_reduction - } - } - # Bon/Qiangicism/Donyipoloism/Mundhumism +# # Taltosist Paganism +# else_if = { +# limit = { scope:the_faith.religion = religion:mediterranean_religion } +# if = { +# limit = { +# title_capital_county = { +# squared_distance = { +# target = title:c_visegrad +# value >= ghw_target_distance_01_threshold +# } +# } +# } +# multiply = ghw_target_distance_01_reduction +# } +# } +# # Bon/Qiangicism/Donyipoloism/Mundhumism # else_if = { # limit = { # scope:the_faith.religion = { @@ -2470,22 +2470,22 @@ great_holy_war_target_kingdom_weight = { multiply = ghw_target_distance_02_reduction } } - # Taltosist Paganism - else_if = { - limit = { scope:the_faith.religion = religion:mediterranean_religion } - if = { - limit = { - title_capital_county = { - squared_distance = { - target = title:c_visegrad - value >= ghw_target_distance_02_threshold - } - } - } - multiply = ghw_target_distance_02_reduction - } - } - # Bon/Qiangicism/Donyipoloism/Mundhumism +# # Taltosist Paganism +# else_if = { +# limit = { scope:the_faith.religion = religion:mediterranean_religion } +# if = { +# limit = { +# title_capital_county = { +# squared_distance = { +# target = title:c_visegrad +# value >= ghw_target_distance_02_threshold +# } +# } +# } +# multiply = ghw_target_distance_02_reduction +# } +# } +# # Bon/Qiangicism/Donyipoloism/Mundhumism # else_if = { # limit = { # scope:the_faith.religion = { @@ -2880,22 +2880,22 @@ great_holy_war_target_kingdom_weight = { multiply = ghw_target_distance_03_reduction } } - # Taltosist Paganism - else_if = { - limit = { scope:the_faith.religion = religion:mediterranean_religion } - if = { - limit = { - title_capital_county = { - squared_distance = { - target = title:c_visegrad - value >= ghw_target_distance_03_threshold - } - } - } - multiply = ghw_target_distance_03_reduction - } - } - # Bon/Qiangicism/Donyipoloism/Mundhumism +# # Taltosist Paganism +# else_if = { +# limit = { scope:the_faith.religion = religion:mediterranean_religion } +# if = { +# limit = { +# title_capital_county = { +# squared_distance = { +# target = title:c_visegrad +# value >= ghw_target_distance_03_threshold +# } +# } +# } +# multiply = ghw_target_distance_03_reduction +# } +# } +# # Bon/Qiangicism/Donyipoloism/Mundhumism # else_if = { # if = { # limit = { diff --git a/common/script_values/99_court_chaplain_values.txt b/common/script_values/99_court_chaplain_values.txt index ac476722c..4dd3b4259 100644 --- a/common/script_values/99_court_chaplain_values.txt +++ b/common/script_values/99_court_chaplain_values.txt @@ -76,7 +76,11 @@ court_chaplain_religious_relations_consulted_house_bonus_modifier = { court_chaplain_religious_relations_cultural_tradition_bonus_modifier = { if = { limit = { - scope:councillor_liege.culture = { has_cultural_parameter = religious_relations_is_empowered } + exists = scope:councillor_liege.culture + trigger_if = { + limit = { exists = scope:councillor_liege.culture } + scope:councillor_liege.culture ?= { has_cultural_parameter = religious_relations_is_empowered } + } } add = court_chaplain_religious_relations_modifier multiply = 0.2 #When changing, adjust culture_parameter_religious_relations_is_empowered @@ -245,13 +249,13 @@ court_chaplain_religious_relations_no_hof_opinion_modifier = { add = 0 if = { limit = { - scope:councillor.faith = { + scope:councillor.faith ?= { OR = { has_doctrine_parameter = no_head_of_faith NOT = { exists = religious_head } } } - scope:councillor.rite = { rite_has_doctrine = doctrine_theocracy_lay_clergy } + scope:councillor.rite ?= { rite_has_doctrine = doctrine_theocracy_lay_clergy } } add = court_chaplain_religious_relations_opinion_modifier divide = court_chaplain_religious_relations_no_hof_balance @@ -625,7 +629,7 @@ court_chaplain_conversion_contextual_bonuses = { #Conversion modifiers from where the Faith is on the Pluralism spectrum. if = { limit = { - scope:councillor.rite = { + scope:councillor.rite ?= { rite_has_parameter = pluralism_fundamentalist_proselytization_bonus } } @@ -636,7 +640,7 @@ court_chaplain_conversion_contextual_bonuses = { } if = { limit = { - scope:councillor.rite = { + scope:councillor.rite ?= { rite_has_parameter = pluralism_pluralistic_proselytization_penalty } } @@ -651,13 +655,13 @@ court_chaplain_conversion_contextual_bonuses = { if = { limit = { exists = scope:county - scope:county.rite = { + scope:county.rite ?= { rite_has_parameter = sanctioned_false_conversion_county_resistance } } if = { limit = { - scope:county.rite = { rite_has_tenet = tenet_false_conversion_sanction } + scope:county.rite ?= { rite_has_tenet = tenet_false_conversion_sanction } } add = { value = scope:councillor.conversion_false_conversion_sanction_resistance @@ -666,7 +670,7 @@ court_chaplain_conversion_contextual_bonuses = { } else_if = { limit = { - scope:county.rite = { rite_has_tenet = tenet_pastoral_isolation } + scope:county.rite ?= { rite_has_tenet = tenet_pastoral_isolation } } add = { value = scope:councillor.conversion_pastoral_isolation_resistance @@ -684,13 +688,13 @@ court_chaplain_conversion_contextual_bonuses = { if = { limit = { exists = scope:county - scope:county.rite = { + scope:county.rite ?= { rite_has_parameter = reincarnation_resistance_to_conversion } } if = { limit = { - scope:county.rite = { rite_has_tenet = tenet_reincarnation } + scope:county.rite ?= { rite_has_tenet = tenet_reincarnation } } add = { value = scope:councillor.conversion_reincarnation_resistance @@ -708,7 +712,7 @@ court_chaplain_conversion_contextual_bonuses = { if = { limit = { exists = scope:county - scope:county.rite = { + scope:county.rite ?= { rite_has_parameter = tenet_adaptive_conversion_resistance } } @@ -719,7 +723,7 @@ court_chaplain_conversion_contextual_bonuses = { } if = { limit = { - scope:councillor.liege.rite = { rite_has_parameter = other_culture_conversion_penalty_active } + scope:councillor.liege.rite ?= { rite_has_parameter = other_culture_conversion_penalty_active } exists = scope:county scope:county.culture != scope:councillor.liege.culture } @@ -734,7 +738,7 @@ court_chaplain_conversion_contextual_bonuses = { ### Mendicant Preachers if = { limit = { - scope:councillor.rite = { + scope:councillor.rite ?= { rite_has_parameter = mendicant_preachers_conversion_active } } @@ -759,7 +763,7 @@ court_chaplain_conversion_contextual_bonuses = { if = { limit = { exists = scope:county - scope:councillor.rite = { + scope:councillor.rite ?= { rite_has_parameter = same_culture_conversion_bonus_active } scope:county.culture = scope:councillor.liege.culture @@ -773,7 +777,7 @@ court_chaplain_conversion_contextual_bonuses = { if = { limit = { exists = scope:county - scope:councillor.faith = { + scope:councillor.faith ?= { has_doctrine_parameter = ghw_no_hof_conversion_buffs_active OR = { has_doctrine_parameter = no_head_of_faith @@ -791,7 +795,7 @@ court_chaplain_conversion_contextual_bonuses = { if = { limit = { exists = scope:county - scope:councillor.rite = { rite_has_parameter = easier_to_convert_faith_in_mountains } + scope:councillor.rite ?= { rite_has_parameter = easier_to_convert_faith_in_mountains } scope:county = { # We check any province and not just title province, to be generous. county_has_province_with_terrain = { @@ -811,7 +815,7 @@ court_chaplain_conversion_contextual_bonuses = { limit = { exists = scope:county scope:county = { - rite = { rite_has_parameter = harder_to_convert_faith_away_in_mountains } + rite ?= { rite_has_parameter = harder_to_convert_faith_away_in_mountains } # We check any province and not just title province, to be generous. county_has_province_with_terrain = { terrain = mountains @@ -830,7 +834,7 @@ court_chaplain_conversion_contextual_bonuses = { limit = { exists = scope:county.faith scope:county.faith != scope:councillor.faith - scope:councillor.faith = { faith_is_syncretic_with = { FAITH = scope:county.faith } } + scope:councillor.faith ?= { faith_is_syncretic_with = { FAITH = scope:county.faith } } } add = { value = scope:councillor.conversion_syncretic_with_religion_malus @@ -888,7 +892,7 @@ court_chaplain_conversion_contextual_bonuses = { } religion = religion:germanic_religion } - scope:county.faith = { + scope:county.faith ?= { NOT = { has_doctrine_parameter = unreformed } } } @@ -944,7 +948,7 @@ court_chaplain_conversion_contextual_bonuses = { #Conversion bonuses from certain Holy Sites. if = { limit = { - scope:councillor.faith = { + scope:councillor.faith ?= { controls_holy_site_with_parameter = jerusalem_conversion_bonus } title:b_jerusalem = { @@ -958,7 +962,7 @@ court_chaplain_conversion_contextual_bonuses = { } if = { limit = { - scope:councillor.faith = { + scope:councillor.faith ?= { controls_holy_site_with_parameter = kerala_conversion_bonus } title:b_mahoyadapuram = { @@ -973,7 +977,7 @@ court_chaplain_conversion_contextual_bonuses = { if = { limit = { exists = scope:county - scope:councillor.faith = { + scope:councillor.faith ?= { controls_holy_site_with_parameter = iona_conversion_bonus } title:b_islay = { @@ -991,7 +995,7 @@ court_chaplain_conversion_contextual_bonuses = { if = { limit = { exists = scope:county - scope:county.faith = { + scope:county.faith ?= { controls_holy_site_with_parameter = wadi_el_milk_conversion_resistance_bonus } title:b_wadi_el-milk = { @@ -1005,7 +1009,7 @@ court_chaplain_conversion_contextual_bonuses = { } if = { limit = { - scope:councillor.faith = { + scope:councillor.faith ?= { controls_holy_site_with_parameter = cordoba_conversion_bonus } title:b_cordoba = { @@ -1019,7 +1023,7 @@ court_chaplain_conversion_contextual_bonuses = { } if = { limit = { - scope:councillor.faith = { + scope:councillor.faith ?= { controls_holy_site_with_parameter = geneva_conversion_bonus } title:b_geneva = { @@ -1034,7 +1038,7 @@ court_chaplain_conversion_contextual_bonuses = { if = { limit = { exists = scope:county - scope:county.faith = { + scope:county.faith ?= { controls_holy_site_with_parameter = visoki_conversion_resistance_bonus } title:b_visoki = { @@ -1051,7 +1055,7 @@ court_chaplain_conversion_contextual_bonuses = { if = { limit = { exists = scope:county - scope:county.culture = { + scope:county.culture ?= { has_cultural_parameter = more_easily_converted } } @@ -1063,7 +1067,7 @@ court_chaplain_conversion_contextual_bonuses = { if = { limit = { exists = scope:county - scope:county.culture = { + scope:county.culture ?= { has_cultural_parameter = harder_to_convert_county_faith } } @@ -1108,7 +1112,7 @@ court_chaplain_conversion_contextual_bonuses = { limit = { exists = global_var:fp3_struggle_ending global_var:fp3_struggle_ending = flag:fp3_struggle_shia_caliphate_ending - scope:councillor.rite = { + scope:councillor.rite ?= { rite_has_doctrine = muhammad_succession_shia_doctrine } } @@ -1121,7 +1125,7 @@ court_chaplain_conversion_contextual_bonuses = { limit = { exists = global_var:fp3_struggle_ending global_var:fp3_struggle_ending = flag:fp3_struggle_strengthen_caliphate_ending - scope:councillor.rite = { + scope:councillor.rite ?= { rite_has_doctrine = muhammad_succession_sunni_doctrine } } @@ -1232,7 +1236,7 @@ court_chaplain_conversion_contextual_bonuses = { # Faster conversion for certain special doctrines if = { limit = { - scope:councillor_liege.faith = { has_doctrine_parameter = adoptionists_attractively_intuitive_theology } + scope:councillor_liege.faith ?= { has_doctrine_parameter = adoptionists_attractively_intuitive_theology } exists = scope:county scope:county.faith.religion = religion:christianity_religion } @@ -1247,7 +1251,7 @@ court_chaplain_conversion_factors = { value = 1 if = { limit = { - scope:councillor.faith = { + scope:councillor.faith ?= { has_doctrine_parameter = unreformed } } @@ -1323,7 +1327,7 @@ court_chaplain_conversion_factors = { limit = { scope:councillor.liege = { has_character_modifier = fp2_council_conversion_modifier } scope:county.rite != rite:mozarabic_church - scope:county.faith = { + scope:county.faith ?= { religion = scope:councillor.liege.religion NOT = { exists = religious_head } } @@ -1341,7 +1345,7 @@ court_chaplain_conversion_factors = { has_character_modifier = fp3_promoted_persian_scripture_modifier is_ai = no #this is so that we don't get AI converting and homogenizing Persia too quickly } - scope:county.culture = { has_cultural_pillar = heritage_iranian } + scope:county.culture ?= { has_cultural_pillar = heritage_iranian } } multiply = { value = promote_persian_scripture_conversion_modifier_value @@ -1356,16 +1360,16 @@ court_chaplain_conversion_factors = { switch = { trigger = global_var:fp3_struggle_ending_assertion_school flag:sunni = { - scope:councillor.liege.rite = { rite_has_doctrine = muhammad_succession_sunni_doctrine } + scope:councillor.liege.rite ?= { rite_has_doctrine = muhammad_succession_sunni_doctrine } } flag:shia = { - scope:councillor.liege.rite = { rite_has_doctrine = muhammad_succession_shia_doctrine } + scope:councillor.liege.rite ?= { rite_has_doctrine = muhammad_succession_shia_doctrine } } flag:muhakkima = { - scope:councillor.liege.rite = { rite_has_doctrine = muhammad_succession_muhakkima_doctrine } + scope:councillor.liege.rite ?= { rite_has_doctrine = muhammad_succession_muhakkima_doctrine } } flag:zandaqa = { - scope:councillor.liege.rite = { rite_has_doctrine = muhammad_succession_zandaqa_doctrine } + scope:councillor.liege.rite ?= { rite_has_doctrine = muhammad_succession_zandaqa_doctrine } } } } @@ -1684,7 +1688,7 @@ court_chaplain_progress_percentage = { conversion_fundamentalist_faith_bonus = { if = { limit = { - scope:councillor.rite = { + scope:councillor.rite ?= { rite_has_parameter = pluralism_fundamentalist_proselytization_bonus } } @@ -1697,7 +1701,7 @@ conversion_pluralistic_faith_penalty = { value = 0 if = { limit = { - scope:councillor.rite = { + scope:councillor.rite ?= { rite_has_parameter = pluralism_pluralistic_proselytization_penalty } } @@ -1713,7 +1717,7 @@ conversion_false_conversion_sanction_resistance = { if = { limit = { exists = scope:county - scope:county.rite = { + scope:county.rite ?= { rite_has_parameter = sanctioned_false_conversion_county_resistance } } @@ -1727,7 +1731,7 @@ conversion_reincarnation_resistance = { if = { limit = { exists = scope:county - scope:county.rite = { + scope:county.rite ?= { rite_has_parameter = reincarnation_resistance_to_conversion } } @@ -1746,7 +1750,7 @@ conversion_adaptive_resistance = { if = { limit = { exists = scope:county - scope:county.rite = { + scope:county.rite ?= { rite_has_parameter = tenet_adaptive_conversion_resistance } } @@ -1760,7 +1764,7 @@ conversion_culture_harder_to_convert = { if = { limit = { exists = scope:county - scope:county.culture = { + scope:county.culture ?= { has_cultural_parameter = harder_to_convert_county_faith } } @@ -1774,7 +1778,7 @@ conversion_culture_more_easily_converted = { if = { limit = { exists = scope:county - scope:county.culture = { + scope:county.culture ?= { has_cultural_parameter = more_easily_converted } } @@ -1796,7 +1800,7 @@ conversion_communal_identity_resistance = { value = 0 if = { limit = { - scope:councillor.rite = { rite_has_parameter = other_culture_conversion_penalty_active } + scope:councillor.rite ?= { rite_has_parameter = other_culture_conversion_penalty_active } scope:county.culture != scope:councillor.liege.culture } subtract = court_chaplain_conversion_base_total @@ -1808,7 +1812,7 @@ conversion_mendicant_preachers_bonus = { value = 0 if = { limit = { - scope:councillor.rite = { + scope:councillor.rite ?= { rite_has_parameter = mendicant_preachers_conversion_active } } @@ -1835,7 +1839,7 @@ conversion_communal_identity_bonus = { if = { limit = { exists = scope:county - scope:councillor.rite = { + scope:councillor.rite ?= { rite_has_parameter = same_culture_conversion_bonus_active } scope:county.culture = scope:councillor.liege.culture @@ -1861,13 +1865,13 @@ conversion_ghw_tenet_no_hof_bonus = { #add = court_chaplain_conversion_base_total if = { limit = { - faith = { holy_sites_controlled = 1 } + faith ?= { holy_sites_controlled = 1 } } multiply = conversion_ghw_tenet_multiplier_control } else_if = { limit = { - faith = { holy_sites_controlled = 2 } + faith ?= { holy_sites_controlled = 2 } } multiply = { value = conversion_ghw_tenet_multiplier_control @@ -1876,7 +1880,7 @@ conversion_ghw_tenet_no_hof_bonus = { } else_if = { limit = { - faith = { holy_sites_controlled = 3 } + faith ?= { holy_sites_controlled = 3 } } multiply = { value = conversion_ghw_tenet_multiplier_control @@ -1885,7 +1889,7 @@ conversion_ghw_tenet_no_hof_bonus = { } else_if = { limit = { - faith = { holy_sites_controlled = 4 } + faith ?= { holy_sites_controlled = 4 } } multiply = { value = conversion_ghw_tenet_multiplier_control @@ -1894,7 +1898,7 @@ conversion_ghw_tenet_no_hof_bonus = { } else_if = { limit = { - faith = { holy_sites_controlled = 5 } + faith ?= { holy_sites_controlled = 5 } } multiply = { value = conversion_ghw_tenet_multiplier_control @@ -1903,7 +1907,7 @@ conversion_ghw_tenet_no_hof_bonus = { } else_if = { limit = { - faith = { holy_sites_controlled = 6 } + faith ?= { holy_sites_controlled = 6 } } multiply = { value = conversion_ghw_tenet_multiplier_control @@ -1912,7 +1916,7 @@ conversion_ghw_tenet_no_hof_bonus = { } else_if = { limit = { - faith = { holy_sites_controlled = 7 } + faith ?= { holy_sites_controlled = 7 } } multiply = { value = conversion_ghw_tenet_multiplier_control @@ -1921,7 +1925,7 @@ conversion_ghw_tenet_no_hof_bonus = { } else_if = { limit = { - faith = { holy_sites_controlled = 8 } + faith ?= { holy_sites_controlled = 8 } } multiply = { value = conversion_ghw_tenet_multiplier_control @@ -1930,7 +1934,7 @@ conversion_ghw_tenet_no_hof_bonus = { } else_if = { limit = { - faith = { holy_sites_controlled = 9 } + faith ?= { holy_sites_controlled = 9 } } multiply = { value = conversion_ghw_tenet_multiplier_control @@ -1939,7 +1943,7 @@ conversion_ghw_tenet_no_hof_bonus = { } else_if = { limit = { - faith = { holy_sites_controlled >= 10 } + faith ?= { holy_sites_controlled >= 10 } } multiply = { value = conversion_ghw_tenet_multiplier_control @@ -2010,7 +2014,7 @@ conversion_holy_site_jerusalem = { value = 0 if = { limit = { - scope:councillor.faith = { + scope:councillor.faith ?= { controls_holy_site_with_parameter = jerusalem_conversion_bonus } } @@ -2023,7 +2027,7 @@ conversion_holy_site_kerala = { value = 0 if = { limit = { - scope:councillor.faith = { + scope:councillor.faith ?= { controls_holy_site_with_parameter = kerala_conversion_bonus } } @@ -2036,7 +2040,7 @@ conversion_holy_site_iona = { value = 0 if = { limit = { - scope:councillor.faith = { + scope:councillor.faith ?= { controls_holy_site_with_parameter = iona_conversion_bonus } } @@ -2049,7 +2053,7 @@ conversion_holy_site_visoki = { value = 0 if = { limit = { - scope:councillor.faith = { + scope:councillor.faith ?= { controls_holy_site_with_parameter = visoki_conversion_resistance_bonus } } @@ -2062,7 +2066,7 @@ conversion_holy_site_wadi_el_milk = { value = 0 if = { limit = { - scope:councillor.faith = { + scope:councillor.faith ?= { controls_holy_site_with_parameter = wadi_el_milk_conversion_resistance_bonus } } @@ -2075,7 +2079,7 @@ conversion_holy_site_cordoba = { value = 0 if = { limit = { - scope:councillor.faith = { + scope:councillor.faith ?= { controls_holy_site_with_parameter = cordoba_conversion_bonus } } @@ -2088,7 +2092,7 @@ conversion_holy_site_geneva = { value = 0 if = { limit = { - scope:councillor.faith = { + scope:councillor.faith ?= { controls_holy_site_with_parameter = geneva_conversion_bonus } } @@ -2224,7 +2228,7 @@ court_chaplain_sunni_promotion = { limit = { exists = global_var:fp3_struggle_ending global_var:fp3_struggle_ending = flag:fp3_struggle_strengthen_caliphate_ending - rite = { + rite ?= { rite_has_doctrine = muhammad_succession_sunni_doctrine } } @@ -2240,7 +2244,7 @@ court_chaplain_shia_promotion = { limit = { exists = global_var:fp3_struggle_ending global_var:fp3_struggle_ending = flag:fp3_struggle_shia_caliphate_ending - rite = { + rite ?= { rite_has_doctrine = muhammad_succession_shia_doctrine } } @@ -2252,7 +2256,7 @@ court_chaplain_shia_promotion = { } #Cardinal Order bonus -cardinal_order_convert_faith = { +cardinal_order_convert_faith ?= { if = { limit = { scope:county ?= { diff --git a/common/script_values/99_steward_values.txt b/common/script_values/99_steward_values.txt new file mode 100644 index 000000000..694c1422b --- /dev/null +++ b/common/script_values/99_steward_values.txt @@ -0,0 +1,1310 @@ +# Can't reference a named value that hasn't been defined yet, so this file is late in the load order +# Feel free to use other files as well, but be careful about load order +# Please remove the example formulas once there's a few real formulas + + +steward_learn_on_the_job_scale = { + value = 0 + if = { + limit = { + liege = { has_perk = learn_on_the_job_perk } + } + add = stewardship + multiply = { + add = learn_on_the_job_percentage + divide = 100 + } + floor = yes + min = 1 + } +} + +kurultai_steward_learn_on_the_job_scale = { + value = 0 + if = { + limit = { + liege = { has_perk = learn_on_the_job_perk } + highest_skill = stewardship + } + add = stewardship + multiply = { + add = learn_on_the_job_percentage + divide = 100 + } + floor = yes + min = 1 + } +} + +### Reliable House modifier +steward_reliable_house_scale = { + value = 0 + if = { + limit = { + exists = liege.dynasty + liege.dynasty = { has_dynasty_perk = fp2_coterie_legacy_2 } + house = liege.house + } + add = stewardship + multiply = { + add = council_reliable_house_percentage + divide = 100 + } + floor = yes + min = 1 + } +} + + +######################################### +########## COLLECT TAXES TASK ########### +######################################### + +steward_collect_taxes_scale_base = { + add = stewardship + divide = 2 +} + +steward_collect_taxes_perk_bonus_scale = { + add = steward_collect_taxes_scale_base + multiply = { + add = tax_man_perk_percentage + divide = 100 + } +} + +steward_collect_taxes_erudition_bonus_scale = { + add = steward_collect_taxes_scale_base + multiply = { + add = erudition_legacy_5_percentage + divide = 100 + } +} + +steward_collect_taxes_family_business_bonus_scale = { + add = steward_collect_taxes_scale_base + multiply = { + add = family_business_councillors_percentage + divide = 100 + } +} + +steward_collect_taxes_consulted_house_bonus_scale = { + add = steward_collect_taxes_scale_base + multiply = { + add = consulted_house_councillors_percentage + divide = 100 + } +} + +steward_collect_taxes_scale_tooltip_total = { + add = steward_collect_taxes_scale_base + if = { + limit = { + scope:councillor_liege = { has_perk = tax_man_perk } + } + add = steward_collect_taxes_perk_bonus_scale + } + if = { + limit = { + councillor_liege_has_erudition_legacy_5_perk = yes + } + add = steward_collect_taxes_erudition_bonus_scale + } + if = { + limit = { + councillor_liege_has_family_business_bonus = yes + } + add = steward_collect_taxes_family_business_bonus_scale # 0.1 + } + if = { + limit = { + councillor_liege_has_consulted_house_bonus = yes + } + add = steward_collect_taxes_consulted_house_bonus_scale # 0.1 + } + if = { + limit = { + scope:councillor_liege.culture ?= { has_cultural_parameter = bookkeeping_collect_taxes_bonus } + } + add = 10 + } +} + +steward_collect_taxes_total_scale = { + add = steward_collect_taxes_scale_tooltip_total + divide = 100 +} + +steward_collect_taxes_bonus_tax_income = { + add = medium_gold_value + multiply = stewardship + divide = 10 +} + +######################################### +######### DEVELOP COUNTY TASK ########### +######################################### + +steward_develop_county_full_progress = { + if = { + limit = { exists = scope:county } + add = scope:county.development_rate + } +} + +steward_develop_county_current_progress = { + value = 0 + if = { + limit = { exists = scope:county } + add = scope:county.development_towards_level_increase + } +} + +steward_develop_county_base = { + add = 0.1 +} + +steward_develop_county_monthly_increase = { + add = stewardship + multiply = 0.175 +} + +steward_develop_county_base_total = { + add = steward_develop_county_base + add = steward_develop_county_monthly_increase +} + +steward_develop_county_modifier_scale = { + add = steward_develop_county_base_total + divide = 100 +} + +# Relation impact +steward_develop_county_monthly_increase_friend_bonus = { + if = { + limit = { + scope:councillor_liege = { + has_relation_friend = scope:councillor + NOT = { has_relation_best_friend = scope:councillor } + } + } + value = steward_develop_county_base_total + multiply = { + add = council_friend_impact_percentage + divide = 100 + } + } +} +steward_develop_county_monthly_increase_best_friend_bonus = { + if = { + limit = { + scope:councillor_liege = { + has_relation_best_friend = scope:councillor + } + } + value = steward_develop_county_base_total + multiply = { + add = council_best_friend_impact_percentage + divide = 100 + } + } +} +steward_develop_county_monthly_increase_rival_bonus = { + if = { + limit = { + scope:councillor_liege = { + has_relation_rival = scope:councillor + NOT = { has_relation_nemesis = scope:councillor } + } + } + value = steward_develop_county_base_total + multiply = { + add = council_rival_impact_percentage + divide = 100 + } + } +} +steward_develop_county_monthly_increase_nemesis_bonus = { + if = { + limit = { + scope:councillor_liege = { + has_relation_nemesis = scope:councillor + } + } + value = steward_develop_county_base_total + multiply = { + add = council_nemesis_impact_percentage + divide = 100 + } + } +} + +steward_develop_county_perk_bonus_monthly_increase = { + value = 0 + if = { + limit = { + liege = { has_perk = planned_cultivation_perk } + } + add = steward_develop_county_base_total + multiply = { + add = planned_cultivation_percentage + divide = 100 + } + } +} + +steward_develop_county_erudition_bonus_monthly_increase = { + value = 0 + add = steward_develop_county_base_total + multiply = { + add = erudition_legacy_5_percentage + divide = 100 + } +} + +steward_develop_county_family_business_monthly_increase = { + value = 0 + add = steward_develop_county_base_total + multiply = { + add = family_business_councillors_percentage + divide = 100 + } +} + +steward_develop_county_consulted_house_monthly_increase = { + value = 0 + add = steward_develop_county_base_total + multiply = { + add = consulted_house_councillors_percentage + divide = 100 + } +} + +steward_develop_county_total = { + add = steward_develop_county_base + add = steward_develop_county_monthly_increase + add = steward_develop_county_monthly_increase_friend_bonus + add = steward_develop_county_monthly_increase_best_friend_bonus + add = steward_develop_county_monthly_increase_rival_bonus + add = steward_develop_county_monthly_increase_nemesis_bonus + add = steward_develop_county_perk_bonus_monthly_increase + if = { + limit = { + councillor_liege_has_erudition_legacy_5_perk = yes + } + add = steward_develop_county_erudition_bonus_monthly_increase + } + if = { + limit = { + councillor_liege_has_family_business_bonus = yes + } + add = steward_develop_county_family_business_monthly_increase + } +} + +steward_develop_county_tribal_penalty = { + value = 0 + if = { + limit = { + scope:councillor_liege = { + should_apply_tribal_development_penalty_trigger = yes + } + } + add = scope:councillor.steward_develop_county_total + add = scope:councillor.steward_develop_county_perk_bonus_monthly_increase + multiply = -0.5 + } +} + +steward_develop_county_perk_bonus_modifier_scale = { + value = 0 + if = { + limit = { + liege = { has_perk = planned_cultivation_perk } + } + add = steward_develop_county_modifier_scale + multiply = 0.2 + } +} + +current_development_penalty = { + value = 0 + if = { + limit = { + exists = scope:county + } + add = scope:councillor.steward_develop_county_base_total + add = scope:councillor.steward_develop_county_perk_bonus_monthly_increase + add = scope:councillor.steward_develop_county_tribal_penalty + multiply = { + subtract = scope:county.development_level + multiply = { + value = 9.13 # Due to the way the development penalty is calculated, this means you reach maximum penalty at Development Level 10. + # If you want really mathy-stuff, the formula is: Monthly Increase - (Monthly Increase(Development Level/100)*Above Number) + if = { + limit = { culture = { has_innovation = innovation_development_04 } } + multiply = 0.1111 # With Rennisance Thought, this is increased to Development Level 90. + } + else_if = { + limit = { culture = { has_innovation = innovation_development_03 } } + multiply = 0.1818 # With Urbanization, Development Level 55. + } + else_if = { + limit = { culture = { has_innovation = innovation_development_02 } } + multiply = 0.2856 # With Communal Government, Development Level 35. + } + else_if = { + limit = { culture = { has_innovation = innovation_development_01 } } + multiply = 0.5000 # With the Public Works innovation, Development Level 20. + } + } + divide = 100 + min = -0.875 # This is the maximum penalty. + } + } +} + +######################################### +######### PROMOTE CULTURE TASK ########## +######################################### + +steward_promote_culture_base = 0.25 + +steward_promote_culture_monthly_increase = { + add = stewardship + divide = 20 +} + +steward_promote_culture_contextual_bonuses = { + # Relation Bonuses/Penalties + if = { # Friend + limit = { + scope:councillor_liege = { + has_relation_friend = scope:councillor + NOT = { has_relation_best_friend = scope:councillor } + } + } + add = { + value = scope:councillor.steward_promote_culture_monthly_increase_friend_bonus + desc = COUNCILLOR_IS_YOUR_FRIEND + } + } + if = { # Best Friend + limit = { + scope:councillor_liege = { + has_relation_best_friend = scope:councillor + } + } + add = { + value = scope:councillor.steward_promote_culture_monthly_increase_best_friend_bonus + desc = COUNCILLOR_IS_YOUR_BEST_FRIEND + } + } + if = { # Rival + limit = { + scope:councillor_liege = { + has_relation_rival = scope:councillor + NOT = { has_relation_nemesis = scope:councillor } + } + } + add = { + value = scope:councillor.steward_promote_culture_monthly_increase_rival_bonus + desc = COUNCILLOR_IS_YOUR_RIVAL + } + } + if = { # Nemesis + limit = { + scope:councillor_liege = { + has_relation_nemesis = scope:councillor + } + } + add = { + value = scope:councillor.steward_promote_culture_monthly_increase_nemesis_bonus + desc = COUNCILLOR_IS_YOUR_NEMESIS + } + } + if = { + limit = { + councillor_liege_has_erudition_legacy_5_perk = yes + } + add = { + value = steward_promote_culture_erudition_bonus + desc = ERUDITION_DYNASTY_PERK_BONUS_VALUE + } + } + if = { + limit = { + councillor_liege_has_family_business_bonus = yes + } + add = { + value = scope:councillor.steward_promote_culture_family_business_bonus + desc = FAMILY_BUSINESS_BONUS_VALUE + } + } + if = { + limit = { + exists = scope:county + scope:councillor_liege.culture = { + is_hybrid_culture = yes + culture_age < culture_hybrid_cooldown + any_parent_culture = { + this = scope:county.culture + } + } + } + add = { + value = scope:councillor.promote_culture_hybrid_culture_vs_parents_bonus + desc = STEWARD_PROMOTE_CULTURE_HYBRID_VS_PARENTS_BONUS_MODIFIER + } + } + if = { + limit = { + exists = scope:county + scope:councillor_liege.culture = { + is_divergent_culture = yes + culture_age < culture_hybrid_cooldown # Intentional + any_parent_culture = { + this = scope:county.culture + } + } + } + add = { + value = scope:councillor.promote_culture_divergent_culture_vs_parents_bonus + desc = STEWARD_PROMOTE_CULTURE_DIVERGENT_VS_PARENTS_BONUS_MODIFIER + } + } + if = { + limit = { + exists = scope:county + scope:councillor_liege.rite = { + rite_has_parameter = same_faith_promote_culture_bonus_active + } + scope:county.faith = scope:councillor_liege.faith + } + add = { + value = scope:councillor.promote_culture_communal_identity_bonus + desc = STEWARD_PROMOTE_CULTURE_COMMUNAL_IDENTITY_BONUS_MODIFIER + } + } + if = { + limit = { + exists = scope:county + scope:councillor_liege.rite = { rite_has_parameter = easier_to_convert_culture_in_same_faith_mountains } + scope:county = { + faith = scope:councillor_liege.faith + county_has_province_with_terrain = { + terrain = mountains + terrain = desert_mountains + } + } + } + add = { + value = scope:councillor.promote_culture_easier_to_convert_culture_in_same_faith_mountains_bonus + desc = STEWARD_PROMOTE_CULTURE_EASIER_TO_CONVERT_CULTURE_IN_SAME_FAITH_MOUNTAINS_BONUS + } + } + if = { + limit = { + scope:councillor_liege.culture = { + has_innovation = innovation_east_settling + } + } + add = { + value = scope:councillor.promote_culture_east_settling_bonus + desc = STEWARD_PROMOTE_CULTURE_INNOVATION_BONUS_EAST_SETTLING + } + } + if = { + limit = { + exists = scope:county + scope:county = { has_county_modifier = 6210_architect_county_modifier } + } + add = { + value = scope:councillor.6210_architect_promote_culture_bonus + desc = COURT_CHAPLAIN_CONVERSION_LOCAL_COUNTY_MODIFIERS + } + } + if = { + limit = { + exists = scope:county + scope:county = { has_county_modifier = easier_to_culture_convert } + } + add = { + value = scope:councillor.easier_to_convert_bonus + desc = COURT_CHAPLAIN_CONVERSION_LOCAL_COUNTY_MODIFIERS + } + } + if = { + limit = { + scope:councillor_liege = { has_character_modifier = court_fashion_culture_modifier } + } + add = { + value = scope:councillor.steward_fashion_bonus + desc = COUNCILLOR_LIEGE_MODIFIERS_BONUS + } + } + #Reduce for various county modifiers. + # Cultural Traditions + ## Bonuses + if = { + limit = { + exists = scope:county + scope:county.culture = { has_cultural_parameter = easier_to_convert_county_culture_with_heritage } + scope:councillor_liege.culture = { has_same_culture_heritage = scope:county.culture } + } + add = { + value = conversion_culture_easier_to_culture_change_with_heritage_value + desc = TRADITION_EASIER_TO_CULTURE_CONVERT_WITH_HERITAGE_MODIFIER + } + } + if = { + limit = { + councillor_liege_has_erudition_legacy_5_perk = yes + } + add = { + value = steward_promote_culture_erudition_bonus_monthly_increase + desc = ERUDITION_DYNASTY_PERK_BONUS_VALUE + } + } + if = { + limit = { + councillor_liege_has_family_business_bonus = yes + } + add = { + value = steward_promote_culture_family_business_monthly_increase + desc = FAMILY_BUSINESS_BONUS_VALUE + } + } + if = { + limit = { + councillor_liege_has_consulted_house_bonus = yes + } + add = { + value = steward_promote_culture_consulted_house_monthly_increase + desc = CONSULTED_HOUSE_BONUS_VALUE + } + } + if = { + limit = { + scope:county = { + OR = { + has_county_modifier = 3020_own_culture_monument + has_county_modifier = 3020_multicultural_monument + } + } + } + add = { + value = hold_court_3020_culture_bonus + desc = 3020_MONUMENT_VALUE + } + } + if = { + limit = { + scope:councillor_liege.rite ?= { + rite_has_parameter = tenet_original_sin_county_conversion_bonus + this = scope:county.rite + } + } + add = { + value = original_sin_easier_to_convert_culture_modifier_value + desc = PAM_ORIGINAL_SIN_EASIER_TO_CONVERT_CULTURE_MODIFIER + } + } + ## Penalties + if = { + limit = { + exists = scope:county + scope:county.culture = { has_cultural_parameter = harder_to_convert_county_culture_without_heritage } + NOT = { + scope:councillor_liege.culture = { has_same_culture_heritage = scope:county.culture } + } + } + add = { + value = conversion_culture_resistant_to_culture_change_without_heritage_value + desc = TRADITION_HARDER_TO_CULTURE_CONVERT_WITHOUT_HERITAGE_MODIFIER + } + } + + if = { + limit = { + exists = scope:county + scope:county.culture = { has_cultural_parameter = harder_to_convert_county_culture } + } + add = { + value = conversion_culture_resistant_to_culture_change + desc = TRADITION_HARDER_TO_CULTURE_CONVERT + } + } + + # PAM ORIGINAL SIN TENET + + if = { + limit = { + exists = scope:county + scope:county.rite ?= { rite_has_parameter = tenet_original_sin_county_conversion_resistance } + scope:county.faith != scope:councillor_liege.faith + } + add = { + value = conversion_culture_resistant_to_culture_change + desc = PAM_ORIGINAL_SIN_HARDER_TO_CONVERT_CULTURE_MODIFIER + } + } + + # Struggles + ## Penalties + if = { + limit = { + exists = scope:county + scope:county = { + any_county_struggle = { has_struggle_phase_parameter = county_culture_conversion_in_region_proceeds_slower } + } + } + add = { + value = conversion_culture_resistant_to_culture_change_due_to_struggle_phase_value + desc = STRUGGLE_HARDER_TO_CULTURE_CONVERT_DUE_TO_STRUGGLE_PHASE_MODIFIER + } + } + ## Bonuses + if = { + limit = { + exists = scope:county + scope:county = { + any_county_struggle = { has_struggle_phase_parameter = county_culture_conversion_in_region_proceeds_faster } + } + } + add = { + value = conversion_culture_accepting_of_culture_change_due_to_struggle_phase_value + desc = STRUGGLE_EASIER_TO_CULTURE_CONVERT_DUE_TO_STRUGGLE_PHASE_MODIFIER + } + } + # Decisions + if = { + limit = { + OR = { + scope:councillor_liege.culture = { has_cultural_pillar = heritage_goidelic } + scope:councillor_liege.culture = { has_cultural_pillar = heritage_brythonic } + } + exists = scope:county + scope:county = { + has_county_modifier = reclaim_britannia_culture_modifier + NOR= { + culture = { has_cultural_pillar = heritage_goidelic } + culture = { has_cultural_pillar = heritage_brythonic } + } + } + } + add = { + value = promote_culture_reclaimed_brittania_bonus + desc = STEWARD_PROMOTE_CULTURE_RECLAIMING_BRITANNIA + } + } + + if = { + limit = { + scope:councillor_liege.culture = { has_cultural_pillar = heritage_syriac } + exists = scope:county + scope:county = { + has_county_modifier = promote_culture_beth_nahrain_modifier + NOT = { + culture = { has_cultural_pillar = heritage_syriac } + } + } + } + add = { + value = promote_culture_beth_nahrain_bonus + desc = steward_promote_culture_beth_nahrain + } + } + + if = { + limit = { + scope:county.culture ?= { has_cultural_pillar = heritage_iranian } + exists = global_var:fp3_struggle_ending + global_var:fp3_struggle_ending = flag:fp3_struggle_rekindle_iran_ending + + NOT = { + scope:councillor_liege.culture = { has_same_culture_heritage = scope:county.culture } + } + } + add = { + value = conversion_culture_resistant_to_culture_change + desc = struggle_persia_ending_rekindle_iran_harder_to_convert_culture_reason + } + } + + if = { + limit = { + scope:councillor_liege.culture = { has_cultural_pillar = heritage_iranian } + exists = global_var:fp3_struggle_ending + global_var:fp3_struggle_ending = flag:fp3_struggle_rekindle_iran_ending + + NOT = { + scope:councillor_liege.culture = { has_same_culture_heritage = scope:county.culture } + } + } + add = { + value = conversion_culture_easy + desc = struggle_persia_ending_rekindle_iran_harder_to_convert_culture_reason + } + } + + # Events + if = { + limit = { + exists = scope:county + scope:county = { + has_county_modifier = governance_1073_conversion_resistance_modifier + } + } + add = { + value = scope:councillor.promote_culture_local_traditions_respected_penalty + desc = STEWARD_PROMOTE_CULTURE_LOCAL_TRADITIONS_RESPECTED + } + } + if = { + limit = { + exists = scope:county + scope:county = { + has_county_modifier = county_shuubiyya_modifier + } + } + add = { + value = scope:councillor.promote_culture_shuubiyya_penalty + desc = STEWARD_PROMOTE_CULTURE_SHUUBIYYA + } + } + if = { + limit = { + exists = scope:county + scope:county = { + OR = { + has_county_modifier = enthusiastic_nomad_settlement_saharan_modifier + has_county_modifier = nomad_settlement_saharan_modifier + } + } + } + add = { + value = scope:councillor.promote_culture_allowed_nomad_settlement_penalty + desc = STEWARD_PROMOTE_CULTURE_ALLOWED_NOMAD_SETTLEMENT + } + } + if = { + limit = { + exists = scope:county + scope:county = { has_county_modifier = hold_court_8190_vassal_modifier } + } + add = { + value = scope:councillor.court_8190_vassal_modifier_value + desc = COURT_CHAPLAIN_CONVERSION_LOCAL_COUNTY_MODIFIERS + } + } +} + +steward_promote_culture_monthly_increase_friend_bonus = { + value = steward_promote_culture_monthly_increase + multiply = { + value = council_friend_impact_percentage + divide = 100 + } +} + +steward_promote_culture_base_total = { + add = steward_promote_culture_base + add = steward_promote_culture_monthly_increase +} + +steward_promote_culture_monthly_increase_best_friend_bonus = { + value = steward_promote_culture_base_total + multiply = { + value = council_best_friend_impact_percentage + divide = 100 + } +} +steward_promote_culture_monthly_increase_rival_bonus = { + value = steward_promote_culture_base_total + multiply = { + value = council_rival_impact_percentage + divide = 100 + } +} +steward_promote_culture_monthly_increase_nemesis_bonus = { + value = steward_promote_culture_base_total + multiply = { + value = council_nemesis_impact_percentage + divide = 100 + } +} + +steward_promote_culture_erudition_bonus = { + add = steward_promote_culture_base_total + multiply = { + add = erudition_legacy_5_percentage + divide = 100 + } +} + +steward_promote_culture_family_business_bonus = { + add = steward_promote_culture_base_total + multiply = { + add = family_business_councillors_percentage + divide = 100 + } +} + +promote_culture_communal_identity_bonus = { + value = 0 + add = steward_promote_culture_base_total + multiply = 0.50 +} + +promote_culture_easier_to_convert_culture_in_same_faith_mountains_bonus_root_value = 0.5 + +promote_culture_easier_to_convert_culture_in_same_faith_mountains_bonus_loc_control = { + value = promote_culture_easier_to_convert_culture_in_same_faith_mountains_bonus_root_value + multiply = 100 +} + +promote_culture_easier_to_convert_culture_in_same_faith_mountains_bonus = { + value = steward_promote_culture_base_total + multiply = promote_culture_easier_to_convert_culture_in_same_faith_mountains_bonus_root_value +} + +promote_culture_hybrid_culture_vs_parents_bonus = { + value = 0 + add = steward_promote_culture_base_total + multiply = 1.5 +} + +promote_culture_divergent_culture_vs_parents_bonus = { + value = 0 + add = steward_promote_culture_base_total + multiply = 1.3 +} + +promote_culture_east_settling_bonus = { + value = 0 + add = steward_promote_culture_base_total + multiply = 0.15 +} + +promote_culture_reclaimed_brittania_bonus = { + value = steward_promote_culture_base_total + multiply = 0.75 +} + +promote_culture_beth_nahrain_bonus = { + value = steward_promote_culture_base_total + multiply = 0.75 +} + +steward_promote_culture_erudition_bonus_monthly_increase = { + value = steward_promote_culture_base_total + multiply = { + add = erudition_legacy_5_percentage + divide = 100 + } +} + +steward_promote_culture_family_business_monthly_increase = { + value = steward_promote_culture_base_total + multiply = { + add = family_business_councillors_percentage + divide = 100 + } +} + +steward_promote_culture_consulted_house_monthly_increase = { + value = steward_promote_culture_base_total + multiply = { + add = consulted_house_councillors_percentage + divide = 100 + } +} + +hold_court_3020_culture_bonus = { + value = 0.1 +} + +promote_culture_local_traditions_respected_penalty = { + value = 0 + add = steward_promote_culture_base_total + multiply = -0.75 +} + +promote_culture_defiant_ambushers_penalty = { + value = 0 + add = steward_promote_culture_base_total + multiply = -0.5 +} + +promote_culture_shuubiyya_penalty = { + value = 0 + if = { + limit = { + exists = scope:county + scope:county = { + has_county_modifier = county_shuubiyya_modifier + } + } + add = steward_promote_culture_base_total + multiply = -0.75 + } +} + +promote_culture_allowed_nomad_settlement_penalty = { + value = 0 + add = steward_promote_culture_base_total + multiply = -0.8 +} + +promote_culture_development_penalty = { + value = 0 + if = { + limit = { exists = scope:county } + add = scope:councillor.steward_promote_culture_base_total + add = scope:councillor.steward_promote_culture_contextual_bonuses + multiply = { + subtract = scope:county.development_level + divide = 100 + min = -0.9 + } + } +} + +conversion_culture_easier_to_culture_change_with_heritage_value = { + value = 0 + add = steward_promote_culture_base + multiply = 0.3 +} + +conversion_culture_resistant_to_culture_change_without_heritage_value = { + value = 0 + subtract = steward_promote_culture_base_total + multiply = 0.5 +} + +conversion_culture_resistant_to_culture_change = { + value = 0 + subtract = steward_promote_culture_base_total + multiply = 0.5 +} + +conversion_culture_resistant_to_culture_change_due_to_struggle_phase_value = { + value = 0 + subtract = steward_promote_culture_base + multiply = 0.5 +} + +conversion_culture_accepting_of_culture_change_due_to_struggle_phase_value = { + value = 0 + subtract = steward_promote_culture_base + multiply = -0.5 +} + +conversion_culture_easy = { + value = 0 + add = steward_promote_culture_base_total + multiply = 0.5 +} + +original_sin_easier_to_convert_culture_modifier_value = { + value = 0 + add = steward_promote_culture_base_total + multiply = 0.25 +} + + + +######################################### +######## CONVINCE DE JURE TASK ########## +######################################### + +steward_convince_dejure_base = 0.1 + +steward_convince_dejure_monthly_increase = { + add = stewardship + divide = 20 +} + +steward_convince_dejure_monthly_increase_friend_bonus = { + value = steward_convince_dejure_monthly_increase + multiply = { + value = council_friend_impact_percentage + divide = 100 + } +} +steward_convince_dejure_base_total = { + add = steward_convince_dejure_monthly_increase + add = steward_convince_dejure_monthly_increase_friend_bonus +} +steward_convince_dejure_monthly_increase_best_friend_bonus = { + value = steward_convince_dejure_base_total + multiply = { + value = council_best_friend_impact_percentage + divide = 100 + } +} +steward_convince_dejure_monthly_increase_rival_bonus = { + value = steward_convince_dejure_base_total + multiply = { + value = council_rival_impact_percentage + divide = 100 + } +} +steward_convince_dejure_monthly_increase_nemesis_bonus = { + value = steward_convince_dejure_base_total + multiply = { + value = council_nemesis_impact_percentage + divide = 100 + } +} + +steward_convince_dejure_erudition_bonus = { + add = steward_convince_dejure_base_total + multiply = { + add = erudition_legacy_5_percentage + divide = 100 + } +} + +steward_convince_dejure_family_business_bonus = { + add = steward_convince_dejure_base_total + multiply = { + add = family_business_councillors_percentage + divide = 100 + } +} + +steward_convince_dejure_consulted_house_bonus = { + add = steward_convince_dejure_base_total + multiply = { + add = consulted_house_councillors_percentage + divide = 100 + } +} + +######################################### +######### ACCEPT CULTURE TASK ########### +######################################### + +task_accept_culture_base_progress = { + value = 0.01 + multiply = scope:councillor_liege.primary_title.tier +} + +steward_accept_culture_base_total = { + add = task_accept_culture_base_progress + add = steward_accept_culture_yearly_increase +} + +steward_accept_culture_yearly_increase = { + add = stewardship + multiply = 0.005 +} + +steward_accept_culture_erudition_bonus_yearly_increase = { + add = steward_accept_culture_base_total + multiply = { + add = erudition_legacy_5_percentage + divide = 100 + } +} + +steward_accept_culture_customs_bonus_yearly_increase = { + add = steward_accept_culture_base_total + multiply = { + add = customs_legacy_percentage + divide = 100 + } +} + +# Relation impact +steward_accept_culture_yearly_increase_friend_bonus = { + if = { + limit = { + scope:councillor_liege = { + has_relation_friend = scope:councillor + NOT = { has_relation_best_friend = scope:councillor } + } + } + value = steward_accept_culture_base_total + multiply = { + add = council_friend_impact_percentage + divide = 100 + } + } +} +steward_accept_culture_yearly_increase_best_friend_bonus = { + if = { + limit = { + scope:councillor_liege = { + has_relation_best_friend = scope:councillor + } + } + value = steward_accept_culture_base_total + multiply = { + add = council_best_friend_impact_percentage + divide = 100 + } + } +} +steward_accept_culture_yearly_increase_rival_bonus = { + if = { + limit = { + scope:councillor_liege = { + has_relation_rival = scope:councillor + NOT = { has_relation_nemesis = scope:councillor } + } + } + value = steward_accept_culture_base_total + multiply = { + add = council_rival_impact_percentage + divide = 100 + } + } +} +steward_accept_culture_yearly_increase_nemesis_bonus = { + if = { + limit = { + scope:councillor_liege = { + has_relation_nemesis = scope:councillor + } + } + value = steward_accept_culture_base_total + multiply = { + add = council_nemesis_impact_percentage + divide = 100 + } + } +} +steward_accept_culture_yearly_increase_independent_bonus = { + value = 0 + if = { + limit = { + scope:councillor_liege = { + top_liege = this + } + } + add = { + value = steward_accept_culture_base_total + multiply = 5 + } + } +} + +steward_accept_culture_court_type_bonus = { + value = 0 + if = { + limit = { + scope:councillor_liege = { + has_royal_court = yes + has_dlc_feature = royal_court + has_court_type = court_administrative + court_grandeur_current_level >= 4 + } + } + add = steward_accept_culture_base_total + multiply = { + value = court_administrative_steward_task_bonus + divide = 100 + } + } +} + +task_accept_culture_total_base_value = { + add = task_accept_culture_base_progress + add = steward_accept_culture_yearly_increase + if = { + limit = { + councillor_liege_has_customs_legacy_perk = yes + } + add = steward_accept_culture_customs_bonus_yearly_increase + } + if = { + limit = { + councillor_liege_has_erudition_legacy_5_perk = yes + } + add = steward_accept_culture_erudition_bonus_yearly_increase + } + add = steward_accept_culture_yearly_increase_friend_bonus + add = steward_accept_culture_yearly_increase_best_friend_bonus + add = steward_accept_culture_yearly_increase_rival_bonus + add = steward_accept_culture_yearly_increase_nemesis_bonus + if = { + limit = { + councillor_liege_has_family_business_bonus = yes + } + add = steward_accept_culture_family_business_bonus_yearly_increase + } + if = { + limit = { + exists = scope:county + scope:councillor.culture = scope:county.culture + } + add = steward_accept_culture_yearly_increase_same_culture_bonus + } +} + +task_accept_culture_progress = { + add = task_accept_culture_base_progress + add = steward_accept_culture_yearly_increase + if = { + limit = { + councillor_liege_has_customs_legacy_perk = yes + } + add = steward_accept_culture_customs_bonus_yearly_increase + } + if = { + limit = { + councillor_liege_has_erudition_legacy_5_perk = yes + } + add = steward_accept_culture_erudition_bonus_yearly_increase + } + if = { + limit = { + councillor_liege_has_family_business_bonus = yes + } + add = steward_accept_culture_family_business_bonus_yearly_increase + } + if = { + limit = { + councillor_liege_has_consulted_house_bonus = yes + } + add = steward_accept_culture_consulted_house_bonus_yearly_increase + } + add = steward_accept_culture_yearly_increase_friend_bonus + add = steward_accept_culture_yearly_increase_best_friend_bonus + add = steward_accept_culture_yearly_increase_rival_bonus + add = steward_accept_culture_yearly_increase_nemesis_bonus + add = steward_accept_culture_yearly_increase_independent_bonus + add = steward_accept_culture_court_type_bonus + if = { + limit = { + exists = scope:county + scope:councillor.culture = scope:county.culture + } + add = steward_accept_culture_yearly_increase_same_culture_bonus + } +} + +steward_accept_culture_family_business_bonus_yearly_increase = { + add = steward_accept_culture_base_total + multiply = { + add = family_business_councillors_percentage + divide = 100 + } +} + +steward_accept_culture_consulted_house_bonus_yearly_increase = { + add = steward_accept_culture_base_total + multiply = { + add = consulted_house_councillors_percentage + divide = 100 + } +} + +steward_accept_culture_yearly_increase_same_culture_bonus = { + value = steward_accept_culture_base_total + multiply = 0.25 +} diff --git a/common/scripted_effects/07_dlc_ep3_scripted_effects.txt b/common/scripted_effects/07_dlc_ep3_scripted_effects.txt index c9649c8ba..9a9f9f9ad 100644 --- a/common/scripted_effects/07_dlc_ep3_scripted_effects.txt +++ b/common/scripted_effects/07_dlc_ep3_scripted_effects.txt @@ -1781,7 +1781,7 @@ ep3_become_landed_transfer_effect = { flag:mandala = { if = { limit = { - faith = { has_doctrine = doctrine_polytheist } + faith ?= { has_doctrine = doctrine_polytheist } } change_government = mandala_government #Sort out the House shenanigans @@ -1942,7 +1942,7 @@ ep3_become_landed_transfer_effect = { #scope:old_government ?= flag:mandala scope:target.holder = { government_has_flag = government_is_mandala } } - faith = { has_doctrine = doctrine_polytheist } + faith ?= { has_doctrine = doctrine_polytheist } } change_government = mandala_government #Sort out the House shenanigans @@ -2186,7 +2186,7 @@ purchase_land_interaction_effect = { limit = { scope:recipient = { government_has_flag = government_is_mandala } #... we're lenient - faith = { has_doctrine = doctrine_polytheist } + faith ?= { has_doctrine = doctrine_polytheist } } #Sort out the House shenanigans hidden_effect = { @@ -3098,7 +3098,7 @@ adventurer_realm_destabilisation_list_effect = { abs = yes divide = 5 } - culture = { + culture ?= { this != scope:adventurer.culture cultural_acceptance = { target = scope:adventurer.culture @@ -3118,7 +3118,7 @@ adventurer_realm_destabilisation_list_effect = { max = 25 } ai_zeal > low_positive_zeal - faith = { + faith ?= { this != scope:adventurer.faith "faith_hostility_level(scope:adventurer.faith)" > 0 } @@ -4678,7 +4678,7 @@ admin_change_government_effect = { else_if = { limit = { top_liege = this - faith = { religion_tag = islam_religion } + faith ?= { religion_tag = islam_religion } } change_government = clan_government } @@ -8086,115 +8086,115 @@ save_traveler_culture_effect = { OR = { AND = { culture_overlaps_geographical_region = world_europe - scope:traveler_culture = { culture_overlaps_geographical_region = world_europe } + scope:traveler_culture ?= { culture_overlaps_geographical_region = world_europe } } AND = { culture_overlaps_geographical_region = world_asia_minor - scope:traveler_culture = { culture_overlaps_geographical_region = world_europe } + scope:traveler_culture ?= { culture_overlaps_geographical_region = world_europe } } AND = { culture_overlaps_geographical_region = world_europe - scope:traveler_culture = { culture_overlaps_geographical_region = world_asia_minor } + scope:traveler_culture ?= { culture_overlaps_geographical_region = world_asia_minor } } AND = { culture_overlaps_geographical_region = world_asia_minor - scope:traveler_culture = { culture_overlaps_geographical_region = world_asia_minor } + scope:traveler_culture ?= { culture_overlaps_geographical_region = world_asia_minor } } AND = { culture_overlaps_geographical_region = world_asia_minor - scope:traveler_culture = { culture_overlaps_geographical_region = world_middle_east } + scope:traveler_culture ?= { culture_overlaps_geographical_region = world_middle_east } } AND = { culture_overlaps_geographical_region = world_middle_east - scope:traveler_culture = { culture_overlaps_geographical_region = world_asia_minor } + scope:traveler_culture ?= { culture_overlaps_geographical_region = world_asia_minor } } AND = { culture_overlaps_geographical_region = world_middle_east - scope:traveler_culture = { culture_overlaps_geographical_region = world_middle_east } + scope:traveler_culture ?= { culture_overlaps_geographical_region = world_middle_east } } AND = { culture_overlaps_geographical_region = world_africa - scope:traveler_culture = { culture_overlaps_geographical_region = world_africa } + scope:traveler_culture ?= { culture_overlaps_geographical_region = world_africa } } AND = { culture_overlaps_geographical_region = world_steppe - scope:traveler_culture = { culture_overlaps_geographical_region = world_steppe } + scope:traveler_culture ?= { culture_overlaps_geographical_region = world_steppe } } AND = { culture_overlaps_geographical_region = world_tibet - scope:traveler_culture = { culture_overlaps_geographical_region = world_tibet } + scope:traveler_culture ?= { culture_overlaps_geographical_region = world_tibet } } AND = { culture_overlaps_geographical_region = world_tibet - scope:traveler_culture = { culture_overlaps_geographical_region = world_india} + scope:traveler_culture ?= { culture_overlaps_geographical_region = world_india} } AND = { culture_overlaps_geographical_region = world_india - scope:traveler_culture = { culture_overlaps_geographical_region = world_tibet } + scope:traveler_culture ?= { culture_overlaps_geographical_region = world_tibet } } AND = { culture_overlaps_geographical_region = world_india - scope:traveler_culture = { culture_overlaps_geographical_region = world_india } + scope:traveler_culture ?= { culture_overlaps_geographical_region = world_india } } AND = { culture_overlaps_geographical_region = world_burma - scope:traveler_culture = { culture_overlaps_geographical_region = world_india } + scope:traveler_culture ?= { culture_overlaps_geographical_region = world_india } } AND = { culture_overlaps_geographical_region = world_india - scope:traveler_culture = { culture_overlaps_geographical_region = world_burma } + scope:traveler_culture ?= { culture_overlaps_geographical_region = world_burma } } AND = { culture_overlaps_geographical_region = world_tibet - scope:traveler_culture = { culture_overlaps_geographical_region = world_burma } + scope:traveler_culture ?= { culture_overlaps_geographical_region = world_burma } } AND = { culture_overlaps_geographical_region = world_burma - scope:traveler_culture = { culture_overlaps_geographical_region = world_tibet } + scope:traveler_culture ?= { culture_overlaps_geographical_region = world_tibet } } AND = { culture_overlaps_geographical_region = world_tibet - scope:traveler_culture = { culture_overlaps_geographical_region = world_asia_china } + scope:traveler_culture ?= { culture_overlaps_geographical_region = world_asia_china } } AND = { culture_overlaps_geographical_region = world_asia_china - scope:traveler_culture = { culture_overlaps_geographical_region = world_asia_china } + scope:traveler_culture ?= { culture_overlaps_geographical_region = world_asia_china } } AND = { culture_overlaps_geographical_region = world_asia_china - scope:traveler_culture = { culture_overlaps_geographical_region = world_asia_southeast } + scope:traveler_culture ?= { culture_overlaps_geographical_region = world_asia_southeast } } AND = { culture_overlaps_geographical_region = world_asia_china - scope:traveler_culture = { culture_overlaps_geographical_region = world_asia_korea } + scope:traveler_culture ?= { culture_overlaps_geographical_region = world_asia_korea } } AND = { culture_overlaps_geographical_region = world_asia_china - scope:traveler_culture = { culture_overlaps_geographical_region = world_asia_japan } + scope:traveler_culture ?= { culture_overlaps_geographical_region = world_asia_japan } } AND = { culture_overlaps_geographical_region = world_asia_korea - scope:traveler_culture = { culture_overlaps_geographical_region = world_asia_china } + scope:traveler_culture ?= { culture_overlaps_geographical_region = world_asia_china } } AND = { culture_overlaps_geographical_region = world_asia_korea - scope:traveler_culture = { culture_overlaps_geographical_region = world_asia_japan } + scope:traveler_culture ?= { culture_overlaps_geographical_region = world_asia_japan } } AND = { culture_overlaps_geographical_region = world_asia_korea - scope:traveler_culture = { culture_overlaps_geographical_region = world_asia_korea } + scope:traveler_culture ?= { culture_overlaps_geographical_region = world_asia_korea } } AND = { culture_overlaps_geographical_region = world_asia_japan - scope:traveler_culture = { culture_overlaps_geographical_region = world_asia_japan } + scope:traveler_culture ?= { culture_overlaps_geographical_region = world_asia_japan } } AND = { culture_overlaps_geographical_region = world_asia_japan - scope:traveler_culture = { culture_overlaps_geographical_region = world_asia_china } + scope:traveler_culture ?= { culture_overlaps_geographical_region = world_asia_china } } AND = { culture_overlaps_geographical_region = world_asia_japan - scope:traveler_culture = { culture_overlaps_geographical_region = world_asia_korea } + scope:traveler_culture ?= { culture_overlaps_geographical_region = world_asia_korea } } } cultural_acceptance = { @@ -8525,7 +8525,7 @@ ep3_pick_random_maa_regiment_effect = { # TRIBAL 1 = { trigger = { - culture = { has_innovation = innovation_elephantry } + culture ?= { has_innovation = innovation_elephantry } } save_scope_value_as = { name = maa_to_create @@ -8534,7 +8534,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_innovation = innovation_war_camels } + culture ?= { has_innovation = innovation_war_camels } } save_scope_value_as = { name = maa_to_create @@ -8543,7 +8543,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_innovation = innovation_arched_saddle } + culture ?= { has_innovation = innovation_arched_saddle } } save_scope_value_as = { name = maa_to_create @@ -8552,7 +8552,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { + culture ?= { has_innovation = innovation_catapult NOR = { has_cultural_pillar = heritage_chinese @@ -8569,7 +8569,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { + culture ?= { has_innovation = innovation_catapult OR = { has_cultural_pillar = heritage_chinese @@ -8587,7 +8587,7 @@ ep3_pick_random_maa_regiment_effect = { # EARLY 1 = { trigger = { - culture = { has_innovation = innovation_quilted_armor } + culture ?= { has_innovation = innovation_quilted_armor } } save_scope_value_as = { name = maa_to_create @@ -8596,7 +8596,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { + culture ?= { has_innovation = innovation_mangonel NOR = { has_cultural_pillar = heritage_chinese @@ -8613,7 +8613,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { + culture ?= { has_innovation = innovation_mangonel OR = { has_cultural_pillar = heritage_chinese @@ -8631,7 +8631,7 @@ ep3_pick_random_maa_regiment_effect = { # HIGH 1 = { trigger = { - culture = { + culture ?= { has_innovation = innovation_trebuchet NOR = { has_cultural_pillar = heritage_chinese @@ -8648,7 +8648,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { + culture ?= { has_innovation = innovation_trebuchet OR = { has_cultural_pillar = heritage_chinese @@ -8665,7 +8665,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_innovation = innovation_advanced_bowmaking } + culture ?= { has_innovation = innovation_advanced_bowmaking } } save_scope_value_as = { name = maa_to_create @@ -8675,7 +8675,7 @@ ep3_pick_random_maa_regiment_effect = { # LATE 1 = { trigger = { - culture = { + culture ?= { has_cultural_parameter = unlock_late_medieval_gunpowder_units NOR = { has_cultural_pillar = heritage_chinese @@ -8692,7 +8692,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { + culture ?= { has_cultural_parameter = unlock_late_medieval_gunpowder_units OR = { has_cultural_pillar = heritage_chinese @@ -8710,7 +8710,7 @@ ep3_pick_random_maa_regiment_effect = { # CULTURAL INNOVATIONS 1 = { trigger = { - culture = { has_innovation = innovation_bamboo_bows } + culture ?= { has_innovation = innovation_bamboo_bows } } save_scope_value_as = { name = maa_to_create @@ -8719,7 +8719,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_innovation = innovation_zweihanders } + culture ?= { has_innovation = innovation_zweihanders } } save_scope_value_as = { name = maa_to_create @@ -8728,7 +8728,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_innovation = innovation_adaptive_militia } + culture ?= { has_innovation = innovation_adaptive_militia } } save_scope_value_as = { name = maa_to_create @@ -8737,7 +8737,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_innovation = innovation_valets } + culture ?= { has_innovation = innovation_valets } } save_scope_value_as = { name = maa_to_create @@ -8746,7 +8746,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_innovation = innovation_rocket_cart } + culture ?= { has_innovation = innovation_rocket_cart } } save_scope_value_as = { name = maa_to_create @@ -8755,7 +8755,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_innovation = innovation_pike_columns } + culture ?= { has_innovation = innovation_pike_columns } } save_scope_value_as = { name = maa_to_create @@ -8764,7 +8764,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_innovation = innovation_legionnaires } + culture ?= { has_innovation = innovation_legionnaires } } save_scope_value_as = { name = maa_to_create @@ -8773,7 +8773,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_innovation = innovation_desert_tactics } + culture ?= { has_innovation = innovation_desert_tactics } } save_scope_value_as = { name = maa_to_create @@ -8782,7 +8782,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_innovation = innovation_caballeros } + culture ?= { has_innovation = innovation_caballeros } } save_scope_value_as = { name = maa_to_create @@ -8791,7 +8791,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_innovation = innovation_hobbies } + culture ?= { has_innovation = innovation_hobbies } } save_scope_value_as = { name = maa_to_create @@ -8800,7 +8800,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_innovation = innovation_rectilinear_schiltron } + culture ?= { has_innovation = innovation_rectilinear_schiltron } } save_scope_value_as = { name = maa_to_create @@ -8809,7 +8809,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_innovation = innovation_sahel_horsemen } + culture ?= { has_innovation = innovation_sahel_horsemen } } save_scope_value_as = { name = maa_to_create @@ -8818,7 +8818,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_innovation = innovation_sarawit } + culture ?= { has_innovation = innovation_sarawit } } save_scope_value_as = { name = maa_to_create @@ -8827,7 +8827,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_innovation = innovation_repeating_crossbow } + culture ?= { has_innovation = innovation_repeating_crossbow } } save_scope_value_as = { name = maa_to_create @@ -8836,7 +8836,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_innovation = innovation_pole_vault } + culture ?= { has_innovation = innovation_pole_vault } } save_scope_value_as = { name = maa_to_create @@ -8845,7 +8845,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_huscarls } + culture ?= { has_cultural_parameter = unlock_maa_huscarls } } save_scope_value_as = { name = maa_to_create @@ -8854,7 +8854,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_longbowmen } + culture ?= { has_cultural_parameter = unlock_maa_longbowmen } } save_scope_value_as = { name = maa_to_create @@ -8863,7 +8863,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_monaspa } + culture ?= { has_cultural_parameter = unlock_maa_monaspa } } save_scope_value_as = { name = maa_to_create @@ -8872,7 +8872,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_cataphract } + culture ?= { has_cultural_parameter = unlock_maa_cataphract } } save_scope_value_as = { name = maa_to_create @@ -8881,7 +8881,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_metsanvartija } + culture ?= { has_cultural_parameter = unlock_maa_metsanvartija } } save_scope_value_as = { name = maa_to_create @@ -8890,7 +8890,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_maturkan_warriors } + culture ?= { has_cultural_parameter = unlock_maa_maturkan_warriors } } save_scope_value_as = { name = maa_to_create @@ -8900,7 +8900,7 @@ ep3_pick_random_maa_regiment_effect = { 1 = { trigger = { OR = { - culture = { has_cultural_parameter = unlock_maa_horse_archers } + culture ?= { has_cultural_parameter = unlock_maa_horse_archers } mpo_can_recruit_nomad_maa_trigger = yes } } @@ -8911,7 +8911,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_ayyar } + culture ?= { has_cultural_parameter = unlock_maa_ayyar } } save_scope_value_as = { name = maa_to_create @@ -8920,7 +8920,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_mubarizun } + culture ?= { has_cultural_parameter = unlock_maa_mubarizun } } save_scope_value_as = { name = maa_to_create @@ -8929,7 +8929,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_mulaththamun } + culture ?= { has_cultural_parameter = unlock_maa_mulaththamun } } save_scope_value_as = { name = maa_to_create @@ -8938,7 +8938,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_archers_of_the_nile } + culture ?= { has_cultural_parameter = unlock_maa_archers_of_the_nile } } save_scope_value_as = { name = maa_to_create @@ -8947,7 +8947,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_druzhina } + culture ?= { has_cultural_parameter = unlock_maa_druzhina } } save_scope_value_as = { name = maa_to_create @@ -8956,7 +8956,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_hussar } + culture ?= { has_cultural_parameter = unlock_maa_hussar } } save_scope_value_as = { name = maa_to_create @@ -8965,7 +8965,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_horn_warrior } + culture ?= { has_cultural_parameter = unlock_maa_horn_warrior } } save_scope_value_as = { name = maa_to_create @@ -8974,7 +8974,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_bush_hunter } + culture ?= { has_cultural_parameter = unlock_maa_bush_hunter } } save_scope_value_as = { name = maa_to_create @@ -8983,7 +8983,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_shomer } + culture ?= { has_cultural_parameter = unlock_maa_shomer } } save_scope_value_as = { name = maa_to_create @@ -8992,7 +8992,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_garudas } + culture ?= { has_cultural_parameter = unlock_maa_garudas } } save_scope_value_as = { name = maa_to_create @@ -9001,7 +9001,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_khandayat } + culture ?= { has_cultural_parameter = unlock_maa_khandayat } } save_scope_value_as = { name = maa_to_create @@ -9010,7 +9010,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_mountaineer } + culture ?= { has_cultural_parameter = unlock_maa_mountaineer } } save_scope_value_as = { name = maa_to_create @@ -9019,7 +9019,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_guinea_warrior } + culture ?= { has_cultural_parameter = unlock_maa_guinea_warrior } } save_scope_value_as = { name = maa_to_create @@ -9028,7 +9028,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_abudrar } + culture ?= { has_cultural_parameter = unlock_maa_abudrar } } save_scope_value_as = { name = maa_to_create @@ -9037,7 +9037,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_zbrojnosh } + culture ?= { has_cultural_parameter = unlock_maa_zbrojnosh } } save_scope_value_as = { name = maa_to_create @@ -9046,7 +9046,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_palace_guards } + culture ?= { has_cultural_parameter = unlock_maa_palace_guards } } save_scope_value_as = { name = maa_to_create @@ -9066,7 +9066,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_tarkhan } + culture ?= { has_cultural_parameter = unlock_maa_tarkhan } } save_scope_value_as = { name = maa_to_create @@ -9075,7 +9075,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_zupin_warrior } + culture ?= { has_cultural_parameter = unlock_maa_zupin_warrior } } save_scope_value_as = { name = maa_to_create @@ -9084,7 +9084,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_tawashi } + culture ?= { has_cultural_parameter = unlock_maa_tawashi } } save_scope_value_as = { name = maa_to_create @@ -9244,7 +9244,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_vigmen } + culture ?= { has_cultural_parameter = unlock_maa_vigmen } } save_scope_value_as = { name = maa_to_create @@ -9253,7 +9253,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_bondi } + culture ?= { has_cultural_parameter = unlock_maa_bondi } } save_scope_value_as = { name = maa_to_create @@ -9262,7 +9262,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_varangian_veterans } + culture ?= { has_cultural_parameter = unlock_maa_varangian_veterans } } save_scope_value_as = { name = maa_to_create @@ -9271,7 +9271,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_ayrudzi } + culture ?= { has_cultural_parameter = unlock_maa_ayrudzi } } save_scope_value_as = { name = maa_to_create @@ -9289,7 +9289,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_conrois } + culture ?= { has_cultural_parameter = unlock_maa_conrois } } save_scope_value_as = { name = maa_to_create @@ -9298,7 +9298,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_akritai } + culture ?= { has_cultural_parameter = unlock_maa_akritai } } save_scope_value_as = { name = maa_to_create @@ -9307,7 +9307,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_ballistrai } + culture ?= { has_cultural_parameter = unlock_maa_ballistrai } } save_scope_value_as = { name = maa_to_create @@ -9316,7 +9316,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_skoutatoi } + culture ?= { has_cultural_parameter = unlock_maa_skoutatoi } } save_scope_value_as = { name = maa_to_create @@ -9325,7 +9325,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_warrior_monk_units } + culture ?= { has_cultural_parameter = unlock_warrior_monk_units } } save_scope_value_as = { name = maa_to_create @@ -9334,7 +9334,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_emishi_horse_archers_units } + culture ?= { has_cultural_parameter = unlock_emishi_horse_archers_units } } save_scope_value_as = { name = maa_to_create @@ -9343,7 +9343,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_mounted_samurai_units } + culture ?= { has_cultural_parameter = unlock_mounted_samurai_units } } save_scope_value_as = { name = maa_to_create @@ -9352,7 +9352,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_pesilat } + culture ?= { has_cultural_parameter = unlock_maa_pesilat } } save_scope_value_as = { name = maa_to_create @@ -9361,7 +9361,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_gakgung_archers } + culture ?= { has_cultural_parameter = unlock_maa_gakgung_archers } } save_scope_value_as = { name = maa_to_create @@ -9370,7 +9370,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_infantry_samurai_units } + culture ?= { has_cultural_parameter = unlock_infantry_samurai_units } } save_scope_value_as = { name = maa_to_create @@ -9379,7 +9379,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_zhanmadao } + culture ?= { has_cultural_parameter = unlock_zhanmadao } } save_scope_value_as = { name = maa_to_create @@ -9388,7 +9388,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_burenjia } + culture ?= { has_cultural_parameter = unlock_burenjia } } save_scope_value_as = { name = maa_to_create @@ -9397,7 +9397,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_innovation = innovation_tiefutu } + culture ?= { has_innovation = innovation_tiefutu } } save_scope_value_as = { name = maa_to_create @@ -9406,7 +9406,7 @@ ep3_pick_random_maa_regiment_effect = { } 1 = { trigger = { - culture = { has_cultural_parameter = unlock_maa_black_armor_cavalry } + culture ?= { has_cultural_parameter = unlock_maa_black_armor_cavalry } } save_scope_value_as = { name = maa_to_create @@ -10054,7 +10054,7 @@ ep3_missionary_effect = { limit = { OR = { $LOCATION$.religion = $PREACHER$.religion - $LOCATION$.faith = { has_doctrine_parameter = unreformed } + $LOCATION$.faith ?= { has_doctrine_parameter = unreformed } # character:41702 ?= $PREACHER$ } } @@ -10065,21 +10065,21 @@ ep3_missionary_effect = { # Preacher is Gnostic, convert the locals to a regionally appropriate form of Gnosticism else_if = { limit = { - $PREACHER$.faith = { + $PREACHER$.faith ?= { OR = { has_doctrine = tenet_gnosticism has_doctrine = special_doctrine_is_gnostic_faith } } $LOCATION$.religion = { - any_faith = { + any_faith ?= { has_doctrine = tenet_gnosticism } } } $LOCATION$ = { religion = { - random_faith = { + random_faith ?= { limit = { OR = { has_doctrine = tenet_gnosticism @@ -10716,8 +10716,8 @@ admin_government_reset_effect = { else_if = { limit = { OR = { - faith = { religion_tag = islam_religion } - culture = { + faith ?= { religion_tag = islam_religion } + culture ?= { OR = { has_cultural_pillar = heritage_arabic has_cultural_pillar = heritage_iranian @@ -11505,9 +11505,9 @@ noble_family_adoption_effect = { house.house_head = { #We do this first, otherwise house head will already mean someone else. if = { limit = { - $ADOPTER$.culture = { has_cultural_parameter = wider_adoption } + $ADOPTER$.culture ?= { has_cultural_parameter = wider_adoption } $ADOPTEE$ = { - culture = { has_cultural_parameter = wider_adoption } + culture ?= { has_cultural_parameter = wider_adoption } NOT = { any_parent = { is_alive = yes @@ -11563,7 +11563,7 @@ noble_family_adoption_effect = { custom = every_zealot_house_member_tt limit = { ai_zeal >= medium_positive_ai_value - faith = { faith_hostility_level = { target = $ADOPTEE$.faith value >= faith_astray_level } } + faith ?= { faith_hostility_level = { target = $ADOPTEE$.faith value >= faith_astray_level } } NOT = { this = $ADOPTER$ } } add_opinion = { @@ -11579,12 +11579,12 @@ noble_family_adoption_effect = { is_close_family_of = $ADOPTER$ NAND = { ai_zeal >= medium_positive_ai_value - faith = { faith_hostility_level = { target = $ADOPTEE$.faith value >= faith_astray_level } } + faith ?= { faith_hostility_level = { target = $ADOPTEE$.faith value >= faith_astray_level } } } NAND = { - $ADOPTER$.culture = { has_cultural_parameter = wider_adoption } + $ADOPTER$.culture ?= { has_cultural_parameter = wider_adoption } $ADOPTEE$ = { - culture = { has_cultural_parameter = wider_adoption } + culture ?= { has_cultural_parameter = wider_adoption } NOT = { any_parent = { is_alive = yes @@ -13013,14 +13013,15 @@ ep3_increase_pacification_effect = { if = { limit = { - character:90028 = { + exists = character:90028 + character:90028 ?= { is_alive = yes NOT = { has_character_flag = hereward_settled_flag } } } - character:90028 = { + character:90028 ?= { send_interface_message = { type = msg_pacification_rise title = harrying.notification_pacification_rise @@ -13031,6 +13032,7 @@ ep3_increase_pacification_effect = { if = { limit = { + exists = scope:story.var:ruler_england scope:story.var:ruler_england = { any_vassal = { culture = culture:anglo_saxon @@ -13090,14 +13092,14 @@ ep3_increase_pacification_large_effect = { if = { limit = { - character:90028 = { + character:90028 ?= { is_alive = yes NOT = { has_character_flag = hereward_settled_flag } } } - character:90028 = { + character:90028 ?= { send_interface_message = { type = msg_pacification_rise title = harrying.notification_pacification_rise @@ -13167,14 +13169,14 @@ ep3_increase_resistance_effect = { if = { limit = { - character:90028 = { + character:90028 ?= { is_alive = yes NOT = { has_character_flag = hereward_settled_flag } } } - character:90028 = { + character:90028 ?= { send_interface_message = { type = msg_resistance_rise title = harrying.notification_resistance_rise @@ -13244,14 +13246,14 @@ ep3_increase_resistance_large_effect = { if = { limit = { - character:90028 = { + character:90028 ?= { is_alive = yes NOT = { has_character_flag = hereward_settled_flag } } } - character:90028 = { + character:90028 ?= { send_interface_message = { type = msg_resistance_rise title = harrying.notification_resistance_rise @@ -13323,14 +13325,14 @@ ep3_decrease_pacification_effect = { if = { limit = { - character:90028 = { + character:90028 ?= { is_alive = yes NOT = { has_character_flag = hereward_settled_flag } } } - character:90028 = { + character:90028 ?= { send_interface_message = { type = msg_pacification_falls title = harrying.notification_pacification_fall @@ -13403,14 +13405,14 @@ ep3_decrease_resistance_effect = { if = { limit = { - character:90028 = { + character:90028 ?= { is_alive = yes NOT = { has_character_flag = hereward_settled_flag } } } - character:90028 = { + character:90028 ?= { send_interface_message = { type = msg_resistance_falls title = harrying.notification_resistance_fall @@ -13785,7 +13787,7 @@ assign_favourite_child_effect = { exists = scope:current_favorite } remove_relation_favorite_child = scope:current_favorite - scope:current_favorite = { + scope:current_favorite ?= { add_opinion = { target = $ACTOR$ modifier = no_more_favorite_opinion diff --git a/common/scripted_modifiers/00_building_modifiers.txt b/common/scripted_modifiers/00_building_modifiers.txt new file mode 100644 index 000000000..48d5881e9 --- /dev/null +++ b/common/scripted_modifiers/00_building_modifiers.txt @@ -0,0 +1,1108 @@ +#Scripted Modifiers used for buildings + +ai_general_building_modifier = { + modifier = { + add = -2 + scope:holder.capital_province != this + } + modifier = { # No time, must conquer! + add = -1000 + scope:holder = { + gold <= conqueror_safe_spending_gold + has_variable = conqueror + } + } +} + +ai_tier_1_building_modifier = { + modifier = { # Try to build rank 1 buildings in your capital before anything else + add = 20 + scope:holder.capital_province = this + } +} + +ai_tier_1_economical_building_preference_modifier = { + modifier = { # Economy boom AI's like economy buildings + add = 5 + scope:holder = { + OR = { + ai_has_economical_boom_personality = yes + has_character_flag = ai_desire_economy_buildings + } + } + } +} + +ai_tier_1_pious_building_preference_modifier = { + modifier = { # This building gives me piety! + add = 5 + scope:holder = { + ai_has_pious_builder_personality = yes + } + } +} + +ai_economical_building_preference_modifier = { + modifier = { + add = ai_economic_preference_value + scope:holder = { + OR = { + ai_rationality >= 25 + has_focus_or_focus_trait_trigger = { FOCUS = stewardship_wealth_focus } + has_focus_or_focus_trait_trigger = { FOCUS = stewardship_domain_focus } + monthly_character_income < monthly_character_expenses_times_three + } + } + } +} + +ai_pious_building_preference_modifier = { + modifier = { + add = ai_piety_preference_value + scope:holder = { + OR = { + ai_zeal >= 25 + ai_has_pious_builder_personality = yes + monthly_character_income < monthly_character_expenses_times_three + } + } + } +} + +ai_skirmisher_modifier = { + modifier = { + add = stationed_maa_bonus + has_stationed_regiment_of_base_type = skirmishers + } + modifier = { + add = likes_maa_value + scope:holder = { + highest_held_title_tier >= tier_county + culture ?= { + OR = { + has_cultural_pillar = heritage_baltic + has_cultural_pillar = heritage_ugro_permian + has_cultural_pillar = heritage_balto_finnic + culture_has_skirmisher_maa = yes + } + } + } + } + modifier = { + add = really_likes_maa_value + scope:holder = { + highest_held_title_tier >= tier_county + max_number_maa_soldiers_of_base_type = { + type = skirmishers + value >= 600 + } + } + } + modifier = { + add = dislikes_maa_value + scope:holder = { + highest_held_title_tier >= tier_county + OR = { + number_maa_regiments_of_base_type = { + type = skirmishers + value <= 0 + } + culture ?= { + OR = { + has_cultural_pillar = heritage_central_germanic + has_cultural_pillar = heritage_frankish + has_cultural_pillar = heritage_iberian + has_cultural_pillar = heritage_latin + } + } + } + } + } +} + +ai_archer_modifier = { + modifier = { + add = stationed_maa_bonus + has_stationed_regiment_of_base_type = archers + } + modifier = { + add = likes_maa_value + scope:holder = { + highest_held_title_tier >= tier_county + culture ?= { + OR = { + has_cultural_pillar = heritage_west_germanic + has_cultural_pillar = heritage_brythonic + has_cultural_pillar = heritage_east_african + has_cultural_pillar = heritage_indo_aryan + has_cultural_pillar = heritage_dravidian + has_cultural_pillar = heritage_burman + has_cultural_pillar = heritage_chinese + culture_has_archer_maa = yes + } + } + } + } + modifier = { + add = really_likes_maa_value + scope:holder = { + highest_held_title_tier >= tier_county + max_number_maa_soldiers_of_base_type = { + type = archers + value >= 600 + } + } + } + modifier = { + add = dislikes_maa_value + scope:holder = { + highest_held_title_tier >= tier_county + OR = { + number_maa_regiments_of_base_type = { + type = archers + value <= 0 + } + culture ?= { has_cultural_pillar = heritage_central_germanic } + culture ?= { has_cultural_pillar = heritage_frankish } + } + } + } +} + +ai_heavy_infantry_modifier = { + modifier = { + add = stationed_maa_bonus + has_stationed_regiment_of_base_type = heavy_infantry + } + modifier = { # If the holder has a preference for the MaA + add = likes_maa_value + scope:holder = { + highest_held_title_tier >= tier_county + culture ?= { + OR = { + has_cultural_pillar = heritage_central_germanic + has_cultural_pillar = heritage_north_germanic + has_cultural_pillar = heritage_west_germanic + has_cultural_pillar = heritage_east_slavic + culture_has_heavy_infantry_maa = yes + } + } + } + } + modifier = { # If the holder really likes the MaA type and is suited for it + add = really_likes_maa_value + scope:holder = { + highest_held_title_tier >= tier_county + max_number_maa_soldiers_of_base_type = { + type = heavy_infantry + value >= 400 + } + } + } + modifier = { # If the holder doesn't care for the MaA type + add = dislikes_maa_value + scope:holder = { + highest_held_title_tier >= tier_county + OR = { + number_maa_regiments_of_base_type = { + type = heavy_infantry + value <= 0 + } + culture ?= { has_cultural_pillar = heritage_central_germanic } + culture ?= { has_cultural_pillar = heritage_latin } + } + } + } +} + +ai_pikemen_modifier = { + modifier = { + add = stationed_maa_bonus + has_stationed_regiment_of_base_type = pikemen + } + modifier = { # If the holder has a preference for the MaA + add = likes_maa_value + scope:holder = { + highest_held_title_tier >= tier_county + culture ?= { + OR = { + has_cultural_pillar = heritage_central_germanic + has_cultural_pillar = heritage_latin + culture_has_pikemen_maa = yes + } + } + } + } + modifier = { # If the holder really likes the MaA type and is suited for it + add = really_likes_maa_value + scope:holder = { + highest_held_title_tier >= tier_county + max_number_maa_soldiers_of_base_type = { + type = pikemen + value >= 400 + } + } + } + modifier = { # If the holder doesn't care for the MaA type + add = dislikes_maa_value + scope:holder = { + highest_held_title_tier >= tier_county + number_maa_regiments_of_base_type = { + type = pikemen + value <= 0 + } + } + } +} + +ai_light_cavalry_modifier = { + modifier = { + add = stationed_maa_bonus + has_stationed_regiment_of_base_type = light_cavalry + } + modifier = { # If the holder has a preference for the MaA + add = likes_maa_value + scope:holder = { + highest_held_title_tier >= tier_county + culture ?= { + OR = { + has_cultural_pillar = heritage_arabic + has_cultural_pillar = heritage_iranian + has_cultural_pillar = heritage_berber + has_cultural_pillar = heritage_iberian + has_cultural_pillar = heritage_indo_aryan + culture_has_light_cavalry_maa = yes + } + } + } + } + modifier = { # If the holder really likes the MaA type and is suited for it + add = really_likes_maa_value + scope:holder = { + highest_held_title_tier >= tier_county + OR = { + max_number_maa_soldiers_of_base_type = { + type = light_cavalry + value >= 400 + } + + culture ?= { has_cultural_pillar = heritage_iranian } + + # Steppe cultures + culture ?= { has_cultural_pillar = heritage_turkic } + culture ?= { has_cultural_pillar = heritage_mongolic } + } + } + } + modifier = { # If the holder doesn't care for the MaA type + add = dislikes_maa_value + scope:holder = { + highest_held_title_tier >= tier_county + OR = { + number_maa_regiments_of_base_type = { + type = light_cavalry + value <= 0 + } + culture ?= { + OR = { + has_cultural_pillar = heritage_central_germanic + has_cultural_pillar = heritage_tibetan + has_cultural_pillar = heritage_baltic + has_cultural_pillar = heritage_burman + has_cultural_pillar = heritage_somalian + } + } + } + } + } +} + +ai_heavy_cavalry_modifier = { + modifier = { + add = stationed_maa_bonus + has_stationed_regiment_of_base_type = heavy_cavalry + } + modifier = { # If the holder has a preference for the MaA + add = likes_maa_value + scope:holder = { + highest_held_title_tier >= tier_county + culture ?= { + OR = { + has_cultural_pillar = heritage_central_germanic + has_cultural_pillar = heritage_frankish + has_cultural_pillar = heritage_indo_aryan + culture_has_heavy_cavalry_maa = yes + } + } + } + } + modifier = { # If the holder really likes the MaA type and is suited for it + add = really_likes_maa_value + scope:holder = { + highest_held_title_tier >= tier_county + OR = { + max_number_maa_soldiers_of_base_type = { + type = heavy_cavalry + value >= 100 + } + culture ?= { has_cultural_pillar = heritage_iranian } + + # Steppe cultures + culture ?= { has_cultural_pillar = heritage_turkic } + culture ?= { has_cultural_pillar = heritage_mongolic } + } + } + } + modifier = { # If the holder doesn't care for the MaA type + add = dislikes_maa_value + scope:holder = { + highest_held_title_tier >= tier_county + OR = { + number_maa_regiments_of_base_type = { + type = heavy_cavalry + value <= 0 + } + culture ?= { + OR = { + has_cultural_pillar = heritage_tibetan + has_cultural_pillar = heritage_baltic + has_cultural_pillar = heritage_south_slavic + has_cultural_pillar = heritage_sahelian + has_cultural_pillar = heritage_senegambian + has_cultural_pillar = heritage_west_african + has_cultural_pillar = heritage_yoruba + has_cultural_pillar = heritage_somalian + has_cultural_pillar = heritage_east_african + has_cultural_pillar = heritage_burman + } + } + } + } + } +} + +ai_compensate_heavy_cavalry_modifier = { + modifier = { + add = compensate_conflict_maa_bonus + scope:holder = { + highest_held_title_tier >= tier_county + culture ?= { + OR = { # Likes Heavy Cavalry + has_cultural_pillar = heritage_central_germanic + has_cultural_pillar = heritage_frankish + has_cultural_pillar = heritage_indo_aryan + has_cultural_pillar = heritage_iranian + has_cultural_pillar = heritage_turkic + has_cultural_pillar = heritage_mongolic + culture_has_heavy_cavalry_maa = yes + } + + OR = { # Dislikes Light Cavalry + has_cultural_pillar = heritage_central_germanic + has_cultural_pillar = heritage_tibetan + has_cultural_pillar = heritage_baltic + has_cultural_pillar = heritage_burman + has_cultural_pillar = heritage_somalian + } + } + } + } +} + +ai_compensate_light_cavalry_modifier = { + modifier = { + add = compensate_conflict_maa_bonus + scope:holder = { + highest_held_title_tier >= tier_county + culture ?= { + OR = { # Likes Light Cavalry + has_cultural_pillar = heritage_arabic + has_cultural_pillar = heritage_berber + has_cultural_pillar = heritage_iberian + has_cultural_pillar = heritage_indo_aryan + has_cultural_pillar = heritage_iranian + has_cultural_pillar = heritage_turkic + has_cultural_pillar = heritage_mongolic + culture_has_light_cavalry_maa = yes + } + + OR = { # Dislikes Heavy Cavalry + has_cultural_pillar = heritage_tibetan + has_cultural_pillar = heritage_baltic + has_cultural_pillar = heritage_south_slavic + has_cultural_pillar = heritage_sahelian + has_cultural_pillar = heritage_senegambian + has_cultural_pillar = heritage_west_african + has_cultural_pillar = heritage_yoruba + has_cultural_pillar = heritage_somalian + has_cultural_pillar = heritage_east_african + has_cultural_pillar = heritage_burman + } + } + } + } +} + +ai_archer_cavalry_modifier = { + modifier = { + add = stationed_maa_bonus + has_stationed_regiment_of_base_type = archer_cavalry + } + modifier = { # If the holder has a preference for the MaA + add = likes_maa_value + scope:holder = { + highest_held_title_tier >= tier_county + OR = { + # Steppe cultures + culture ?= { has_cultural_pillar = heritage_turkic } + culture ?= { has_cultural_pillar = heritage_mongolic } + } + } + } + modifier = { # If the holder really likes the MaA type and is suited for it + add = really_likes_maa_value + scope:holder = { + highest_held_title_tier >= tier_county + OR = { + max_number_maa_soldiers_of_base_type = { + type = archer_cavalry + value >= 400 + } + # Steppe cultures + culture ?= { has_cultural_pillar = heritage_turkic } + culture ?= { has_cultural_pillar = heritage_mongolic } + } + } + } + modifier = { # If the holder doesn't care for the MaA type + add = dislikes_maa_value + scope:holder = { + highest_held_title_tier >= tier_county + number_maa_regiments_of_base_type = { + type = archer_cavalry + value <= 0 + } + } + } +} + +ai_camels_modifier = { + modifier = { + add = stationed_maa_bonus + has_stationed_regiment_of_base_type = camel_cavalry + } + modifier = { # If the holder has a preference for the MaA + add = likes_maa_value + scope:holder = { + highest_held_title_tier >= tier_county + OR = { + culture = { has_cultural_pillar = heritage_arabic } + culture = { has_cultural_pillar = heritage_berber } + } + } + } + modifier = { # If the holder really likes the MaA type and is suited for it + add = really_likes_maa_value + scope:holder = { + highest_held_title_tier >= tier_county + OR = { + max_number_maa_soldiers_of_base_type = { + type = camel_cavalry + value >= 400 + } + culture = { has_cultural_pillar = heritage_arabic } + culture = { has_cultural_pillar = heritage_berber } + } + } + } + modifier = { # If the holder doesn't care for the MaA type + add = dislikes_maa_value + scope:holder = { + highest_held_title_tier >= tier_county + number_maa_regiments_of_base_type = { + type = camel_cavalry + value <= 0 + } + } + } +} + +ai_elephants_modifier = { + modifier = { + add = stationed_maa_bonus + has_stationed_regiment_of_base_type = elephant_cavalry + } + modifier = { # If the holder has a preference for the MaA + add = likes_maa_value + scope:holder = { + highest_held_title_tier >= tier_county + culture = { + OR = { + has_cultural_pillar = heritage_dravidian + has_cultural_pillar = heritage_indo_aryan + has_cultural_pillar = heritage_burman + } + } + } + } + modifier = { # If the holder really likes the MaA type and is suited for it + add = really_likes_maa_value + scope:holder = { + highest_held_title_tier >= tier_county + OR = { + max_number_maa_soldiers_of_base_type = { + type = elephant_cavalry + value >= 100 + } + culture = { has_cultural_pillar = heritage_dravidian } + culture = { has_cultural_pillar = heritage_indo_aryan } + culture = { has_cultural_pillar = heritage_burman } + } + } + } + modifier = { # If the holder doesn't care for the MaA type + add = dislikes_maa_value + scope:holder = { + highest_held_title_tier >= tier_county + number_maa_regiments_of_base_type = { + type = elephant_cavalry + value <= 0 + } + } + } +} + +ai_stacking_bonus_military_camps_modifier = { + modifier = { + add = stacking_bonus_value + has_building_or_higher = military_camps_01 + scope:holder = { + OR = { + max_number_maa_soldiers_of_base_type = { + type = skirmishers + value >= 200 + } + max_number_maa_soldiers_of_base_type = { + type = archers + value >= 200 + } + } + } + } +} + +ai_stacking_bonus_smiths_modifier = { + modifier = { + add = stacking_bonus_value + has_building_or_higher = smiths_01 + scope:holder = { + OR = { + max_number_maa_soldiers_of_base_type = { + type = heavy_infantry + value >= 200 + } + max_number_maa_soldiers_of_base_type = { + type = pikemen + value >= 200 + } + } + } + } +} + +ai_stacking_bonus_stables_modifier = { + modifier = { + add = stacking_bonus_value + has_building_or_higher = stables_01 + scope:holder = { + OR = { + max_number_maa_soldiers_of_base_type = { + type = heavy_cavalry + value >= 50 + } + max_number_maa_soldiers_of_base_type = { + type = light_cavalry + value >= 200 + } + } + } + } +} + +ai_stacking_bonus_horse_pastures_modifier = { + modifier = { + add = stacking_bonus_value + has_building_or_higher = horse_pastures_01 + scope:holder = { + OR = { + max_number_maa_soldiers_of_base_type = { + type = archer_cavalry + value >= 200 + } + max_number_maa_soldiers_of_base_type = { + type = light_cavalry + value >= 200 + } + } + } + } +} + +ai_stacking_bonus_hillside_grazing_modifier = { + modifier = { + add = stacking_bonus_value + has_building_or_higher = hillside_grazing_01 + scope:holder = { + OR = { + max_number_maa_soldiers_of_base_type = { + type = archer_cavalry + value >= 200 + } + max_number_maa_soldiers_of_base_type = { + type = light_cavalry + value >= 200 + } + max_number_maa_soldiers_of_base_type = { + type = heavy_cavalry + value >= 50 + } + } + } + } +} + +ai_stacking_bonus_warrior_lodges_modifier = { + modifier = { + add = stacking_bonus_value + has_building_or_higher = warrior_lodges_01 + scope:holder = { + OR = { + max_number_maa_soldiers_of_base_type = { + type = skirmishers + value >= 200 + } + max_number_maa_soldiers_of_base_type = { + type = heavy_infantry + value >= 200 + } + max_number_maa_soldiers_of_base_type = { + type = pikemen + value >= 200 + } + } + } + } +} + +ai_stacking_bonus_wind_furnaces_modifier = { + modifier = { + add = stacking_bonus_value + has_building_or_higher = wind_furnace_01 + scope:holder = { + OR = { + max_number_maa_soldiers_of_base_type = { + type = pikemen + value >= 200 + } + max_number_maa_soldiers_of_base_type = { + type = heavy_infantry + value >= 200 + } + max_number_maa_soldiers_of_base_type = { + type = heavy_cavalry + value >= 200 + } + } + } + } +} + +ai_stacking_bonus_outposts_modifier = { + modifier = { + add = stacking_bonus_value + has_building_or_higher = outposts_01 + scope:holder = { + OR = { + max_number_maa_soldiers_of_base_type = { + type = skirmishers + value >= 200 + } + max_number_maa_soldiers_of_base_type = { + type = archers + value >= 200 + } + } + } + } +} + +ai_stacking_bonus_camel_farms_modifier = { + modifier = { + add = stacking_bonus_value + has_building_or_higher = camel_farms_01 + scope:holder = { + OR = { + max_number_maa_soldiers_of_base_type = { + type = light_cavalry + value >= 200 + } + max_number_maa_soldiers_of_base_type = { + type = camel_cavalry + value >= 200 + } + } + } + } +} + +ai_stacking_bonus_elephant_pens_modifier = { + modifier = { + add = stacking_bonus_value + has_building_or_higher = elephant_pens_01 + scope:holder = { + max_number_maa_soldiers_of_base_type = { + type = elephant_cavalry + value >= 50 + } + } + } +} + +ai_anti_synergy_cavalry_modifier = { + modifier = { + add = anti_synergy_penalty_value + OR = { + #has_building_or_higher = camel_farms_01 # Economy building technically + has_building_or_higher = horse_pastures_01 + has_building_or_higher = hillside_grazing_01 + has_building_or_higher = stables_01 + has_building_or_higher = jousting_lists_01 + } + } +} + +ai_anti_synergy_armored_infantry_modifier = { + modifier = { + add = anti_synergy_penalty_value + OR = { + has_building_or_higher = smiths_01 + has_building_or_higher = blacksmiths_01 + has_building_or_higher = warrior_lodges_01 + } + } +} + +ai_anti_synergy_light_infantry_modifier = { + modifier = { + add = anti_synergy_penalty_value + OR = { + has_building_or_higher = military_camps_01 + has_building_or_higher = outposts_01 + has_building_or_higher = archery_ranges_01 + } + } +} + +## Cultural Modifiers +culture_likely_to_fortify_modifier = { + modifier = { + factor = 5 + scope:holder.culture ?= { has_cultural_parameter = ai_more_likely_to_fortify } + } +} + +ai_tradeport_improvement_from_culture_modifier = { + modifier = { + add = { + value = 0 + if = { + limit = { + scope:holder.culture = { has_cultural_parameter = trade_ports_give_levies } + } + add = 2 + } + if = { + limit = { + scope:holder.culture = { has_cultural_parameter = trade_ports_give_control_growth } + } + add = 2 + } + if = { + limit = { + scope:holder.culture = { has_cultural_parameter = next_level_trade_ports } + } + add = 1 + } + } + } +} + +ai_pasture_improvement_from_culture_modifier = { + modifier = { + add = { + value = 0 + if = { + limit = { + scope:holder.culture ?= { has_cultural_parameter = pastures_building_bonuses } + } + add = 2 + } + if = { + limit = { + is_coastal = yes + scope:holder.culture ?= { has_cultural_parameter = coastal_agriculture_building_bonuses } + } + add = 2 + } + } + } +} + +ai_hunting_grounds_improvement_from_culture_modifier = { + modifier = { + add = { + value = 0 + if = { + limit = { + scope:holder.culture ?= { has_cultural_parameter = hunting_archery_building_bonuses } + } + add = 2 + } + } + } +} + +ai_orchard_improvement_from_culture_modifier = { + modifier = { + add = { + value = 0 + if = { + limit = { + scope:holder.culture ?= { has_cultural_parameter = coastal_agriculture_building_bonuses } + } + add = 2 + } + } + } +} + +ai_farm_estate_improvement_from_culture_modifier = { + modifier = { + add = { + value = 0 + if = { + limit = { + scope:holder.culture = { has_cultural_parameter = coastal_agriculture_building_bonuses } + } + add = 2 + } + if = { + limit = { + OR = { # more productive building than the alternatives for this terrain type + terrain = jungle + terrain = hills + } + scope:holder.culture = { # holder's culture, not province's + has_cultural_parameter = rice_cultivators_can_construct_paddy_fields_in_hills_and_jungle + } + } + add = 2 + } + } + } +} + + +ai_paddy_fields_improvement_from_culture_modifier = { + modifier = { + add = { + value = 0 + if = { + limit = { + OR = { + terrain = terraced_hills + terrain = wetlands + } + culture = { # province's culture, not holder's + has_cultural_parameter = champa_rice_building_bonuses + } + } + add = 4 + } + if = { + limit = { + OR = { # more productive building than the alternatives for this terrain type + terrain = jungle + terrain = hills + } + scope:holder.culture = { # holder's culture, not province's + has_cultural_parameter = rice_cultivators_can_construct_paddy_fields_in_hills_and_jungle + } + } + add = 2 + } + } + } +} + +ai_cereal_fields_improvement_from_culture_modifier = { + modifier = { + add = { + value = 0 + if = { + limit = { + scope:holder.culture ?= { has_cultural_parameter = coastal_agriculture_building_bonuses } + } + add = 2 + } + } + } +} + +ai_outposts_improvement_from_culture_modifier = { + modifier = { + add = { + value = 0 + if = { + limit = { + scope:holder.culture = { has_cultural_parameter = outposts_building_bonuses } + } + add = 2 + } + } + } +} + +ai_barracks_improvement_from_culture_modifier = { + modifier = { + add = { + value = 0 + if = { + limit = { + scope:holder.culture = { has_cultural_parameter = building_barracks_piety_bonuses } + } + add = 2 + } + } + } +} + +ai_logging_camp_improvement_from_culture_modifier = { + modifier = { + add = { + value = 0 + if = { + limit = { + scope:holder.culture ?= { has_cultural_parameter = logging_camps_building_bonuses } + } + add = 2 + } + } + } +} + +ai_peat_quarries_improvement_from_culture_modifier = { + modifier = { + add = { + value = 0 + if = { + limit = { + scope:holder.culture ?= { has_cultural_parameter = logging_camps_building_bonuses } + } + add = 2 + } + if = { + limit = { + scope:holder.culture ?= { has_cultural_parameter = peat_quarries_building_bonuses } + } + add = 2 + } + } + } +} + +ai_hill_farms_improvement_from_culture_modifier = { + modifier = { + add = { + value = 0 + if = { + limit = { + scope:holder.culture ?= { has_cultural_parameter = hill_farms_building_bonuses } + } + add = 2 + } + } + } +} + +ai_elephant_pens_improvement_from_culture_modifier = { + modifier = { + add = { + value = 0 + if = { + limit = { + scope:holder.culture = { has_cultural_parameter = elephant_pens_building_bonuses } + } + add = 2 + } + } + } +} + +ai_plantations_improvement_from_culture_modifier = { + modifier = { + add = { + value = 0 + if = { + limit = { + scope:holder.culture ?= { has_cultural_parameter = plantations_building_bonuses } + } + add = 2 + } + } + } +} + +ai_quarries_improvement_from_culture_modifier = { + modifier = { + add = { + value = 0 + if = { + limit = { + scope:holder.culture ?= { has_cultural_parameter = quarries_building_bonuses } + } + add = 2 + } + } + } +} + +directive_to_fortify_modifier = { + modifier = { + add = 10 + scope:holder = { + has_character_flag = vassal_directive_building_focus_fortification + vassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege } + } + } +} + +directive_to_build_military_modifier = { + modifier = { + add = 10 + scope:holder = { + has_character_flag = vassal_directive_building_focus_military + vassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege } + } + } +} + +directive_to_build_economy_modifier = { + modifier = { + add = 10 + scope:holder = { + has_character_flag = vassal_directive_building_focus_economy + vassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege } + } + } +} diff --git a/common/scripted_triggers/00_ai_value_triggers.txt b/common/scripted_triggers/00_ai_value_triggers.txt new file mode 100644 index 000000000..e53e66f92 --- /dev/null +++ b/common/scripted_triggers/00_ai_value_triggers.txt @@ -0,0 +1,366 @@ + +###TRIGGER LIST +#opposing_ai_values_trigger - Checks if one character has a positive value and another character has a negative value for the same ai value. + +#Needs TARGET and the name of the VALUE +opposing_ai_values_trigger = { + OR = { + AND = { + ai_$VALUE$ < 0 + $TARGET$ = { ai_$VALUE$ > 0 } + } + AND = { + ai_$VALUE$ > 0 + $TARGET$ = { ai_$VALUE$ < 0 } + } + } +} + +ai_has_builder_or_pious_builder_personality = { + ai_has_pious_builder_personality = yes + ai_has_economical_boom_personality = yes +} + +ai_has_pious_builder_personality = { + OR = { + AND = { + pious_ai_builder_trigger = yes + ai_has_warlike_personality = no + } + #Or our Devaraja decrees it + AND = { + OR = { + is_tributary = yes + is_independent_ruler = no + } + overlord ?= { has_realm_law_flag = subjects_appear_more_pious } + } + #Weight the AI according to their Aspect + house ?= { has_house_aspiration_parameter = aspect_of_serenity } + } + NOR = { + has_variable = conqueror + #Weight the AI according to their Aspect + house ?= { + OR = { + has_house_aspiration_parameter = aspect_of_creation + has_house_aspiration_parameter = aspect_of_destruction + has_house_aspiration_parameter = aspect_of_trickery + } + } + } +} + +ai_has_warlike_personality = { + OR = { + vassal_contract_has_flag = admin_ai_is_warlike # Admin vassals with the "Frontier" administration consider it their job to expand + house ?= { # The unity decision "Organize House Members for War" forces AI house members to adopt this stance + has_house_modifier = unity_house_organized_for_war_modifier + } + AND = { # They are Detractors during the FP3 Struggle in the Unrest Phase + any_character_struggle = { + trigger_if = { + limit = { is_struggle_type = persian_struggle } + is_struggle_phase = struggle_persia_phase_unrest + } + trigger_else = { always = no } + } + has_trait = fp3_struggle_detractor + } + AND = { # Nomads are not 'unpredictable', they are Warlike instead + government_has_flag = government_is_nomadic + ai_has_cautious_personality = no + economical_ai_guts_trigger = no + } + AND = { + ai_boldness > 0 + ai_greed >= 0 + + OR = { + has_trait = wrathful + has_trait = impatient + has_trait = sadistic + has_trait = ambitious + has_trait = vengeful + has_trait = zealous + has_trait = irritable + AND = { + ai_boldness >= 50 + ai_greed >= 50 + } + AND = { + ai_boldness >= 25 + ai_greed >= 100 + } + AND = { + ai_boldness >= 100 + ai_greed >= 25 + } + government_has_flag = government_is_tribal + culture ?= { has_cultural_pillar = ethos_bellicose } + } + + NOR = { + ai_compassion >= 75 + has_trait = compassionate + has_trait = craven + has_trait = calm + faith ?= { has_doctrine_parameter = pacifist } + culture ?= { has_cultural_parameter = reduced_cost_for_conversion_to_pacifist_faith } + house ?= { + has_house_modifier = unity_house_focused_on_economy_modifier + } + vassal_contract_has_flag = admin_ai_is_builder + } + } + # Or we're on the warpath. + has_variable = imperial_expedition_charged + #Or our Devaraja decrees it + AND = { + OR = { + is_tributary = yes + is_independent_ruler = no + } + overlord ?= { has_realm_law_flag = subjects_appear_more_warlike } + } + #Weight the AI according to their Aspect + house ?= { has_house_aspiration_parameter = aspect_of_destruction } + } + NOR = { + has_variable = conqueror + #Weight the AI according to their Aspect + house ?= { + OR = { + has_house_aspiration_parameter = aspect_of_creation + has_house_aspiration_parameter = aspect_of_serenity + has_house_aspiration_parameter = aspect_of_trickery + } + } + } +} + +ai_has_cautious_personality = { + ai_boldness <= 0 + + OR = { + has_trait = paranoid + has_trait = craven + AND = { + ai_boldness <= -25 + OR = { + has_trait = patient + has_trait = calm + has_trait = content + culture = { has_cultural_pillar = ethos_stoic } + culture = { has_cultural_tradition = tradition_stalwart_defenders } + } + } + } + NOR = { + has_trait = fickle + has_trait = lunatic + house ?= { + OR = { + has_house_modifier = unity_house_organized_for_war_modifier + has_house_modifier = unity_house_focused_on_economy_modifier + #Weight the AI according to their Aspect + has_house_aspiration_parameter = aspect_of_creation + has_house_aspiration_parameter = aspect_of_serenity + has_house_aspiration_parameter = aspect_of_trickery + } + } + AND = { # They are Detractors during the FP3 Struggle in the Unrest Phase + any_character_struggle = { + trigger_if = { + limit = { is_struggle_type = persian_struggle } + is_struggle_phase = struggle_persia_phase_unrest + } + trigger_else = { always = no } + } + has_trait = fp3_struggle_detractor + } + vassal_contract_has_flag = admin_ai_is_warlike + vassal_contract_has_flag = admin_ai_is_builder + has_variable = conqueror + } +} + +ai_has_economical_boom_personality = { + OR = { + # Admin vassals with the "Civilian" administration consider it their job to improve the economy + vassal_contract_has_flag = admin_ai_is_builder + # The unity decision "Encourage House to Improve the Economy" forces AI house members to adopt this stance + house ?= { + has_house_modifier = unity_house_focused_on_economy_modifier + } + AND = { + economical_ai_guts_trigger = yes + ai_has_warlike_personality = no + } + #Or our Devaraja decrees it + AND = { + OR = { + is_tributary = yes + is_independent_ruler = no + } + overlord ?= { has_realm_law_flag = subjects_appear_more_economical } + } + #Weight the AI according to their Aspect + house ?= { has_house_aspiration_parameter = aspect_of_creation } + } + NOR = { + has_variable = conqueror + #Weight the AI according to their Aspect + house ?= { + OR = { + has_house_aspiration_parameter = aspect_of_destruction + has_house_aspiration_parameter = aspect_of_serenity + has_house_aspiration_parameter = aspect_of_trickery + } + } + } +} + +pious_ai_builder_trigger = { + ai_zeal > 0 + ai_energy > 0 + OR = { + has_focus = learning_theology_focus # Only this focus, which is 33% of all learning focused characters in the world + has_trait = zealous + has_trait = forgiving + has_trait = improvident + has_trait = humble + has_trait = patient + has_trait = diligent + has_trait = generous + has_character_modifier = the_temple_builder_modifier + government_has_flag = government_is_mandala + } + num_virtuous_traits >= 1 + num_sinful_traits = 0 + NAND = { + has_trait = cynical + has_trait = greedy + house = { + has_house_modifier = unity_house_organized_for_war_modifier + } + } +} + +economical_ai_guts_trigger = { + ai_boldness > 0 + OR = { + has_focus = stewardship_domain_focus # Only this focus, which is 33% of all stewardship focused characters in the world + has_trait = calm + has_trait = patient + has_trait = diligent + has_trait = generous + has_trait = stubborn + has_trait = profligate + has_character_modifier = the_city_builder_modifier + has_character_modifier = the_castle_builder_modifier + } + NAND = { + has_trait = greedy + has_trait = impatient + house ?= { + has_house_modifier = unity_house_organized_for_war_modifier + } + } +} + +ai_wants_low_unity = { + government_has_flag = government_is_clan + # To actively decrease Unity, the AI needs the following personality + OR = { + AND = { + OR = { + has_trait_malicious_trigger = yes + has_trait_dominant_trigger = yes + } + has_trait_submissive_trigger = no + has_trait_benevolent_trigger = no + } + ai_has_warlike_personality = yes + has_variable = conqueror + has_character_flag = agenda_towards_escalation + } +} + +ai_wants_high_unity = { + government_has_flag = government_is_clan + # We'll make sure that the AI only wants to actively increase Unity if they have a matching personality + OR = { + AND = { + OR = { + has_trait_benevolent_trigger = yes + has_trait_submissive_trigger = yes + } + has_trait_malicious_trigger = no + } + ai_has_economical_boom_personality = yes + AND = { + NOT = { has_trait = fp3_struggle_detractor } + # House is the most recent Caliphs house + exists = struggle:persian_struggle + trigger_if = { + limit = { exists = title:d_sunni.holder } + house = title:d_sunni.holder.house + } + trigger_else = { house = title:d_sunni.previous_holder.house } + } + has_character_flag = agenda_towards_deescalation + } + + # And to make sure the AI doesn't want to increase and decrease Unity at the same time + ai_wants_low_unity = no +} + +ai_has_conqueror_personality = { + OR = { + has_trait = conqueror + has_trait = greatest_of_khans + has_character_modifier = the_great_khan_modifier + any_owned_story = { + type = story_conqueror + } + } +} + +ai_should_get_conqueror_bonuses = { + has_variable = conqueror + NOT = { has_game_rule = no_conquerors_bonuses } +} + +ai_should_get_extreme_conqueror_bonuses = { + has_variable = conqueror + has_character_modifier = ai_extreme_conqueror_modifier +} + +ai_should_focus_on_building_in_their_capital = { + is_landed = yes + highest_held_title_tier >= tier_county + NOT = { has_variable = conqueror } + NOT = { government_has_flag = government_is_nomadic } + exists = capital_county + exists = culture + OR = { + capital_county.title_province.free_building_slots > 0 + AND = { + culture = { has_innovation = innovation_ledger } + capital_county.title_province.combined_building_level <= 4 + } + AND = { + culture = { has_innovation = innovation_baliffs } + capital_county.title_province.combined_building_level <= 6 + } + AND = { + culture = { has_innovation = innovation_guilds } + capital_county.title_province.combined_building_level <= 9 + } + AND = { + culture = { has_innovation = innovation_cranes } + capital_county.title_province.combined_building_level <= 12 + } + } +} diff --git a/common/scripted_triggers/00_building_requirement_triggers.txt b/common/scripted_triggers/00_building_requirement_triggers.txt index 8503574f4..92eb6464e 100644 --- a/common/scripted_triggers/00_building_requirement_triggers.txt +++ b/common/scripted_triggers/00_building_requirement_triggers.txt @@ -237,8 +237,12 @@ building_orchards_requirement_terrain = { terrain = floodplains terrain = oasis has_building_or_higher = qanats_05 - culture = { - has_cultural_parameter = vegetarian_fruit_orchard_allowed + AND = { + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_parameter = vegetarian_fruit_orchard_allowed } + } } } } @@ -251,7 +255,13 @@ building_farm_estates_requirement_terrain = { terrain = hills terrain = jungle } - county.culture = { has_cultural_parameter = rice_cultivators_can_construct_paddy_fields_in_hills_and_jungle } + AND = { + exists = county.culture + trigger_if = { + limit = { exists = county.culture } + county.culture ?= { has_cultural_parameter = rice_cultivators_can_construct_paddy_fields_in_hills_and_jungle } + } + } } } } @@ -325,14 +335,26 @@ building_paddy_fields_requirement_terrain = { } AND = { terrain = wetlands - county.culture = { has_cultural_parameter = champa_rice_wet_land_paddies } + AND = { + exists = county.culture + trigger_if = { + limit = { exists = county.culture } + county.culture ?= { has_cultural_parameter = champa_rice_wet_land_paddies } + } + } } AND = { OR = { terrain = hills terrain = jungle } - county.culture = { has_cultural_parameter = rice_cultivators_can_construct_paddy_fields_in_hills_and_jungle } + AND = { + exists = county.culture + trigger_if = { + limit = { exists = county.culture } + county.culture ?= { has_cultural_parameter = rice_cultivators_can_construct_paddy_fields_in_hills_and_jungle } + } + } } } } @@ -447,7 +469,13 @@ building_elephant_pens_requirement_terrain = { terrain = jungle OR = { geographical_region = world_innovation_elephants - culture = { has_cultural_parameter = elephant_pens_building_bonuses } + AND = { + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_parameter = elephant_pens_building_bonuses } + } + } } } @@ -455,7 +483,13 @@ building_horse_pastures_requirement_terrain = { OR = { terrain = steppe geographical_region = world_steppe_east - culture = { has_cultural_parameter = unlock_horse_pastures_building } + AND = { + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_parameter = unlock_horse_pastures_building } + } + } } } @@ -471,7 +505,13 @@ building_quarries_requirement_terrain = { OR = { terrain = mountains terrain = desert_mountains - culture = { has_cultural_parameter = can_build_quarries_everywhere } + AND = { + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_parameter = can_build_quarries_everywhere } + } + } } } @@ -486,7 +526,13 @@ building_warrior_lodges_requirement_terrain = { } NOT = { geographical_region = world_horse_buildings_in_hills_and_mountains } } - culture = { has_cultural_parameter = warrior_lodges_lift_restrictions } + AND = { + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_parameter = warrior_lodges_lift_restrictions } + } + } } } @@ -523,7 +569,7 @@ building_wind_furnace_requirement_terrain = { } - scope:holder.culture = { has_innovation = innovation_wootz_steel } + scope:holder.culture ?= { has_innovation = innovation_wootz_steel } } building_hill_forts_requirement_terrain = { @@ -587,7 +633,13 @@ building_caravanserai_requirement_terrain = { building_qanats_requirement_terrain = { county ?= { - culture = { has_cultural_parameter = unlocks_qanat_building } + AND = { + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_parameter = unlocks_qanat_building } + } + } county_has_province_with_terrain = { terrain = hills terrain = tells @@ -757,22 +809,22 @@ add_random_building_trigger = { generic_economic_building_innovation_trigger = { trigger_if = { limit = { has_building_or_higher = $BUILDING$_01 } - scope:build_owner.culture = { has_innovation = innovation_crop_rotation } + scope:build_owner.culture ?= { has_innovation = innovation_crop_rotation } } trigger_if = { limit = { has_building_or_higher = $BUILDING$_02 } building_requirement_castle_city_church = { LEVEL = 02 } - scope:build_owner.culture = { has_innovation = innovation_manorialism } + scope:build_owner.culture ?= { has_innovation = innovation_manorialism } } trigger_if = { limit = { has_building_or_higher = $BUILDING$_04 } building_requirement_castle_city_church = { LEVEL = 03 } - scope:build_owner.culture = { has_innovation = innovation_guilds } + scope:build_owner.culture ?= { has_innovation = innovation_guilds } } trigger_if = { limit = { has_building_or_higher = $BUILDING$_06 } building_requirement_castle_city_church = { LEVEL = 04 } - scope:build_owner.culture = { has_innovation = innovation_cranes } + scope:build_owner.culture ?= { has_innovation = innovation_cranes } } } @@ -780,22 +832,22 @@ generic_economic_building_innovation_trigger = { generic_fortification_building_innovations_trigger = { trigger_if = { limit = { has_building_or_higher = $BUILDING$_01 } - scope:build_owner.culture = { has_innovation = innovation_motte } + scope:build_owner.culture ?= { has_innovation = innovation_motte } } trigger_if = { limit = { has_building_or_higher = $BUILDING$_02 } building_requirement_castle_city_church = { LEVEL = 02 } - scope:build_owner.culture = { has_innovation = innovation_battlements } + scope:build_owner.culture ?= { has_innovation = innovation_battlements } } trigger_if = { limit = { has_building_or_higher = $BUILDING$_04 } building_requirement_castle_city_church = { LEVEL = 03 } - scope:build_owner.culture = { has_innovation = innovation_hoardings } + scope:build_owner.culture ?= { has_innovation = innovation_hoardings } } trigger_if = { limit = { has_building_or_higher = $BUILDING$_06 } building_requirement_castle_city_church = { LEVEL = 04 } - scope:build_owner.culture = { has_innovation = innovation_machicolations } + scope:build_owner.culture ?= { has_innovation = innovation_machicolations } } } @@ -803,22 +855,22 @@ generic_fortification_building_innovations_trigger = { generic_recruitment_building_innovations_trigger = { trigger_if = { limit = { has_building_or_higher = $BUILDING$_01 } - scope:build_owner.culture = { has_innovation = innovation_barracks } + scope:build_owner.culture ?= { has_innovation = innovation_barracks } } trigger_if = { limit = { has_building_or_higher = $BUILDING$_02 } building_requirement_castle_city_church = { LEVEL = 02 } - scope:build_owner.culture = { has_innovation = innovation_burhs } + scope:build_owner.culture ?= { has_innovation = innovation_burhs } } trigger_if = { limit = { has_building_or_higher = $BUILDING$_04 } building_requirement_castle_city_church = { LEVEL = 03 } - scope:build_owner.culture = { has_innovation = innovation_castle_baileys } + scope:build_owner.culture ?= { has_innovation = innovation_castle_baileys } } trigger_if = { limit = { has_building_or_higher = $BUILDING$_06 } building_requirement_castle_city_church = { LEVEL = 04 } - scope:build_owner.culture = { has_innovation = innovation_royal_armory } + scope:build_owner.culture ?= { has_innovation = innovation_royal_armory } } } @@ -946,7 +998,7 @@ religious_special_building_exclusion_trigger = { # checks if any special buildin building_monastic_schools_holding_level_requirement_trigger = { trigger_if = { - limit = { scope:holder.rite = { rite_has_parameter = monastic_schools_allowed_in_every_holding_type } } + limit = { scope:holder.rite ?= { rite_has_parameter = monastic_schools_allowed_in_every_holding_type } } OR = { has_building_or_higher = castle_$LEVEL$ has_building_or_higher = city_$LEVEL$ @@ -975,7 +1027,11 @@ building_waterworks_requirement_terrain = { terrain = mountains terrain = desert_mountains } - scope:holder.culture = { has_cultural_parameter = unlocks_waterworks_buildings } + exists = scope:holder.culture + trigger_if = { + limit = { exists = scope:holder.culture } + scope:holder.culture ?= { has_cultural_parameter = unlocks_waterworks_buildings } + } } building_spice_plantation_requirement_terrain = { @@ -1014,12 +1070,22 @@ building_breweries_requirement = { } OR = { religion = religion:catholic_religion - faith = { has_doctrine_parameter = allows_brewery } + AND = { + exists = faith + trigger_if = { + limit = { exists = faith } + faith ?= { has_doctrine_parameter = allows_brewery } + } + } } } trigger_else = { - building_requirement_castle_city_church = { LEVEL = $NUMBER$ } - culture = { has_cultural_parameter = allows_brewery } + building_requirement_castle_city_church = { LEVEL = $NUMBER$ } + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_parameter = allows_brewery } + } } } @@ -1061,7 +1127,11 @@ building_doggerland_ivory_deposits_requirement_terrain = { building_vineyards_requirement = { AND = { - root.culture = { has_cultural_parameter = allows_vineyards } + exists = root.culture + trigger_if = { + limit = { exists = root.culture } + root.culture ?= { has_cultural_parameter = allows_vineyards } + } OR = { terrain = farmlands terrain = plains @@ -1072,16 +1142,28 @@ building_vineyards_requirement = { building_communal_settlement_requirement = { OR = { - scope:holder.faith = { - has_doctrine_parameter = allows_communal_settlement + AND = { + exists = scope:holder.faith + trigger_if = { + limit = { exists = scope:holder.faith } + scope:holder.faith ?= { has_doctrine_parameter = allows_communal_settlement } + } } - root.faith = { - has_doctrine_parameter = allows_communal_settlement + AND = { + exists = root.faith + trigger_if = { + limit = { exists = root.faith } + root.faith ?= { has_doctrine_parameter = allows_communal_settlement } + } } - root.culture = { - has_cultural_parameter = allows_communal_settlement + AND = { + exists = root.culture + trigger_if = { + limit = { exists = root.culture } + root.culture ?= { has_cultural_parameter = allows_communal_settlement } + } } } } \ No newline at end of file diff --git a/common/scripted_triggers/00_clothing_triggers.txt b/common/scripted_triggers/00_clothing_triggers.txt index c8e2347f3..4d8f6390a 100644 --- a/common/scripted_triggers/00_clothing_triggers.txt +++ b/common/scripted_triggers/00_clothing_triggers.txt @@ -3451,17 +3451,7 @@ portrait_religious_shamanism_nivkh_trigger = { # same as above but shamanists wi portrait_religious_steppe_trigger = { - OR = { -# religion = religion:tengrism_religion -# religion = religion:qiangic_religion -# religion = religion:siberian_religion -# religion = religion:mundhum_religion -# religion = religion:tani_religion - religion = religion:mediterranean_religion -# faith = { -# portrait_religious_faith_or_foundational_trigger = { FAITH = faith:bon_faith } -# } - } + always = no } portrait_religious_buddhist_trigger = { diff --git a/common/scripted_triggers/00_coa_triggers.txt b/common/scripted_triggers/00_coa_triggers.txt index b2b188758..070152ebe 100644 --- a/common/scripted_triggers/00_coa_triggers.txt +++ b/common/scripted_triggers/00_coa_triggers.txt @@ -8,7 +8,7 @@ coa_african_trigger = { } coa_african_culture_trigger = { - scope:culture = { + scope:culture ?= { OR = { has_coa_gfx = central_african_group_coa_gfx has_coa_gfx = east_african_coa_gfx @@ -41,7 +41,7 @@ coa_bishopric_trigger = { coa_breton_trigger = { OR = { - scope:culture = { has_coa_gfx = breton_coa_gfx } + scope:culture ?= { has_coa_gfx = breton_coa_gfx } scope:title ?= { any_this_title_or_de_jure_above = { this = title:k_brittany @@ -52,7 +52,7 @@ coa_breton_trigger = { coa_byzantine_trigger = { OR = { - scope:culture = { has_coa_gfx = byzantine_group_coa_gfx } + scope:culture ?= { has_coa_gfx = byzantine_group_coa_gfx } # scope:title ?= { # any_this_title_or_de_jure_above = { # this = title:e_byzantium @@ -63,7 +63,7 @@ coa_byzantine_trigger = { coa_castilian_trigger = { OR = { - scope:culture = { has_coa_gfx = castilian_coa_gfx } + scope:culture ?= { has_coa_gfx = castilian_coa_gfx } scope:title ?= { any_this_title_or_de_jure_above = { this = title:k_castille @@ -84,10 +84,14 @@ coa_coptic_trigger = { } coa_cross_trigger = { - scope:faith = { - OR = { religion = religion:catholic_religion religion = religion:eastern_orthodox_religion religion = religion:protestant_religion religion = religion:oriental_orthodox_religion } - NOT = { main_rite = { rite_has_tenet = tenet_aniconism } } + trigger_if = { + limit = { exists = scope:faith } + scope:faith ?= { + OR = { religion = religion:catholic_religion religion = religion:eastern_orthodox_religion religion = religion:protestant_religion religion = religion:oriental_orthodox_religion } + NOT = { main_rite ?= { rite_has_tenet = tenet_aniconism } } + } } + trigger_else = { always = no } } coa_england_switches_to_france_coa_trigger = { @@ -120,27 +124,30 @@ coa_switch_to_norse_trigger = { } OR = { faith.religion = religion:folk_germanic_religion - culture = { has_coa_gfx = norse_coa_gfx } + culture ?= { has_coa_gfx = norse_coa_gfx } } } } coa_feudal_trigger = { - - scope:faith.religion = { - OR = { - this = religion:catholic_religion - this = religion:eastern_orthodox_religion - this = religion:protestant_religion - this = religion:oriental_orthodox_religion + trigger_if = { + limit = { exists = scope:faith.religion } + scope:faith.religion = { + OR = { + this = religion:catholic_religion + this = religion:eastern_orthodox_religion + this = religion:protestant_religion + this = religion:oriental_orthodox_religion + } } } + trigger_else = { always = no } government_has_flag = government_is_feudal } coa_french_trigger = { OR = { - scope:culture = { has_coa_gfx = french_coa_gfx } + scope:culture ?= { has_coa_gfx = french_coa_gfx } AND = { exists = root any_liege_or_above = { @@ -154,7 +161,7 @@ coa_french_trigger = { coa_irish_trigger = { OR = { - scope:culture = { has_coa_gfx = irish_coa_gfx } + scope:culture ?= { has_coa_gfx = irish_coa_gfx } scope:title ?= { any_this_title_or_de_jure_above = { this = title:k_ireland @@ -165,7 +172,7 @@ coa_irish_trigger = { coa_indian_culture_trigger = { - scope:culture = { + scope:culture ?= { OR = { has_coa_gfx = burman_group_coa_gfx has_coa_gfx = dravidian_group_coa_gfx @@ -182,8 +189,14 @@ coa_indian_region_trigger = { } } coa_indian_religion_trigger = { - scope:faith.religion = { - save_temporary_scope_as = religion + trigger_if = { + limit = { exists = scope:faith.religion } + scope:faith.religion = { + save_temporary_scope_as = religion + } + } + trigger_else = { + always = no } scope:religion = { OR = { @@ -201,19 +214,27 @@ coa_indian_trigger = { coa_indian_region_trigger = yes coa_indian_religion_trigger = yes } - scope:culture = { has_graphical_east_asia_culture_group_trigger = no } + scope:culture ?= { has_graphical_east_asia_culture_group_trigger = no } } coa_jewish_trigger = { OR = { - scope:faith.religion = religion:judaism_religion - scope:culture = { has_coa_gfx = israelite_group_coa_gfx } + trigger_if = { + limit = { exists = scope:faith.religion } + scope:faith.religion = religion:judaism_religion + } + trigger_else = { always = no } + trigger_if = { + limit = { exists = scope:culture } + scope:culture ?= { has_coa_gfx = israelite_group_coa_gfx } + } + trigger_else = { always = no } } } coa_leonese_trigger = { OR = { - scope:culture = { has_coa_gfx = leonese_coa_gfx } + scope:culture ?= { has_coa_gfx = leonese_coa_gfx } scope:title ?= { any_this_title_or_de_jure_above = { this = title:k_leon @@ -246,7 +267,7 @@ coa_manx_trigger = { coa_mena_trigger = { OR = { scope:faith.religion = religion:islam_religion - scope:culture = { + scope:culture ?= { OR = { has_coa_gfx = arabic_group_coa_gfx has_coa_gfx = berber_group_coa_gfx @@ -258,7 +279,7 @@ coa_mena_trigger = { coa_suomenusko_trigger = { OR = { scope:faith.religion = religion:finnic_religion - scope:culture = { + scope:culture ?= { OR = { has_coa_gfx = balto_finnic_group_coa_gfx has_coa_gfx = ugro_permian_group_coa_gfx @@ -270,7 +291,7 @@ coa_suomenusko_trigger = { coa_polish_trigger = { OR = { - scope:culture = { has_coa_gfx = polish_coa_gfx } + scope:culture ?= { has_coa_gfx = polish_coa_gfx } AND = { exists = root any_liege_or_above = { @@ -284,7 +305,7 @@ coa_polish_trigger = { coa_scottish_trigger = { OR = { - scope:culture = { has_coa_gfx = scottish_coa_gfx } + scope:culture ?= { has_coa_gfx = scottish_coa_gfx } scope:title ?= { any_this_title_or_de_jure_above = { this = title:k_scotland @@ -302,15 +323,15 @@ coa_theocratic_trigger = { } coa_welsh_trigger = { - scope:culture = { has_coa_gfx = welsh_coa_gfx } + scope:culture ?= { has_coa_gfx = welsh_coa_gfx } } coa_tamga_trigger = { - scope:culture = { has_coa_gfx = steppe_coa_gfx } + scope:culture ?= { has_coa_gfx = steppe_coa_gfx } } coa_scandinavian_trigger = { - scope:culture = { + scope:culture ?= { OR = { has_coa_gfx = swedish_coa_gfx has_coa_gfx = norwegian_coa_gfx @@ -320,18 +341,18 @@ coa_scandinavian_trigger = { } coa_norse_trigger = { - scope:culture = { has_coa_gfx = norse_coa_gfx } + scope:culture ?= { has_coa_gfx = norse_coa_gfx } } coa_germanic_trigger = { - scope:culture = { has_coa_gfx = german_group_coa_gfx } + scope:culture ?= { has_coa_gfx = german_group_coa_gfx } } coa_iberian_trigger = { OR = { - scope:culture = { has_coa_gfx = iberian_group_coa_gfx } + scope:culture ?= { has_coa_gfx = iberian_group_coa_gfx } AND = { - scope:culture = { has_coa_gfx = arabic_group_coa_gfx } + scope:culture ?= { has_coa_gfx = arabic_group_coa_gfx } scope:title ?= { OR = { this = title:e_spain @@ -343,7 +364,7 @@ coa_iberian_trigger = { } coa_iranian_trigger = { - scope:culture = { has_coa_gfx = iranian_group_coa_gfx } + scope:culture ?= { has_coa_gfx = iranian_group_coa_gfx } } has_recognizable_chinese_seal = { diff --git a/common/scripted_triggers/00_councillor_triggers.txt b/common/scripted_triggers/00_councillor_triggers.txt index 500d609ac..c85412c21 100644 --- a/common/scripted_triggers/00_councillor_triggers.txt +++ b/common/scripted_triggers/00_councillor_triggers.txt @@ -33,7 +33,11 @@ can_be_councillor_gender_trigger = { has_variable = can_be_councillor_override AND = { is_female = yes - $COURT_OWNER$.rite = { NOT = { rite_has_parameter = male_dominated_council } } + exists = $COURT_OWNER$.rite + trigger_if = { + limit = { exists = $COURT_OWNER$.rite } + $COURT_OWNER$.rite ?= { NOT = { rite_has_parameter = male_dominated_council } } + } } AND = { is_female = yes @@ -43,7 +47,11 @@ can_be_councillor_gender_trigger = { } AND = { is_male = yes - $COURT_OWNER$.rite = { NOT = { rite_has_parameter = female_dominated_council } } + exists = $COURT_OWNER$.rite + trigger_if = { + limit = { exists = $COURT_OWNER$.rite } + $COURT_OWNER$.rite ?= { NOT = { rite_has_parameter = female_dominated_council } } + } } } } @@ -55,7 +63,7 @@ can_be_chancellor_trigger = { } NAND = { has_council_position = councillor_court_chaplain - rite = { rite_has_parameter = clerical_appointment_fixed } + rite ?= { rite_has_parameter = clerical_appointment_fixed } } NOR = { has_council_position = councillor_spouse @@ -74,7 +82,7 @@ can_be_steward_trigger = { } NAND = { has_council_position = councillor_court_chaplain - rite = { rite_has_parameter = clerical_appointment_fixed } + rite ?= { rite_has_parameter = clerical_appointment_fixed } } NOR = { has_council_position = councillor_spouse @@ -94,7 +102,7 @@ can_be_marshal_trigger = { is_hostage = no NAND = { has_council_position = councillor_court_chaplain - rite = { rite_has_parameter = clerical_appointment_fixed } + rite ?= { rite_has_parameter = clerical_appointment_fixed } } NOR = { has_council_position = councillor_spouse @@ -107,7 +115,7 @@ can_be_marshal_trigger = { can_be_councillor_gender_trigger = { COURT_OWNER = $COURT_OWNER$ } AND = { has_trait = shieldmaiden - $COURT_OWNER$.culture = { has_cultural_parameter = has_access_to_shieldmaidens } + $COURT_OWNER$.culture ?= { has_cultural_parameter = has_access_to_shieldmaidens } } } } @@ -116,7 +124,7 @@ can_be_spymaster_trigger = { can_be_councillor_basics_trigger = yes NAND = { has_council_position = councillor_court_chaplain - rite = { rite_has_parameter = clerical_appointment_fixed } + rite ?= { rite_has_parameter = clerical_appointment_fixed } } NOR = { has_council_position = councillor_spouse @@ -141,11 +149,18 @@ can_be_court_chaplain_trigger = { liege = { has_diarchy_active_parameter = diarchy_is_vizierate } } } - $COURT_OWNER$.rite = { rite_has_allowed_gender_for_clergy = scope:court_chaplain_check } - rite = $COURT_OWNER$.rite + exists = $COURT_OWNER$.rite + trigger_if = { + limit = { exists = $COURT_OWNER$.rite } + $COURT_OWNER$.rite ?= { rite_has_allowed_gender_for_clergy = scope:court_chaplain_check } + } + trigger_if = { + limit = { exists = $COURT_OWNER$.rite } + rite = $COURT_OWNER$.rite + } trigger_if = { limit = { - rite = { rite_has_doctrine = doctrine_theocracy_temporal } + rite ?= { rite_has_doctrine = doctrine_theocracy_temporal } } OR = { is_ruler = no @@ -166,7 +181,7 @@ can_be_court_chaplain_trigger = { } trigger_if = { # Married characters are excluded if the doctrine is not there limit = { - rite = { + rite ?= { NOT = { rite_has_parameter = clergy_can_marry } } } @@ -178,7 +193,7 @@ can_be_court_chaplain_trigger = { can_appoint_own_court_chaplain_trigger = { OR = { religious_head_or_challenger ?= this # The appointment authority itself has no one to request a chaplain from - rite = { + rite ?= { NOT = { rite_has_parameter = clerical_appointment_fixed } } tgp_has_access_to_ministry_trigger = yes @@ -266,15 +281,23 @@ can_be_kurultai_trigger = { is_ruler = yes AND = { is_female = yes - $COURT_OWNER$.rite = { NOT = { rite_has_parameter = male_dominated_council } } + exists = $COURT_OWNER$.rite + trigger_if = { + limit = { exists = $COURT_OWNER$.rite } + $COURT_OWNER$.rite ?= { NOT = { rite_has_parameter = male_dominated_council } } + } } AND = { is_male = yes - $COURT_OWNER$.rite = { NOT = { rite_has_parameter = female_dominated_council } } + exists = $COURT_OWNER$.rite + trigger_if = { + limit = { exists = $COURT_OWNER$.rite } + $COURT_OWNER$.rite ?= { NOT = { rite_has_parameter = female_dominated_council } } + } } AND = { has_trait = shieldmaiden - $COURT_OWNER$.culture = { has_cultural_parameter = has_access_to_shieldmaidens } + $COURT_OWNER$.culture ?= { has_cultural_parameter = has_access_to_shieldmaidens } } } } @@ -313,15 +336,15 @@ can_be_any_kurultai_trigger = { is_ruler = yes AND = { is_female = yes - $COURT_OWNER$.rite = { NOT = { rite_has_parameter = male_dominated_council } } + $COURT_OWNER$.rite ?= { NOT = { rite_has_parameter = male_dominated_council } } } AND = { is_male = yes - $COURT_OWNER$.rite = { NOT = { rite_has_parameter = female_dominated_council } } + $COURT_OWNER$.rite ?= { NOT = { rite_has_parameter = female_dominated_council } } } AND = { has_trait = shieldmaiden - $COURT_OWNER$.culture = { has_cultural_parameter = has_access_to_shieldmaidens } + $COURT_OWNER$.culture ?= { has_cultural_parameter = has_access_to_shieldmaidens } } } } @@ -436,7 +459,7 @@ can_be_fired_from_council_trigger = { has_council_position = councillor_court_chaplain liege = { tgp_has_access_to_ministry_trigger = no } } - rite = { + rite ?= { OR = { rite_has_doctrine = doctrine_clerical_succession_temporal_appointment rite_has_doctrine = doctrine_clerical_succession_spiritual_appointment @@ -1094,7 +1117,7 @@ task_conversion_valid_county_trigger = { } } NOT = { - rite = { has_variable = pam_rite_grace_period } + rite ?= { has_variable = pam_rite_grace_period } } } trigger_if = { @@ -1103,7 +1126,7 @@ task_conversion_valid_county_trigger = { trigger_if = { limit = { scope:councillor_liege = { - faith = { + faith ?= { has_doctrine_parameter = unreformed } } @@ -1114,7 +1137,7 @@ task_conversion_valid_county_trigger = { vassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege } } scope:councillor_liege = { ai_zeal >= 50 } - scope:county_check.faith = { has_doctrine_parameter = unreformed } + scope:county_check.faith ?= { has_doctrine_parameter = unreformed } scope:county_check = { # Always convert holy sites any_county_province = { barony = { @@ -1128,7 +1151,7 @@ task_conversion_valid_county_trigger = { trigger_if = { limit = { scope:councillor_liege = { - faith = { + faith ?= { faith_hostility_level = { target = scope:county_check.faith value <= faith_fully_accepted_level @@ -1158,7 +1181,7 @@ task_conversion_valid_county_trigger = { trigger_if = { limit = { scope:councillor_liege = { - faith = { + faith ?= { faith_hostility_level = { target = scope:county_check.faith value <= faith_astray_level @@ -1191,7 +1214,7 @@ task_conversion_valid_county_trigger = { trigger_else_if = { limit = { scope:councillor_liege = { - rite = { rite_has_doctrine = doctrine_pluralism_fundamentalist } + rite ?= { rite_has_doctrine = doctrine_pluralism_fundamentalist } } } OR = { @@ -1261,11 +1284,11 @@ task_conversion_valid_county_trigger = { limit = { scope:councillor_liege = { OR = { - rite = { rite_has_tenet = tenet_tax_nonbelievers } - faith = { has_doctrine = special_doctrine_jizya } + rite ?= { rite_has_tenet = tenet_tax_nonbelievers } + faith ?= { has_doctrine = special_doctrine_jizya } } } - scope:councillor_liege.faith = { faith_is_in_same_rf = { FAITH = scope:county_check.faith } } + scope:councillor_liege.faith ?= { faith_is_in_same_rf = { FAITH = scope:county_check.faith } } } OR = { scope:councillor_liege = { @@ -1273,8 +1296,8 @@ task_conversion_valid_county_trigger = { vassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege } } scope:councillor_liege = { ai_zeal >= 50 } - scope:county_check.faith = { has_doctrine_parameter = unreformed } - scope:councillor_liege.faith = { + scope:county_check.faith ?= { has_doctrine_parameter = unreformed } + scope:councillor_liege.faith ?= { any_holy_site_barony = { kingdom = scope:county_check.kingdom } diff --git a/common/scripted_triggers/00_military_triggers.txt b/common/scripted_triggers/00_military_triggers.txt new file mode 100644 index 000000000..0e47fd5ff --- /dev/null +++ b/common/scripted_triggers/00_military_triggers.txt @@ -0,0 +1,30 @@ +#Triggers handling questions of military and warfare + +#Checks whether scope character has greater military strength than the ratio specified +military_strength_greater_than_ratio_trigger = { + save_temporary_scope_value_as = { + name = ratio + + value = { + value = max_military_strength + divide = $TARGET$.max_military_strength + } + } + + scope:ratio > $RATIO$ +} + +valid_for_maa_trigger = { + OR = { + AND = { + has_government = landless_adventurer_government + has_perk = planned_cultivation_perk + location.county.culture ?= { has_cultural_parameter = $PARAMETER$ } + } + culture ?= { has_cultural_parameter = $PARAMETER$ } + } +} + +valid_for_nomadic_riders_trigger = { + government_has_flag = government_is_nomadic +} \ No newline at end of file diff --git a/common/scripted_triggers/00_religious_triggers.txt b/common/scripted_triggers/00_religious_triggers.txt index 2d068dfdf..289f52051 100644 --- a/common/scripted_triggers/00_religious_triggers.txt +++ b/common/scripted_triggers/00_religious_triggers.txt @@ -58,7 +58,11 @@ has_strong_religious_conviction_trigger = { } is_christian_trigger = { - faith = { OR = { religion_tag = eastern_orthodox_religion religion_tag = catholic_religion religion_tag = protestant_religion religion_tag = oriental_orthodox_religion } } + trigger_if = { + limit = { exists = faith } + faith ?= { OR = { religion_tag = eastern_orthodox_religion religion_tag = catholic_religion religion_tag = protestant_religion religion_tag = oriental_orthodox_religion } } + } + trigger_else = { always = no } } # Not-non-XYZ triggers allow us to check for specific historical faiths whilst still defaulting to something positive for variant faiths. @@ -117,28 +121,39 @@ can_be_combatant_based_on_gender_trigger = { } trigger_if = { limit = { - $ARMY_OWNER$.culture = { has_cultural_parameter = martial_custom_male_only_combatant } + exists = $ARMY_OWNER$.culture + trigger_if = { + limit = { exists = $ARMY_OWNER$.culture } + $ARMY_OWNER$.culture ?= { has_cultural_parameter = martial_custom_male_only_combatant } + } } is_male = yes } trigger_else_if = { limit = { - $ARMY_OWNER$.culture = { has_cultural_parameter = martial_custom_female_only_combatant } + exists = $ARMY_OWNER$.culture + trigger_if = { + limit = { exists = $ARMY_OWNER$.culture } + $ARMY_OWNER$.culture ?= { has_cultural_parameter = martial_custom_female_only_combatant } + } } is_female = yes } trigger_else = {} } trigger_else = { # Does not have the Royal Court and thus combatant is governed by faith - OR = { - $ARMY_OWNER$.rite = { rite_has_parameter = combatant_can_be_either_gender_if_no_roco } - AND = { - $ARMY_OWNER$.rite = { rite_has_parameter = combatant_must_be_male_if_no_roco } - is_male = yes - } - AND = { - $ARMY_OWNER$.rite = { rite_has_parameter = combatant_must_be_female_if_no_roco } - is_female = yes + trigger_if = { + limit = { exists = $ARMY_OWNER$.rite } + OR = { + $ARMY_OWNER$.rite ?= { rite_has_parameter = combatant_can_be_either_gender_if_no_roco } + AND = { + $ARMY_OWNER$.rite ?= { rite_has_parameter = combatant_must_be_male_if_no_roco } + is_male = yes + } + AND = { + $ARMY_OWNER$.rite ?= { rite_has_parameter = combatant_must_be_female_if_no_roco } + is_female = yes + } } } } @@ -146,7 +161,7 @@ can_be_combatant_based_on_gender_trigger = { # No need to gender diversify this: if they're a right-gender shieldperson of the culture, then they've already got permission to fight from the previous AND conditions. has_trait = shieldmaiden $ARMY_OWNER$ = { - culture = { has_cultural_parameter = has_access_to_shieldmaidens } + culture ?= { has_cultural_parameter = has_access_to_shieldmaidens } } } # Event-based special exceptions @@ -156,12 +171,12 @@ can_be_combatant_based_on_gender_trigger = { } AND = { prowess >= 10 - $ARMY_OWNER$.culture = { has_cultural_parameter = high_prowess_ignores_knight_restrictions } - NOT = { $ARMY_OWNER$.culture = { has_cultural_parameter = minimum_prowess_for_knights } } + $ARMY_OWNER$.culture ?= { has_cultural_parameter = high_prowess_ignores_knight_restrictions } + NOT = { $ARMY_OWNER$.culture ?= { has_cultural_parameter = minimum_prowess_for_knights } } } AND = { prowess >= 12 - $ARMY_OWNER$.culture = { + $ARMY_OWNER$.culture ?= { has_cultural_parameter = high_prowess_ignores_knight_restrictions has_cultural_parameter = minimum_prowess_for_knights } @@ -178,17 +193,31 @@ can_be_combatant_based_on_gender_trigger = { object = this subject = $ARMY_OWNER$ OR = { - rite = { rite_has_parameter = clergy_can_fight } + trigger_if = { + limit = { exists = rite } + rite ?= { rite_has_parameter = clergy_can_fight } + } + trigger_else = { always = no } AND = { has_personal_tenet_flag = clergy_can_fight_personal - NOT = { - rite = { rite_has_parameter = pacifist } + trigger_if = { + limit = { exists = rite } + NOT = { rite ?= { rite_has_parameter = pacifist } } } + trigger_else = { always = no } } - culture = { has_cultural_parameter = culture_clergy_can_fight } + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_parameter = culture_clergy_can_fight } + } + trigger_else = { always = no } AND = { - $ARMY_OWNER$.culture = { - has_cultural_parameter = high_prowess_ignores_knight_restrictions + $ARMY_OWNER$ = { + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_parameter = high_prowess_ignores_knight_restrictions } + } + trigger_else = { always = no } } prowess >= 10 } @@ -201,14 +230,14 @@ clergy_can_fight_check_trigger = { trigger_if = { limit = { is_clergy = yes } OR = { - rite = { rite_has_parameter = clergy_can_fight } + rite ?= { rite_has_parameter = clergy_can_fight } AND = { has_personal_tenet_flag = clergy_can_fight_personal NOT = { - rite = { rite_has_parameter = pacifist } + rite ?= { rite_has_parameter = pacifist } } } - culture = { has_cultural_parameter = culture_clergy_can_fight } + culture ?= { has_cultural_parameter = culture_clergy_can_fight } } } } @@ -216,14 +245,14 @@ clergy_can_fight_check_trigger = { can_be_clergy_due_to_gender_trigger = { OR = { AND = { - rite = { rite_has_parameter = clergy_must_be_female } + rite ?= { rite_has_parameter = clergy_must_be_female } is_female = yes } AND = { - rite = { rite_has_parameter = clergy_must_be_male } + rite ?= { rite_has_parameter = clergy_must_be_male } is_male = yes } - rite = { rite_has_parameter = clergy_can_be_either_gender } + rite ?= { rite_has_parameter = clergy_can_be_either_gender } } } @@ -243,7 +272,7 @@ is_wrong_gender_in_rite_trigger = { faith_is_aniconic_trigger = { OR = { faith.religion = religion:islam_religion - rite = { rite_has_tenet = tenet_aniconism } + rite ?= { rite_has_tenet = tenet_aniconism } } } @@ -281,26 +310,26 @@ relation_with_character_is_incestuous_in_rite_trigger = { #Note: only checks from the viewpoint of current scope. Needs CHARACTER relation_with_character_is_incestuous_in_my_faith_trigger = { - faith.main_rite = { save_temporary_scope_as = my_rite } + faith.main_rite ?= { save_temporary_scope_as = my_rite } relation_with_character_is_incestuous_in_rite_trigger = { CHARACTER = $CHARACTER$ RITE = scope:my_rite } } relation_with_character_is_incestuous_in_my_rite_trigger = { - rite = { save_temporary_scope_as = my_rite } + rite ?= { save_temporary_scope_as = my_rite } relation_with_character_is_incestuous_in_rite_trigger = { CHARACTER = $CHARACTER$ RITE = scope:my_rite } } relation_with_character_is_incestuous_in_my_or_lieges_rite_trigger = { OR = { AND = { - rite = { #My rite doesn't approve + rite ?= { #My rite doesn't approve save_temporary_scope_as = check_rite } relation_with_character_is_incestuous_in_rite_trigger = { CHARACTER = $CHARACTER$ RITE = scope:check_rite } } AND = { #Liege's rite doesn't approve liege ?= { - rite = { + rite ?= { save_temporary_scope_as = check_rite } } @@ -325,7 +354,7 @@ rite_allows_marriage_consanguinity_trigger = { relation_between_characters_is_sodomy_in_my_rite_trigger = { $CHARACTER_1$ = { is_male = yes } $CHARACTER_2$ = { is_male = yes } - rite = { + rite ?= { NOT = { rite_has_parameter = homosexuality_accepted } } } @@ -340,7 +369,7 @@ relation_with_character_is_sodomy_in_rite_trigger = { #Note: only checks from the viewpoint of current scope. Needs CHARACTER relation_with_character_is_sodomy_by_my_rite_trigger = { - rite = { save_temporary_scope_as = my_rite } + rite ?= { save_temporary_scope_as = my_rite } relation_with_character_is_sodomy_in_rite_trigger = { CHARACTER = $CHARACTER$ RITE = scope:my_rite @@ -350,14 +379,14 @@ relation_with_character_is_sodomy_by_my_rite_trigger = { relation_with_character_is_sodomy_in_my_or_lieges_rite_trigger = { OR = { AND = { - rite = { #My rite doesn't approve + rite ?= { #My rite doesn't approve save_temporary_scope_as = check_rite } relation_with_character_is_sodomy_in_rite_trigger = { CHARACTER = $CHARACTER$ RITE = scope:check_rite } } AND = { #Liege's rite doesn't approve liege ?= { - rite = { + rite ?= { save_temporary_scope_as = check_rite } } @@ -376,7 +405,7 @@ murdering_character_is_kinslaying_in_rite_trigger = { murdering_character_is_kinslaying_in_my_or_same_dynasty_lieges_rite_trigger = { save_temporary_scope_as = kinslayer_me - rite = { + rite ?= { save_temporary_scope_as = check_rite } trigger_if = { @@ -384,7 +413,7 @@ murdering_character_is_kinslaying_in_my_or_same_dynasty_lieges_rite_trigger = { liege ?= { dynasty = scope:kinslayer_me.dynasty } } liege = { - rite = { + rite ?= { save_temporary_scope_as = check_rite_liege } } @@ -537,14 +566,14 @@ trait_is_shunned_or_criminal_in_rite_trigger = { trait_is_shunned_or_criminal_in_my_or_lieges_rite_trigger = { OR = { AND = { - rite = { #My rite doesn't approve + rite ?= { #My rite doesn't approve save_temporary_scope_as = check_rite } trait_is_shunned_or_criminal_in_rite_trigger = { TRAIT = $TRAIT$ RITE = scope:check_rite GENDER_CHARACTER = $GENDER_CHARACTER$ } } AND = { #Liege's rite doesn't approve liege ?= { - rite = { + rite ?= { save_temporary_scope_as = check_rite } } @@ -778,7 +807,7 @@ has_negative_attitude_towards_trait_trigger = { } } - rite = { save_temporary_scope_as = my_rite } + rite ?= { save_temporary_scope_as = my_rite } OR = { trait_is_shunned_in_rite_trigger = { TRAIT = $TRAIT$ RITE = scope:my_rite GENDER_CHARACTER = $GENDER_CHARACTER$ } trait_is_criminal_in_rite_trigger = { TRAIT = $TRAIT$ RITE = scope:my_rite GENDER_CHARACTER = $GENDER_CHARACTER$ } @@ -958,7 +987,7 @@ secret_is_blackmailable_trigger = { refusing_conversion_is_crime_trigger = { OR = { # has_title = title:e_minister_of_rites - rite = { + rite ?= { trigger_if = { # Only apply imprisonment reason if actor's rite is not the state rite limit = { $CHARACTER$ = { @@ -989,10 +1018,10 @@ refusing_conversion_is_crime_trigger = { character_can_create_holy_order_basic_trigger = { NOR = { - faith = { + faith ?= { has_doctrine_parameter = immaterial_harmony_no_holy_orders } - faith = { + faith ?= { any_faith_holy_order = { #Can be monastic patron and found military order leader ?= { @@ -1016,11 +1045,11 @@ is_hostile_enough_for_holy_war_trigger = { # Character scope: may this attacker press a religious war against TARGET? is_valid_religious_war_target_trigger = { OR = { - rite = { is_hostile_enough_for_holy_war_trigger = { RITE = $TARGET$.rite } } + rite ?= { is_hostile_enough_for_holy_war_trigger = { RITE = $TARGET$.rite } } AND = { - rite = { rite_has_parameter = literalism_holy_war_cb_active } + rite ?= { rite_has_parameter = literalism_holy_war_cb_active } religion = $TARGET$.religion - NOT = { $TARGET$.rite = { rite_has_tenet = tenet_literalism } } + NOT = { $TARGET$.rite ?= { rite_has_tenet = tenet_literalism } } } } } @@ -1164,7 +1193,7 @@ religion_has_circumcision_trigger = { is_heretic_trigger = { $WHO$.faith.religion = $TARGET$.faith.religion - $WHO$.faith = { + $WHO$.faith ?= { faith_hostility_level = { target = $TARGET$.faith value >= religious_cb_enabled_hostility_level @@ -1174,10 +1203,10 @@ is_heretic_trigger = { is_heathen_trigger = { NOT = { $WHO$.faith.religion = $TARGET$.faith.religion } - $TARGET$.faith = { + $TARGET$.faith ?= { has_doctrine = pagan_hostility_doctrine } - $WHO$.faith = { + $WHO$.faith ?= { faith_hostility_level = { target = $TARGET$.faith value >= religious_cb_enabled_hostility_level @@ -1187,10 +1216,10 @@ is_heathen_trigger = { is_infidel_trigger = { NOT = { $WHO$.faith.religion = $TARGET$.faith.religion } - $TARGET$.faith = { + $TARGET$.faith ?= { NOT = { has_doctrine = pagan_hostility_doctrine } } - $WHO$.faith = { + $WHO$.faith ?= { faith_hostility_level = { target = $TARGET$.faith value >= religious_cb_enabled_hostility_level @@ -1360,7 +1389,7 @@ fertilitygod_is_active_trigger = { ###REINCARNATION### can_become_reincarnation_trigger = { save_temporary_scope_as = reincarnated_child - rite = { + rite ?= { rite_has_tenet = tenet_reincarnation } any_parent = { @@ -1556,7 +1585,7 @@ can_create_head_of_faith_title_trigger = { can_perform_the_hajj_trigger = { faith.religion = religion:islam_religion - rite = { rite_has_parameter = can_go_on_pilgrimage } + rite ?= { rite_has_parameter = can_go_on_pilgrimage } } shared_faith_or_hof_trigger = { @@ -1763,7 +1792,7 @@ holy_order_1010_request_target_trigger = { } faith_dominant_gender_male_or_equal = { - rite = { + rite ?= { OR = { rite_has_parameter = male_dominated_law rite_has_parameter = gender_equal_law @@ -1772,7 +1801,7 @@ faith_dominant_gender_male_or_equal = { } faith_dominant_gender_female_or_equal = { - rite = { + rite ?= { OR = { rite_has_parameter = female_dominated_law rite_has_parameter = gender_equal_law @@ -1823,32 +1852,32 @@ would_be_sinful_adulterer_trigger = { trigger_if = { limit = { is_male = yes } NOT = { - rite = { rite_has_doctrine = doctrine_adultery_men_accepted } + rite ?= { rite_has_doctrine = doctrine_adultery_men_accepted } } } trigger_else = { NOT = { - rite = { rite_has_doctrine = doctrine_adultery_women_accepted } + rite ?= { rite_has_doctrine = doctrine_adultery_women_accepted } } } } has_tolerant_faith_or_culture_trigger = { OR = { - rite = { rite_has_doctrine = doctrine_pluralism_pluralistic } - culture = { has_cultural_parameter = less_likely_to_force_conversion } - culture = { has_cultural_tradition = tradition_religion_blending } + rite ?= { rite_has_doctrine = doctrine_pluralism_pluralistic } + culture ?= { has_cultural_parameter = less_likely_to_force_conversion } + culture ?= { has_cultural_tradition = tradition_religion_blending } has_trait = nomadic_philosophy } } is_open_to_inviting_other_faiths_trigger = { OR = { - rite = { rite_has_tenet = tenet_adaptive } - faith = { has_doctrine = unreformed_faith_doctrine } - rite = { rite_has_doctrine = doctrine_pluralism_pluralistic } - culture = { has_cultural_tradition = tradition_religion_blending } - culture = { has_cultural_tradition = tradition_tgp_religious_hospitality } + rite ?= { rite_has_tenet = tenet_adaptive } + faith ?= { has_doctrine = unreformed_faith_doctrine } + rite ?= { rite_has_doctrine = doctrine_pluralism_pluralistic } + culture ?= { has_cultural_tradition = tradition_religion_blending } + culture ?= { has_cultural_tradition = tradition_tgp_religious_hospitality } } } @@ -1859,7 +1888,7 @@ faith_is_open_minded_trigger = { } } -is_mainstream_jewish_faith = { +is_mainstream_jewish_faith ?= { religion = religion:judaism_religion # NOT = { # this = faith:samaritan @@ -1869,8 +1898,8 @@ is_mainstream_jewish_faith = { # } } -is_unprotected_hostile_faith = { # Checks if the faith is at least hostile but not protected by a contract, used in a county scope - faith = { +is_unprotected_hostile_faith ?= { # Checks if the faith is at least hostile but not protected by a contract, used in a county scope + faith ?= { faith_hostility_level = { target = prev.holder.top_liege.faith value >= 2 @@ -1901,7 +1930,7 @@ islam_or_syncretic_with_islam_trigger = { $CHARACTER$ = { OR = { faith.religion = religion:islam_religion - rite = { rite_has_parameter = islamic_syncretic_actor } + rite ?= { rite_has_parameter = islamic_syncretic_actor } } } } @@ -1910,7 +1939,7 @@ judaism_or_syncretic_with_judaism_trigger = { $CHARACTER$ = { OR = { faith.religion = religion:judaism_religion - rite = { rite_has_parameter = jewish_syncretic_actor } + rite ?= { rite_has_parameter = jewish_syncretic_actor } } } } @@ -1918,22 +1947,22 @@ judaism_or_syncretic_with_judaism_trigger = { christianity_or_syncretic_with_christianity_trigger = { $CHARACTER$ = { OR = { - OR = { - faith.religion = religion:oriental_orthodox_religion - rite = { rite_has_parameter = christian_syncretic_actor } - } - OR = { - faith.religion = religion:eastern_orthodox_religion - rite = { rite_has_parameter = christian_syncretic_actor } - } - OR = { - faith.religion = religion:catholic_religion - rite = { rite_has_parameter = christian_syncretic_actor } - } - OR = { - faith.religion = religion:protestant_religion - rite = { rite_has_parameter = christian_syncretic_actor } - } + OR = { + faith.religion = religion:oriental_orthodox_religion + rite ?= { rite_has_parameter = christian_syncretic_actor } + } + OR = { + faith.religion = religion:eastern_orthodox_religion + rite ?= { rite_has_parameter = christian_syncretic_actor } + } + OR = { + faith.religion = religion:catholic_religion + rite ?= { rite_has_parameter = christian_syncretic_actor } + } + OR = { + faith.religion = religion:protestant_religion + rite ?= { rite_has_parameter = christian_syncretic_actor } + } } } } @@ -1941,8 +1970,8 @@ christianity_or_syncretic_with_christianity_trigger = { unreformed_or_syncretic_with_unreformed_trigger = { $CHARACTER$ = { OR = { - faith = { has_doctrine_parameter = unreformed } - rite = { rite_has_parameter = unreformed_syncretic_actor } + faith ?= { has_doctrine_parameter = unreformed } + rite ?= { rite_has_parameter = unreformed_syncretic_actor } } } } @@ -1951,7 +1980,7 @@ zoroastrian_or_syncretic_with_eastern_trigger = { $CHARACTER$ = { OR = { faith.religion = religion:zoroastrianism_religion - rite = { rite_has_parameter = eastern_syncretic_actor } + rite ?= { rite_has_parameter = eastern_syncretic_actor } } } } @@ -1960,7 +1989,7 @@ eastern_or_syncretic_with_eastern_trigger = { $CHARACTER$ = { OR = { faith.religion = { is_in_family = rf_eastern } - rite = { rite_has_parameter = eastern_syncretic_actor } + rite ?= { rite_has_parameter = eastern_syncretic_actor } } } } @@ -1969,7 +1998,7 @@ sinitic_or_syncretic_with_sinitic_trigger = { $CHARACTER$ = { OR = { faith.religion = { is_in_family = rf_sinitic } - rite = { rite_has_parameter = sinitic_syncretic_actor } + rite ?= { rite_has_parameter = sinitic_syncretic_actor } } } } @@ -1978,7 +2007,7 @@ hindu_or_syncretic_with_eastern_trigger = { $CHARACTER$ = { OR = { faith.religion = religion:hinduism_religion - rite = { rite_has_parameter = eastern_syncretic_actor } + rite ?= { rite_has_parameter = eastern_syncretic_actor } } } } @@ -1987,26 +2016,26 @@ jain_or_syncretic_with_eastern_trigger = { $CHARACTER$ = { OR = { faith.religion = religion:jainism_religion - rite = { rite_has_parameter = eastern_syncretic_actor } + rite ?= { rite_has_parameter = eastern_syncretic_actor } } } } holy_site_adoptable_by_character_trigger = { - any_holy_site_faith = { + any_holy_site_faith ?= { save_temporary_scope_as = compare_faith OR = { - $CHARACTER$.rite = { rite_has_parameter = allow_adopt_any_holy_site } + $CHARACTER$.rite ?= { rite_has_parameter = allow_adopt_any_holy_site } AND = { OR = { religion = $CHARACTER$.faith.religion - $CHARACTER$.faith = { + $CHARACTER$.faith ?= { faith_is_syncretic_with = { FAITH = scope:compare_faith } } } - $CHARACTER$.faith = { + $CHARACTER$.faith ?= { faith_hostility_level = { target = prev value <= faith_astray_level @@ -2143,7 +2172,7 @@ is_faith_dominant_gender = { OR = { AND = { is_male = yes - rite = { + rite ?= { OR = { rite_has_parameter = male_dominated_law rite_has_parameter = gender_equal_law @@ -2152,7 +2181,7 @@ is_faith_dominant_gender = { } AND = { is_female = yes - rite = { + rite ?= { OR = { rite_has_parameter = female_dominated_law rite_has_parameter = gender_equal_law @@ -2163,59 +2192,99 @@ is_faith_dominant_gender = { } religion_is_broadly_asian_trigger = { - OR = { - religion_is_east_asian_trigger = yes - broadly_dharmic_trigger = yes - broadly_chinese_religion_trigger = yes + trigger_if = { + limit = { exists = faith } + OR = { + religion_is_east_asian_trigger = yes + broadly_dharmic_trigger = yes + broadly_chinese_religion_trigger = yes + } + } + trigger_else = { + always = no + } +} + +neow_faith_is_eastern_trigger = { + trigger_if = { + limit = { exists = faith } + faith ?= { religion = { is_in_family = rf_eastern } } + } + trigger_else = { + always = no } } religion_is_east_asian_trigger = { - OR = { - faith.religion = religion:buddhism_religion - faith.religion = religion:confucianism_religion - faith.religion = religion:taoism_religion - faith.religion = religion:shintoism_religion + trigger_if = { + limit = { exists = faith } + OR = { + faith.religion = religion:buddhism_religion + faith.religion = religion:confucianism_religion + faith.religion = religion:taoism_religion + faith.religion = religion:shintoism_religion + } + } + trigger_else = { + always = no } } religion_is_non_norse_european_pagan_trigger = { - OR = { - faith.religion = religion:baltic_religion - faith.religion = religion:finno_ugric_religion - faith.religion = religion:germanic_religion - faith.religion = religion:paganism_religion - faith.religion = religion:slavic_religion + trigger_if = { + limit = { exists = faith } + OR = { + faith.religion = religion:baltic_religion + faith.religion = religion:finno_ugric_religion + faith.religion = religion:germanic_religion + faith.religion = religion:paganism_religion + faith.religion = religion:slavic_religion + } + } + trigger_else = { + always = no } } non_dharmic_east_asia_trigger = { - OR = { - faith.religion = religion:shintoism_religion - faith.religion = religion:dualism_religion - faith.religion = religion:bon_religion - faith.religion = religion:dab_qhuas_religion - faith.religion = religion:aluk_religion - faith.religion = religion:dayawism_religion - faith.religion = religion:hantuism_religion - faith.religion = religion:kaharingan_religion - faith.religion = religion:satsana_phi_religion - faith.religion = religion:tolotang_religion - faith.religion = religion:utaki_religion - faith.religion = religion:bimoism_religion - faith.religion = religion:moism_religion - faith.religion = religion:muism_religion - faith.religion = religion:qiangic_religion + trigger_if = { + limit = { exists = faith } + OR = { + faith.religion = religion:shintoism_religion + faith.religion = religion:dualism_religion + faith.religion = religion:bon_religion + faith.religion = religion:dab_qhuas_religion + faith.religion = religion:aluk_religion + faith.religion = religion:dayawism_religion + faith.religion = religion:hantuism_religion + faith.religion = religion:kaharingan_religion + faith.religion = religion:satsana_phi_religion + faith.religion = religion:tolotang_religion + faith.religion = religion:utaki_religion + faith.religion = religion:bimoism_religion + faith.religion = religion:moism_religion + faith.religion = religion:muism_religion + faith.religion = religion:qiangic_religion + } + } + trigger_else = { + always = no } } religion_is_pagan_steppe = { - OR = { - faith.religion = religion:tengrism_religion - faith.religion = religion:magyar_religion - faith.religion = religion:siberian_religion - faith.religion = religion:shamanism_religion - faith.religion = religion:kamuyism_religion + trigger_if = { + limit = { exists = faith } + OR = { + faith.religion = religion:tengrism_religion + faith.religion = religion:magyar_religion + faith.religion = religion:siberian_religion + faith.religion = religion:shamanism_religion + faith.religion = religion:kamuyism_religion + } + } + trigger_else = { + always = no } } @@ -2241,8 +2310,14 @@ broadly_dharmic_faith_trigger = { } broadly_dharmic_trigger = { - faith = { - broadly_dharmic_faith_trigger = yes + trigger_if = { + limit = { exists = faith } + faith ?= { + broadly_dharmic_faith_trigger = yes + } + } + trigger_else = { + always = no } } @@ -2389,7 +2464,7 @@ character_considered_morally_dubious_trigger = { $RITE$ = { save_temporary_scope_as = moral_dubious_judge_rite } - scope:moral_dubious_judge_rite = { + scope:moral_dubious_judge_rite ?= { "rite_hostility_level(scope:judged.rite)" >= faith_evil_level } } @@ -2701,11 +2776,11 @@ rite_embraces_the_secular_flesh_trigger = { OR = { AND = { trait_is_virtue_rite = lustful - $CHARACTER$.rite = { NOT = { trait_is_virtue_rite = lustful } } + $CHARACTER$.rite ?= { NOT = { trait_is_virtue_rite = lustful } } } AND = { trait_is_sin_rite = chaste - $CHARACTER$.rite = { NOT = { trait_is_sin_rite = chaste } } + $CHARACTER$.rite ?= { NOT = { trait_is_sin_rite = chaste } } } #you are a gay person... and their take on the gays is better than yours trigger_if = { @@ -2715,14 +2790,14 @@ rite_embraces_the_secular_flesh_trigger = { has_sexuality = homosexual has_sexuality = bisexual } - rite = { NOT = { rite_has_parameter = homosexuality_accepted } } + rite ?= { NOT = { rite_has_parameter = homosexuality_accepted } } } } OR = { rite_has_parameter = homosexuality_accepted AND = { rite_has_parameter = homosexuality_shunned - $CHARACTER$.rite = { rite_has_parameter = homosexuality_illegal } + $CHARACTER$.rite ?= { rite_has_parameter = homosexuality_illegal } } } } @@ -2731,14 +2806,14 @@ rite_embraces_the_secular_flesh_trigger = { limit = { $CHARACTER$ = { is_female = yes - rite = { NOT = { rite_has_parameter = adultery_female_accepted } } + rite ?= { NOT = { rite_has_parameter = adultery_female_accepted } } } } OR = { rite_has_parameter = adultery_female_accepted AND = { rite_has_parameter = adultery_female_shunned - $CHARACTER$.rite = { rite_has_parameter = adultery_female_crime } + $CHARACTER$.rite ?= { rite_has_parameter = adultery_female_crime } } } } @@ -2747,14 +2822,14 @@ rite_embraces_the_secular_flesh_trigger = { limit = { $CHARACTER$ = { is_male = yes - rite = { NOT = { rite_has_parameter = adultery_male_accepted } } + rite ?= { NOT = { rite_has_parameter = adultery_male_accepted } } } } OR = { rite_has_parameter = adultery_male_accepted AND = { rite_has_parameter = adultery_male_shunned - $CHARACTER$.rite = { rite_has_parameter = adultery_male_crime } + $CHARACTER$.rite ?= { rite_has_parameter = adultery_male_crime } } } } @@ -2765,11 +2840,11 @@ rite_forbids_the_secular_flesh_trigger = { OR = { AND = { trait_is_virtue_rite = chaste - $CHARACTER$.rite = { NOT = { trait_is_virtue_rite = chaste } } + $CHARACTER$.rite ?= { NOT = { trait_is_virtue_rite = chaste } } } AND = { trait_is_sin_rite = lustful - $CHARACTER$.rite = { NOT = { trait_is_sin_rite = lustful } } + $CHARACTER$.rite ?= { NOT = { trait_is_sin_rite = lustful } } } #you are a gay person... and their take on the gays is crueler than yours trigger_if = { @@ -2779,14 +2854,14 @@ rite_forbids_the_secular_flesh_trigger = { has_sexuality = homosexual has_sexuality = bisexual } - rite = { NOT = { rite_has_parameter = homosexuality_illegal } } + rite ?= { NOT = { rite_has_parameter = homosexuality_illegal } } } } OR = { rite_has_parameter = homosexuality_illegal AND = { rite_has_parameter = homosexuality_shunned - $CHARACTER$.rite = { rite_has_parameter = homosexuality_accepted } + $CHARACTER$.rite ?= { rite_has_parameter = homosexuality_accepted } } } } @@ -2795,14 +2870,14 @@ rite_forbids_the_secular_flesh_trigger = { limit = { $CHARACTER$ = { is_female = yes - rite = { NOT = { rite_has_parameter = adultery_female_crime } } + rite ?= { NOT = { rite_has_parameter = adultery_female_crime } } } } OR = { rite_has_parameter = adultery_female_crime AND = { rite_has_parameter = adultery_female_shunned - $CHARACTER$.rite = { rite_has_parameter = adultery_female_accepted } + $CHARACTER$.rite ?= { rite_has_parameter = adultery_female_accepted } } } } @@ -2811,14 +2886,14 @@ rite_forbids_the_secular_flesh_trigger = { limit = { $CHARACTER$ = { is_male = yes - rite = { NOT = { rite_has_parameter = adultery_male_crime } } + rite ?= { NOT = { rite_has_parameter = adultery_male_crime } } } } OR = { rite_has_parameter = adultery_male_crime AND = { rite_has_parameter = adultery_male_shunned - $CHARACTER$.rite = { rite_has_parameter = adultery_male_accepted } + $CHARACTER$.rite ?= { rite_has_parameter = adultery_male_accepted } } } } @@ -2884,8 +2959,8 @@ demand_divorce_marriage_polygamous_trigger = { this = $SPOUSE$ } } - $SPOUSE$.culture = { NOT = { has_cultural_tradition = tradition_polygamous } } - $SPOUSE$.rite = { NOT = { rite_has_doctrine = doctrine_polygamy } } + $SPOUSE$.culture ?= { NOT = { has_cultural_tradition = tradition_polygamous } } + $SPOUSE$.rite ?= { NOT = { rite_has_doctrine = doctrine_polygamy } } } demand_divorce_marriage_offensive_trigger = { @@ -2926,7 +3001,7 @@ rite_growth_in_founder_spread_area_trigger = { OR = { AND = { is_landed = yes - faith = { has_doctrine_parameter = has_clerical_regions } + faith ?= { has_doctrine_parameter = has_clerical_regions } exists = capital_county.clerical_region_title scope:founder.capital_county.clerical_region_title ?= capital_county.clerical_region_title } @@ -3026,13 +3101,13 @@ rite_growth_founder_is_well_versed_trigger = { rite_growth_tenet_is_unique_to_new_rite_trigger = { save_temporary_scope_as = candidate_tenet - scope:source_rite = { NOT = { rite_has_tenet = scope:candidate_tenet } } + scope:source_rite ?= { NOT = { rite_has_tenet = scope:candidate_tenet } } } rite_growth_doctrine_is_unique_to_new_rite_trigger = { save_temporary_scope_as = candidate_doctrine - scope:new_rite = { rite_has_doctrine = scope:candidate_doctrine } - scope:source_rite = { NOT = { rite_has_doctrine = scope:candidate_doctrine } } + scope:new_rite ?= { rite_has_doctrine = scope:candidate_doctrine } + scope:source_rite ?= { NOT = { rite_has_doctrine = scope:candidate_doctrine } } } rite_growth_founder_is_meaningful_relation_trigger = { @@ -3060,7 +3135,7 @@ can_edit_rite_trigger = { is_at_war = no custom_tooltip = { text = ecumenical_council_already_ongoing_tt - NOT = { faith = { has_variable = ecumenical_council_ongoing } } + NOT = { faith ?= { has_variable = ecumenical_council_ongoing } } } trigger_if = { limit = { @@ -3076,7 +3151,7 @@ can_edit_rite_trigger = { trigger_if = { limit = { - rite = { + rite ?= { rite_has_doctrine = doctrine_theocracy_temporal } is_clergy = no @@ -3107,7 +3182,7 @@ can_edit_rite_trigger = { trigger_if = { limit = { - faith = { has_doctrine_parameter = unreformed } + faith ?= { has_doctrine_parameter = unreformed } } NOT = { @@ -3139,7 +3214,7 @@ can_edit_rite_trigger = { } custom_tooltip = { text = empire_faith_gate_reformation_holy_site - faith = { + faith ?= { any_holy_site_barony = { count >= 3 county.holder = { @@ -3151,7 +3226,7 @@ can_edit_rite_trigger = { } # Vanilla: 3 holy sites trigger_else = { - faith = { + faith ?= { num_realm_holy_sites_faithful_holders = { CHARACTER = root COUNT = 3 @@ -3162,7 +3237,7 @@ can_edit_rite_trigger = { custom_tooltip = { text = faith_reformation_via_decision - faith = { + faith ?= { NOT = { has_variable = block_reformation_var } } } @@ -3189,7 +3264,7 @@ can_create_rite_trigger = { trigger_if = { limit = { - rite = { + rite ?= { rite_has_doctrine = doctrine_theocracy_temporal } is_clergy = no @@ -3220,7 +3295,7 @@ can_create_rite_trigger = { trigger_if = { limit = { - faith = { has_doctrine_parameter = unreformed } + faith ?= { has_doctrine_parameter = unreformed } } NOT = { @@ -3252,7 +3327,7 @@ can_create_rite_trigger = { } custom_tooltip = { text = empire_faith_gate_reformation_holy_site - faith = { + faith ?= { any_holy_site_barony = { count >= 3 county.holder = { @@ -3264,7 +3339,7 @@ can_create_rite_trigger = { } # Vanilla: 3 holy sites trigger_else = { - faith = { + faith ?= { num_realm_holy_sites_faithful_holders = { CHARACTER = root COUNT = 3 @@ -3275,7 +3350,7 @@ can_create_rite_trigger = { custom_tooltip = { text = faith_reformation_via_decision - faith = { + faith ?= { NOT = { has_variable = block_reformation_var } } } @@ -3289,7 +3364,7 @@ spiritual_hof_or_realm_priest_superior_recipient_trigger = { NOR = { AND = { religious_head_or_challenger ?= scope:recipient - faith = { + faith ?= { has_doctrine = doctrine_spiritual_head } } @@ -3315,7 +3390,7 @@ spiritual_hof_or_realm_priest_superior_recipient_trigger = { OR = { AND = { religious_head_or_challenger = scope:recipient - faith = { + faith ?= { has_doctrine = doctrine_spiritual_head } } @@ -3357,7 +3432,7 @@ hof_or_realm_priest_superior_recipient_trigger = { custom_tooltip = { text = superior_or_hof_tt OR = { - faith = { + faith ?= { religious_head ?= scope:recipient } cp:councillor_court_chaplain ?= { @@ -3523,7 +3598,7 @@ hof_or_realm_priest_superior_actor_trigger = { custom_tooltip = { text = superior_or_hof_tt OR = { - faith = { + faith ?= { religious_head ?= scope:recipient } cp:councillor_court_chaplain ?= { @@ -3577,19 +3652,19 @@ faith_is_syncretic_with = { prev = { has_doctrine_parameter = unreformed_syncretic_actor } } trigger_else_if = { - limit = { faith = { religion_tag = eastern_orthodox_religion } } + limit = { faith ?= { religion_tag = eastern_orthodox_religion } } prev = { has_doctrine_parameter = christian_syncretic_actor } } trigger_else_if = { - limit = { faith = { religion_tag = catholic_religion } } + limit = { faith ?= { religion_tag = catholic_religion } } prev = { has_doctrine_parameter = christian_syncretic_actor } } trigger_else_if = { - limit = { faith = { religion_tag = protestant_religion } } + limit = { faith ?= { religion_tag = protestant_religion } } prev = { has_doctrine_parameter = christian_syncretic_actor } } trigger_else_if = { - limit = { faith = { religion_tag = oriental_orthodox_religion } } + limit = { faith ?= { religion_tag = oriental_orthodox_religion } } prev = { has_doctrine_parameter = christian_syncretic_actor } } trigger_else_if = { @@ -3621,35 +3696,35 @@ rite_is_syncretic_with = { prev = { rite_has_parameter = unreformed_syncretic_actor } } trigger_else_if = { - limit = { faith = { religion_tag = eastern_orthodox_religion } } + limit = { faith ?= { religion_tag = eastern_orthodox_religion } } prev = { rite_has_parameter = christian_syncretic_actor } } trigger_else_if = { - limit = { faith = { religion_tag = catholic_religion } } + limit = { faith ?= { religion_tag = catholic_religion } } prev = { rite_has_parameter = christian_syncretic_actor } } trigger_else_if = { - limit = { faith = { religion_tag = protestant_religion } } + limit = { faith ?= { religion_tag = protestant_religion } } prev = { rite_has_parameter = christian_syncretic_actor } } trigger_else_if = { - limit = { faith = { religion_tag = oriental_orthodox_religion } } + limit = { faith ?= { religion_tag = oriental_orthodox_religion } } prev = { rite_has_parameter = christian_syncretic_actor } } trigger_else_if = { - limit = { faith = { religion_tag = islam_religion } } + limit = { faith ?= { religion_tag = islam_religion } } prev = { rite_has_parameter = islamic_syncretic_actor } } trigger_else_if = { - limit = { faith = { religion_tag = judaism_religion } } + limit = { faith ?= { religion_tag = judaism_religion } } prev = { rite_has_parameter = jewish_syncretic_actor } } trigger_else_if = { - limit = { faith = { is_in_family = rf_eastern } } + limit = { faith ?= { is_in_family = rf_eastern } } prev = { rite_has_parameter = eastern_syncretic_actor } } trigger_else_if = { - limit = { faith = { is_in_family = rf_sinitic } } + limit = { faith ?= { is_in_family = rf_sinitic } } prev = { rite_has_parameter = sinitic_syncretic_actor } } trigger_else = { diff --git a/common/scripted_triggers/00_war_and_peace_triggers.txt b/common/scripted_triggers/00_war_and_peace_triggers.txt index e6ecfc0ef..c1eaa9a59 100644 --- a/common/scripted_triggers/00_war_and_peace_triggers.txt +++ b/common/scripted_triggers/00_war_and_peace_triggers.txt @@ -276,7 +276,7 @@ allows_declaring_war_against_target_trigger = { is_in_activity = no trigger_if = { limit = { - culture = { has_cultural_parameter = cannot_attack_allies } + culture ?= { has_cultural_parameter = cannot_attack_allies } } NOT = { is_allied_to = scope:defender_check @@ -284,7 +284,7 @@ allows_declaring_war_against_target_trigger = { } trigger_if = { limit = { - culture = { has_cultural_parameter = cannot_attack_truces } + culture ?= { has_cultural_parameter = cannot_attack_truces } } NOT = { has_truce = scope:defender_check @@ -487,8 +487,16 @@ can_use_conquest_cbs_trigger = { government_has_flag = government_is_clan government_has_flag = government_is_nomadic government_has_flag = government_is_steppe_admin - rite = { rite_has_parameter = conquest_cb_enabled } - culture = { has_cultural_parameter = can_use_conquest_cbs } + trigger_if = { + limit = { exists = rite } + rite ?= { rite_has_parameter = conquest_cb_enabled } + } + trigger_else = { always = no } + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_parameter = can_use_conquest_cbs } + } + trigger_else = { always = no } AND = { government_has_flag = government_is_japan_feudal has_realm_law = imperial_expansion_law @@ -506,7 +514,13 @@ can_be_warrior_trigger = { OR = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = $ARMY_OWNER$ } AND = { - $ARMY_OWNER$.culture = { has_cultural_parameter = high_prowess_ignores_knight_restrictions } + $ARMY_OWNER$ = { + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_parameter = high_prowess_ignores_knight_restrictions } + } + trigger_else = { always = no } + } prowess >= 10 } # Japan Onna-musha @@ -517,9 +531,17 @@ can_be_warrior_trigger = { NOT = { government_has_mechanic = administrative } - culture = { has_cultural_parameter = non_admin_close_family_non_martial_gender_knights_in_defensive_wars } + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_parameter = non_admin_close_family_non_martial_gender_knights_in_defensive_wars } + } + trigger_else = { always = no } } - culture = { has_cultural_parameter = non_admin_close_family_non_martial_gender_knights_in_defensive_wars } + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_parameter = non_admin_close_family_non_martial_gender_knights_in_defensive_wars } + } + trigger_else = { always = no } } AND = { $ARMY_OWNER$ = { is_at_war_as_defender = yes } @@ -558,8 +580,12 @@ can_be_knight_trigger = { } trigger_if = { limit = { - $ARMY_OWNER$.culture = { - has_cultural_parameter = minimum_prowess_for_knights + exists = $ARMY_OWNER$.culture + trigger_if = { + limit = { exists = $ARMY_OWNER$.culture } + $ARMY_OWNER$.culture ?= { + has_cultural_parameter = minimum_prowess_for_knights + } } } prowess >= 12 @@ -569,17 +595,21 @@ can_be_knight_trigger = { is_clergy = yes } OR = { - rite = { rite_has_parameter = clergy_can_fight } + rite ?= { rite_has_parameter = clergy_can_fight } AND = { has_personal_tenet_flag = clergy_can_fight_personal NOT = { - rite = { rite_has_parameter = pacifist } + rite ?= { rite_has_parameter = pacifist } } } - culture = { has_cultural_parameter = culture_clergy_can_fight } + culture ?= { has_cultural_parameter = culture_clergy_can_fight } AND = { - $ARMY_OWNER$.culture = { - has_cultural_parameter = high_prowess_ignores_knight_restrictions + exists = $ARMY_OWNER$.culture + trigger_if = { + limit = { exists = $ARMY_OWNER$.culture } + $ARMY_OWNER$.culture ?= { + has_cultural_parameter = high_prowess_ignores_knight_restrictions + } } prowess >= 10 } @@ -587,8 +617,12 @@ can_be_knight_trigger = { } OR = { AND = { - $ARMY_OWNER$.culture = { - has_cultural_parameter = high_prowess_ignores_knight_restrictions + exists = $ARMY_OWNER$.culture + trigger_if = { + limit = { exists = $ARMY_OWNER$.culture } + $ARMY_OWNER$.culture ?= { + has_cultural_parameter = high_prowess_ignores_knight_restrictions + } } prowess >= 10 } @@ -953,14 +987,14 @@ religious_cb_holder_under_target_can_be_vassalized = { OR = { # For all Faiths, if the attacker views this vassal's faith more favorably than the defender does, they are 'liberated' and become vassals under the attacker. # For example, if Catholics are crusading against Ash'aris(viewed as Evil), any Messalian vassals (viewed as Hostile) will become vassals under the Catholic attacker. - scope:attacker.faith = { + scope:attacker.faith ?= { faith_hostility_level_comparison = { prev.holder.faith < scope:defender.faith } } # Pluralist faiths always attempt to preserve vassals if possible, even if the vassal follows an Evil faith. - scope:attacker.rite = { rite_has_parameter = pluralism_pluralistic_holy_wars_preserve_vassals } + scope:attacker.rite ?= { rite_has_parameter = pluralism_pluralistic_holy_wars_preserve_vassals } } } @@ -1009,8 +1043,16 @@ can_use_viking_invasion_cbs_trigger = { } can_use_viking_invasion_cbs_dlc_trigger = { - culture = { has_innovation = innovation_longboats } - rite = { rite_has_tenet = tenet_warmonger } + trigger_if = { + limit = { exists = culture } + culture ?= { has_innovation = innovation_longboats } + } + trigger_else = { always = no } + trigger_if = { + limit = { exists = rite } + rite ?= { rite_has_tenet = tenet_warmonger } + } + trigger_else = { always = no } any_sub_realm_county = { is_coastal_county = yes } trigger_if = { limit = { is_ai = yes } @@ -1022,7 +1064,11 @@ can_use_viking_invasion_cbs_dlc_trigger = { NOT = { any_liege_or_above = { NOT = { - rite = { rite_has_tenet = tenet_warmonger } + trigger_if = { + limit = { exists = rite } + rite ?= { rite_has_tenet = tenet_warmonger } + } + trigger_else = { always = no } } } } diff --git a/common/scripted_triggers/pam_antipope_triggers.txt b/common/scripted_triggers/pam_antipope_triggers.txt new file mode 100644 index 000000000..be8dcc55f --- /dev/null +++ b/common/scripted_triggers/pam_antipope_triggers.txt @@ -0,0 +1,278 @@ +# Any theocratic vassal of $LIEGE$'s faith, no matter the rite +pam_valid_antipope_clergy_vassal_trigger = { + save_temporary_scope_as = antipope_temp + is_clergy = yes + custom_tooltip = { + text = pam_antipope_clerical_gender_tt + $LIEGE$.rite = { rite_has_allowed_gender_for_clergy = scope:antipope_temp } + } + faith = $LIEGE$.faith + NOT = { any_held_title = { is_head_of_faith = yes } } + pam_is_antipope_trigger = no +} + +# Holds one of their faith's antipope titles +pam_is_antipope_trigger = { + save_temporary_scope_as = pam_antipope_holder_check + faith ?= { + any_religious_head_challenger = { + holder ?= scope:pam_antipope_holder_check + } + } +} + +pam_title_is_antipope_office_trigger = { + has_variable = pam_antipope_office +} + +# Holds the sponsor title behind one of their faith's antipopes. A self-declared antipope sponsors themselves +pam_is_antipope_sponsor_trigger = { + save_temporary_scope_as = pam_antipope_sponsor_check + faith = { + any_religious_head_challenger = { + challenger_sponsor ?= { + holder ?= scope:pam_antipope_sponsor_check + } + } + } +} + +pam_sponsors_other_antipope_trigger = { + save_temporary_scope_as = pam_other_antipope_sponsor_check + faith = { + any_religious_head_challenger = { + NOT = { holder ?= scope:pam_other_antipope_sponsor_check } + challenger_sponsor ?= { + holder ?= scope:pam_other_antipope_sponsor_check + } + } + } +} + +# Scoped to an antipope: $SPONSOR$ is the ruler whose title backs them +pam_antipope_is_sponsored_by_trigger = { + save_temporary_scope_as = pam_checked_antipope + $SPONSOR$ = { save_temporary_scope_as = pam_expected_sponsor } + faith = { + any_religious_head_challenger = { + holder ?= scope:pam_checked_antipope + challenger_sponsor ?= { + holder ?= scope:pam_expected_sponsor + } + } + } +} + +pam_is_sponsored_antipope_trigger = { + pam_is_antipope_trigger = yes + pam_is_antipope_sponsor_trigger = no +} + +pam_antipope_declaration_discounted_trigger = { + situation:the_christian_church ?= { + has_situation_top_phase_parameter = the_christian_church_cheaper_antipope_declaration + } +} + +# Covers the antipope, their sponsor, and anyone under either of them +pam_antipope_protected_from_excommunication_trigger = { + is_following_religious_head_challenger = yes + faith.religious_head ?= $EXCOMMUNICATOR$ + NOT = { has_personal_tenet_flag = tenet_apostolic_succession_antipope_opposition } +} + +# Clerical requests that the mainline hierarchy would answer +# Anyone under an antipope has to take them to that antipope instead +pam_antipope_clerical_request_trigger = { + trigger_if = { + limit = { pam_is_antipope_trigger = yes } + custom_tooltip = { + text = pam_clerical_request_actor_is_antipope_tt + religious_head_or_challenger ?= $RECIPIENT$ + } + } + trigger_else_if = { + limit = { pam_is_antipope_sponsor_trigger = yes } + custom_tooltip = { + text = pam_clerical_request_actor_is_antipope_sponsor_tt + religious_head_or_challenger ?= $RECIPIENT$ + } + } + trigger_else_if = { + limit = { is_following_religious_head_challenger = yes } + custom_tooltip = { + text = pam_clerical_request_in_antipope_realm_tt + religious_head_or_challenger ?= $RECIPIENT$ + } + } + trigger_else = { + always = yes + } +} + +pam_antipope_may_grant_clerical_region_trigger = { + trigger_if = { + limit = { scope:actor = { pam_is_antipope_trigger = yes } } + trigger_if = { + limit = { exists = $SEE$.holder } + $SEE$.holder.religious_head_or_challenger ?= scope:actor + } + trigger_else = { + $SEE$.title_capital_county.holder.religious_head_or_challenger ?= scope:actor + } + } + trigger_else = { + always = yes + } +} + +# Antipope + Sponsor +pam_can_use_challenge_hof_cb_trigger = { + OR = { + pam_is_antipope_trigger = yes + pam_is_antipope_sponsor_trigger = yes + } + faith = { + exists = religious_head + NOT = { religious_head = scope:attacker } + } +} + +pam_challenge_hof_join_war_trigger = { + is_ai = yes + highest_held_title_tier >= tier_county + NOR = { + is_participant_in_war = scope:war + # Don't add vassals of targets + is_vassal_or_below_of = scope:defender + is_vassal_or_below_of = scope:attacker + # Not part of an attacker's realm + any_liege_or_above = { is_participant_in_war = scope:war } + } + OR = { + # Military Holy Orders always join + government_has_flag = government_is_military_holy_order + AND = { + # Landed rulers join if zealous independents or theocrats, prevent every cardinal and monastic abbot joining + is_landed = yes + OR = { + AND = { + is_independent_ruler = yes + # Attackers always join if rite is different, to reward spreading rite + trigger_if = { + limit = { + scope:defender.rite != scope:attacker.rite + rite = scope:attacker.rite + } + always = yes + } + # Otherwise attackers/defenders join only if zealous + trigger_else = { + ai_zeal >= very_high_positive_ai_value + } + } + government_has_flag = government_is_theocracy + } + } + } +} + +# Against the Antipope sponsor (which can be the antipope themselves if self-declared) +pam_can_target_antiking_cb_trigger = { + scope:defender = { + pam_is_antipope_sponsor_trigger = yes + faith = scope:attacker.faith + top_liege = this + } + scope:attacker = { + is_landed = yes + faith = scope:defender.faith + NOT = { this = scope:defender } + NOR = { + pam_is_antipope_sponsor_trigger = yes + pam_is_antipope_trigger = yes + } + } +} + +antipope_requirements_trigger = { + calc_true_if = { + amount >= $AMOUNT$ + has_trait = herald + trigger_if = { + limit = { religion = religion:islam_religion } + # Sayyids get a free pass. + has_trait = sayyid + } + trigger_else_if = { + limit = { religion = religion:zoroastrianism_religion } + OR = { + has_trait = saoshyant + has_trait = saoshyant_descendant + } + } + # to prevent "false" visible, but you should not get this as a potential antipope since this can only be granted to a HoF + trigger_else = { + has_trait = savior + } + has_trait_xp = { + trait = lifestyle_scholar + value >= 100 + } + custom_description = { + text = is_head_of_rite_tt + subject = root + rite.head_of_rite ?= this + } + # has_relation_rival has no first-person trigger localization, so describe it explicitly + custom_description = { + text = declare_yourself_antipope_decision_hof_rival_tt + has_relation_rival = faith.religious_head + } + custom_description = { + text = appoint_a_righteous_caliph_decision.caliph_not_in_diplo_range + NOT = { in_diplomatic_range = faith.religious_head } + } + # Having a holy site. + custom_description = { + text = appoint_a_righteous_caliph_decision.control_one_holy_site + faith = { + any_holy_site_barony = { + count >= 1 + holder ?= { target_is_same_character_or_above = root } + } + } + } + # Having *2* holy sites. + custom_description = { + text = appoint_a_righteous_caliph_decision.control_two_holy_sites + faith = { + any_holy_site_barony = { + count >= 2 + holder ?= { target_is_same_character_or_above = root } + } + } + } + # Having a higher-than-minimum piety level. + piety_level >= very_high_piety_level + custom_description = { + text = declare_yourself_antipope_decision_hof_piety_level_tt + piety_level > faith.religious_head.piety_level + } + # And just having a caliph who doesn't live up to the root's faith's ideals. + custom_description = { + text = appoint_a_righteous_caliph_decision.caliph_has_x_or_more_traits_sinful_to_your_faith + faith.religious_head = { + num_sinful_traits = { + value >= 2 + target = root.rite + } + } + } + # Has planned to schism off for a *while*. + custom_description = { + text = appoint_a_righteous_caliph_decision.has_wishes_to_schism_caliphate_flag + has_character_flag = wishes_to_schism_caliphate_flag + } + } +} diff --git a/common/tax_slots/obligations/clan_tax_collector.txt b/common/tax_slots/obligations/clan_tax_collector.txt new file mode 100644 index 000000000..1d4c16899 --- /dev/null +++ b/common/tax_slots/obligations/clan_tax_collector.txt @@ -0,0 +1,289 @@ +default_tax_collector = { + tax_factor = 0.2 + levies_factor = 0.2 + ai_will_do = { + value = default_tax_obligation_ai_will_do + + # Always take at least one default tax collector slot + if = { + limit = { scope:num_slots_with_obligation = 0 } + add = 100 + } + if = { + limit = { scope:liege.culture ?= { has_cultural_parameter = unlock_tax_obligation_deqhan } } + add = -1000 + } + } +} + +strict_taxation_tax_collector = { + tax_factor = 0.4 + levies_factor = 0.2 + + liege_modifier = { + domain_tax_mult = 0.01 + } + + subject_modifier = { + opinion_of_liege = -30 + monthly_piety_gain_mult = 0.1 + } + + ai_will_do = { + value = tax_obligation_base_ai_will_do + if = { + limit = { + scope:liege = { + ai_greed >= 75 # The AI has to be very greedy + ai_compassion <= 0 # And not kind enough to have qualms about it + } + } + add = 2 + } + if = { + limit = { scope:liege.culture ?= { has_cultural_parameter = unlock_tax_obligation_deqhan } } + add = -1 + } + } +} + +jizya_special_rights_tax_collector = { + is_valid = { + scope:liege.faith = { + has_doctrine_parameter = unlock_jizya_contract + } + } + + is_vassal_valid = { + custom_description = { + text = vassal_has_the_wrong_religion + subject = scope:vassal + scope:vassal.religion != scope:liege.religion + } + } + + tax_factor = 1 + levies_factor = -0.75 + + subject_modifier = { + monthly_prestige = -0.2 + } + + flag = vassal_contract_cannot_revoke_titles + flag = religiously_protected + + ai_will_do = { + value = tax_obligation_base_ai_will_do + if = { + limit = { + scope:num_slots_with_obligation = 0 # And only if we don't have Jizya already + + scope:liege = { + OR = { + # The AI has at least this many vassals to warrant Jizya being used + any_vassal = { + count >= tax_obligation_half_of_slot + government_has_flag = government_is_clan + religion != scope:liege.religion + } + + # Or a large enough portion of their vassals are of another religion + any_vassal = { + percent >= 0.25 + government_has_flag = government_is_clan + religion != scope:liege.religion + } + } + } + } + add = 5 + } + } +} + +iqta_special_rights_tax_collector = { + levies_factor = 0.1 + + liege_modifier = { + #men_at_arms_maintenance = -0.01 + #men_at_arms_recruitment_cost = -0.01 + maa_damage_mult = 0.01 + } + + subject_modifier = { + men_at_arms_maintenance = -0.1 + men_at_arms_recruitment_cost = -0.1 + opinion_of_liege = 15 + } + + ai_will_do = { + value = tax_obligation_base_ai_will_do + + scope:liege = { + if = { + limit = { + AND = { + ai_greed <= 0 # The AI shouldn't be greedy, since they won't care in that case + ai_compassion >= 0 # The AI has to the somewhat compassionate to consider being nice to their vassals + } + } + if = { + limit = { # Increase the score a lot if there are several vassal who REALLY doesn't like their liege + any_vassal = { + count >= tax_obligation_half_of_slot + opinion = { + target = scope:liege + value <= -80 + } + } + } + add = 4 + } + else_if = { + limit = { # Increase it only slightly if the vassals only somewhat dislike their liege + any_vassal = { + count >= tax_obligation_half_of_slot + opinion = { + target = scope:liege + value <= -40 + } + } + } + add = 2 + } + } + } + } +} + +ghazi_special_rights_tax_collector = { + tax_factor = 0.1 + + is_vassal_valid = { + custom_description = { + text = vassal_has_the_wrong_faith + subject = scope:vassal + scope:vassal.faith = scope:liege.faith + } + } + + liege_modifier = { + monthly_piety_gain_mult = 0.02 + zealot_opinion = 1 + } + + subject_modifier = { + monthly_piety = 0.5 + monthly_war_income_mult = 0.1 + monthly_county_control_growth_add = 0.25 + army_siege_value_mult = 0.15 + raid_speed = 0.15 + ai_war_cooldown = -0.5 + ai_war_chance = 1 + ai_zeal = 50 + ai_energy = 25 + } + + flag = vassal_contract_cheaper_religious_war + flag = vassal_contract_increase_prestige_cb_cost + flag = vassal_contract_allow_raiding + + ai_will_do = { + value = tax_obligation_base_ai_will_do + + if = { + limit = { + scope:liege = { + ai_has_warlike_personality = yes # AI should like wars to use Ghazi + ai_zeal >= 0 + any_vassal = { + count >= { + value = scope:num_vassal_slots + divide = 100 + multiply = 90 + } + faith = scope:liege.faith + } + } + } + add = 2 + } + } +} + +### FP3 Tax Decrees +deqhan_special_rights_tax_collector = { + is_shown = { + has_fp3_dlc_trigger = yes + } + is_valid = { + scope:liege.culture = { has_cultural_parameter = unlock_tax_obligation_deqhan } + } + tax_factor = 0.35 + levies_factor = 0.35 + + liege_modifier = { + legitimacy_gain_mult = 0.01 + } + + subject_modifier = { + monthly_prestige_gain_mult = 0.2 + } + + ai_will_do = { + value = tax_obligation_base_ai_will_do + add = 3 + } +} + +maguh_special_rights_tax_collector = { + is_shown = { + has_fp3_dlc_trigger = yes + } + + is_valid = { + scope:liege = { + dynasty ?= { + has_dynasty_perk = fp3_khvarenah_legacy_4 + } + } + } + + liege_modifier = { + development_growth_factor = 0.01 + } + + subject_modifier = { + character_capital_county_monthly_development_growth_add = 0.1 + holding_build_gold_cost = -0.1 + build_gold_cost = -0.1 + opinion_of_liege = 15 + } + + ai_will_do = { + value = tax_obligation_base_ai_will_do + add = 1 + } +} + +muqata_special_rights_tax_collector = { + is_shown = { + has_fp3_dlc_trigger = yes + } + + liege_modifier = { + monthly_prestige = 0.1 + } + + subject_modifier = { + development_growth_factor = 0.1 + county_opinion_add = 10 + opinion_of_liege = 30 + epidemic_resistance = 10 + travel_danger = -5 + } + + ai_will_do = { + value = tax_obligation_base_ai_will_do + } +} diff --git a/common/tax_slots/types/00_tax_slot_types.txt b/common/tax_slots/types/00_tax_slot_types.txt new file mode 100644 index 000000000..294058231 --- /dev/null +++ b/common/tax_slots/types/00_tax_slot_types.txt @@ -0,0 +1,86 @@ +# Tax Slot Types + +clan_tax_slot = { + default_obligation = default_tax_collector + + obligations = { + strict_taxation_tax_collector + iqta_special_rights_tax_collector + ghazi_special_rights_tax_collector + muqata_special_rights_tax_collector + jizya_special_rights_tax_collector + deqhan_special_rights_tax_collector + maguh_special_rights_tax_collector + } + + tax_slot_vassal_limit = { + add = { + value = 12 + desc = tax_slot_vassal_level_base_desc + } + } + + is_valid_tax_collector = { + liege ?= scope:liege + scope:liege != this + is_imprisoned = no + is_adult = yes + is_incapable = no + NOT = { has_character_modifier = fp3_incapable_tax_collector_modifier } + + # Gender has to be allowed to be granted titles to be eligible + trigger_if = { + limit = { + scope:liege.rite ?= { + rite_has_doctrine = doctrine_gender_male_dominated + } + } + is_male = yes + } + trigger_if = { + limit = { + scope:liege.rite ?= { + rite_has_doctrine = doctrine_gender_female_dominated + } + } + is_female = yes + } + } + + aptitude_level_breakpoints = { 20 45 75 110 } + + tax_collector_aptitude = tax_collector_aptitude_score + + on_tax_collector_hired = { + scope:tax_collector = { + add_character_flag = is_tax_collector + if = { + limit = { + has_opinion_modifier = { + target = scope:liege + modifier = fired_from_tax_collector_position_opinion + } + } + remove_opinion = { + target = scope:liege + modifier = fired_from_tax_collector_position_opinion + } + } + } + } + + on_tax_collector_fired = { + scope:tax_collector = { + remove_character_flag = is_tax_collector + if = { + limit = { + this != scope:liege + } + add_opinion = { + target = scope:liege + modifier = fired_from_tax_collector_position_opinion + } + } + } + } +} \ No newline at end of file diff --git a/common/vassal_stances/00_vassal_stances.txt b/common/vassal_stances/00_vassal_stances.txt index c6ffaa270..2c25d4343 100644 --- a/common/vassal_stances/00_vassal_stances.txt +++ b/common/vassal_stances/00_vassal_stances.txt @@ -33,7 +33,7 @@ } if = { limit = { - culture = { has_cultural_pillar = ethos_courtly } + culture ?= { has_cultural_pillar = ethos_courtly } } add = 50 } @@ -59,7 +59,7 @@ } if = { limit = { - culture = { + culture ?= { has_innovation = innovation_royal_prerogative } } @@ -67,7 +67,7 @@ } if = { limit = { - culture = { + culture ?= { has_innovation = innovation_heraldry } } @@ -75,7 +75,7 @@ } if = { limit = { - culture = { + culture ?= { has_innovation = innovation_court_officials } } @@ -215,24 +215,30 @@ glory_hound = { } if = { limit = { - culture = { - has_innovation = innovation_baliffs + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_innovation = innovation_baliffs } } } multiply = 1.2 } if = { limit = { - culture = { - has_innovation = innovation_knighthood + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_innovation = innovation_knighthood } } } multiply = 1.2 } if = { limit = { - culture = { - has_innovation = innovation_rightful_ownership + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_innovation = innovation_rightful_ownership } } } multiply = 1.2 @@ -274,7 +280,7 @@ glory_hound = { } if = { limit = { - culture = { has_cultural_pillar = ethos_bellicose } + culture ?= { has_cultural_pillar = ethos_bellicose } } add = 25 } @@ -354,7 +360,11 @@ parochial = { } if = { limit = { - culture = { has_cultural_pillar = ethos_communal } + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_pillar = ethos_communal } + } } add = 25 } @@ -366,7 +376,11 @@ parochial = { } if = { limit = { - culture = { has_cultural_tradition = tradition_isolationist } + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_tradition = tradition_isolationist } + } } add = 50 } @@ -386,40 +400,50 @@ parochial = { } if = { limit = { - culture = { - has_innovation = innovation_manorialism + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_innovation = innovation_manorialism } } } multiply = 1.2 } if = { limit = { - culture = { - has_innovation = innovation_land_grants + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_innovation = innovation_land_grants } } } multiply = 1.2 } if = { limit = { - culture = { - has_innovation = innovation_development_04 + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_innovation = innovation_development_04 } } } multiply = 1.2 } if = { limit = { - culture = { - has_innovation = innovation_double_entry_bookkeeping + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_innovation = innovation_double_entry_bookkeeping } } } multiply = 1.2 } if = { limit = { - culture = { - has_cultural_parameter = more_parochial_vassals + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_parameter = more_parochial_vassals } } } multiply = 1.2 @@ -580,13 +604,21 @@ zealot = { } if = { limit = { - culture = { has_cultural_tradition = tradition_zealous_people } + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_tradition = tradition_zealous_people } + } } add = 50 } if = { limit = { - culture = { has_cultural_pillar = ethos_spiritual } + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_pillar = ethos_spiritual } + } } add = 25 } @@ -599,38 +631,50 @@ zealot = { if = { limit = { num_sinful_traits <= 0 - rite = { rite_has_parameter = more_often_zealots } + exists = rite + trigger_if = { + limit = { exists = rite } + rite ?= { rite_has_parameter = more_often_zealots } + } } add = 150 } if = { limit = { - culture = { - has_innovation = innovation_chronicle_writing + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_innovation = innovation_chronicle_writing } } } multiply = 1.2 } if = { limit = { - culture = { - has_innovation = innovation_reconquista + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_innovation = innovation_reconquista } } } multiply = 1.2 } if = { limit = { - culture = { - has_innovation = innovation_divine_right + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_innovation = innovation_divine_right } } } multiply = 1.2 } if = { limit = { - culture = { - has_innovation = innovation_primogeniture + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_innovation = innovation_primogeniture } } } multiply = 1.2 @@ -646,7 +690,7 @@ zealot = { limit = { NOR = { faith = scope:liege.faith - faith = { + faith ?= { faith_hostility_level = { target = scope:liege.faith value = faith_fully_accepted_level @@ -696,7 +740,7 @@ zealot = { limit = { NOR = { faith = scope:liege.faith - faith = { + faith ?= { faith_hostility_level = { target = scope:liege.faith value > faith_astray_level @@ -756,7 +800,7 @@ zealot = { is_valid = { OR = { faith = scope:liege.faith - faith = { + faith ?= { faith_hostility_level = { target = scope:liege.faith value = faith_fully_accepted_level @@ -779,18 +823,18 @@ minority = { OR = { AND = { faith != scope:liege.faith - faith = { + faith ?= { faith_hostility_level = { target = scope:liege.faith value > faith_astray_level } } - NOT = { rite = { rite_is_syncretic_with = { RITE = scope:liege.rite } } } + NOT = { rite ?= { rite_is_syncretic_with = { RITE = scope:liege.rite } } } } AND = { culture != scope:liege.culture OR = { - culture = { + culture ?= { cultural_acceptance = { target = scope:liege.culture value < 30 } } # AND = { @@ -860,19 +904,31 @@ minority = { faith = scope:liege.faith } NOR = { - culture = { has_cultural_tradition = tradition_loyal_soldiers } - culture = { has_cultural_tradition = tradition_fp2_malleable_subjects } + AND = { + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_tradition = tradition_loyal_soldiers } + } + } + AND = { + exists = culture + trigger_if = { + limit = { exists = culture } + culture ?= { has_cultural_tradition = tradition_fp2_malleable_subjects } + } + } } OR = { AND = { faith != scope:liege.faith - faith = { + faith ?= { faith_hostility_level = { target = scope:liege.faith value > faith_astray_level } } - NOT = { rite = { rite_is_syncretic_with = { RITE = scope:liege.rite } } } + NOT = { rite ?= { rite_is_syncretic_with = { RITE = scope:liege.rite } } } } AND = { scope:liege = { @@ -880,7 +936,7 @@ minority = { } culture != scope:liege.culture OR = { - culture = { + culture ?= { cultural_acceptance = { target = scope:liege.culture value < 30 } } # AND = { @@ -922,7 +978,7 @@ barons_and_minor_landholders = { OR = { NOR = { faith = scope:liege.faith - faith = { + faith ?= { faith_hostility_level = { target = scope:liege.faith value >= faith_astray_level @@ -931,7 +987,7 @@ barons_and_minor_landholders = { } NOR = { culture = scope:liege.culture - culture = { + culture ?= { cultural_acceptance = { target = scope:liege.culture value >= 30 } } } @@ -1028,7 +1084,7 @@ belligerent = { } if = { limit = { - culture = { has_cultural_pillar = ethos_bellicose } + culture ?= { has_cultural_pillar = ethos_bellicose } } add = 50 } @@ -1060,7 +1116,7 @@ belligerent = { } if = { limit = { - culture = { + culture ?= { has_innovation = innovation_standing_armies } } @@ -1068,7 +1124,7 @@ belligerent = { } if = { limit = { - culture = { + culture ?= { has_innovation = innovation_all_things } } diff --git a/localization/english/replace/zz_NEOW_religion_opinions_l_english.yml b/localization/english/replace/zz_NEOW_religion_opinions_l_english.yml index 8186e5c36..0028ca572 100644 --- a/localization/english/replace/zz_NEOW_religion_opinions_l_english.yml +++ b/localization/english/replace/zz_NEOW_religion_opinions_l_english.yml @@ -9,7 +9,6 @@ europeanist_religion_opinion:0 "$europeanist_religion_adherent$ Opinion" finnic_religion_opinion:0 "$finnic_religion_adherent$ Opinion" folk_germanic_religion_opinion:0 "$folk_germanic_religion_adherent$ Opinion" - mediterranean_religion_opinion:0 "$mediterranean_religion_adherent$ Opinion" novelist_religion_opinion:0 "$novelist_religion_adherent$ Opinion" eastern_orthodox_religion_opinion:0 "$eastern_orthodox_religion_adherent$ Opinion" french_pantheon_religion_opinion:0 "$french_pantheon_religion_adherent$ Opinion"