diff --git a/N3OW/common/defines/00_defines.txt b/N3OW/common/defines/00_defines.txt index b3035fed..2b4ac6f5 100644 --- a/N3OW/common/defines/00_defines.txt +++ b/N3OW/common/defines/00_defines.txt @@ -598,8 +598,8 @@ NCombat = { BASE_TOUGHNESS_TO_PURSUIT = 0.05 # This many % of the toughness of the retreater's soft casualties will turn into pursuit (during the full pursuit, not per day). Essentially, this means if neither side has screen or pursuit, 5% of the soft casualties will become hard casualties. More if the pursuer has more pursuit than the defender has screen, and vice versa MINIMUM_PURSUIT_DAMAGE = 0.01 # High screen can't bring casualties below 1% in the pursuit phase DISEMBARK_PENALTY_DAYS = 30 # How long does an army have a penalty after disembarking? - KNIGHT_DAMAGE_PER_PROWESS = 50 # How much "Damage" stat does a knight get per prowess? - KNIGHT_TOUGHNESS_PER_PROWESS = 8 # How much "Toughness" stat does a knight get per prowess? + KNIGHT_DAMAGE_PER_PROWESS = 30 # How much "Damage" stat does a knight get per prowess? + KNIGHT_TOUGHNESS_PER_PROWESS = 6 # How much "Toughness" stat does a knight get per prowess? ### Brief: KNIGHT_AVERAGE_PROWESS_FOR_AI_POWER_CALCULATION ( int32 ) # How much prowess do we assume a knight to have for the purpose @@ -1083,8 +1083,8 @@ NPathFinding = { NCulture = { MINIMUM_INNOVATIONS_TO_NEXT_ERA = 8 # Raw number of innovations needed to be able to go to the next era. If an era has less innovations than this number, the lowest is used. ERA_PROGRESS_GAIN_BASE_MONTHLY = 0.1 # Base percentage gain every month for era spread - ERA_PROGRESS_GAIN_MONTHLY_PER_AVERAGE_DEVELOPMENT_LEVEL = 0.05 # How much extra per average development level - FIRST_ERA_START_YEAR = 476 # When did the first era start? + ERA_PROGRESS_GAIN_MONTHLY_PER_AVERAGE_DEVELOPMENT_LEVEL = 0.08 # How much extra per average development level + FIRST_ERA_START_YEAR = 2300 # When did the first era start? # Regional spread will start with the minimum number of regions from any of the next percentages INNOVATION_REGIONAL_PERCENTAGE = 0.1 # Minimum percentage of region for regional innovations to get regional spread @@ -1094,7 +1094,7 @@ NCulture = { # Chance (0..100) to advance with the innovation each month: # base + from spread + from fascination INNOVATION_PROGRESS_CHANCE_BASE = 5 - INNOVATION_PROGRESS_CHANCE_FROM_SPREAD = 40 # chance bonus to innovation if there is any spread by nearby cultures + INNOVATION_PROGRESS_CHANCE_FROM_SPREAD = 85 # chance bonus to innovation if there is any spread by nearby cultures INNOVATION_PROGRESS_CHANCE_SPREAD_AND_FASCINATION_MULTIPLIER = 2 # multiply Cultural Acceptance (100-based) by this as bonus multiplier if the current spread innovation is ALSO a fascination # from fascination = base + SKILL_LEVEL_BONUS( max( 0, head relevant skill - HEAD_SKILL_BASE ) ) # SKILL_LEVEL_BONUS( SKILL_MOD ) is computed as a sum of contributions that get smaller the higher the skill modifier. @@ -1103,19 +1103,19 @@ NCulture = { # Skill mod 37 -> 1 * 10 + 0.9 * 10 + 0.8 * 10 + 0.7 * 7 = 27.4 # trailing points after the highest section take the last multiplier of the PER_SKILL_SECTION array, which should have at minimum 2 entries # this skill level bonus will not exceed the SKILL_CAP, so a Skill 100 character will still get at most (for example) 30% progress chance from their skill. - INNOVATION_PROGRESS_CHANCE_FROM_FASCINATION_BASE = 10 # base progress chance bonus if fascination + INNOVATION_PROGRESS_CHANCE_FROM_FASCINATION_BASE = 5 # base progress chance bonus if fascination INNOVATION_PROGRESS_CHANCE_FROM_FASCINATION_HEAD_SKILL_BASE = 0 # skill level below which no bonus is given - INNOVATION_PROGRESS_CHANCE_FROM_FASCINATION_SKILL_LEVEL_SECTION_SIZE = 10 # size of each multiplier chunk. with 10, the first 10 bonus point will get the first multiplier and so on - INNOVATION_PROGRESS_CHANCE_FROM_FASCINATION_SKILL_CAP = 45 # how high can the skill bonus be at most (BASE included) + INNOVATION_PROGRESS_CHANCE_FROM_FASCINATION_SKILL_LEVEL_SECTION_SIZE = 0 # size of each multiplier chunk. with 10, the first 10 bonus point will get the first multiplier and so on + INNOVATION_PROGRESS_CHANCE_FROM_FASCINATION_SKILL_CAP = 0 # how high can the skill bonus be at most (BASE included) INNOVATION_PROGRESS_CHANCE_FROM_FASCINATION_PER_SKILL_SECTION = { 1 0.9 0.8 0.7 0.6 } - INNOVATION_PROGRESS_CHANCE_FROM_FASCINATION_NO_HEAD_SKILL = 10 # used as the skill value if there is no cultural head + INNOVATION_PROGRESS_CHANCE_FROM_FASCINATION_NO_HEAD_SKILL = 5 # used as the skill value if there is no cultural head INNOVATION_PROGRESS_GAIN_FROM_BONUS_FASCINATION = 1.5 # Additional progress rate if the innovation is current fascination AND was selected as bonus_fascination_innovation # If the random roll succeeds, the innovation will progress by: # base + from development + from eras ahead INNOVATION_PROGRESS_GAIN_BASE = 0.3 - INNOVATION_PROGRESS_GAIN_PER_AVERAGE_DEVELOPMENT_LEVEL = 0.02 + INNOVATION_PROGRESS_GAIN_PER_AVERAGE_DEVELOPMENT_LEVEL = 0.1 INNOVATION_PROGRESS_GAIN_PER_ERA_AHEAD = 0.2 INNOVATION_PROGRESS_DIVIDE_FACTOR_IF_ERA_BEHIND = 5 # the overall progress is divided by this number to achieve a way slower progress for future innovations. 10 would divide the total progress by 10, and this is further divided by the number of eras the culture is behind - so the progress may end up being divided by 30 at most. Set to 0 to disable this behavior. INNOVATION_PROGRESS_MIN_MULTIPLIER_IF_ERA_BEHIND = 0.01 # the division from the define above may not go lower than this. Ranges between 0 and 1. diff --git a/N3OW/common/domiciles/buildings/00_estate_buildings.txt b/N3OW/common/domiciles/buildings/00_estate_buildings.txt index d22376c7..1ee88e03 100644 --- a/N3OW/common/domiciles/buildings/00_estate_buildings.txt +++ b/N3OW/common/domiciles/buildings/00_estate_buildings.txt @@ -11,7 +11,7 @@ estate_main_01 = { slot_type = main internal_slots = 2 construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } cost = { gold = estate_external_building_high_cost_tier_2_value @@ -63,7 +63,7 @@ estate_main_02 = { slot_type = main internal_slots = 4 construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = estate_main_01 can_construct = { @@ -125,7 +125,7 @@ estate_main_03 = { slot_type = main internal_slots = 6 construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = estate_main_02 can_construct = { @@ -188,7 +188,7 @@ estate_main_04 = { slot_type = main internal_slots = 8 construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = estate_main_03 can_construct = { @@ -251,7 +251,7 @@ estate_main_05 = { slot_type = main internal_slots = 10 construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = estate_main_04 can_construct = { @@ -315,7 +315,7 @@ estate_main_05 = { ### Diplomacy Upgrade living_quarters_01 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = estate_main_01 @@ -352,7 +352,7 @@ living_quarters_01 = { } living_quarters_02 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = living_quarters_01 @@ -391,7 +391,7 @@ living_quarters_02 = { } living_quarters_03 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = living_quarters_02 @@ -433,7 +433,7 @@ living_quarters_03 = { } living_quarters_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = living_quarters_03 @@ -478,7 +478,7 @@ living_quarters_04 = { ### Martial Upgrade trophy_room_01 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = estate_main_01 @@ -510,7 +510,7 @@ trophy_room_01 = { } trophy_room_02 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = trophy_room_01 @@ -543,7 +543,7 @@ trophy_room_02 = { } trophy_room_03 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = trophy_room_02 @@ -584,7 +584,7 @@ trophy_room_03 = { } trophy_room_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = trophy_room_03 @@ -628,7 +628,7 @@ trophy_room_04 = { ### Stewardship Upgrade office_01 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = estate_main_01 @@ -665,7 +665,7 @@ office_01 = { } office_02 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = office_01 @@ -703,7 +703,7 @@ office_02 = { } office_03 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = office_02 @@ -746,7 +746,7 @@ office_03 = { } office_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = office_03 @@ -792,7 +792,7 @@ office_04 = { ### Intrigue Upgrade servants_quarters_01 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = estate_main_01 @@ -825,7 +825,7 @@ servants_quarters_01 = { } servants_quarters_02 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = servants_quarters_01 @@ -861,7 +861,7 @@ servants_quarters_02 = { } servants_quarters_03 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = servants_quarters_02 @@ -902,7 +902,7 @@ servants_quarters_03 = { } servants_quarters_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = servants_quarters_03 @@ -946,7 +946,7 @@ servants_quarters_04 = { ### Learning Upgrade library_01 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = estate_main_01 @@ -978,7 +978,7 @@ library_01 = { } library_02 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = library_01 @@ -1016,7 +1016,7 @@ library_02 = { # Observatory sub-branch library_observatory_03 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = library_02 @@ -1057,7 +1057,7 @@ library_observatory_03 = { } library_observatory_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = library_observatory_03 @@ -1100,7 +1100,7 @@ library_observatory_04 = { # Education sub-branch library_education_03 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = library_02 @@ -1141,7 +1141,7 @@ library_education_03 = { } library_education_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = library_education_03 @@ -1186,7 +1186,7 @@ library_education_04 = { ### Bath bath_01 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = estate_main_01 @@ -1223,7 +1223,7 @@ bath_01 = { } bath_02 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = bath_01 @@ -1261,7 +1261,7 @@ bath_02 = { } bath_03 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = bath_02 @@ -1303,7 +1303,7 @@ bath_03 = { } bath_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = bath_03 @@ -1347,7 +1347,7 @@ bath_04 = { ### Guest Room guest_room_01 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = estate_main_01 @@ -1388,7 +1388,7 @@ guest_room_01 = { } guest_room_02 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = guest_room_01 @@ -1432,7 +1432,7 @@ guest_room_02 = { } guest_room_03 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = guest_room_02 @@ -1481,7 +1481,7 @@ guest_room_03 = { } guest_room_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = guest_room_03 @@ -1529,7 +1529,7 @@ guest_room_04 = { } guest_room_05 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = guest_room_04 @@ -1578,7 +1578,7 @@ guest_room_05 = { } guest_room_06 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = guest_room_05 @@ -1628,7 +1628,7 @@ guest_room_06 = { ### Wine Cellar wine_cellar_01 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = estate_main_01 @@ -1670,7 +1670,7 @@ wine_cellar_01 = { } wine_cellar_02 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = wine_cellar_01 @@ -1712,7 +1712,7 @@ wine_cellar_02 = { } wine_cellar_03 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = wine_cellar_02 @@ -1756,7 +1756,7 @@ wine_cellar_03 = { ### Courtyard courtyard_01 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = estate_main_01 @@ -1792,7 +1792,7 @@ courtyard_01 = { } courtyard_02 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = courtyard_01 @@ -1829,7 +1829,7 @@ courtyard_02 = { } courtyard_03 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = courtyard_02 @@ -1870,7 +1870,7 @@ courtyard_03 = { } courtyard_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = courtyard_03 @@ -1913,7 +1913,7 @@ courtyard_04 = { ### Prison prison_01 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = estate_main_01 @@ -1958,7 +1958,7 @@ prison_01 = { } prison_02 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = prison_01 @@ -2007,7 +2007,7 @@ prison_02 = { } prison_03 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = prison_02 @@ -2061,7 +2061,7 @@ prison_03 = { } prison_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = prison_03 @@ -2117,7 +2117,7 @@ prison_04 = { ### Reception Hall reception_hall_01 = { construction_time = 1000 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = estate_main_01 @@ -2159,7 +2159,7 @@ reception_hall_01 = { reception_hall_02 = { construction_time = 1000 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = reception_hall_01 @@ -2202,7 +2202,7 @@ reception_hall_02 = { reception_hall_03 = { construction_time = 1000 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = reception_hall_02 @@ -2246,7 +2246,7 @@ reception_hall_03 = { reception_hall_04 = { construction_time = 1000 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = reception_hall_03 @@ -2290,7 +2290,7 @@ reception_hall_04 = { reception_hall_05 = { construction_time = 1000 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = reception_hall_04 @@ -2335,7 +2335,7 @@ reception_hall_05 = { ### Cabinet of Curiosities cabinet_of_curiosities_01 = { construction_time = 1000 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = estate_main_01 @@ -2379,7 +2379,7 @@ cabinet_of_curiosities_01 = { cabinet_of_curiosities_02 = { construction_time = 1000 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = cabinet_of_curiosities_01 @@ -2433,7 +2433,7 @@ cabinet_of_curiosities_02 = { cabinet_of_curiosities_03 = { construction_time = 1000 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = cabinet_of_curiosities_02 @@ -2490,7 +2490,7 @@ cabinet_of_curiosities_03 = { #Grand Solar grand_solar_01 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = estate_main_01 @@ -2531,7 +2531,7 @@ grand_solar_01 = { grand_solar_02 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = grand_solar_01 @@ -2572,7 +2572,7 @@ grand_solar_02 = { grand_solar_03 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = grand_solar_02 @@ -2615,7 +2615,7 @@ grand_solar_03 = { grand_solar_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } slot_type = internal previous_building = grand_solar_03 @@ -2666,7 +2666,7 @@ grand_solar_04 = { ### Temple Building temple_small_01 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } cost = { gold = { @@ -2761,7 +2761,7 @@ temple_small_01 = { } temple_small_02 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = temple_small_01 cost = { @@ -2857,7 +2857,7 @@ temple_small_02 = { } temple_small_03 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = temple_small_02 can_construct = { @@ -2959,7 +2959,7 @@ temple_small_03 = { # Crypt sub-branch temple_crypt_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = temple_small_03 can_construct = { @@ -3074,7 +3074,7 @@ temple_crypt_04 = { } temple_crypt_05 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = temple_crypt_04 can_construct = { @@ -3189,7 +3189,7 @@ temple_crypt_05 = { } temple_crypt_06 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = temple_crypt_05 can_construct = { @@ -3307,7 +3307,7 @@ temple_crypt_06 = { # Temple sub-branch temple_large_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = temple_small_03 can_construct = { @@ -3410,7 +3410,7 @@ temple_large_04 = { } temple_large_05 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = temple_large_04 can_construct = { @@ -3513,7 +3513,7 @@ temple_large_05 = { } temple_large_06 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = temple_large_05 can_construct = { @@ -3620,7 +3620,7 @@ temple_large_06 = { # Monastery sub-branch temple_monastery_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = temple_small_03 can_construct = { @@ -3726,7 +3726,7 @@ temple_monastery_04 = { } temple_monastery_05 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = temple_monastery_04 can_construct = { @@ -3832,7 +3832,7 @@ temple_monastery_05 = { } temple_monastery_06 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = temple_monastery_05 can_construct = { @@ -3940,7 +3940,7 @@ temple_monastery_06 = { ### Barracks barracks_01 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } cost = { gold = { @@ -4002,7 +4002,7 @@ barracks_01 = { } barracks_02 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = barracks_01 cost = { @@ -4069,7 +4069,7 @@ barracks_02 = { } barracks_03 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = barracks_02 can_construct = { @@ -4140,7 +4140,7 @@ barracks_03 = { } barracks_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = barracks_03 can_construct = { @@ -4211,7 +4211,7 @@ barracks_04 = { } barracks_05 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = barracks_04 can_construct = { @@ -4282,7 +4282,7 @@ barracks_05 = { } barracks_06 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = barracks_05 can_construct = { @@ -4355,7 +4355,7 @@ barracks_06 = { ### Watchtower watchtower_01 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } cost = { gold = { @@ -4415,7 +4415,7 @@ watchtower_01 = { } watchtower_02 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = watchtower_01 cost = { @@ -4478,7 +4478,7 @@ watchtower_02 = { } watchtower_03 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = watchtower_02 can_construct = { @@ -4545,7 +4545,7 @@ watchtower_03 = { } watchtower_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = watchtower_03 can_construct = { @@ -4613,7 +4613,7 @@ watchtower_04 = { } watchtower_05 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = watchtower_04 can_construct = { @@ -4681,7 +4681,7 @@ watchtower_05 = { } watchtower_06 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = watchtower_05 can_construct = { @@ -4752,7 +4752,7 @@ watchtower_06 = { ### Guardhouse guardhouse_01 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } cost = { gold = { @@ -4812,7 +4812,7 @@ guardhouse_01 = { } guardhouse_02 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = guardhouse_01 cost = { @@ -4874,7 +4874,7 @@ guardhouse_02 = { } guardhouse_03 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = guardhouse_02 can_construct = { @@ -4942,7 +4942,7 @@ guardhouse_03 = { } guardhouse_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = guardhouse_03 can_construct = { @@ -5012,7 +5012,7 @@ guardhouse_04 = { ### Garden garden_01 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } cost = { gold = { @@ -5111,7 +5111,7 @@ garden_01 = { } garden_02 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = garden_01 cost = { @@ -5211,7 +5211,7 @@ garden_02 = { } garden_03 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = garden_02 cost = { @@ -5313,7 +5313,7 @@ garden_03 = { # Leisure Garden sub-branch garden_leisure_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = garden_03 can_construct = { @@ -5419,7 +5419,7 @@ garden_leisure_04 = { } garden_leisure_05 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = garden_leisure_04 can_construct = { @@ -5525,7 +5525,7 @@ garden_leisure_05 = { } garden_leisure_06 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = garden_leisure_05 can_construct = { @@ -5633,7 +5633,7 @@ garden_leisure_06 = { # Fruit Garden sub-branch garden_fruit_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = garden_03 can_construct = { @@ -5738,7 +5738,7 @@ garden_fruit_04 = { } garden_fruit_05 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = garden_fruit_04 can_construct = { @@ -5843,7 +5843,7 @@ garden_fruit_05 = { } garden_fruit_06 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = garden_fruit_05 can_construct = { @@ -5950,7 +5950,7 @@ garden_fruit_06 = { ### Stable stable_01 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } cost = { gold = { @@ -6011,7 +6011,7 @@ stable_01 = { } stable_02 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = stable_01 cost = { @@ -6077,7 +6077,7 @@ stable_02 = { } stable_03 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = stable_02 cost = { @@ -6145,7 +6145,7 @@ stable_03 = { # Grand Stable sub-branch stable_grand_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = stable_03 can_construct = { @@ -6209,7 +6209,7 @@ stable_grand_04 = { } stable_grand_05 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = stable_grand_04 can_construct = { @@ -6274,7 +6274,7 @@ stable_grand_05 = { } stable_grand_06 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = stable_grand_05 can_construct = { @@ -6341,7 +6341,7 @@ stable_grand_06 = { # Kennel sub-branch stable_kennel_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = stable_03 can_construct = { @@ -6414,7 +6414,7 @@ stable_kennel_04 = { } stable_kennel_05 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = stable_kennel_04 can_construct = { @@ -6488,7 +6488,7 @@ stable_kennel_05 = { } stable_kennel_06 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = stable_kennel_05 can_construct = { @@ -6565,7 +6565,7 @@ stable_kennel_06 = { # Charioteer sub-branch (Byzantine unique upgrade) stable_chariot_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = stable_03 can_construct = { @@ -6628,7 +6628,7 @@ stable_chariot_04 = { } stable_chariot_05 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = stable_chariot_04 can_construct = { @@ -6692,7 +6692,7 @@ stable_chariot_05 = { } stable_chariot_06 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = stable_chariot_05 can_construct = { @@ -6758,7 +6758,7 @@ stable_chariot_06 = { ### Workshop workshop_01 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } cost = { gold = { @@ -6812,7 +6812,7 @@ workshop_01 = { } workshop_02 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = workshop_01 cost = { @@ -6869,7 +6869,7 @@ workshop_02 = { # Carpenter sub-branch workshop_carpenter_03 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = workshop_02 can_construct = { @@ -6932,7 +6932,7 @@ workshop_carpenter_03 = { } workshop_carpenter_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = workshop_carpenter_03 can_construct = { @@ -6995,7 +6995,7 @@ workshop_carpenter_04 = { } workshop_carpenter_05 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = workshop_carpenter_04 can_construct = { @@ -7059,7 +7059,7 @@ workshop_carpenter_05 = { } workshop_carpenter_06 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = workshop_carpenter_05 can_construct = { @@ -7125,7 +7125,7 @@ workshop_carpenter_06 = { # Mason sub-branch workshop_mason_03 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = workshop_02 can_construct = { @@ -7186,7 +7186,7 @@ workshop_mason_03 = { } workshop_mason_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = workshop_mason_03 can_construct = { @@ -7247,7 +7247,7 @@ workshop_mason_04 = { } workshop_mason_05 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = workshop_mason_04 can_construct = { @@ -7310,7 +7310,7 @@ workshop_mason_05 = { } workshop_mason_06 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = workshop_mason_05 can_construct = { @@ -7375,7 +7375,7 @@ workshop_mason_06 = { # Textile sub-branch workshop_textile_03 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = workshop_02 can_construct = { @@ -7438,7 +7438,7 @@ workshop_textile_03 = { } workshop_textile_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = workshop_textile_03 can_construct = { @@ -7501,7 +7501,7 @@ workshop_textile_04 = { } workshop_textile_05 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = workshop_textile_04 can_construct = { @@ -7564,7 +7564,7 @@ workshop_textile_05 = { } workshop_textile_06 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = workshop_textile_05 can_construct = { @@ -7629,7 +7629,7 @@ workshop_textile_06 = { ### Storage storage_01 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } cost = { gold = { @@ -7692,7 +7692,7 @@ storage_01 = { } storage_02 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = storage_01 cost = { @@ -7758,7 +7758,7 @@ storage_02 = { # Warehouse sub-branch storage_warehouse_03 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = storage_02 can_construct = { @@ -7821,7 +7821,7 @@ storage_warehouse_03 = { } storage_warehouse_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = storage_warehouse_03 can_construct = { @@ -7886,7 +7886,7 @@ storage_warehouse_04 = { # Granary sub-branch storage_granary_03 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = storage_02 can_construct = { @@ -7952,7 +7952,7 @@ storage_granary_03 = { } storage_granary_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = storage_granary_03 can_construct = { @@ -8024,7 +8024,7 @@ storage_granary_04 = { ### Market market_01 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } cost = { gold = { @@ -8091,7 +8091,7 @@ market_01 = { } market_02 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = market_01 cost = { @@ -8150,7 +8150,7 @@ market_02 = { } market_03 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = market_02 can_construct = { @@ -8214,7 +8214,7 @@ market_03 = { } market_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = market_03 can_construct = { @@ -8278,7 +8278,7 @@ market_04 = { } market_05 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = market_04 can_construct = { @@ -8342,7 +8342,7 @@ market_05 = { } market_06 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = market_05 can_construct = { @@ -8408,7 +8408,7 @@ market_06 = { ### Grazing Lands grazing_land_01 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } cost = { gold = { @@ -8507,7 +8507,7 @@ grazing_land_01 = { } grazing_land_02 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = grazing_land_01 cost = { @@ -8607,7 +8607,7 @@ grazing_land_02 = { } grazing_land_03 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = grazing_land_02 cost = { @@ -8707,7 +8707,7 @@ grazing_land_03 = { } grazing_land_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = grazing_land_03 can_construct = { @@ -8798,7 +8798,7 @@ grazing_land_04 = { } grazing_land_05 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = grazing_land_04 can_construct = { @@ -8889,7 +8889,7 @@ grazing_land_05 = { } grazing_land_06 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = grazing_land_05 can_construct = { @@ -8982,7 +8982,7 @@ grazing_land_06 = { # Horse Archer sub-branch horse_pasture_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = grazing_land_03 can_construct = { @@ -9067,7 +9067,7 @@ horse_pasture_04 = { } horse_pasture_05 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = horse_pasture_04 can_construct = { @@ -9152,7 +9152,7 @@ horse_pasture_05 = { } horse_pasture_06 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = horse_pasture_05 can_construct = { @@ -9239,7 +9239,7 @@ horse_pasture_06 = { # Camel sub-branch camel_pasture_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = grazing_land_03 can_construct = { @@ -9324,7 +9324,7 @@ camel_pasture_04 = { } camel_pasture_05 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = camel_pasture_04 can_construct = { @@ -9409,7 +9409,7 @@ camel_pasture_05 = { } camel_pasture_06 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = camel_pasture_05 can_construct = { @@ -9496,7 +9496,7 @@ camel_pasture_06 = { # Elephant sub-branch elephant_pasture_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = grazing_land_03 can_construct = { @@ -9557,7 +9557,7 @@ elephant_pasture_04 = { } elephant_pasture_05 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = elephant_pasture_04 can_construct = { @@ -9618,7 +9618,7 @@ elephant_pasture_05 = { } elephant_pasture_06 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = elephant_pasture_05 can_construct = { @@ -9681,7 +9681,7 @@ elephant_pasture_06 = { ### Grain Fields grain_field_01 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } cost = { gold = { @@ -9793,7 +9793,7 @@ grain_field_01 = { } grain_field_02 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = grain_field_01 cost = { @@ -9895,7 +9895,7 @@ grain_field_02 = { } grain_field_03 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = grain_field_02 can_construct = { @@ -10002,7 +10002,7 @@ grain_field_03 = { } grain_field_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = grain_field_03 can_construct = { @@ -10109,7 +10109,7 @@ grain_field_04 = { } grain_field_05 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = grain_field_04 can_construct = { @@ -10216,7 +10216,7 @@ grain_field_05 = { } grain_field_06 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = grain_field_05 can_construct = { @@ -10325,7 +10325,7 @@ grain_field_06 = { ### Vineyard vineyard_01 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } cost = { gold = { @@ -10416,7 +10416,7 @@ vineyard_01 = { } vineyard_02 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = vineyard_01 cost = { @@ -10498,7 +10498,7 @@ vineyard_02 = { } vineyard_03 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = vineyard_02 can_construct = { @@ -10583,7 +10583,7 @@ vineyard_03 = { } vineyard_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = vineyard_03 can_construct = { @@ -10668,7 +10668,7 @@ vineyard_04 = { } vineyard_05 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = vineyard_04 can_construct = { @@ -10753,7 +10753,7 @@ vineyard_05 = { } vineyard_06 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = vineyard_05 can_construct = { @@ -10840,7 +10840,7 @@ vineyard_06 = { ### Olive Plantation olive_01 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } cost = { gold = { @@ -10928,7 +10928,7 @@ olive_01 = { } olive_02 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = olive_01 cost = { @@ -11007,7 +11007,7 @@ olive_02 = { } olive_03 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = olive_02 can_construct = { @@ -11090,7 +11090,7 @@ olive_03 = { } olive_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = olive_03 can_construct = { @@ -11173,7 +11173,7 @@ olive_04 = { } olive_05 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = olive_04 can_construct = { @@ -11257,7 +11257,7 @@ olive_05 = { } olive_06 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = olive_05 can_construct = { @@ -11343,7 +11343,7 @@ olive_06 = { ### Silk Production - Byzantine exclusive silk_01 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } can_construct = { custom_tooltip = { @@ -11406,7 +11406,7 @@ silk_01 = { } silk_02 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = silk_01 can_construct = { @@ -11473,7 +11473,7 @@ silk_02 = { } silk_03 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = silk_02 can_construct = { @@ -11541,7 +11541,7 @@ silk_03 = { } silk_04 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = silk_03 can_construct = { @@ -11610,7 +11610,7 @@ silk_04 = { } silk_05 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = silk_04 can_construct = { @@ -11679,7 +11679,7 @@ silk_05 = { } silk_06 = { construction_time = 730 - allowed_domicile_types = { estate } + allowed_domicile_types = { estate patrician_estate } previous_building = silk_05 can_construct = { diff --git a/N3OW/common/domiciles/types/00_domicile_types.txt b/N3OW/common/domiciles/types/00_domicile_types.txt index f1711b47..010c0d12 100644 --- a/N3OW/common/domiciles/types/00_domicile_types.txt +++ b/N3OW/common/domiciles/types/00_domicile_types.txt @@ -1602,6 +1602,715 @@ estate = { } } +patrician_estate = { + + rename_window = house + + illustration = "gfx/interface/illustrations/event_scenes/ep3_medi_estate.dds" + icon = "gfx/interface/icons/flat_icons/estate.dds" + map_pin_texture = "gfx/interface/icons/map_icons/map_icon_estate.dds" + map_pin_anchor = left + map_pin_lobby = yes + + can_move_manually = yes + move_cooldown = { days = estate_move_cooldown_value } + move_cost = { + gold = { + value = { + value = 20 + format = "BASE_VALUE_FORMAT" + desc = "BASE_VALUE" + } + if = { + limit = { + domicile ?= { has_domicile_building_or_higher = estate_main_05 } + } + add = 80 + } + else_if = { + limit = { + domicile ?= { has_domicile_building_or_higher = estate_main_04 } + } + add = 60 + } + else_if = { + limit = { + domicile ?= { has_domicile_building_or_higher = estate_main_03 } + } + add = 40 + } + else_if = { + limit = { + domicile ?= { has_domicile_building_or_higher = estate_main_02 } + } + add = 20 + } + } + } + + base_external_slots = 2 + + domicile_building_slots = { + external_slot_1 = { + position = { 19.7% 5.5% } + size = { 15% 30% } + + empty_slot_asset = { + trigger = { + domicile_location = { + OR = { + terrain = jungle + terrain = wetlands + terrain = floodplains + } + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_jungle_empty_02.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_jungle_empty_02_mask.png" + } + + empty_slot_asset = { + trigger = { + domicile_location = { + OR = { + terrain = drylands + terrain = desert + terrain = desert_mountains + terrain = oasis + terrain = steppe + } + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_drylands_empty.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_drylands_empty_mask.png" + } + + empty_slot_asset = { + trigger = { + domicile_location = { + OR = { + terrain = mountains + terrain = hills + } + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_rough_empty.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_rough_empty_mask.png" + } + + empty_slot_asset = { + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_grassland_empty_05.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_grassland_empty_05_mask.png" + } + + + # Under Construction + construction_slot_asset = { + trigger = { + domicile_location.culture = { + has_graphical_mena_culture_group_trigger = yes + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_building_construction_mena.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_building_construction_mena_mask.png" + } + construction_slot_asset = { + trigger = { + domicile_location.culture = { + has_graphical_western_culture_group_trigger = yes + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_building_construction_western.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_building_construction_western_mask.png" + } + construction_slot_asset = { + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_building_construction_byzantine.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_building_construction_byzantine_mask.png" + } + } + + external_slot_4 = { + position = { 49.0% 2.5% } + size = { 15% 30% } + + empty_slot_asset = { + trigger = { + domicile_location = { + OR = { + terrain = jungle + terrain = wetlands + terrain = floodplains + } + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_jungle_empty_05.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_jungle_empty_05_mask.png" + } + + empty_slot_asset = { + trigger = { + domicile_location = { + OR = { + terrain = drylands + terrain = desert + terrain = desert_mountains + terrain = oasis + terrain = steppe + } + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_drylands_empty_03.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_drylands_empty_03_mask.png" + } + + empty_slot_asset = { + trigger = { + domicile_location = { + OR = { + terrain = mountains + terrain = hills + } + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_rough_empty_03.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_rough_empty_03_mask.png" + } + + empty_slot_asset = { + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_grassland_empty_03.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_grassland_empty_03_mask.png" + } + + + # Under Construction + construction_slot_asset = { + trigger = { + domicile_location.culture = { + has_graphical_mena_culture_group_trigger = yes + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_building_construction_mena.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_building_construction_mena_mask.png" + } + construction_slot_asset = { + trigger = { + domicile_location.culture = { + has_graphical_western_culture_group_trigger = yes + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_building_construction_western.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_building_construction_western_mask.png" + } + construction_slot_asset = { + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_building_construction_byzantine.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_building_construction_byzantine_mask.png" + } + } + + main_slot = { + slot_type = main + position = { 28.2% 13.2% } + size = { 28% 34.5% } + + empty_slot_asset = { + trigger = { + domicile_location = { + OR = { + terrain = jungle + terrain = wetlands + terrain = floodplains + } + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_grassland_empty.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_building_grain_fields_byzantine_mask.png" + } + + empty_slot_asset = { + trigger = { + domicile_location = { + OR = { + terrain = drylands + terrain = desert + terrain = desert_mountains + terrain = oasis + terrain = steppe + } + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_grassland_empty.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_building_grain_fields_byzantine_mask.png" + } + + empty_slot_asset = { + trigger = { + domicile_location = { + OR = { + terrain = hills + terrain = mountains + } + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_grassland_empty.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_building_grain_fields_byzantine_mask.png" + } + + empty_slot_asset = { + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_grassland_empty.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_building_grain_fields_byzantine_mask.png" + } + + # Under Construction + construction_slot_asset = { + trigger = { + domicile_location.culture = { + has_graphical_mena_culture_group_trigger = yes + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_building_manor_construction_mena.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_building_manor_construction_mena_mask.png" + } + construction_slot_asset = { + trigger = { + domicile_location.culture = { + has_graphical_western_culture_group_trigger = yes + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_building_manor_construction_western.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_building_manor_construction_western_mask.png" + } + construction_slot_asset = { + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_building_manor_construction_byzantine.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_building_manor_construction_byzantine_mask.png" + } + } + + external_slot_2 = { + position = { 4% 20% } + size = { 15% 30% } + + empty_slot_asset = { + trigger = { + domicile_location = { + OR = { + terrain = jungle + terrain = wetlands + terrain = floodplains + } + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_jungle_empty_06.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_jungle_empty_06_mask.png" + } + + empty_slot_asset = { + trigger = { + domicile_location = { + OR = { + terrain = drylands + terrain = desert + terrain = desert_mountains + terrain = oasis + terrain = steppe + } + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_drylands_empty_06.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_drylands_empty_06_mask.png" + } + + empty_slot_asset = { + trigger = { + domicile_location = { + OR = { + terrain = mountains + terrain = hills + } + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_rough_empty_06.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_rough_empty_06_mask.png" + } + + empty_slot_asset = { + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_grassland_empty_06.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_grassland_empty_06_mask.png" + } + + + # Under Construction + construction_slot_asset = { + trigger = { + domicile_location.culture = { + has_graphical_mena_culture_group_trigger = yes + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_building_construction_mena.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_building_construction_mena_mask.png" + } + construction_slot_asset = { + trigger = { + domicile_location.culture = { + has_graphical_western_culture_group_trigger = yes + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_building_construction_western.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_building_construction_western_mask.png" + } + construction_slot_asset = { + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_building_construction_byzantine.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_building_construction_byzantine_mask.png" + } + } + + external_slot_3 = { + position = { 14% 46% } + size = { 15% 30% } + + empty_slot_asset = { + trigger = { + domicile_location = { + OR = { + terrain = jungle + terrain = wetlands + terrain = floodplains + } + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_jungle_empty_04.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_jungle_empty_04_mask.png" + } + + empty_slot_asset = { + trigger = { + domicile_location = { + OR = { + terrain = drylands + terrain = desert + terrain = desert_mountains + terrain = oasis + terrain = steppe + } + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_drylands_empty_04.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_drylands_empty_04_mask.png" + } + + empty_slot_asset = { + trigger = { + domicile_location = { + OR = { + terrain = mountains + terrain = hills + } + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_rough_empty_04.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_rough_empty_04_mask.png" + } + + empty_slot_asset = { + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_grassland_empty_04.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_grassland_empty_04_mask.png" + } + + + # Under Construction + construction_slot_asset = { + trigger = { + domicile_location.culture = { + has_graphical_mena_culture_group_trigger = yes + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_building_construction_mena.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_building_construction_mena_mask.png" + } + construction_slot_asset = { + trigger = { + domicile_location.culture = { + has_graphical_western_culture_group_trigger = yes + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_building_construction_western.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_building_construction_western_mask.png" + } + construction_slot_asset = { + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_building_construction_byzantine.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_building_construction_byzantine_mask.png" + } + } + + external_slot_5 = { + position = { 64% 29% } + size = { 15% 30% } + + empty_slot_asset = { + trigger = { + domicile_location = { + OR = { + terrain = jungle + terrain = wetlands + terrain = floodplains + } + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_jungle_empty_03.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_jungle_empty_03_mask.png" + } + + empty_slot_asset = { + trigger = { + domicile_location = { + OR = { + terrain = drylands + terrain = desert + terrain = desert_mountains + terrain = oasis + terrain = steppe + } + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_drylands_empty_05.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_drylands_empty_05_mask.png" + } + + empty_slot_asset = { + trigger = { + domicile_location = { + OR = { + terrain = mountains + terrain = hills + } + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_rough_empty_02.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_rough_empty_02_mask.png" + } + + empty_slot_asset = { + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_grassland_empty_02.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_grassland_empty_02_mask.png" + } + + + # Under Construction + construction_slot_asset = { + trigger = { + domicile_location.culture = { + has_graphical_mena_culture_group_trigger = yes + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_building_construction_mena.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_building_construction_mena_mask.png" + } + construction_slot_asset = { + trigger = { + domicile_location.culture = { + has_graphical_western_culture_group_trigger = yes + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_building_construction_western.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_building_construction_western_mask.png" + } + construction_slot_asset = { + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_building_construction_byzantine.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_building_construction_byzantine_mask.png" + } + } + + external_slot_6 = { + position = { 43% 52% } + size = { 15% 30% } + + empty_slot_asset = { + trigger = { + domicile_location = { + OR = { + terrain = jungle + terrain = wetlands + terrain = floodplains + } + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_jungle_empty.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_jungle_empty_mask.png" + } + + empty_slot_asset = { + trigger = { + domicile_location = { + OR = { + terrain = drylands + terrain = desert + terrain = desert_mountains + terrain = oasis + terrain = steppe + } + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_drylands_empty_02.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_drylands_empty_02_mask.png" + } + + empty_slot_asset = { + trigger = { + domicile_location = { + OR = { + terrain = mountains + terrain = hills + } + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_rough_empty_05.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_rough_empty_05_mask.png" + } + + empty_slot_asset = { + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_grassland_empty.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_grassland_empty_mask.png" + } + + + # Under Construction + construction_slot_asset = { + trigger = { + domicile_location.culture = { + has_graphical_mena_culture_group_trigger = yes + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_building_construction_mena.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_building_construction_mena_mask.png" + } + construction_slot_asset = { + trigger = { + domicile_location.culture = { + has_graphical_western_culture_group_trigger = yes + } + } + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_building_construction_western.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_building_construction_western_mask.png" + } + construction_slot_asset = { + icon = "gfx/interface/icons/flat_icons/plus.dds" + texture = "gfx/interface/window_domiciles/estate_building_construction_byzantine.dds" + intersectionmask_texture = "gfx/interface/window_domiciles/estate_building_construction_byzantine_mask.png" + } + } + } + + # Backgrounds + domicile_asset = { + trigger = { + domicile_location = { + this = root.owner.top_liege.capital_province + } + } + background = "gfx/interface/window_domiciles/estate_background_urban_terrain.dds" + foreground = "gfx/interface/window_domiciles/estate_background_urban_terrain_foreground.dds" + ambience = "event:/DLC/EP3/SFX/Ambience/2D/Domicile/ep3_amb_2d_domicile_byzantine_urban" + } + + domicile_asset = { + trigger = { + domicile_location = { + OR = { + terrain = jungle + terrain = wetlands + terrain = floodplains + } + } + } + background = "gfx/interface/window_domiciles/estate_background_jungle_terrain.dds" + foreground = "gfx/interface/window_domiciles/estate_background_jungle_terrain_foreground.dds" + ambience = "event:/DLC/EP3/SFX/Ambience/2D/Domicile/ep3_amb_2d_domicile_wetlands" + } + + domicile_asset = { + trigger = { + domicile_location = { + OR = { + terrain = drylands + terrain = desert + terrain = desert_mountains + terrain = oasis + terrain = steppe + } + } + } + background = "gfx/interface/window_domiciles/estate_background_dry_terrain.dds" + foreground = "gfx/interface/window_domiciles/estate_background_dry_terrain_foreground.dds" + ambience = "event:/DLC/EP3/SFX/Ambience/2D/Domicile/ep3_amb_2d_domicile_dry_lands" + } + + domicile_asset = { + trigger = { + domicile_location = { + OR = { + terrain = hills + terrain = mountains + } + } + } + background = "gfx/interface/window_domiciles/estate_background_rough_terrain.dds" + foreground = "gfx/interface/window_domiciles/estate_background_rough_terrain_foreground.dds" + ambience = "event:/DLC/EP3/SFX/Ambience/2D/Domicile/ep3_amb_2d_domicile_rough_lands" + } + + domicile_asset = { + background = "gfx/interface/window_domiciles/estate_background_green_terrain.dds" + foreground = "gfx/interface/window_domiciles/estate_background_green_terrain_foreground.dds" + ambience = "event:/DLC/EP3/SFX/Ambience/2D/Domicile/ep3_amb_2d_domicile_green_lands" + } +} yurt = { rename_window = primary_title diff --git a/N3OW/common/governments/00_government_types.txt b/N3OW/common/governments/00_government_types.txt index a95e8d89..a79f1c7b 100644 --- a/N3OW/common/governments/00_government_types.txt +++ b/N3OW/common/governments/00_government_types.txt @@ -7,13 +7,15 @@ feudal_government = { create_cadet_branches = yes rulers_should_have_dynasty = yes dynasty_named_realms = yes - royal_court = yes legitimacy = yes } + royal_court = any + fallback = 1 primary_holding = castle_holding + valid_holdings = { temple_citadel_holding } required_county_holdings = { castle_holding city_holding church_holding } vassal_contract_group = feudal_vassal @@ -22,11 +24,21 @@ feudal_government = { use_legends = yes } - flag = may_elevate_co_monarch # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). - flag = government_is_feudal - flag = government_is_settled + flags = { + government_is_feudal + government_is_settled + may_elevate_co_monarch + government_uses_crown_authority + government_uses_domain_limit + } + + mechanic_type = feudal + is_mechanic_type_default = yes + color = hsv{ 0.67 1.00 0.78 } + realm_mask_offset = { 0.0 0.01 } + realm_mask_scale = { 1 1 } } republic_government = { @@ -35,12 +47,14 @@ republic_government = { required_county_holdings = { city_holding castle_holding church_holding } government_rules = { + inherit_from_dynastic_government = no create_cadet_branches = yes - rulers_should_have_dynasty = yes legitimacy = yes + inherit_from_dynastic_government = no + noble_families = yes + treasury = yes } - domicile_type = estate ai = { arrange_marriage = no use_goals = no @@ -52,9 +66,18 @@ republic_government = { vassal_contract_group = republic_vassal # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). - flag = government_is_special_republic - flag = government_is_settled + flags = { + government_is_special_republic + government_is_settled + government_uses_domain_limit + government_uses_domicile_but_not_adventurer + } + + mechanic_type = administrative + domicile_type = estate color = hsv{ 0.00 1.00 0.98 } + realm_mask_offset = { 0.0 -0.01 } + realm_mask_scale = { 1 1 } } ### Brief: theocracy_government @@ -69,7 +92,7 @@ theocracy_government = { } primary_holding = church_holding - valid_holdings = { castle_holding tribal_holding nomad_holding herder_holding } + valid_holdings = { castle_holding tribal_holding nomad_holding herder_holding temple_citadel_holding } required_county_holdings = { church_holding castle_holding city_holding } ai = { @@ -87,9 +110,18 @@ theocracy_government = { vassal_contract_group = theocracy_vassal # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). - flag = government_is_theocracy - flag = government_is_settled + flags = { + government_is_theocracy + government_is_settled + government_uses_domain_limit + } + + mechanic_type = theocracy + is_mechanic_type_default = yes + color = hsv{ 0.00 0.00 0.78 } + realm_mask_offset = { 0.0 0.02 } + realm_mask_scale = { 0.95 0.95 } } ### Brief: clan_government @@ -97,11 +129,13 @@ clan_government = { government_rules = { create_cadet_branches = yes rulers_should_have_dynasty = yes - royal_court = yes legitimacy = yes dynasty_named_realms = yes + always_use_patronym = yes } + royal_court = any + primary_holding = castle_holding primary_heritages = { heritage_arabic heritage_iranian heritage_turkic } @@ -109,9 +143,8 @@ clan_government = { preferred_religions = { islam_religion } - valid_holdings = { castle_holding } + valid_holdings = { temple_citadel_holding } required_county_holdings = { castle_holding city_holding church_holding } - always_use_patronym = yes house_unity = clan_house_unity tax_slot_type = clan_tax_slot @@ -152,29 +185,40 @@ clan_government = { } # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). - flag = government_is_clan - flag = may_appoint_viziers - flag = government_is_settled + flags = { + government_is_clan + may_appoint_viziers + government_is_settled + government_uses_crown_authority + government_uses_domain_limit + } + + mechanic_type = clan + is_mechanic_type_default = yes + color = hsv{ 0.39 0.93 0.54 } + realm_mask_offset = { 0.0 0.03 } + realm_mask_scale = { 1 1 } } tribal_government = { government_rules = { rulers_should_have_dynasty = yes regiments_prestige_as_gold = yes - royal_court = yes legitimacy = yes + always_use_patronym = yes + affected_by_development = no } + royal_court = any + supply_limit_mult_for_others = -0.5 primary_holding = tribal_holding required_county_holdings = { tribal_holding } - valid_holdings = { castle_holding } + valid_holdings = { castle_holding temple_citadel_holding } prestige_opinion_override = { -10 0 3 5 10 20 } - always_use_patronym = yes - affected_by_development = no vassal_contract_group = tribal_vassal @@ -196,12 +240,82 @@ tribal_government = { monthly_prestige = 0.2 } - flag = government_can_raid_rule - flag = may_elevate_co_monarch # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). - flag = government_is_tribal - flag = government_is_settled + flags = { + government_is_tribal + government_is_tribal_excluding_wanua + use_prestige_to_buy_maa + government_is_settled + government_can_raid_rule + may_elevate_co_monarch + government_uses_domain_limit + } + color = hsv{ 0.02 0.75 0.36 } + realm_mask_offset = { 0.0 0.0 } + realm_mask_scale = { 0.96 0.96 } +} + +# This govtype will be switched back to tribal_government if the TGP DLC is not active. This is done by effect in the game_start.txt on_action file. +# +wanua_government = { # "Wanua" + government_rules = { + rulers_should_have_dynasty = yes + legitimacy = yes + always_use_patronym = yes + affected_by_development = no + gain_legitimacy_becoming_tributary = yes + regiments_use_barter_goods_as_gold = yes + barter = yes + } + + royal_court = any + + supply_limit_mult_for_others = -0.5 + primary_holding = tribal_holding + required_county_holdings = { tribal_holding } + primary_heritages = { heritage_austronesian } + + valid_holdings = { city_holding castle_holding temple_citadel_holding } + + prestige_opinion_override = { -10 0 3 5 10 20 } + + vassal_contract_group = wanua_vassal + + ai = { + use_legends = yes + } + + character_modifier = { + title_creation_cost_mult = -0.5 + + embarkation_cost_mult = -1 + + sea_travel_danger = medium_sea_danger_reduction + coastal_sea_travel_danger = medium_sea_danger_reduction + + ai_war_chance = -0.5 + + domain_limit_max = 2 + vassal_limit_max = 2 + } + + can_get_government = { + has_tgp_dlc_trigger = yes + } + + flags = { + government_is_tribal + government_is_wanua + government_can_raid_rule + government_enables_naval_raiding + government_enables_river_travel + may_elevate_co_monarch + } + + color = rgb{ 85 207 198 } + realm_mask_offset = { 0.0 0.09 } + realm_mask_scale = { 0.9 0.9 } } ### Brief: mercenary_government @@ -226,10 +340,19 @@ mercenary_government = { use_legends = no } - flag = cannot_be_vassal_or_liege # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). - flag = government_is_mercenary + flags = { + government_uses_crown_authority + cannot_be_vassal_or_liege + government_is_mercenary + } + + mechanic_type = mercenary + is_mechanic_type_default = yes + color = hsv{ 0.00 0.00 0.66 } + realm_mask_offset = { 0.0 -0.01 } + realm_mask_scale = { 1 1 } } ### Brief: holy_order_government @@ -254,12 +377,21 @@ holy_order_government = { use_legends = no } - valid_holdings = { castle_holding city_holding } + valid_holdings = { castle_holding city_holding temple_citadel_holding } - flag = cannot_be_vassal_or_liege # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). - flag = government_is_holy_order + flags = { + government_uses_crown_authority + cannot_be_vassal_or_liege + government_is_holy_order + } + + mechanic_type = holy_order + is_mechanic_type_default = yes + color = hsv{ 0.00 0.00 0.66 } + realm_mask_offset = { 0.0 -0.01 } + realm_mask_scale = { 1 1 } } ### Brief: administrative_government @@ -272,20 +404,30 @@ administrative_government = { create_cadet_branches = yes rulers_should_have_dynasty = yes dynasty_named_realms = no - royal_court = yes landless_playable = yes legitimacy = yes use_as_base_on_landed = yes use_as_base_on_rank_up = yes + inherit_from_dynastic_government = no sticky_government = yes + house_aspirations = yes + noble_families = yes + admin_allows_holding_multiple_primary_tier_titles = yes + treasury = yes + replace_gold_cost_by_treasury = yes } + royal_court = top_liege + domicile_type = estate + main_administrative_tier = duchy + min_appointment_tier = duchy + minimum_provincial_maa_tier = duchy fallback = 3 primary_holding = castle_holding - valid_holdings = { city_holding } + valid_holdings = { city_holding temple_citadel_holding } required_county_holdings = { castle_holding city_holding church_holding } vassal_contract_group = admin_vassal @@ -302,17 +444,42 @@ administrative_government = { vassal_limit = 100 active_accolades = -1 title_creation_cost_mult = -0.5 + mercenary_hire_cost_mult = 2 + men_at_arms_maintenance = 0.5 + + # Vassals get Treasury income that is this percentage less than their taxes to their liege + monthly_treasury_from_liege_mult = -0.15 + } + + top_liege_character_modifier = { + # 85% of vassal income goes to the treasury + monthly_treasury_from_vassals = 0.85 + men_at_arms_maintenance = 1.5 + men_at_arms_recruitment_cost = 1 } # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). - flag = government_is_administrative + flags = { + government_is_administrative + + # These flags only exist for loc and in-game descriptions + government_has_influence + government_has_treasury + government_is_special_administrative + government_has_title_men_at_arms + government_has_powerful_families + government_is_settled + government_uses_domicile_but_not_adventurer + government_uses_domain_limit + government_uses_admin_province_obligations + } + + mechanic_type = administrative + is_mechanic_type_default = yes - # These flags only exist for loc and in-game descriptions - flag = government_has_influence - flag = government_has_title_men_at_arms - flag = government_has_powerful_families - flag = government_is_settled color = { 72 6 92 } + realm_mask_offset = { 0.0 0.01 } + realm_mask_scale = { 1 1 } } ### Brief: landless_adventurer_government @@ -340,12 +507,12 @@ landless_adventurer_government = { can_get_government = { any_held_title = { - tier = tier_duchy + title_tier = duchy is_landless_type_title = yes } } - valid_holdings = { tribal_holding church_holding castle_holding city_holding } + valid_holdings = { tribal_holding church_holding castle_holding city_holding temple_citadel_holding } character_modifier = { active_accolades = -100 @@ -369,9 +536,18 @@ landless_adventurer_government = { } # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). - flag = cannot_be_vassal_or_liege - flag = government_is_landless_adventurer + flags = { + cannot_be_vassal_or_liege + government_is_landless_adventurer + has_unique_government_perks + } + + mechanic_type = landless_adventurer + is_mechanic_type_default = yes + color = hsv{ 0.00 0.00 0.66 } + realm_mask_offset = { 0.0 0.0 } + realm_mask_scale = { 1 1 } } ### Brief: nomad_government @@ -381,10 +557,10 @@ landless_adventurer_government = { # nomad_government = { government_rules = { + obedience = yes create_cadet_branches = yes rulers_should_have_dynasty = yes dynasty_named_realms = no - royal_court = yes landless_playable = yes legitimacy = yes use_as_base_on_rank_up = yes @@ -393,24 +569,26 @@ nomad_government = { uses_county_fertility = yes uses_culture_and_house_head_named_realms = yes sticky_government = yes - obedience = yes subject_men_at_arms = yes no_capital_movement_cooldown = yes + affected_by_development = no + buildings = no } + royal_court = any + domicile_type = yurt primary_holding = nomad_holding - valid_holdings = { nomad_holding castle_holding tribal_holding } + valid_holdings = { castle_holding tribal_holding temple_citadel_holding } required_county_holdings = { nomad_holding } generated_character_template = nomadic_chieftain_character - - affected_by_development = no + max_dread = 150 vassal_contract_group = nomad_vassal - + character_modifier = { steppe_travel_danger = steppe_high_danger_reduction plains_travel_danger = steppe_high_danger_reduction @@ -437,18 +615,27 @@ nomad_government = { } # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). - flag = government_is_nomadic - flag = government_can_raid_rule - flag = government_can_use_tributary_men_at_arms - flag = can_start_war_with_raised_troops - flag = ignores_faith_marriage_penalties - flag = no_hostile_attrition_in_steppe # Done in code, here for loc - flag = movement_speed_from_government - flag = land_raiding_movement_speed_from_government - flag = can_raze_holdings + flags = { + government_is_nomadic + government_has_herd + government_can_raid_rule + government_can_use_tributary_men_at_arms + can_start_war_with_raised_troops + ignores_faith_marriage_penalties + no_hostile_attrition_in_steppe # Done in code, here for loc + movement_speed_from_government + land_raiding_movement_speed_from_government + can_raze_holdings + government_uses_domicile_but_not_adventurer + } + + mechanic_type = nomad + is_mechanic_type_default = yes # These flags only exist for loc and in-game descriptions color = { 255 127 80 } + realm_mask_offset = { 0.0 0.12 } + realm_mask_scale = { 0.8 0.8 } } ### Brief: herder_government @@ -457,10 +644,6 @@ nomad_government = { # This is referenced in code # herder_government = { - primary_holding = herder_holding - valid_holdings = { herder_holding castle_holding tribal_holding } - required_county_holdings = { herder_holding } - generated_character_template = herder_character government_rules = { @@ -472,8 +655,9 @@ herder_government = { replenishes_county_fertility = yes deny_powerful_vassal = yes redirects_wars_to_overlord = yes + buildings = no } - + character_modifier = { knight_limit = -100 active_accolades = -100 @@ -481,6 +665,10 @@ herder_government = { monthly_income_mult = -10 } + primary_holding = herder_holding + valid_holdings = { herder_holding castle_holding tribal_holding } + required_county_holdings = { herder_holding } + ai = { use_lifestyle = no arrange_marriage = no @@ -494,7 +682,524 @@ herder_government = { vassal_contract_group = herder_vassal # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). - flag = government_is_herder - flag = ignores_faith_marriage_penalties + flags = { + government_is_herder + government_has_herd + ignores_faith_marriage_penalties + } + + mechanic_type = herder + is_mechanic_type_default = yes + color = { 235 213 52 } + realm_mask_offset = { 0.0 0.12 } + realm_mask_scale = { 0.8 0.8 } +} + +celestial_government = { + government_rules = { + create_cadet_branches = yes + rulers_should_have_dynasty = yes + dynasty_named_realms = no + administrative = yes + landless_playable = yes + legitimacy = yes + use_as_base_on_landed = yes + use_as_base_on_rank_up = yes + inherit_from_dynastic_government = no + sticky_government = yes + house_aspirations = yes + noble_families = yes + deny_powerful_vassal = yes + + treasury = yes + merit = yes + replace_gold_cost_by_treasury = yes + block_alliance_child_marriage = yes + admin_allows_holding_multiple_primary_tier_titles = no + } + + royal_court = top_liege + + domicile_type = east_asian_estate + main_administrative_tier = duchy + min_appointment_tier = county + minimum_provincial_maa_tier = county + administrative_title_maa_setup = vassals_and_top_liege + + fallback = 3 + + primary_holding = castle_holding + valid_holdings = { city_holding temple_citadel_holding } + required_county_holdings = { castle_holding city_holding church_holding } + + vassal_contract_group = celestial_vassal + + character_modifier = { + levy_size = -0.5 + feudal_government_tax_contribution_mult = -0.5 + feudal_government_levy_contribution_mult = -0.5 + clan_government_tax_contribution_mult = -0.5 + clan_government_levy_contribution_mult = -0.5 + men_at_arms_cap = -3 + men_at_arms_limit = -2 + knight_limit = -5 + vassal_limit = 20 + active_accolades = -1 + character_max_merit_level_add = 1 + mercenary_hire_cost_mult = 2 + + # Vassals get Treasury income that is this percentage less than their taxes to their liege + monthly_treasury_from_liege_mult = -0.25 + } + + top_liege_character_modifier = { + # 99% of vassal income goes to the treasury + monthly_treasury_from_vassals = 0.99 + men_at_arms_title_cap = -1 + } + + ai_ruler_desired_kingdom_titles = { + value = -1 # Keep all + if = { + limit = { + highest_held_title_tier >= tier_empire + } + add = 1 # Is 0 == Don't keep any Kingdoms - they should all be circuits + } + } + ai_ruler_desired_empire_titles = { + value = -1 # Keep all + if = { + limit = { + highest_held_title_tier = tier_hegemony + } + add = 1 # Is 0 == Don't keep any Empires - they should all be 'great circuits' + } + } + + # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). + flags = { + government_is_celestial + + government_has_merit + government_has_influence + government_has_treasury + government_has_title_men_at_arms + government_has_powerful_families + government_has_county_tier_noble_families + government_is_settled + government_uses_domicile_but_not_adventurer + government_uses_domain_limit + government_uses_admin_province_obligations + government_uses_merit_family_aspirations + has_special_house_aspirations + } + + # The hegemon cannot reassign ministers + ai_can_reassign_council_positions = { + primary_title != title:h_china + } + + currency_levels_cap = { + merit = 9 + } + + color = { 250 230 10 } + realm_mask_offset = { 0.0 0.1 } + realm_mask_scale = { 0.94 0.94 } +} + +mandala_government = { + government_rules = { + create_cadet_branches = yes + + rulers_should_have_dynasty = yes + dynasty_named_realms = yes + + legitimacy = yes + use_as_base_on_landed = yes + use_as_base_on_rank_up = yes + house_aspirations = yes + considers_piety_for_title_creation = yes + ask_for_tribute = yes + + deny_powerful_vassal = yes #LET HAVOC ENSUE! + + count_tributaries_for_title_requirements = yes + radiance = yes + } + + royal_court = any + + primary_holding = temple_citadel_holding + valid_holdings = { church_holding castle_holding } + required_county_holdings = { temple_citadel_holding city_holding } + + can_get_government = { + has_tgp_dlc_trigger = yes + OR = { + liege = { has_government = mandala_government } + highest_held_title_tier > tier_barony + } + } + + vassal_contract_group = mandala_vassal + + opinion_of_liege = { + scope:liege = { + if = { + limit = { piety_level = max_piety_level_plus_3 } + scope:vassal = { value = mandala_vassal_opinion_bonus_piety_8_value } + } + else_if = { + limit = { piety_level = max_piety_level_plus_2 } + scope:vassal = { value = mandala_vassal_opinion_bonus_piety_7_value } + } + else_if = { + limit = { piety_level = max_piety_level_plus_1 } + scope:vassal = { value = mandala_vassal_opinion_bonus_piety_6_value } + } + else_if = { + limit = { piety_level = max_piety_level } + scope:vassal = { value = mandala_vassal_opinion_bonus_piety_5_value } + } + else_if = { + limit = { piety_level = very_high_piety_level } + scope:vassal = { value = mandala_vassal_opinion_bonus_piety_4_value } + } + else_if = { + limit = { piety_level = high_piety_level } + scope:vassal = { value = mandala_vassal_opinion_bonus_piety_3_value } + } + else_if = { + limit = { piety_level = medium_piety_level } + scope:vassal = { value = mandala_vassal_opinion_bonus_piety_2_value } + } + else_if = { + limit = { piety_level = low_piety_level } + scope:vassal = { value = mandala_vassal_opinion_bonus_piety_1_value } + } + else_if = { + limit = { piety_level = low_negative_piety_level } + scope:vassal = { value = mandala_vassal_opinion_bonus_piety_0_value } + } + } + } + opinion_of_liege_desc = { desc = liege_piety_level_desc } + + opinion_of_suzerain = { + scope:suzerain = { + if = { + limit = { piety_level = max_piety_level_plus_3 } + scope:tributary = { value = mandala_tributary_opinion_bonus_piety_8_value } + } + else_if = { + limit = { piety_level = max_piety_level_plus_2 } + scope:tributary = { value = mandala_tributary_opinion_bonus_piety_7_value } + } + else_if = { + limit = { piety_level = max_piety_level_plus_1 } + scope:tributary = { value = mandala_tributary_opinion_bonus_piety_6_value } + } + else_if = { + limit = { piety_level = max_piety_level } + scope:tributary = { value = mandala_tributary_opinion_bonus_piety_5_value } + } + else_if = { + limit = { piety_level = very_high_piety_level } + scope:tributary = { value = mandala_tributary_opinion_bonus_piety_4_value } + } + else_if = { + limit = { piety_level = high_piety_level } + scope:tributary = { value = mandala_tributary_opinion_bonus_piety_3_value } + } + else_if = { + limit = { piety_level = medium_piety_level } + scope:tributary = { value = mandala_tributary_opinion_bonus_piety_2_value } + } + else_if = { + limit = { piety_level = low_piety_level } + scope:tributary = { value = mandala_tributary_opinion_bonus_piety_1_value } + } + else_if = { + limit = { piety_level = low_negative_piety_level } + scope:tributary = { value = mandala_tributary_opinion_bonus_piety_0_value } + } + } + } + opinion_of_suzerain_desc = { desc = suzerain_piety_level_desc } + + character_modifier = { + clergy_opinion = 5 + zealot_opinion = 5 + domain_limit_max = 2 + + #Vassal Limit Max: + #Base: + vassal_limit_max = 2 + #Increased with Mandala Temple Complex up to 30 + #Further 35 possible from Piety Levels 6-8 for a total of 65 + zealot_tax_contribution_mult = 0.05 + zealot_levy_contribution_mult = 0.05 + monthly_piety_gain_mult = 0.15 + } + + # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). + flags = { + uses_mandala_aspects + uses_mandala_decrees + government_is_mandala + has_coerce_tributary_scheme + additional_piety_from_religious_buildings + can_perform_ritual_contracts + subjects_gain_piety_based_on_overlord_piety_level + has_special_house_aspirations + government_is_settled + has_unique_government_perks + no_powerful_vassals + } + + # These flags only exist for loc and in-game descriptions + + currency_levels_cap = { + piety = 8 + } + + mechanic_type = mandala + is_mechanic_type_default = yes + + color = { 42 56 100 } + realm_mask_offset = { 0.0 0.05 } + realm_mask_scale = { 0.92 0.92 } +} + +steppe_admin_government = { + government_rules = { + obedience = yes + create_cadet_branches = yes + rulers_should_have_dynasty = yes + dynasty_named_realms = no + administrative = yes + landless_playable = yes + legitimacy = yes + use_as_base_on_rank_up = yes + use_as_base_on_landed = yes + inherit_from_dynastic_government = no + sticky_government = yes + house_aspirations = yes + subject_men_at_arms = yes + noble_families = yes + + merit = yes # Meritocracy! + treasury = yes + replace_gold_cost_by_treasury = yes + government_ignores_rightful_liege_penalties = yes + deny_powerful_vassal = yes + } + + royal_court = any + + domicile_type = east_asian_estate + + main_administrative_tier = duchy + min_appointment_tier = county + minimum_provincial_maa_tier = duchy + + primary_holding = castle_holding + valid_holdings = { city_holding temple_citadel_holding } + required_county_holdings = { castle_holding city_holding church_holding } + + vassal_contract_group = meritocratic_vassal + + max_dread = 150 + + character_modifier = { + levy_size = -0.5 + feudal_government_tax_contribution_mult = -0.5 + feudal_government_levy_contribution_mult = -0.5 + clan_government_tax_contribution_mult = -0.5 + clan_government_levy_contribution_mult = -0.5 + men_at_arms_cap = -2 + men_at_arms_limit = -2 + knight_limit = -5 + vassal_limit = 100 + active_accolades = -1 + ignore_negative_opinion_of_culture = yes + movement_speed = 0.1 + movement_speed_land_raiding = 0.1 + ai_war_cooldown = -0.5 + ai_war_chance = 2 + title_creation_cost_mult = -0.5 + character_max_merit_level_add = 2 + mercenary_hire_cost_mult = 2 + + # Vassals get Treasury income that is this percentage less than their taxes to their liege + monthly_treasury_from_liege_mult = -0.4 + } + + top_liege_character_modifier = { + # 95% of vassal income goes to the treasury + monthly_treasury_from_vassals = 0.95 + } + + ai_ruler_desired_kingdom_titles = { + value = -1 # Keep all + if = { + limit = { + highest_held_title_tier >= tier_empire + } + add = 2 # Is 1 == keep one kingdom only! + } + } + ai_ruler_desired_empire_titles = { + value = -1 # Keep all + if = { + limit = { + highest_held_title_tier = tier_hegemony + } + add = 1 # Is 0 == Don't keep any Empires - they should all be 'great circuits' + } + } + + # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). + flags = { + government_is_steppe_admin + government_can_raid_rule + government_can_use_tributary_men_at_arms + government_has_merit + government_has_influence + government_has_treasury + government_has_title_men_at_arms + government_has_powerful_families + government_has_county_tier_noble_families + ignores_faith_marriage_penalties + land_raiding_movement_speed_from_government + can_raze_holdings + government_is_settled + government_uses_domicile_but_not_adventurer + government_uses_admin_province_obligations + government_uses_merit_family_aspirations + has_special_house_aspirations + } + + currency_levels_cap = { + merit = 5 + } + + can_get_government = { + has_tgp_dlc_trigger = yes + } + + color = { 255 110 40 } + realm_mask_offset = { 0.0 0.2 } + realm_mask_scale = { 0.78 0.78 } +} + +meritocratic_government = { # e.g. Korea, Dai Viet + government_rules = { + create_cadet_branches = yes + rulers_should_have_dynasty = yes + dynasty_named_realms = no + administrative = yes + landless_playable = yes + legitimacy = yes + use_as_base_on_landed = yes + use_as_base_on_rank_up = yes + inherit_from_dynastic_government = no + sticky_government = yes + house_aspirations = yes + noble_families = yes + + merit = yes # Meritocracy! + treasury = yes + replace_gold_cost_by_treasury = yes + deny_powerful_vassal = yes + } + + royal_court = any + + domicile_type = east_asian_estate + main_administrative_tier = duchy + min_appointment_tier = county + minimum_provincial_maa_tier = duchy + + primary_holding = castle_holding + valid_holdings = { city_holding temple_citadel_holding } + required_county_holdings = { castle_holding city_holding church_holding } + + vassal_contract_group = meritocratic_vassal + + character_modifier = { + levy_size = -0.5 + feudal_government_tax_contribution_mult = -0.5 + feudal_government_levy_contribution_mult = -0.5 + clan_government_tax_contribution_mult = -0.5 + clan_government_levy_contribution_mult = -0.5 + men_at_arms_cap = -2 + men_at_arms_limit = -2 + knight_limit = -5 + vassal_limit = 100 + active_accolades = -1 + title_creation_cost_mult = -0.5 + character_max_merit_level_add = 2 + mercenary_hire_cost_mult = 2 + + # Vassals get Treasury income that is this percentage less than their taxes to their liege + monthly_treasury_from_liege_mult = -0.4 + } + + top_liege_character_modifier = { + # 95% of vassal income goes to the treasury + monthly_treasury_from_vassals = 0.95 + } + + ai_ruler_desired_kingdom_titles = { + value = -1 # Keep all + if = { + limit = { + highest_held_title_tier >= tier_empire + } + add = 2 # Is 1 == keep one kingdom only! + } + } + ai_ruler_desired_empire_titles = { + value = -1 # Keep all + if = { + limit = { + highest_held_title_tier = tier_hegemony + } + add = 1 # Is 0 == Don't keep any Empires - they should all be 'great circuits' + } + } + + can_get_government = { + has_tgp_dlc_trigger = yes + } + + # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). + flags = { + government_is_meritocratic + # These flags only exist for loc and in-game descriptions + government_has_merit + government_has_influence + government_has_treasury + government_has_title_men_at_arms + government_has_powerful_families + government_has_county_tier_noble_families + government_is_settled + government_uses_domicile_but_not_adventurer + government_uses_domain_limit + government_uses_admin_province_obligations + government_uses_merit_family_aspirations + has_special_house_aspirations + } + + currency_levels_cap = { + merit = 5 + } + + color = { 250 100 0 } + realm_mask_offset = { 0.0 0.12 } + realm_mask_scale = { 0.92 0.92 } } diff --git a/N3OW/common/governments/01_japan_government_types.txt b/N3OW/common/governments/01_japan_government_types.txt new file mode 100644 index 00000000..dbead3ef --- /dev/null +++ b/N3OW/common/governments/01_japan_government_types.txt @@ -0,0 +1,163 @@ +japan_administrative_government = { # Ritsuryo + government_rules = { + create_cadet_branches = yes + rulers_should_have_dynasty = yes + dynasty_named_realms = no + administrative = yes + legitimacy = yes + landless_playable = yes + use_as_base_on_landed = yes + use_as_base_on_rank_up = yes + inherit_from_dynastic_government = no + sticky_government = yes + house_aspirations = yes + noble_families = yes + deny_powerful_vassal = yes + } + + royal_court = any + + domicile_type = japanese_manor + main_administrative_tier = county + min_appointment_tier = county + minimum_provincial_maa_tier = duchy + + primary_holding = castle_holding + primary_heritages = { heritage_japonic } + valid_holdings = { city_holding temple_citadel_holding } + required_county_holdings = { castle_holding city_holding church_holding } + + vassal_contract_group = japan_administrative_vassal + + character_modifier = { + # LEVIES & TAXES + japan_feudal_government_tax_contribution_mult = -0.5 + japan_feudal_government_levy_contribution_mult = -0.5 + garrison_size = -0.5 + # MEN-AT-ARMS + men_at_arms_cap = -2 + men_at_arms_limit = -2 + # KNIGHTS + knight_limit = -5 + # VASSALS + vassal_limit = 50 # Kampaku + # DOMAIN + domain_limit_max = 1 # Raised further by manor + domain_tax_mult = 0.3 + } + + can_get_government = { + has_tgp_dlc_trigger = yes + top_liege = { + OR = { + government_is_japanese_trigger = yes + has_character_flag = tgp_japan_restore_japanese_government_flag + culture = culture:japanese + culture = { + any_parent_culture_or_above = { this = culture:japanese } + } + } + } + } + + # The Regent always remains in the same place. + can_move_realm_capital = { + NOT = { primary_title ?= title:e_japan } + } + + compatible_government_type_succession = { japan_feudal_government } + + # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). + flags = { + government_is_japan_administrative + # These flags only exist for loc and in-game descriptions + government_has_influence + government_has_title_men_at_arms + government_has_powerful_families + government_has_county_tier_noble_families + has_special_house_aspirations + government_is_settled + government_uses_domicile_but_not_adventurer + has_unique_government_perks + government_uses_admin_province_obligations + government_has_house_blocs + } + + color = { 250 90 150 } + realm_mask_offset = { 0.02 0.072 } + realm_mask_scale = { 0.88 0.88 } +} + +japan_feudal_government = { # Soryo + government_rules = { + create_cadet_branches = yes + rulers_should_have_dynasty = yes + dynasty_named_non_independent_landed_rulers = yes + landless_playable = yes + legitimacy = yes + house_aspirations = yes + use_as_base_on_landed = yes + use_as_base_on_rank_up = yes + noble_families = yes + } + + royal_court = any + + character_modifier = { + # LEVIES & TAXES + japan_administrative_government_tax_contribution_mult = -0.5 + japan_administrative_government_levy_contribution_mult = -0.5 + garrison_size = -0.5 + # VASSALS + vassal_limit = 50 # Shogun + # KNIGHTS + knight_effectiveness_mult = 0.1 + knight_limit = 2 + # DOMAIN + domain_limit_max = 2 # Raised further by manor + # SAMURAI + archer_cavalry_recruitment_cost_mult = -0.25 + heavy_infantry_recruitment_cost_mult = -0.25 + } + + domicile_type = japanese_manor + + primary_holding = castle_holding + primary_heritages = { heritage_japonic } + valid_holdings = { temple_citadel_holding } + required_county_holdings = { castle_holding city_holding church_holding } + + vassal_contract_group = japan_feudal_vassal + + can_get_government = { + has_tgp_dlc_trigger = yes + } + + # The Regent always remains in the same place. + can_move_realm_capital = { + NOT = { primary_title ?= title:e_japan } + } + + compatible_government_type_succession = { japan_administrative_government } + + ai = { + use_legends = yes + } + + # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). + flags = { + may_elevate_co_monarch + government_is_japan_feudal + government_has_county_tier_noble_families + has_special_house_aspirations + government_is_settled + government_uses_domicile_but_not_adventurer + has_unique_government_perks + government_has_house_blocs + } + + color = { 68 100 250 } + realm_mask_offset = { 0.0 0.075 } + realm_mask_scale = { 0.95 0.95 } +} + diff --git a/N3OW/common/governments/_governments.info b/N3OW/common/governments/_governments.info index 6f0942ea..f9a78be7 100644 --- a/N3OW/common/governments/_governments.info +++ b/N3OW/common/governments/_governments.info @@ -48,12 +48,6 @@ # dynasty_named_realms = no - ### brief: royal_court ( bool ) - # Should this government allow having a royal court if of the - # correct tier from NRoyalCourt::MIN_ROYAL_COURT_TIER - # - royal_court = no - ### brief: legitimacy ( bool ) # Rulers can have legitimacy if there's one valid for them # @@ -69,14 +63,28 @@ # administrative = no + ### brief: admin_allows_holding_multiple_primary_tier_titles ( bool ) + # Allows administrative rulers to hold multiple primary tier titles + # - Only valid with admin government types ( administrative = yes ) + # - Only checked during the following title transfer types: + # - appointment + # - appointment_succession + # - stepped_down + # + admin_allows_holding_multiple_primary_tier_titles = no + ### brief: landless_playable ( bool ) # Allow rulers be playable even when they don't have any county - # or barony. # # Requires the dlc_flag landless_playable # landless_playable = no + ### brief: allow_out_of_realm_inheritance ( bool ) + # default is no. + # + allow_out_of_realm_inheritance = no + ### brief: use_as_base_on_landed ( bool ) # Switch to this government type when obtaining your first title (becoming landed) if the old holder of the title # was this government type @@ -110,6 +118,53 @@ # mercenary = no + ### brief: state_faith ( bool ) + # Uses state faith. + # Default is no. + # + state_faith = no + + ## brief: treasury ( bool ) + # Uses the Imperial Treasury resource + # Default is no + treasury = no + + ## brief: merit ( bool ) + # Uses the Merit resource + # Default is no + merit = no + + ## brief: uses_county_fertility ( bool ) + # Default is no. + # + uses_county_fertility = no + + ## brief: replenishes_county_fertility ( bool ) + # Default is no. + # + replenishes_county_fertility = no + + ## brief: obedience ( bool ) + # Uses obedience. + # Default is no. + # + obedience = no + + ## brief: uses_culture_and_house_head_named_realms ( bool ) + # Default is no. + # + uses_culture_and_house_head_named_realms = no + + ## brief: sticky_government ( bool ) + # Default is no. + # + sticky_government = no + + ## brief: subject_men_at_arms ( bool ) + # Default is no. + # + subject_men_at_arms = no + ### brief: use_title_tier_modifiers ( bool ) # Enable passive prestige gain from held titles and title tier modifiers # Default is yes. @@ -128,7 +183,7 @@ inherit_from_dynastic_government = yes ### brief: dynasty_named_realms ( bool ) - # The realm of the government using this will have it's map name instead be based on their + # The realm of the government using this will have it's map name instead be based on their # dynasty and culture - the following rules apply # (In this example we use the mongols of the dynasty Borjigin) # If you are the culture head - you would be The Mongols @@ -149,19 +204,134 @@ # Default is yes. # use_maa_maintenance = yes + + ### brief: no_capital_movement_cooldown ( bool ) + # Default is no. + # + no_capital_movement_cooldown = no + + ## TODO_TGP add description + # + redirects_wars_to_overlord = no + + ### brief: noble_families ( bool ) + # Default is no. + # + noble_families = no + + ### brief: house_aspirations ( bool ) + # Use house aspirations or family attributes + # Default is no. + # + house_aspirations = no + + ## brief: replace_gold_cost_by_treasury (bool) + # This government pays for state expenses with treasury instead of gold. Requires the treasury flag to be set as well. + # Affected areas: title creation, holding buildings, mercenaries, title regiments.. + # default is no + # + replace_gold_cost_by_treasury = no + + ### brief: block_alliance_child_marriage (bool) + # Government flag which disables alliances from childrens' weddings + # Default is no + # + block_alliance_child_marriage = no + + ### brief: block_alliance_non_dominant_gender_child_marriage (bool) + # Government flag which disables alliances from non-dominant childrens' weddings + # Default is no + # + block_alliance_non_dominant_gender_child_marriage = no + + ### brief: always_use_patronym ( bool ) + # Patronyms will display for characters if either their Culture or + # Government has this. Default is no. + # + always_use_patronym = no + + ### brief: affected_by_development ( bool ) + # Are the counties with owners with this government type affected + # by development. + # + affected_by_development = yes + + ### brief: noble_families (bool) + # Does this government type allow the existence of Noble Family Titles? + # Default is no. + # + noble_families = no + + ### brief: considers_piety_for_title_creation ( bool ) + # Considers characters piety for title creation. + # Default is no + # + considers_piety_for_title_creation = no + + ### brief: ask_for_tribute ( bool ) + # Can ask other characters to become tributary. + # Shows tributarization_chance map mode in Realm window + # Uses offer_tributary_status_interaction interaction + # Default is no + # + ask_for_tribute = no + + ### brief: barter ( bool ) + # Enables the bartering system + # Default is no + # + barter = no + + ### brief: buildings (bool) + # Can characters of this government build buildings in their Holdings? + # Default is yes + # + buildings = yes + + ### brief: count_tributaries_for_title_requirements (bool) + # characters of this government will consider their tributaries' land as well + # when evaluating if they have enough land to create or usurp a title. + # + # you always need at least one dejure county. + # + # Default is no + # + count_tributaries_for_title_requirements = no + + ### brief: radiance (bool) + # characters of this government will have access to the Radiance mechanics + # Default is no + # + radiance = no } - ### brief: always_use_patronym ( bool ) - # Patronyms will display for characters if either their Culture or - # Government has this. Default is no. + ### mechanic_type ( government type ) + # Specifies to what "family" of government does this government belong. + # Not all governments must specify one. This flag is used in Code for some specific checks + # (such as creation of Nomad titles for Nomad rulers). Not set by default. # - always_use_patronym = no + # Supported values: + # * feudal + # * mercenary + # * holy_order + # * clan + # * theocracy + # * administrative + # * landless_adventurer + # * herder + # * nomad + # * mandala + # + mechanic_type = - ### brief: affected_by_development ( bool ) - # Are the counties with owners with this government type affected - # by development. + ### is_mechanic_type_default (bool) + # Should this government be the default of its type? This will be used + # when spawning new characters or changing government. + # Only one government per mechanic_type (described above) should be marked as default. + # All government types listed above should have one default. + # default is no # - affected_by_development = yes + is_mechanic_type_default = no ### brief: fallback ( integer ) # At least one government should be scripted as fallback, fallback @@ -185,6 +355,18 @@ # can_get_government = { ... } + ### brief: can_move_realm_capital ( trigger ) + # Checked when attempting to move realm capital to see if this + # government type allows that ruler to move it. + # + # Default behaviour: + # Rulers are, if nothing is defined, allowed to move their realm capital. + # + # Supported scopes: + # root: ( Character ) + # The ruler of the realm with this government type. + can_move_realm_capital = { ... } + ### brief: primary_holding ( database key ) # What is the primary holding type of this government type? Key is # mapped to the holdings database: common/holdings/ @@ -250,6 +432,40 @@ # prestige_opinion_override = { -20 10 ... } + ### brief: royal_court ( enum ) + # Should this government allow having a royal court for the ruler and their vassals + # if of the correct tier from NRoyalCourt::MIN_ROYAL_COURT_TIER + # none ( default ) - rulers of this government type can't have royal court, no limit on vassals + # any - rulers do have royal court, no limit on vassals + # top_liege - only independent rulers can have royal court. Any vassals on any government type can't have royal court + # + royal_court = none / any / top_liege + + ### brief: main_administrative_tier ( enum ) + # Title tier that enables most administrative mechanics + # Such as title troops, map modes etc + # + main_administrative_tier = county / duchy / kingdom + + ### brief: min_appointment_tier ( enum ) + # Title tier that enables appointment succession mechanics + # + min_appointment_tier = county / duchy / kingdom + + ### brief: minimum_provincial_maa_tier ( enum ) + # Lowest title tier allowed to have title troops. + # This should only be set for administrative government types. + # Will default to 'duchy' if not set. + # + minimum_provincial_maa_tier = county / duchy / kingdom + + ### brief: title_maa_setup ( enum ) + # Which titles within the Administrative government type can create title troops + # main_administrative_tier_and_top_liege - (default) Main administrative tier (see above) titles, and the top liege primary title + # vassals_and_top_liege - Titles that are the main administrative tier or above, and the top liege primary title + # top_vassals_and_top_liege - Titles that are directly under the top liege, and the top liege primary title + title_maa_setup = main_administrative_tier_and_top_liege + ### brief: vassal_contract ( array of database keys ) # Vassal obligations, how much does the vassal give to their liege. # The vassal's government type determines which contract type is @@ -278,6 +494,78 @@ domicile_type = domicile type key + ### brief: opinion_of_liege ( scripted value, optional ) + # An opinion bonus or malus that the vassal may have related to their liege, specific to this vassal's government type. + # Supported variables: + # liege + # vassal + # + opinion_of_liege = { value ... } + + ### brief: opinion_of_liege_desc ( dynamic description, optional ) + # Dynamic description related to the opinion_of_liege above. Please fill this in if defining a custom opinion_of_liege + # Supported variables: + # liege + # vassal + # + opinion_of_liege_desc = { dynamic_desc ... } + + ### brief: opinion_of_suzerain ( scripted value, optional ) + # An opinion bonus or malus that the tributary may have related to their suzerain, specific to this vassal's government type. + # Supported variables: + # suzerain + # tributary + # + opinion_of_suzerain = { value ... } + + ### brief: opinion_of_suzerain_desc ( dynamic description, optional ) + # Dynamic description related to the opinion_of_suzerain above. Please fill this in if defining a custom opinion_of_suzerain + # Supported variables: + # suzerain + # tributary + # + opinion_of_suzerain_desc = { dynamic_desc ... } + + ### brief: opinion_of_overlord ( scripted value, optional ) + # An opinion bonus or malus that the subjects may have related to their overlord, specific to this subject's government type. + # Note: If should apply to both liege and suzerain, use this instead + # + # Supported variables: + # overlord + # subject + # + opinion_of_overlord = { value ... } + + ### brief: opinion_of_overlord_desc ( dynamic description, optional ) + # Dynamic description related to the opinion_of_overlord above. Please fill this in if defining a custom opinion_of_overlord + # Note: If should apply to both liege and suzerain, use this instead + # + # Supported variables: + # overlord + # subject + # + opinion_of_overlord_desc = { dynamic_desc ... } + + ## brief: currency_levels_cap + # 0-based index of the max piety / prestige / merit / influence level this government allows. defaults are defined in defines.txt + # The character's level cap will be limited by this value if lower than the default, but otherwise needs modifiers to be higher. + # Use character_max_[piety/prestige/influence/merit]_level_add to add and remove levels to the default one and alter their max level cap. + # See the paragraph "Currency Level Cap Explained" below for a detailed rundown of how this system works + # + currency_levels_cap = { + piety = 5 + prestige = 5 + influence = 5 + merit = 9 + } + + ### brief: compatible_government_type_succession (government_type) + # in specific cases (such as when evaluating if a character is eligible for succession in an admin government) + # this government type also allows the listed government types to be valid candidates. Normally it's only characters + # of the same government that can be appointed + # + compatible_government_type_succession = { government_type_key ... } + ### brief: ai # Overrides for some AI functionaltiy when held by an AI with this # government type. Note that some features might be disabled for @@ -319,6 +607,11 @@ ### brief: perform_religious_reformation ( flag ) # perform_religious_reformation = yes + + ### brief: use_great_projects (flag) + # Will evaluate founding new Great Projects and contributing to existing ones + # + use_great_projects = no } ### brief: character_modifier ( modifiers ) @@ -326,17 +619,55 @@ # character_modifier = {} + ### brief: top_liege_character_modifier ( modifiers ) + # Modifier applied to the ruler character with this government type, if they are an independent top liege. + # This applied on top of the regular 'character_modifier' above. + # + top_liege_character_modifier = {} + ### brief: color ( vector 3 ) # Color for map mode # color = { 100 100 100 } - ### brief: flag ( flag ) - # List of flags this government uses. Can be defined as any string - # that can be referenced by government_has_flag = some_flag. Can - # be defined multiple times for multiple flags. + ############## + ### AI + ############## + + ### brief: ai_ruler_desired_kingdom_titles (scripted value) + # How many kingdom titles would the a ruler with this government want to keep for themselves? + # They will try to give away excess kingdoms until they are at the specified value. + # A negative value will make the AI keep all titles. + # Default value is defined as AI_RULER_DESIRED_KINGDOM_TITLES_DEFAULT # - flag = some_flag + # root = the ruler + ai_ruler_desired_kingdom_titles = -1 + + ### brief: ai_ruler_desired_empire_titles (scripted value) + # How many empire titles would a ruler with this government want to keep for themselves? + # They will try to give away excess empires until they are at the specified value. + # A negative value will make the AI keep all titles. + # Default value is defined as AI_RULER_DESIRED_EMPIRE_TITLES_DEFAULT + # + # root = the ruler + ai_ruler_desired_empire_titles = -1 + + ### brief: ai_can_reassign_council_positions (trigger) + # Should an AI ruler with this government be allowed to reassign council positions? Default is yes + # + # root = the council owner + # + ai_can_reassign_council_positions = { ... } + + + ### brief: flags ( parameter list ) + # List of flags this government uses. Can be defined as any string + # that can be referenced by government_has_flag = some_flag. + # + flags = { + some_flag + some_other_flag + } } Allowed Modifiers @@ -352,3 +683,42 @@ databases: Other generated modifiers are _not_ allowed, such as those from other governments, men_at_arms_types, cultures, or terrain types. + +### +### Currency Level Cap Explained +### +# Characters' maximum achievable levels for Prestige, Piety, Influence and Merit depend on 4 sources: +# * the default maximum level, defined in 00_define.txt +# * the list of level tiers, also defined in 00_define.txt +# * the cap specified in their government +# * the modifiers applied to the Character +# +# Considering Piety for instance, a Character's maximum Level of Devotion depends on: +# * NCharacter.DEFAULT_PIETY_LEVEL_CAP (5) +# * the list of Devotion points needed to achieve every level (NCharacter.LEVELS_PIETY), which has 8 entries +# * the default currency_level_cap.piety for a government is equal to DEFAULT_PIETY_LEVEL_CAP (5), but for Mandala governments this is set to 8. +# This means Characters with the Mandala government type will eventually be able to raise their maximum Level of Devotion to Godlike. +# * the relevant modifier is character_max_piety_level_add +# +# Every Character's maximum Level of Devotion starts at their default (5), but it can be increased or decreased by character_max_piety_level_add. +# However it can never be higher than the cap specified by their Government. +# +# Some fictional examples follow. Imagine that: +# * there is a followed_by_the_masses modifier that gives character_max_piety_level_add = 1 +# * there is a excommunicated modifier that gives character_max_piety_level_add = -2 +# * there is a god_incarnate modifier that gives character_max_piety_level_add = 10 +# * the Feudal government has default Piety level cap, while the Mandala government has Piety level cap set to 8. +# * a fictional Unpious government type has a piety cap set at 3. +# +# * a Mandala ruler followed_by_the_masses will have a maximum achievable Level of Devotion of 6 (5 + 1, capped at 8 due to Mandala level cap) +# * a god_incarnate Mandala ruler will have a maximum achievable Level of Devotion of 8 (5 + 10, capped at 8 due to Mandala level cap) +# * a Feudal ruler followed_by_the_masses will have a maximum achievable Level of Devotion of 5 (5 + 1, capped at 5 due to Feudal level cap) +# * an Unpious ruler followed_by_the_masses will have a maximum achievable Level of Devotion of 3 (5 + 1, capped at 3 due to Unpious level cap) +# * an excommunicated Feudal ruler followed_by_the_masses will have a maximum achievable Level of Devotion of 4 (5 + 1 - 2) +# * an excommunicated Unpious ruler will still have a maximum achievable Level of Devotion of 3 (5 - 2, capped at 3) +# * an excommunicated Mandala ruler will have a maximum achievable Level of Devotion of 3 (5 - 2) +# * a god_incarnate excommunicated Mandala ruler will have a maximum achievable Level of Devotion of 8 (5 + 10 - 2, capped at 8) + + + + diff --git a/N3OW/common/on_action/game_start.txt b/N3OW/common/on_action/game_start.txt index 5a6556ac..b56b5276 100644 --- a/N3OW/common/on_action/game_start.txt +++ b/N3OW/common/on_action/game_start.txt @@ -1689,17 +1689,18 @@ on_game_start = { } #Admin - generate families every_independent_ruler = { - limit = { has_government = administrative_government } + limit = { has_government = administrative_government } every_vassal = { limit = { - has_government = administrative_government - is_house_head = yes - highest_held_title_tier >= tier_duchy - NOR = { - any_held_title = { is_noble_family_title = yes } - house = { - any_house_member = { - any_held_title = { is_noble_family_title = yes } + has_government = administrative_government + is_house_head = yes + highest_held_title_tier >= tier_duchy + NOR = { + any_held_title = { is_noble_family_title = yes } + house = { + any_house_member = { + any_held_title = { is_noble_family_title = yes } + } } } } @@ -1710,6 +1711,19 @@ on_game_start = { create_noble_family_effect = yes domicile ?= { set_up_domicile_estate_effect = yes } } + every_independent_ruler = { + limit = { has_government = republic_government tier = tier_duchy } + every_vassal = { + limit = { + tier = tier_duchy + has_government = republic_government + } + create_noble_family_effect = yes + domicile ?= { set_up_domicile_estate_effect = yes } + } + create_noble_family_effect = yes + domicile ?= { set_up_domicile_estate_effect = yes } + } } } diff --git a/N3OW/common/scripted_effects/00_administrative_effects.txt b/N3OW/common/scripted_effects/00_administrative_effects.txt index bc521383..a19b18de 100644 --- a/N3OW/common/scripted_effects/00_administrative_effects.txt +++ b/N3OW/common/scripted_effects/00_administrative_effects.txt @@ -118,6 +118,41 @@ change_to_administrative_interaction_effect = { } } +set_up_domicile_patrician_estate_effect = { + if = { + limit = { is_domicile_type = patrician_estate } + # Intentionally one level lower than what you can get + if = { + limit = { + NOT = { has_domicile_building_or_higher = estate_main_02 } + owner.culture ?= { has_innovation = innovation_city_planning } + } + add_domicile_building = estate_main_02 + } + if = { + limit = { + has_domicile_building = estate_main_02 + NOT = { has_domicile_building_or_higher = estate_main_03 } + owner.culture ?= { has_innovation = innovation_manorialism } + } + add_domicile_building = estate_main_03 + } + switch = { + trigger = has_domicile_building + estate_main_03 = { + while = { + count = 2 + add_random_internal_estate_building = yes + } + } + estate_main_02 = { + add_random_internal_estate_building = yes + } + } + fill_external_estate_building_effect = yes + } +} + set_up_domicile_estate_effect = { if = { limit = { is_domicile_type = estate } diff --git a/N3OW/common/scripted_triggers/00_activity_triggers.txt b/N3OW/common/scripted_triggers/00_activity_triggers.txt index cc298b18..41e644a8 100644 --- a/N3OW/common/scripted_triggers/00_activity_triggers.txt +++ b/N3OW/common/scripted_triggers/00_activity_triggers.txt @@ -1,12 +1,10 @@ is_available_for_activity_trigger = { - NOT = { exists = involved_activity } - is_adult = yes - OR = { - is_ai = no - is_busy_in_events_unlocalised = no + is_available_quick = { + adult = yes + at_war = no + imprisoned = no + activity = no } - is_at_war = no - is_imprisoned = no is_healthy = yes NOR = { exists = var:booked_for_a_party @@ -15,17 +13,15 @@ } is_available_for_child_activity_trigger = { - NOT = { exists = involved_activity } - is_adult = no + is_available_quick = { + adult = no + at_war = no + imprisoned = no + activity = no + hostage = no + } age >= 4 age < less_than_two_years_to_adulthood_value #To avoid being away when Coming of Age-event triggers - OR = { - is_ai = no - is_busy_in_events_unlocalised = no - } - is_at_war = no - is_imprisoned = no - is_hostage = no is_healthy = yes NOR = { exists = var:hostage_travelling_to_warden @@ -34,24 +30,21 @@ is_available_for_child_activity_trigger = { } is_available_in_activity_trigger = { - exists = involved_activity - is_adult = yes - OR = { - is_ai = no - is_busy_in_events_unlocalised = no + is_available_quick = { + activity = yes + adult = yes + at_war = no + imprisoned = no } - is_at_war = no - is_imprisoned = no is_healthy = yes } ### Witch Ritual activity_witch_ritual_valid_trigger = { - exists = house - house = { + house ?= { has_house_modifier = witch_coven any_house_member = { - NOT = { this = root } + this != root is_witch_known_by_trigger = { CHARACTER = root } } } @@ -219,7 +212,7 @@ petition_liege_county_convert_trigger = { tier = tier_county trigger_if = { limit = { tier = tier_county } - NOT = { county.faith = holder.faith } + county.faith != holder.faith } } @@ -240,7 +233,7 @@ petition_liege_fortify_border_trigger = { county = { save_temporary_scope_as = county_scope any_title_to_title_neighboring_county = { - NOT = { holder.top_liege = scope:county_scope.holder.top_liege } # petition_liege + holder.top_liege != scope:county_scope.holder.top_liege # petition_liege NOT = { holder.top_liege = { is_allied_to = scope:county_scope.holder.top_liege } # petition_liege } @@ -252,18 +245,18 @@ petition_liege_fortify_border_trigger = { # Liege Title petition_liege_title_liege_trigger = { holder = prev.liege - NOT = { THIS = prev.liege.primary_title } + this != prev.liege.primary_title tier < prev.liege.primary_title.tier trigger_if = { limit = { exists = county } - NOT = { county = holder.capital_county } + county != holder.capital_county } OR = { tier > tier_county holder = { any_held_title = { count > 1 - tier = tier_county + title_tier = county } } } @@ -271,8 +264,7 @@ petition_liege_title_liege_trigger = { # Vassal Title petition_liege_title_vassal_trigger = { - exists = holder - holder = { save_temporary_scope_as = second_temp } + holder ?= { save_temporary_scope_as = second_temp } OR = { scope:second_temp.liege = prev.liege scope:second_temp.liege.liege = prev.liege @@ -290,7 +282,7 @@ petition_liege_title_vassal_trigger = { } #trigger_if = { # limit = { exists = county } - # NOT = { county = holder.capital_county } + # county != holder.capital_county #} scope:second_temp = { trigger_if = { @@ -303,7 +295,7 @@ petition_liege_title_vassal_trigger = { scope:second_temp = { any_held_title = { count > 1 - tier = tier_county + title_tier = county } } } @@ -343,6 +335,7 @@ petition_liege_medium_cost_trigger = { limit = { scope:petition_vassal.var:petition_type = flag:war_aid } petitioner_war_aid_levies_cost_value > scope:petition_liege.medium_gold_value } + scope:petition_vassal.var:petition_type = flag:regent } } @@ -398,39 +391,39 @@ petition_liege_skiller_trigger = { trigger_if = { limit = { exists = scope:second_party } - NOT = { this = scope:second_party } + this != scope:second_party } trigger_if = { limit = { exists = scope:vassal_claimant } - NOT = { this = scope:vassal_claimant } + this != scope:vassal_claimant } trigger_if = { limit = { exists = scope:second_councillor } - NOT = { this = scope:second_councillor } + this != scope:second_councillor } trigger_if = { limit = { exists = scope:diplomacy_check } - NOT = { this = scope:diplomacy_check } + this != scope:diplomacy_check } trigger_if = { limit = { exists = scope:martial_check } - NOT = { this = scope:martial_check } + this != scope:martial_check } trigger_if = { limit = { exists = scope:stewardship_check } - NOT = { this = scope:stewardship_check } + this != scope:stewardship_check } trigger_if = { limit = { exists = scope:intrigue_check } - NOT = { this = scope:intrigue_check } + this != scope:intrigue_check } trigger_if = { limit = { exists = scope:learning_check } - NOT = { this = scope:learning_check } + this != scope:learning_check } trigger_if = { limit = { exists = scope:petition_vassal } - NOT = { this = scope:petition_vassal } + this != scope:petition_vassal } } @@ -558,6 +551,18 @@ petition_liege_valid_trigger = { } } +petition_ceremonial_liege_valid_trigger = { + is_alive = yes + is_imprisoned = no + has_variable = petition_ceremonial_liege_scope + var:petition_ceremonial_liege_scope.top_liege ?= root.top_liege # Same realm + var:petition_ceremonial_liege_scope != root.top_liege # Not true liege + var:petition_ceremonial_liege_scope = { + is_imprisoned = no + has_royal_court = yes + } +} + adventurer_potential_destination_distance_check = { #This is made to be used inside set_adventure_location_effect - it relies on the scope it is being run in being the adventurer #Also expects $REGION$ @@ -593,8 +598,10 @@ adventurer_potential_destination_distance_check = { } activity_invite_rule_trigger = { - is_adult = yes - is_imprisoned = no + is_available_quick = { + adult = yes + imprisoned = no + } in_diplomatic_range = root } @@ -659,6 +666,11 @@ any_journey_point_of_interest_trigger = { has_building_or_higher = generic_copper_mines_01 has_building_or_higher = generic_silver_mines_01 has_building_or_higher = generic_gold_mines_01 + # TGP + has_building_or_higher = holy_site_buddhist_grand_temple_01 + has_building_or_higher = holy_site_japanese_temple_01 + has_building_or_higher = holy_site_chinese_temple_01 + has_building_or_higher = holy_site_se_asia_pagan_temple_01 } } diff --git a/N3OW/common/scripted_triggers/00_ai_value_triggers.txt b/N3OW/common/scripted_triggers/00_ai_value_triggers.txt index 114a265b..d1bc4307 100644 --- a/N3OW/common/scripted_triggers/00_ai_value_triggers.txt +++ b/N3OW/common/scripted_triggers/00_ai_value_triggers.txt @@ -16,11 +16,47 @@ opposing_ai_values_trigger = { } } +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_power_parameter = aspect_of_serenity } + } + NOR = { + has_variable = conqueror + #Weight the AI according to their Aspect + house ?= { + OR = { + has_house_power_parameter = aspect_of_creation + has_house_power_parameter = aspect_of_destruction + has_house_power_parameter = aspect_of_trickery + } + } + } +} + ai_has_warlike_personality = { OR = { AND = { has_trait = despoiler_of_byzantium any_held_title = { + tier <= tier_empire OR = { empire = title:e_byzantium empire = title:e_latin_empire @@ -28,11 +64,8 @@ ai_has_warlike_personality = { } } vassal_contract_has_flag = admin_ai_is_warlike # Admin vassals with the "Frontier" administration consider it their job to expand - AND = { # The unity decision "Organize House Members for War" forces AI house members to adopt this stance - exists = house - house = { - has_house_modifier = unity_house_organized_for_war_modifier - } + 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 = { @@ -84,19 +117,36 @@ ai_has_warlike_personality = { has_trait = calm faith = { has_doctrine_parameter = pacifist_opinion_active } culture = { has_cultural_parameter = reduced_cost_for_conversion_to_pacifist_faith } - AND = { - exists = house - house = { - has_house_modifier = unity_house_focused_on_economy_modifier - } + 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_power_parameter = aspect_of_destruction } + } + NOR = { + has_variable = conqueror + #Weight the AI according to their Aspect + house ?= { + OR = { + has_house_power_parameter = aspect_of_creation + has_house_power_parameter = aspect_of_serenity + has_house_power_parameter = aspect_of_trickery + } + } } - ai_has_conqueror_personality = no } ai_has_cautious_personality = { @@ -119,13 +169,14 @@ ai_has_cautious_personality = { NOR = { has_trait = fickle has_trait = lunatic - AND = { - exists = house - house = { - OR = { - has_house_modifier = unity_house_organized_for_war_modifier - has_house_modifier = unity_house_focused_on_economy_modifier - } + 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_power_parameter = aspect_of_creation + has_house_power_parameter = aspect_of_serenity + has_house_power_parameter = aspect_of_trickery } } AND = { # They are Detractors during the FP3 Struggle in the Unrest Phase @@ -137,25 +188,70 @@ ai_has_cautious_personality = { } vassal_contract_has_flag = admin_ai_is_warlike vassal_contract_has_flag = admin_ai_is_builder + has_variable = conqueror } - ai_has_conqueror_personality = no } ai_has_economical_boom_personality = { OR = { - vassal_contract_has_flag = admin_ai_is_builder # Admin vassals with the "Civilian" administration consider it their job to improve the economy - AND = { # The unity decision "Encourage House to Improve the Economy" forces AI house members to adopt this stance - exists = house - house = { - has_house_modifier = unity_house_focused_on_economy_modifier - } + # 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_power_parameter = aspect_of_creation } + } + NOR = { + has_variable = conqueror + #Weight the AI according to their Aspect + house ?= { + OR = { + has_house_power_parameter = aspect_of_destruction + has_house_power_parameter = aspect_of_serenity + has_house_power_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 + } } - ai_has_conqueror_personality = no } economical_ai_guts_trigger = { @@ -168,19 +264,14 @@ economical_ai_guts_trigger = { has_trait = generous has_trait = stubborn has_trait = profligate - has_trait = improvident has_character_modifier = the_city_builder_modifier has_character_modifier = the_castle_builder_modifier - has_character_modifier = the_temple_builder_modifier } NAND = { has_trait = greedy has_trait = impatient - AND = { - exists = house - house = { - has_house_modifier = unity_house_organized_for_war_modifier - } + house ?= { + has_house_modifier = unity_house_organized_for_war_modifier } } } @@ -198,7 +289,7 @@ ai_wants_low_unity = { has_trait_benevolent_trigger = no } ai_has_warlike_personality = yes - ai_has_conqueror_personality = yes + has_variable = conqueror has_character_flag = agenda_towards_escalation } } @@ -238,34 +329,25 @@ ai_has_conqueror_personality = { has_trait = greatest_of_khans has_character_modifier = the_great_khan_modifier any_owned_story = { - story_type = story_conqueror + type = story_conqueror } } } ai_should_get_conqueror_bonuses = { - AND = { - OR = { - has_game_rule = default_conquerors_bonuses - has_game_rule = extreme_conquerors_bonuses - has_game_rule = random_conquerors_bonuses - has_game_rule = reduced_random_conquerors_bonuses - } - ai_has_conqueror_personality = yes - } + has_variable = conqueror + NOT = { has_game_rule = no_conquerors_bonuses } } ai_should_get_extreme_conqueror_bonuses = { - AND = { - has_character_modifier = ai_extreme_conqueror_modifier - ai_has_conqueror_personality = yes - } + 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 - ai_has_conqueror_personality = no + NOT = { has_variable = conqueror } NOT = { government_has_flag = government_is_nomadic } exists = capital_county exists = culture diff --git a/N3OW/common/scripted_triggers/00_artifact_triggers.txt b/N3OW/common/scripted_triggers/00_artifact_triggers.txt index f7e72723..cad4e647 100644 --- a/N3OW/common/scripted_triggers/00_artifact_triggers.txt +++ b/N3OW/common/scripted_triggers/00_artifact_triggers.txt @@ -228,8 +228,7 @@ artifact_needs_material_wood_trigger = { # UnitGFX-based triggers artifact_use_african_unit_visuals_trigger = { - exists = culture - culture = { has_unit_gfx = sub_sahran_unit_gfx } + culture ?= { has_unit_gfx = sub_sahran_unit_gfx } } artifact_use_eastern_unit_visuals_trigger = { @@ -250,8 +249,7 @@ artifact_use_mena_unit_visuals_trigger = { } artifact_use_northern_unit_visuals_trigger = { - exists = culture - culture = { + culture ?= { OR = { has_unit_gfx = norse_unit_gfx has_unit_gfx = northern_unit_gfx @@ -260,13 +258,11 @@ artifact_use_northern_unit_visuals_trigger = { } artifact_use_mongol_unit_visuals_trigger = { - exists = culture - culture = { has_unit_gfx = mongol_unit_gfx } + culture ?= { has_unit_gfx = mongol_unit_gfx } } artifact_use_western_unit_visuals_trigger = { - exists = culture - culture = { + culture ?= { OR = { has_unit_gfx = western_unit_gfx has_unit_gfx = eastern_unit_gfx @@ -275,73 +271,104 @@ artifact_use_western_unit_visuals_trigger = { } } +artifact_use_chinese_unit_visuals_trigger = { + culture ?= { has_unit_gfx = chinese_unit_gfx } +} + +artifact_use_japanese_unit_visuals_trigger = { + culture ?= { has_unit_gfx = japanese_unit_gfx } +} + +artifact_use_southeast_asian_unit_visuals_trigger = { + culture ?= { has_unit_gfx = southeast_asian_unit_gfx } +} + artifact_use_iberian_muslim_unit_visuals_trigger = { - exists = culture - culture = { has_unit_gfx = iberian_muslim_unit_gfx } + culture ?= { has_unit_gfx = iberian_muslim_unit_gfx } } artifact_use_iberian_christian_unit_visuals_trigger = { - exists = culture - culture = { has_unit_gfx = iberian_christian_unit_gfx } + culture ?= { has_unit_gfx = iberian_christian_unit_gfx } } artifact_use_iranian_unit_visuals_trigger = { - exists = culture - culture = { has_unit_gfx = iranian_unit_gfx } + culture ?= { has_unit_gfx = iranian_unit_gfx } } # BuildingGFX-based triggers +artifacts_use_indian_books_trigger = { + OR = { + artifact_use_indian_building_visuals_trigger = yes + artifact_use_chinese_building_visuals_trigger = yes + artifact_use_japanese_building_visuals_trigger = yes + artifact_use_southeast_asian_building_visuals_trigger = yes + } +} + artifact_use_indian_building_visuals_trigger = { - exists = culture - culture = { has_building_gfx = indian_building_gfx } + culture ?= { + OR = { + has_building_gfx = indian_building_gfx + has_building_gfx = southeast_asian_building_gfx + } + } } artifact_use_mena_building_visuals_trigger = { - exists = culture - culture = { has_building_gfx = mena_building_gfx } + culture ?= { has_building_gfx = mena_building_gfx } } artifact_use_mediterranean_building_visuals_trigger = { - exists = culture - culture = { OR = { - has_building_gfx = mediterranean_building_gfx - has_building_gfx = byzantine_building_gfx } + culture ?= { + OR = { + has_building_gfx = mediterranean_building_gfx + has_building_gfx = byzantine_building_gfx + } } } artifact_use_byzantine_building_visuals_trigger = { - exists = culture - culture = { has_building_gfx = byzantine_building_gfx } + culture ?= { has_building_gfx = byzantine_building_gfx } } artifact_use_iberian_building_visuals_trigger = { - exists = culture - culture = { has_building_gfx = iberian_building_gfx } + culture ?= { has_building_gfx = iberian_building_gfx } } artifact_use_western_building_visuals_trigger = { - exists = culture - culture = { has_building_gfx = western_building_gfx } + culture ?= { has_building_gfx = western_building_gfx } } artifact_use_norse_building_visuals_trigger = { - exists = culture - culture = { has_building_gfx = norse_building_gfx } + culture ?= { has_building_gfx = norse_building_gfx } } artifact_use_steppe_building_visuals_trigger = { - exists = culture - culture = { has_building_gfx = steppe_building_gfx } + culture ?= { has_building_gfx = steppe_building_gfx } } artifact_use_iranian_building_visuals_trigger = { - exists = culture - culture = { has_building_gfx = iranian_building_gfx } + culture ?= { has_building_gfx = iranian_building_gfx } } artifact_use_berber_building_visuals_trigger = { - exists = culture - culture = { has_building_gfx = berber_group_building_gfx } + culture ?= { has_building_gfx = berber_group_building_gfx } +} + +artifact_use_chinese_building_visuals_trigger = { + culture ?= { has_building_gfx = chinese_building_gfx } +} + +artifact_use_japanese_building_visuals_trigger = { + culture ?= { has_building_gfx = japanese_building_gfx } +} + +artifact_use_southeast_asian_building_visuals_trigger = { + culture ?= { has_building_gfx = southeast_asian_building_gfx } +} + +artifact_use_korean_clothing_visuals_trigger = { + culture ?= { has_clothing_gfx = korean_clothing_gfx } } # GFX Trigger-picker @@ -681,6 +708,69 @@ artifact_feature_wood_palm_trigger = { artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_palm } } +# East Asia +# nanmu +artifact_feature_wood_nanmu_trigger = { + artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 90 } + artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_asia_east } +} + +# boxwood +artifact_feature_wood_boxwood_trigger = { + artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 90 } + artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_asia_east } +} + +# paulownia +artifact_feature_wood_paulownia_trigger = { + artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 90 } + artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_asia_east } +} + +# camphorwood +artifact_feature_wood_camphorwood_trigger = { + artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 90 } + artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_asia_east } +} + +# Southeast Asia +# narra +artifact_feature_wood_narra_trigger = { + artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 90 } + artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_asia_southeast } +} + +# toona sureni +artifact_feature_wood_toona_sureni_trigger = { + artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 90 } + artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_asia_southeast } +} + +# agarwood +artifact_feature_wood_agarwood_trigger = { + artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 90 } + artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_asia_southeast } +} + +# sandalwood +artifact_feature_wood_sandalwood_trigger = { + artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 90 } + artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_asia_southeast } +} + +# Northeast Asia +# birch +artifact_feature_wood_birch_trigger = { + artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 90 } + artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_asia_northeast } +} + +# linden +artifact_feature_wood_linden_trigger = { + artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 90 } + artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_asia_northeast } +} + ########################################## # Cloths # Woven materials for clothing, tapestries, embroidery, ropes, etc. @@ -1703,11 +1793,11 @@ book_subject_animals_trigger = { OR = { has_trait = lifestyle_hunter AND = { - any_owned_story = { story_type = story_cycle_pet_cat } + any_owned_story = { type = story_cycle_pet_cat } exists = var:story_cycle_cat_name } AND = { - any_owned_story = { story_type = story_cycle_pet_dog } + any_owned_story = { type = story_cycle_pet_dog } exists = var:story_cycle_dog_name } } @@ -2082,7 +2172,7 @@ relic_war_valid_struggle_artefact_trigger = { christianity_or_syncretic_with_christianity_trigger = { CHARACTER = scope:attacker } } } - NOT = { scope:attacker.faith = scope:defender.faith } + scope:attacker.faith != scope:defender.faith } @@ -2113,7 +2203,7 @@ relic_war_valid_against_defender_trigger = { christianity_or_syncretic_with_christianity_trigger = { CHARACTER = scope:attacker } } } - NOT = { scope:attacker.faith = scope:defender.faith } + scope:attacker.faith != scope:defender.faith } } } @@ -2121,9 +2211,7 @@ relic_war_valid_against_defender_trigger = { relic_war_valid_against_defender_vassal_trigger = { any_vassal_or_below = { - NOT = { - faith = scope:attacker.faith - } + faith != scope:attacker.faith any_character_artifact = { exists = var:relic OR = { @@ -2150,7 +2238,7 @@ relic_war_valid_against_defender_vassal_trigger = { christianity_or_syncretic_with_christianity_trigger = { CHARACTER = scope:attacker } } } - NOT = { scope:attacker.faith = scope:defender.faith } + scope:attacker.faith != scope:defender.faith } } } diff --git a/N3OW/common/scripted_triggers/00_available_for_events_triggers.txt b/N3OW/common/scripted_triggers/00_available_for_events_triggers.txt index 03fa9422..c80af4e0 100644 --- a/N3OW/common/scripted_triggers/00_available_for_events_triggers.txt +++ b/N3OW/common/scripted_triggers/00_available_for_events_triggers.txt @@ -1,6 +1,4 @@ ###TRIGGER LIST -#is_busy_in_events_unlocalised - already in an involved event chain -#is_in_pseudo_activity_trigger - character is involved in a pseudo-activity #has_contagious_deadly_disease_trigger #is_healthy #is_available @@ -15,46 +13,9 @@ #can_select_lifestyle_focus #can_marry #can_become_concubine -#is_busy_in_events_localised - -# Despite the name, there are rare instances in which these may become visible to the player - if you add to this list, add localization also -is_busy_in_events_unlocalised = { - OR = { - has_character_flag = is_in_diplomacy_foreign_special_event - has_character_flag = is_in_diplomacy_family_special_event - has_character_flag = is_in_diplomacy_majesty_special_event - has_character_flag = is_in_martial_special_event - has_character_flag = is_in_stewardship_domain_special_event - has_character_flag = is_in_stewardship_duty_special_event - has_character_flag = is_in_stewardship_wealth_special_event - has_character_flag = is_in_intrigue_special_event - has_character_flag = is_in_learning_special_event - has_character_flag = is_in_task_contract_event_chain - has_character_flag = migration_events_1060_rode_ahead - } -} - -# For flags that *may* be seen by the player, and thus need to be cloaked in a custom description to look nice. -is_busy_in_events_localised = { - custom_description = { - text = "yearly_1010_abducted" - NOT = { has_character_flag = yearly_1010_abducted } - } - custom_description = { - text = "yearly_1010_abductor" - NOT = { has_character_flag = yearly_1010_abductor } - } -} has_contagious_deadly_disease_trigger = { - OR = { - has_trait = bubonic_plague - has_trait = smallpox - has_trait = typhus - has_trait = consumption - has_trait = measles - has_trait = dysentery - } + has_trait_with_flag = contagious_deadly_disease } is_healthy = { @@ -62,37 +23,207 @@ is_healthy = { text = not_poor_health_tt health >= fine_health } - NOR = { - has_trait = infirm - has_trait = incapable - has_trait = wounded_2 - has_trait = wounded_3 + NOT = { + has_trait_with_flag = is_healthy_trigger_flag } has_contagious_deadly_disease_trigger = no } basic_is_available_ai = { - is_alive = yes - is_imprisoned = no - is_ai = yes - is_incapable = no + is_available_quick = { + ai = yes + alive = yes + imprisoned = no + incapable = no + } has_contagious_deadly_disease_trigger = no } is_available_allow_travelling = { - is_alive = yes - is_in_army = no - is_imprisoned = no - is_incapable = no + is_available_quick = { + alive = yes + imprisoned = no + incapable = no + in_army = no + } has_contagious_deadly_disease_trigger = no custom_description = { text = ALREADY_IN_ACTIVITY NOR = { exists = involved_activity - has_variable = homage_liege_scope - has_character_flag = meditation_character_flag - has_character_flag = petition_liege_character_flag - has_character_flag = holding_court_character_flag + has_variable = { + name = homage_liege_scope + name = meditation_character_flag + name = local_shrine_rite + name = petition_liege_character_flag + name = holding_court_character_flag + } + is_being_visited_on_tour_strict = yes + } + } + custom_description = { + text = ALREADY_PLANNING_ACTIVITY + NOT = { has_character_flag = planning_an_activity } + } + # Variable set within the adventure inspiration events + NOT = { has_variable = gone_adventuring } + # Variable set on Mandala succession + custom_tooltip = { + text = busy_in_mandala_succession + NOT = { has_variable = busy_in_mandala_succession } + } +} + +# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. +is_available = { + is_available_quick = { + alive = yes + travel = no + in_army = no + imprisoned = no + incapable = no + } + has_contagious_deadly_disease_trigger = no + custom_description = { + text = ALREADY_IN_ACTIVITY + NOR = { + exists = involved_activity + has_variable = { + name = homage_liege_scope + name = meditation_character_flag + name = local_shrine_rite + name = petition_liege_character_flag + name = holding_court_character_flag + } + is_being_visited_on_tour_strict = yes + } + } + custom_description = { + text = ALREADY_PLANNING_ACTIVITY + NOT = { has_character_flag = planning_an_activity } + } + # Variable set within the adventure inspiration events + NOT = { has_variable = gone_adventuring } + # Variable set on Mandala succession + custom_tooltip = { + text = busy_in_mandala_succession + NOT = { has_variable = busy_in_mandala_succession } + } +} + +# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. +is_available_travelling = { + is_available_quick = { + alive = yes + in_army = no + imprisoned = no + incapable = no + travel = yes + } + has_contagious_deadly_disease_trigger = no + NOR = { + has_character_flag = is_in_task_contract_event_chain + has_variable = gone_adventuring + } +} + +# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. +is_available_travelling_adult = { + is_available_quick = { + travel = yes + adult = yes + alive = yes + in_army = no + imprisoned = no + incapable = no + } + has_contagious_deadly_disease_trigger = no + NOR = { + has_character_flag = is_in_task_contract_event_chain + has_variable = gone_adventuring + } +} + +# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. +is_available_travelling_ai_adult = { + is_available_quick = { + travel = yes + adult = yes + ai = yes + alive = yes + in_army = no + imprisoned = no + incapable = no + } + has_contagious_deadly_disease_trigger = no + NOR = { + has_character_flag = is_in_task_contract_event_chain + has_variable = gone_adventuring + } +} + +# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. +is_physically_able = { + is_available_quick = { + alive = yes + imprisoned = no + incapable = no + } +} + +# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. +is_physically_able_ai = { + is_available_quick = { + ai = yes + alive = yes + imprisoned = no + incapable = no + } +} + +# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. +is_physically_able_adult = { + is_available_quick = { + adult = yes + alive = yes + imprisoned = no + incapable = no + } +} + +# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. +is_physically_able_ai_adult = { + is_available_quick = { + ai = yes + adult = yes + alive = yes + imprisoned = no + incapable = no + } +} + +# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. +is_available_ai = { + is_available_quick = { + ai = yes + alive = yes + travel = no + in_army = no + imprisoned = no + incapable = no + } + has_contagious_deadly_disease_trigger = no + custom_description = { + text = ALREADY_IN_ACTIVITY + NOR = { + exists = involved_activity + has_variable = { + name = homage_liege_scope + name = meditation_character_flag + name = local_shrine_rite + name = petition_liege_character_flag + name = holding_court_character_flag + } is_being_visited_on_tour_strict = yes } } @@ -104,106 +235,306 @@ is_available_allow_travelling = { NOT = { has_variable = gone_adventuring } } -is_available = { - is_travelling = no - is_available_allow_travelling = yes -} - -is_available_travelling = { - is_alive = yes - is_in_army = no - is_imprisoned = no - is_incapable = no - is_travelling = yes - has_contagious_deadly_disease_trigger = no - NOT = { has_variable = gone_adventuring } - is_busy_in_events_unlocalised = no -} - -is_available_travelling_adult = { - is_adult = yes - is_available_travelling = yes -} - -is_available_travelling_ai_adult = { - is_adult = yes - is_ai = yes - is_available_travelling = yes -} - -is_physically_able = { - is_alive = yes - is_imprisoned = no - is_incapable = no -} - -is_physically_able_ai = { - is_ai = yes - is_alive = yes - is_imprisoned = no - is_incapable = no -} - -is_physically_able_adult = { - is_adult = yes - is_physically_able = yes -} - -is_physically_able_ai_adult = { - is_ai = yes - is_adult = yes - is_physically_able_adult = yes -} - -is_available_ai = { - is_ai = yes - is_available = yes -} - +# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. is_available_child = { - is_adult = no - is_available = yes + is_available_quick = { + adult = no + alive = yes + travel = no + in_army = no + imprisoned = no + incapable = no + } + + has_contagious_deadly_disease_trigger = no + custom_description = { + text = ALREADY_IN_ACTIVITY + NOR = { + exists = involved_activity + has_variable = { + name = homage_liege_scope + name = meditation_character_flag + name = local_shrine_rite + name = petition_liege_character_flag + name = holding_court_character_flag + } + is_being_visited_on_tour_strict = yes + } + } + custom_description = { + text = ALREADY_PLANNING_ACTIVITY + NOT = { has_character_flag = planning_an_activity } + } + # Variable set within the adventure inspiration events + NOT = { has_variable = gone_adventuring } } +# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. is_available_child_allow_travel = { - is_adult = no - is_available_allow_travelling = yes + is_available_quick = { + adult = no + alive = yes + in_army = no + imprisoned = no + incapable = no + } + + has_contagious_deadly_disease_trigger = no + custom_description = { + text = ALREADY_IN_ACTIVITY + NOR = { + exists = involved_activity + has_variable = { + name = homage_liege_scope + name = meditation_character_flag + name = local_shrine_rite + name = petition_liege_character_flag + name = holding_court_character_flag + } + is_being_visited_on_tour_strict = yes + } + } + custom_description = { + text = ALREADY_PLANNING_ACTIVITY + NOT = { has_character_flag = planning_an_activity } + } + # Variable set within the adventure inspiration events + NOT = { has_variable = gone_adventuring } } +# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. is_available_ai_child = { - is_adult = no - is_available = yes - is_ai = yes + is_available_quick = { + adult = no + ai = yes + alive = yes + travel = no + in_army = no + imprisoned = no + incapable = no + } + has_contagious_deadly_disease_trigger = no + custom_description = { + text = ALREADY_IN_ACTIVITY + NOR = { + exists = involved_activity + has_variable = { + name = homage_liege_scope + name = meditation_character_flag + name = local_shrine_rite + name = petition_liege_character_flag + name = holding_court_character_flag + } + is_being_visited_on_tour_strict = yes + } + } + custom_description = { + text = ALREADY_PLANNING_ACTIVITY + NOT = { has_character_flag = planning_an_activity } + } + # Variable set within the adventure inspiration events + NOT = { has_variable = gone_adventuring } } +# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. is_available_healthy_child = { - is_available_child = yes + is_available_quick = { + adult = no + alive = yes + travel = no + in_army = no + imprisoned = no + incapable = no + } is_healthy = yes + custom_description = { + text = ALREADY_IN_ACTIVITY + NOR = { + exists = involved_activity + has_variable = { + name = homage_liege_scope + name = meditation_character_flag + name = local_shrine_rite + name = petition_liege_character_flag + name = holding_court_character_flag + } + is_being_visited_on_tour_strict = yes + } + } + custom_description = { + text = ALREADY_PLANNING_ACTIVITY + NOT = { has_character_flag = planning_an_activity } + } + # Variable set within the adventure inspiration events + NOT = { has_variable = gone_adventuring } } +# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. is_available_healthy_ai_child = { - is_available_healthy_child = yes - is_ai = yes -} - -is_available_adult = { - is_adult = yes - is_available = yes -} - -is_available_ai_adult = { - is_available_adult = yes - is_ai = yes -} - -is_available_healthy_adult = { - is_available_adult = yes + is_available_quick = { + ai = yes + adult = no + alive = yes + travel = no + in_army = no + imprisoned = no + incapable = no + } is_healthy = yes + custom_description = { + text = ALREADY_IN_ACTIVITY + NOR = { + exists = involved_activity + has_variable = { + name = homage_liege_scope + name = meditation_character_flag + name = local_shrine_rite + name = petition_liege_character_flag + name = holding_court_character_flag + } + is_being_visited_on_tour_strict = yes + } + } + custom_description = { + text = ALREADY_PLANNING_ACTIVITY + NOT = { has_character_flag = planning_an_activity } + } + # Variable set within the adventure inspiration events + NOT = { has_variable = gone_adventuring } } +# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. +is_available_adult = { + is_available_quick = { + adult = yes + alive = yes + travel = no + in_army = no + imprisoned = no + incapable = no + } + has_contagious_deadly_disease_trigger = no + custom_description = { + text = ALREADY_IN_ACTIVITY + NOR = { + exists = involved_activity + has_variable = { + name = homage_liege_scope + name = meditation_character_flag + name = local_shrine_rite + name = petition_liege_character_flag + name = holding_court_character_flag + } + is_being_visited_on_tour_strict = yes + } + } + custom_description = { + text = ALREADY_PLANNING_ACTIVITY + NOT = { has_character_flag = planning_an_activity } + } + # Variable set within the adventure inspiration events + NOT = { has_variable = gone_adventuring } +} + +# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. +is_available_ai_adult = { + is_available_quick = { + ai = yes + adult = yes + alive = yes + travel = no + in_army = no + imprisoned = no + incapable = no + } + has_contagious_deadly_disease_trigger = no + custom_description = { + text = ALREADY_IN_ACTIVITY + NOR = { + exists = involved_activity + has_variable = { + name = homage_liege_scope + name = meditation_character_flag + name = local_shrine_rite + name = petition_liege_character_flag + name = holding_court_character_flag + } + is_being_visited_on_tour_strict = yes + } + } + custom_description = { + text = ALREADY_PLANNING_ACTIVITY + NOT = { has_character_flag = planning_an_activity } + } + # Variable set within the adventure inspiration events + NOT = { has_variable = gone_adventuring } +} + +# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. +is_available_healthy_adult = { + is_available_quick = { + adult = yes + alive = yes + travel = no + in_army = no + imprisoned = no + incapable = no + } + is_healthy = yes + custom_description = { + text = ALREADY_IN_ACTIVITY + NOR = { + exists = involved_activity + has_variable = { + name = homage_liege_scope + name = meditation_character_flag + name = local_shrine_rite + name = petition_liege_character_flag + name = holding_court_character_flag + } + is_being_visited_on_tour_strict = yes + } + } + custom_description = { + text = ALREADY_PLANNING_ACTIVITY + NOT = { has_character_flag = planning_an_activity } + } + # Variable set within the adventure inspiration events + NOT = { has_variable = gone_adventuring } +} + +# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. is_available_healthy_ai_adult = { - is_available_healthy_adult = yes - is_ai = yes + is_available_quick = { + ai = yes + adult = yes + alive = yes + travel = no + in_army = no + imprisoned = no + incapable = no + } + is_healthy = yes + custom_description = { + text = ALREADY_IN_ACTIVITY + NOR = { + exists = involved_activity + has_variable = { + name = homage_liege_scope + name = meditation_character_flag + name = local_shrine_rite + name = petition_liege_character_flag + name = holding_court_character_flag + } + is_being_visited_on_tour_strict = yes + } + } + custom_description = { + text = ALREADY_PLANNING_ACTIVITY + NOT = { has_character_flag = planning_an_activity } + } + # Variable set within the adventure inspiration events + NOT = { has_variable = gone_adventuring } } is_available_adult_or_is_commanding = { @@ -213,43 +544,192 @@ is_available_adult_or_is_commanding = { } } +# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. is_available_at_peace = { - is_at_war = no - is_available = yes - is_busy_in_events_unlocalised = no + is_available_quick = { + at_war = no + alive = yes + travel = no + in_army = no + imprisoned = no + incapable = no + } + has_contagious_deadly_disease_trigger = no + custom_description = { + text = ALREADY_IN_ACTIVITY + NOR = { + exists = involved_activity + has_variable = { + name = homage_liege_scope + name = meditation_character_flag + name = local_shrine_rite + name = petition_liege_character_flag + name = holding_court_character_flag + } + is_being_visited_on_tour_strict = yes + } + } + custom_description = { + text = ALREADY_PLANNING_ACTIVITY + NOT = { has_character_flag = planning_an_activity } + } + # Variable set within the adventure inspiration events + NOT = { has_variable = gone_adventuring } } +# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. is_available_at_peace_adult = { - is_at_war = no - is_available_adult = yes - is_busy_in_events_unlocalised = no + is_available_quick = { + at_war = no + adult = yes + alive = yes + travel = no + in_army = no + imprisoned = no + incapable = no + } + has_contagious_deadly_disease_trigger = no + custom_description = { + text = ALREADY_IN_ACTIVITY + NOR = { + exists = involved_activity + has_variable = { + name = homage_liege_scope + name = meditation_character_flag + name = local_shrine_rite + name = petition_liege_character_flag + name = holding_court_character_flag + } + is_being_visited_on_tour_strict = yes + } + } + custom_description = { + text = ALREADY_PLANNING_ACTIVITY + NOT = { has_character_flag = planning_an_activity } + } + # Variable set within the adventure inspiration events + NOT = { has_variable = gone_adventuring } } +# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. is_available_at_peace_ai_adult = { - is_available_at_peace_adult = yes - is_ai = yes + is_available_quick = { + ai = yes + adult = yes + alive = yes + imprisoned = no + incapable = no + travel = no + in_army = no + at_war = no + } + + has_contagious_deadly_disease_trigger = no + custom_description = { + text = ALREADY_IN_ACTIVITY + NOR = { + exists = involved_activity + has_variable = { + name = homage_liege_scope + name = meditation_character_flag + name = local_shrine_rite + name = petition_liege_character_flag + name = holding_court_character_flag + } + is_being_visited_on_tour_strict = yes + } + } + custom_description = { + text = ALREADY_PLANNING_ACTIVITY + NOT = { has_character_flag = planning_an_activity } + } + # Variable set within the adventure inspiration events + NOT = { has_variable = gone_adventuring } } +# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. is_available_at_peace_adult_lenient = { - is_at_war = no - is_available_adult = yes + is_available_quick = { + adult = yes + alive = yes + travel = no + in_army = no + imprisoned = no + incapable = no + at_war = no + } + + has_contagious_deadly_disease_trigger = no + custom_description = { + text = ALREADY_IN_ACTIVITY + NOR = { + exists = involved_activity + has_variable = { + name = homage_liege_scope + name = meditation_character_flag + name = local_shrine_rite + name = petition_liege_character_flag + name = holding_court_character_flag + } + is_being_visited_on_tour_strict = yes + } + } + custom_description = { + text = ALREADY_PLANNING_ACTIVITY + NOT = { has_character_flag = planning_an_activity } + } + # Variable set within the adventure inspiration events + NOT = { has_variable = gone_adventuring } } +# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. # Meaning you may be at war, but you're still located in your capital. is_available_even_at_war_adult = { - is_available_adult = yes - is_busy_in_events_unlocalised = no + is_available_quick = { + adult = yes + alive = yes + travel = no + in_army = no + imprisoned = no + incapable = no + } + + has_contagious_deadly_disease_trigger = no + custom_description = { + text = ALREADY_IN_ACTIVITY + NOR = { + exists = involved_activity + has_variable = { + name = homage_liege_scope + name = meditation_character_flag + name = local_shrine_rite + name = petition_liege_character_flag + name = holding_court_character_flag + } + is_being_visited_on_tour_strict = yes + } + } + custom_description = { + text = ALREADY_PLANNING_ACTIVITY + NOT = { has_character_flag = planning_an_activity } + } + # Variable set within the adventure inspiration events + NOT = { has_variable = gone_adventuring } } is_capable_adult = { - is_adult = yes - is_incapable = no + is_available_quick = { + adult = yes + incapable = no + } } is_capable_adult_ai = { - is_ai = yes - is_adult = yes - is_incapable = no + is_available_quick = { + ai = yes + adult = yes + incapable = no + } } can_select_lifestyle_focus = { @@ -286,25 +766,57 @@ player_target_available_for_personal_scheme_ongoing_events_trigger = { basic_is_valid_for_yearly_events_trigger = { is_playable_character = yes - is_imprisoned = no - is_incapable = no - NOT = { exists = involved_activity } + is_available_quick = { + imprisoned = no + incapable = no + } OR = { is_travelling = no - is_landless_adventurer = yes + has_government = landless_adventurer_government + } + NOR = { + has_character_flag = is_in_task_contract_event_chain + exists = involved_activity } - is_busy_in_events_unlocalised = no } +# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. is_valid_for_narrow_yearly_events = { - is_at_war = no + is_available_quick = { + at_war = no + imprisoned = no + incapable = no + } is_commanding_army = no - basic_is_valid_for_yearly_events_trigger = yes + is_playable_character = yes + OR = { + is_travelling = no + has_government = landless_adventurer_government + } + NOR = { + has_character_flag = is_in_task_contract_event_chain + exists = involved_activity + } } +# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. is_valid_for_narrow_yearly_events_adult = { - is_adult = yes - is_valid_for_narrow_yearly_events = yes + is_available_quick = { + adult = yes + at_war = no + imprisoned = no + incapable = no + } + is_commanding_army = no + is_playable_character = yes + OR = { + is_travelling = no + has_government = landless_adventurer_government + } + NOR = { + has_character_flag = is_in_task_contract_event_chain + exists = involved_activity + } } is_within_diplo_range = { @@ -328,8 +840,10 @@ is_nomad = { # This trigger checks if a character is a landed Nomad is_landed_nomad = { government_has_flag = government_is_nomadic - is_landed = yes - is_ruler = yes + is_available_quick = { + ruler = yes + landed = yes + } } # Checks if a character is a landless nomad with a domicile @@ -342,27 +856,38 @@ is_landless_nomad = { # This trigger checks if a character is a landless adventurer is_landless_adventurer = { government_has_flag = government_is_landless_adventurer - is_landed = no - is_ruler = yes } # This trigger checks if a character is a governor in an admin realm (implying they are landed) is_governor = { - government_has_flag = government_is_administrative + government_allows = administrative is_landed = yes - is_independent_ruler = no - highest_held_title_tier >= tier_duchy + top_liege != this + OR = { + highest_held_title_tier >= main_administrative_tier + highest_held_title_tier >= min_title_maa_tier + } + tgp_is_ceremonial_liege_trigger = no } is_governor_or_admin_count = { - government_has_flag = government_is_administrative + government_allows = administrative is_landed = yes - is_independent_ruler = no + top_liege != this highest_held_title_tier >= tier_county + tgp_is_ceremonial_liege_trigger = no } # Checks if a character is a landless house_head within an admin realm is_landless_administrative = { - government_has_flag = government_is_administrative + government_allows = administrative + is_landed = no + is_house_head = yes + has_domicile = yes +} + +# Checks if a character is a landless house_head within a feudal realm +is_landless_soryo = { + government_has_flag = government_is_japan_feudal is_landed = no is_house_head = yes has_domicile = yes @@ -376,22 +901,21 @@ is_landed_or_landless_administrative = { } } -# Checks if a character is either landed, a landless house head within an admin realm, a landless nomad, or a landless adventurer +# Checks if a character is either landed, a landless house head within an admin realm, a landless nomad, a landless adventurer, a landless soryo, or a minister is_playable_character = { OR = { is_landed = yes is_landless_administrative = yes is_landless_adventurer = yes is_landless_nomad = yes + is_landless_soryo = yes + tgp_is_any_minister = yes # To keep ministers playable, regardless of having a nobel family title or not } } roman_restoration_is_valid_roman_empire_trigger = { is_ai = no - OR = { - has_title = title:e_byzantium - has_title = title:e_roman_empire - } + is_roman_emperor_trigger = yes OR = { religion = religion:christianity_religion #Either Christian religion = religion:hellenism_religion #Or Hellenic diff --git a/N3OW/common/scripted_triggers/00_bastard_triggers.txt b/N3OW/common/scripted_triggers/00_bastard_triggers.txt index 96beac0c..26516bfe 100644 --- a/N3OW/common/scripted_triggers/00_bastard_triggers.txt +++ b/N3OW/common/scripted_triggers/00_bastard_triggers.txt @@ -62,7 +62,7 @@ secret_unmarried_illegitimate_child_is_valid_trigger = { exists = father exists = scope:temp_child.real_father } - NOT = { father = scope:temp_child.real_father } + father != scope:temp_child.real_father } } } @@ -73,11 +73,21 @@ secret_disputed_heritage_is_valid_trigger = { exists = real_father exists = father exists = mother - NOT = { real_father = father } + real_father != father NOR = { has_trait = bastard has_trait = wild_oat has_trait = legitimized_bastard + real_father = { + government_has_flag = government_is_mandala + house ?= { has_house_power_parameter = aspect_of_creation } + is_house_head = yes + } + mother = { + government_has_flag = government_is_mandala + house ?= { has_house_power_parameter = aspect_of_creation } + is_house_head = yes + } } } } @@ -86,20 +96,26 @@ bastard_secret_is_criminal = { $TARGET$ = { save_temporary_scope_as = criminal_bastard } $PARTICIPANT$ = { save_temporary_scope_as = criminal_participant } OR = { - #Mother if female adultery is criminal + #Adultery of parent is criminal scope:criminal_participant = { - scope:criminal_bastard = { mother = scope:criminal_participant } - OR = { - faith = { has_doctrine_parameter = adultery_female_crime } - any_liege_or_above = { faith = { has_doctrine_parameter = adultery_female_crime } } + NAND = { + government_has_flag = government_is_mandala + house ?= { has_house_power_parameter = aspect_of_creation } + is_house_head = yes } - } - #Real father is male adultery is criminal - scope:criminal_participant = { - scope:criminal_bastard = { real_father = scope:criminal_participant } OR = { - faith = { has_doctrine_parameter = adultery_male_crime } - any_liege_or_above = { faith = { has_doctrine_parameter = adultery_male_crime } } + trait_is_criminal_in_faith_trigger = { + FAITH = faith + TRAIT = adulterer + GENDER_CHARACTER = scope:criminal_participant + } + any_liege_or_above = { + trait_is_criminal_in_faith_trigger = { + FAITH = faith + TRAIT = adulterer + GENDER_CHARACTER = scope:criminal_participant + } + } } } } @@ -107,7 +123,6 @@ bastard_secret_is_criminal = { bastard_secret_is_shunned = { - # FOR DEBUG PURPOSES -- REMOVE ONCE RESOLVED TODO_CD assert_if = { limit = { NOT = { exists = $TARGET$ } } text = "Empty TARGET was passed to bastard_secret_is_shunned!" @@ -141,22 +156,21 @@ bastard_secret_is_shunned = { OR = { #Bastard child: always shunned, never criminal scope:participant = scope:bastard - #Mother if female adultery is shunned + #Adultery is shunned scope:participant = { - exists = scope:bastard.mother - this = scope:bastard.mother OR = { - faith = { has_doctrine_parameter = adultery_female_shunned } - any_liege_or_above = { faith = { has_doctrine_parameter = adultery_female_shunned } } - } - } - #Real father is male adultery is shunned - scope:participant = { - exists = scope:bastard.real_father - this = scope:bastard.real_father - OR = { - faith = { has_doctrine_parameter = adultery_male_shunned } - any_liege_or_above = { faith = { has_doctrine_parameter = adultery_male_shunned } } + trait_is_shunned_in_faith_trigger = { + FAITH = faith + TRAIT = adulterer + GENDER_CHARACTER = scope:participant + } + any_liege_or_above = { + trait_is_shunned_in_faith_trigger = { + FAITH = faith + TRAIT = adulterer + GENDER_CHARACTER = scope:participant + } + } } } #Either parent if incest is shunned diff --git a/N3OW/common/scripted_triggers/00_birth_triggers.txt b/N3OW/common/scripted_triggers/00_birth_triggers.txt index 8bd2637a..7bb4a5e0 100644 --- a/N3OW/common/scripted_triggers/00_birth_triggers.txt +++ b/N3OW/common/scripted_triggers/00_birth_triggers.txt @@ -21,7 +21,7 @@ allow_naming_on_birth_of_child_trigger = { $CHILD$ = { any_parent = { is_ai = no - NOT = { this = scope:naming_parent } + this != scope:naming_parent } } } @@ -37,7 +37,7 @@ allow_naming_on_birth_of_child_trigger = { dynasty = $CHILD$.dynasty $CHILD$ = { any_parent = { - NOT = { this = scope:naming_parent } + this != scope:naming_parent NOT = { dynasty = $CHILD$.dynasty } } } diff --git a/N3OW/common/scripted_triggers/00_board_game_scripted_triggers.txt b/N3OW/common/scripted_triggers/00_board_game_scripted_triggers.txt index 90d817e7..377f765c 100644 --- a/N3OW/common/scripted_triggers/00_board_game_scripted_triggers.txt +++ b/N3OW/common/scripted_triggers/00_board_game_scripted_triggers.txt @@ -47,7 +47,14 @@ bg_game_type_region_tabula_trigger = { } bg_game_type_region_go_trigger = { - geographical_region = world_tibet + OR = { + geographical_region = world_tibet + geographical_region = world_asia_china + geographical_region = world_asia_japan + geographical_region = world_asia_korea + geographical_region = world_asia_southeast + } + } bg_game_type_region_fidchell_trigger = { @@ -59,7 +66,7 @@ bg_stake_land_valid_neighbouring_county_to_trade_trigger = { # Suppress a false positive error. trigger_if = { limit = { tier = tier_county } - NOT = { this = prev.capital_county } + this != prev.capital_county any_neighboring_county = { # Ensure that they're swappable. OR = { diff --git a/N3OW/common/scripted_triggers/00_building_requirement_triggers.txt b/N3OW/common/scripted_triggers/00_building_requirement_triggers.txt index 53ab0318..397d68f5 100644 --- a/N3OW/common/scripted_triggers/00_building_requirement_triggers.txt +++ b/N3OW/common/scripted_triggers/00_building_requirement_triggers.txt @@ -7,10 +7,17 @@ building_requirement_tribal = { OR = { government_has_flag = government_is_tribal government_has_flag = government_is_nomadic + government_has_flag = government_is_wanua } } } +building_requirement_wanua = { + scope:holder ?= { + government_has_flag = government_is_wanua + } +} + building_requirement_tribal_holding_in_county = { NOT = { county = { @@ -70,6 +77,10 @@ building_requirement_castle_city_church = { limit = { has_holding_type = church_holding } has_building_or_higher = temple_$LEVEL$ } + trigger_else_if = { + limit = { has_holding_type = temple_citadel_holding } + has_building_or_higher = temple_citadel_$LEVEL$ + } trigger_else = { custom_description = { text = "building_requirement_castle_city_church_failed" @@ -124,7 +135,6 @@ building_pastures_requirement_terrain = { terrain = desert_mountains terrain = hills terrain = floodplains - terrain = tells AND = { terrain = jungle NOT = { geographical_region = world_innovation_elephants } @@ -150,10 +160,8 @@ building_orchards_requirement_terrain = { terrain = floodplains terrain = oasis has_building_or_higher = qanats_05 - AND = { - culture = { - has_cultural_parameter = vegetarian_fruit_orchard_allowed - } + culture = { + has_cultural_parameter = vegetarian_fruit_orchard_allowed } } } @@ -214,18 +222,49 @@ building_watchtowers_requirement_terrain = { } } +building_paddy_fields_requirement_terrain = { + OR = { + terrain = terraced_hills + AND = { + terrain = floodplains + OR = { + geographical_region = graphical_east_asia + geographical_region = custom_viet_lands + } + } + AND = { + terrain = wetlands + 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 } + } + } +} + building_cereal_fields_requirement_terrain = { OR = { terrain = farmlands terrain = plains terrain = drylands - terrain = floodplains + AND = { + terrain = floodplains + NOR = { + geographical_region = graphical_east_asia + geographical_region = custom_viet_lands + } + } county = { OR = { has_county_modifier = fertile_desert_mountains_modifier has_county_modifier = dodekapolis_modifier } } + has_building_or_higher = qanats_05 } } @@ -292,8 +331,8 @@ building_peat_quarries_requirement_terrain = { building_hill_farms_requirement_terrain = { OR = { - terrain = tells terrain = hills + terrain = terraced_hills } } @@ -329,10 +368,6 @@ building_quarries_requirement_terrain = { } } -building_tell_mines_requirement_terrain = { - terrain = tells -} - building_warrior_lodges_requirement_terrain = { OR = { AND = { @@ -340,7 +375,6 @@ building_warrior_lodges_requirement_terrain = { terrain = mountains terrain = desert_mountains terrain = hills - terrain = tells } NOT = { geographical_region = world_horse_buildings_in_hills_and_mountains } } @@ -353,7 +387,6 @@ building_hillside_grazing_requirement_terrain = { terrain = mountains terrain = desert_mountains terrain = hills - terrain = tells } geographical_region = world_horse_buildings_in_hills_and_mountains } @@ -389,7 +422,7 @@ building_hill_forts_requirement_terrain = { terrain = mountains terrain = desert_mountains terrain = hills - terrain = tells + terrain = terraced_hills } } @@ -415,6 +448,7 @@ building_watermills_requirement_terrain = { terrain = forest terrain = taiga terrain = jungle + terrain = terraced_hills is_riverside_province = yes } } @@ -442,16 +476,13 @@ building_caravanserai_requirement_terrain = { building_qanats_requirement_terrain = { county ?= { - any_county_province = { - OR = { - terrain = tells - terrain = hills - terrain = mountains - terrain = desert_mountains - terrain = desert - terrain = drylands - } - culture = { has_cultural_parameter = unlocks_qanat_building } + culture = { has_cultural_parameter = unlocks_qanat_building } + county_has_province_with_terrain = { + terrain = hills + terrain = mountains + terrain = desert_mountains + terrain = desert + terrain = drylands } } } @@ -461,35 +492,38 @@ building_hospices_requirement_terrain = { } has_any_special_mine_trigger = { - OR = { - has_building_or_higher = rammelsberg_mines_01 - has_building_or_higher = kutna_hora_mines_01 - has_building_or_higher = kremnica_mines_01 - has_building_or_higher = falun_mines_01 - has_building_or_higher = schwaz_mines_01 - has_building_or_higher = argentiera_mines_01 - has_building_or_higher = kollur_mines_01 - has_building_or_higher = siderokausia_mines_01 - has_building_or_higher = mali_mines_01 - has_building_or_higher = konasamudram_mines_01 - has_building_or_higher = dean_mines_01 - has_building_or_higher = zawar_mines_01 - has_building_or_higher = takkeda_mines_01 - has_building_or_higher = khetri_mines_01 - has_building_or_higher = taghaza_mines_01 - has_building_or_higher = ijil_mines_01 - has_building_or_higher = turda_mines_01 - has_building_or_higher = phocaea_mines_01 - has_building_or_higher = pansjhir_mines_01 - has_building_or_higher = trepca_mines_01 - has_building_or_higher = rudnik_mines_01 - has_building_or_higher = cevennes_mines_01 - has_building_or_higher = allaq_mines_01 - has_building_or_higher = verespatak_mines_01 - has_building_or_higher = nishapur_mines_01 - has_building_or_higher = srebrenica_mines_01 - has_building_or_higher = ratnapura_mines_01 - } + has_building_with_flag = special_mine + #OR = { + # has_building_or_higher = rammelsberg_mines_01 + # has_building_or_higher = kutna_hora_mines_01 + # has_building_or_higher = kremnica_mines_01 + # has_building_or_higher = falun_mines_01 + # has_building_or_higher = schwaz_mines_01 + # has_building_or_higher = argentiera_mines_01 + # has_building_or_higher = kollur_mines_01 + # has_building_or_higher = siderokausia_mines_01 + # has_building_or_higher = mali_mines_01 + # has_building_or_higher = konasamudram_mines_01 + # has_building_or_higher = dean_mines_01 + # has_building_or_higher = phnom_dek_mines_01 + # has_building_or_higher = zawar_mines_01 + # has_building_or_higher = takkeda_mines_01 + # has_building_or_higher = khetri_mines_01 + # has_building_or_higher = taghaza_mines_01 + # has_building_or_higher = ijil_mines_01 + # has_building_or_higher = turda_mines_01 + # has_building_or_higher = phocaea_mines_01 + # has_building_or_higher = pansjhir_mines_01 + # has_building_or_higher = trepca_mines_01 + # has_building_or_higher = rudnik_mines_01 + # has_building_or_higher = cevennes_mines_01 + # has_building_or_higher = allaq_mines_01 + # has_building_or_higher = verespatak_mines_01 + # has_building_or_higher = nishapur_mines_01 + # has_building_or_higher = srebrenica_mines_01 + # has_building_or_higher = ratnapura_mines_01 + # has_building_or_higher = mogok_mines_01 + #} } ###################################################################### @@ -535,7 +569,6 @@ has_any_building_of_level_trigger = { has_building = farm_estates_$BUILDING_LEVEL$ has_building = regimental_grounds_$BUILDING_LEVEL$ has_building = monastic_schools_$BUILDING_LEVEL$ - has_building = tell_mines_$BUILDING_LEVEL$ } } @@ -739,6 +772,10 @@ religious_special_building_exclusion_trigger = { # checks if any special buildin has_building = holy_site_great_mosque_of_mecca_01 islamic_special_building_trigger = yes christian_special_building_trigger = yes + has_building = holy_site_buddhist_grand_temple_01 + has_building = holy_site_japanese_temple_01 + has_building = holy_site_chinese_temple_01 + has_building = holy_site_se_asia_pagan_temple_01 } } AND = { # Islamic @@ -785,6 +822,44 @@ building_murex_farm_requirement_terrain = { } } +building_waterworks_requirement_terrain = { + is_county_capital = yes + NOR = { + terrain = mountains + terrain = desert_mountains + } + scope:holder.culture = { has_cultural_parameter = unlocks_waterworks_buildings } +} + +building_spice_plantation_requirement_terrain = { + is_county_capital = yes + + # cloves, nutmeg: present on Muluku Islands + # cinnamomum verum: India, Sri Lanka, Bangladesh and Myanmar + # cinnamomum malabathrum: Eastern Himalayas & Western Ghats + OR = { + geographical_region = world_asia_southeast_mainland + geographical_region = world_asia_borneo + geographical_region = world_asia_sulawesi_maluku + geographical_region = world_asia_indonesia + geographical_region = world_india + } + OR = { + terrain = jungle + terrain = farmlands + terrain = terraced_hills + terrain = plains + } +} + +building_examination_hall_requirement_terrain = { + is_county_capital = yes + + scope:holder = { + government_has_flag = government_has_merit + } +} + building_breweries_requirement = { OR = { AND = { @@ -800,3 +875,12 @@ building_breweries_requirement = { } } } + +#building_powder_magazine_requirement = { +# scope:build_owner.culture = { +# OR = { +# has_innovation = innovation_gunpowder +# has_innovation = innovation_fire_medicine +# } +# } +#} diff --git a/N3OW/common/scripted_triggers/00_childhood_triggers.txt b/N3OW/common/scripted_triggers/00_childhood_triggers.txt index 03814f5f..049edc53 100644 --- a/N3OW/common/scripted_triggers/00_childhood_triggers.txt +++ b/N3OW/common/scripted_triggers/00_childhood_triggers.txt @@ -52,7 +52,7 @@ save_good_friend_character_trigger_check = { is_adult = no age >= root.age_dif_child_down_friend age <= root.age_dif_child_up_friend - NOT = { this = root } + this != root is_imprisoned = no opinion = { target = root @@ -70,7 +70,7 @@ save_good_crush_character_trigger_check = { age >= root.age_dif_child_down age <= root.age_dif_child_up age > childhood_education_start_age - NOT = { this = root } + this != root is_imprisoned = no is_close_family_of_root_trigger = no NOR = { @@ -94,7 +94,7 @@ save_good_bully_character_trigger_check = { is_adult = no age >= 6 age >= root.age - NOT = { this = root } + this != root is_imprisoned = no OR = { has_trait_malicious_trigger = yes @@ -115,13 +115,14 @@ save_good_bully_character_trigger_check = { has_relation_friend = root has_relation_crush = root } + tgp_is_chinese_style_emperor_trigger = no # This would be weird, otherwise } save_good_victim_character_trigger_check = { is_adult = no age >= 6 age <= root.age - NOT = { this = root } + this != root is_imprisoned = no reverse_opinion = { target = root @@ -133,13 +134,13 @@ save_good_victim_character_trigger_check = { has_relation_friend = root has_relation_crush = root } + tgp_is_chinese_style_emperor_trigger = no # This would be weird, otherwise } child_suitable_to_play_with_character = { # Is available for events at $CHARACTER$'s locale. is_available_child = yes - exists = location - location = $CHARACTER$.location + location ?= $CHARACTER$.location # Of a suitable age range. child_not_infant_trigger = yes # Doesn't have a bad relationship with $CHARACTER$. @@ -196,38 +197,76 @@ childhood_nice_child_trigger = { } suitable_same_realm_child = { - exists = location.county.holder # Scoping like this allows children in the pool to also get this event - location.county.holder = { - OR = { - AND = { - is_ai = yes - is_available_child = yes - NOT = { this = root } - age >= 6 + trigger_if = { + limit = { + OR = { + father ?= { + is_ai = no + } + mother ?= { + is_ai = no + } + host ?= { + is_ai = no + } } - any_courtier_or_guest = { - is_ai = yes - is_available_child = yes - NOT = { this = root } - age >= 6 - } - any_warden_hostage = { - is_ai = yes - is_available_child = yes - NOT = { this = root } - age >= 6 - } - any_vassal = { - is_ai = yes - is_available_child = yes - NOT = { this = root } - age >= 6 - } - any_vassal = { + } + location.county.holder ?= { # Scoping like this allows children in the pool to also get this event + OR = { + AND = { + is_ai = yes + is_available_child = yes + this != root + age >= 6 + } any_courtier_or_guest = { is_ai = yes is_available_child = yes - NOT = { this = root } + this != root + age >= 6 + } + any_warden_hostage = { + is_ai = yes + is_available_child = yes + this != root + age >= 6 + } + any_vassal = { + is_ai = yes + is_available_child = yes + this != root + age >= 6 + } + any_vassal = { + any_courtier_or_guest = { + is_ai = yes + is_available_child = yes + this != root + age >= 6 + } + } + } + } + } + trigger_else = { + location.county.holder ?= { # Scoping like this allows children in the pool to also get this event + OR = { + AND = { + is_ai = yes + is_available_child = yes + this != root + age >= 6 + } + any_courtier = { + is_ai = yes + is_available_child = yes + this != root + age >= 6 + } + any_warden_hostage = { + is_ai = yes + is_available_child = yes + this != root age >= 6 } } @@ -242,21 +281,21 @@ similar_age_same_court_child = { AND = { is_ai = yes is_available_child = yes - NOT = { this = root } + this != root age <= root.age_plus_3 age >= age_minus_3 } any_courtier_or_guest = { is_ai = yes is_available_child = yes - NOT = { this = root } + this != root age <= root.age_plus_3 age >= age_minus_3 } any_warden_hostage = { is_ai = yes is_available_child = yes - NOT = { this = root } + this != root age <= root.age_plus_3 age >= age_minus_3 } @@ -269,7 +308,7 @@ suitable_crush_trigger = { save_temporary_scope_as = temp_crush is_ai = yes is_available_child = yes - NOT = { this = root } + this != root child_not_infant_trigger = yes age <= root.age_plus_3 age >= root.age_minus_3 @@ -330,8 +369,13 @@ guardian_or_court_tutor_trait = { } } trigger_else = { - court_owner.court_position:court_tutor_court_position ?= { - has_trait = $TRAIT$ + OR = { + court_owner.court_position:court_tutor_court_position ?= { + has_trait = $TRAIT$ + } + court_owner.court_position:court_guru_court_position ?= { + has_trait = $TRAIT$ + } } } } @@ -352,10 +396,18 @@ guardian_or_court_tutor_2_trait = { } } trigger_else = { - court_owner.court_position:court_tutor_court_position ?= { - OR = { - has_trait = $TRAIT$ - has_trait = $TRAIT_2$ + OR = { + court_owner.court_position:court_tutor_court_position ?= { + OR = { + has_trait = $TRAIT$ + has_trait = $TRAIT_2$ + } + } + court_owner.court_position:court_guru_court_position ?= { + OR = { + has_trait = $TRAIT$ + has_trait = $TRAIT_2$ + } } } } diff --git a/N3OW/common/scripted_triggers/00_clan_triggers.txt b/N3OW/common/scripted_triggers/00_clan_triggers.txt index c05cd4a8..5b4fe944 100644 --- a/N3OW/common/scripted_triggers/00_clan_triggers.txt +++ b/N3OW/common/scripted_triggers/00_clan_triggers.txt @@ -19,7 +19,7 @@ is_in_same_clan_as_trigger = { check_tax_collector_aptitude = { $CHARACTER$ = { tax_collector_aptitude = { - tax_slot_type = clan_tax_slot + target = clan_tax_slot value = $VALUE$ } } diff --git a/N3OW/common/scripted_triggers/00_clothing_triggers.txt b/N3OW/common/scripted_triggers/00_clothing_triggers.txt index 39d8c657..3ed28d53 100644 --- a/N3OW/common/scripted_triggers/00_clothing_triggers.txt +++ b/N3OW/common/scripted_triggers/00_clothing_triggers.txt @@ -7,6 +7,7 @@ has_character_modifier = diplomacy_majesty_4090_no_raiment_modifier # Lunatic event where character goes naked instead of buying new clothes. has_character_flag = is_naked # Special flag used in certain events. faith = { has_doctrine_parameter = naked_adherents_active } + culture = { has_cultural_parameter = naked_culture_active } trigger_if = { limit = { faith = { has_doctrine_parameter = naked_priests_active } @@ -41,7 +42,15 @@ should_be_topless_portrait_trigger = { portrait_wear_no_headgear_trigger = { OR = { AND = { - scope:age < 16 # No headgear for children under 16 # + trigger_if = { # No headgear for children under 16 + limit = { + portrait_wear_no_crown_trigger = yes + } + scope:age < 16 + } + trigger_else = { # Unless it's a crown + scope:age <= coronation_minimum_age_value + } NOR = { portrait_sami_clothing_trigger = yes portrait_ugro_permian_clothing_trigger = yes @@ -53,23 +62,15 @@ portrait_wear_no_headgear_trigger = { has_character_flag = roaming_character - AND = { # No headgear for characters who sold their crown + AND = { # No headgear for characters without crowns exists = this - has_character_flag = sold_crown_charmod + portrait_wear_no_crown_trigger = yes # Should still wear armor when going to war - NOT = { portrait_wear_armor_trigger = yes } - } - - AND = { # No headgear for characters with an active Vow of Poverty - exists = this - has_character_modifier = vow_of_poverty_modifier - # Should still wear armor when going to war - NOT = { portrait_wear_armor_trigger = yes } + portrait_wear_armor_trigger = no } AND = { OR = { - should_be_naked_trigger = yes # Deliberately not the "fully naked" one since dropping your crown's intended even if nudity is disabled AND = { @@ -80,20 +81,14 @@ portrait_wear_no_headgear_trigger = { } } - AND = { - exists = this - has_character_modifier = fp1_abased_before_highgod_modifier # Refuses to wear a crown due to HighGod - } - activity_tournament_shirtless_trigger = yes } NOR = { # Exceptions for dukes, kings, popes highest_held_title_tier >= tier_duchy # Should wear ducal or royal crown instead. - AND = { - religion = religion:christianity_religion - faith.religious_head = this - } + portrait_religious_head_popes_trigger = yes + culture = { has_cultural_pillar = heritage_japonic } # Showing the top of your head is shameful + culture = { has_cultural_pillar = heritage_chinese } # Showing the top of your head is shameful } } @@ -118,13 +113,7 @@ portrait_wear_armor_trigger = { is_imprisoned = no trigger_if = { limit = { exists = involved_activity } - involved_activity = { - NOR = { - has_activity_type = activity_hunt - has_activity_type = activity_pilgrimage - has_activity_type = activity_roaming - } - } + involved_activity = { has_activity_type = activity_tournament } } NOT = { OR = { @@ -198,6 +187,31 @@ portrait_wear_armor_trigger = { primary_title.tier < tier_kingdom } } + # Military style governor + trigger_if = { + limit = { + is_independent_ruler = no + OR = { + has_government = celestial_government + has_government = meritocratic_government + has_government = steppe_admin_government + } + } + OR = { + vassal_contract_has_flag = celestial_province_protectorate + vassal_contract_has_flag = celestial_province_military + vassal_contract_has_flag = meritocratic_province_protectorate + vassal_contract_has_flag = meritocratic_province_military + has_title = title:e_minister_grand_marshal + } + is_adult = yes + trigger_if = { + limit = { has_trait = devoted } + faith = { has_doctrine_parameter = clergy_can_fight } + } + save_temporary_scope_as = fighter_temp + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:fighter_temp } + } has_character_flag = wear_armor # Serving Varangian has_character_flag = is_currently_varangian @@ -210,6 +224,11 @@ portrait_wear_armor_trigger = { has_character_flag = military_outfit is_ruler = no } + # Died in battle + trigger_if = { + limit = { is_alive = no } + death_reason = death_battle + } } } @@ -262,7 +281,7 @@ portrait_accoladed_knight_trigger = { } } -portrait_wear_helmet_trigger = { # Different from Armor, as Kings and Emperors should show their crowns! +portrait_wear_helmet_trigger = { # Different from Armor, as (crowned) Kings and Emperors should show their crowns! exists = this trigger_if = { limit = { exists = involved_activity } @@ -294,14 +313,17 @@ portrait_wear_helmet_trigger = { # Different from Armor, as Kings and Emperors s government_has_flag = government_is_holy_order } has_trait = order_member - # Commanding and lower than a King + # Commanding and lower than a King or uncrowned AND = { is_commanding_army = yes OR = { is_landed_or_landless_administrative = no AND = { exists = primary_title - primary_title.tier < tier_kingdom + OR = { + primary_title.tier < tier_kingdom + portrait_wear_no_crown_trigger = yes + } } } } @@ -347,6 +369,29 @@ portrait_wear_helmet_trigger = { # Different from Armor, as Kings and Emperors s has_character_flag = military_outfit is_ruler = no } + # Military style governor + AND = { + is_independent_ruler = no + OR = { + has_government = celestial_government + has_government = meritocratic_government + has_government = steppe_admin_government + } + OR = { + vassal_contract_has_flag = celestial_province_protectorate + vassal_contract_has_flag = celestial_province_military + vassal_contract_has_flag = meritocratic_province_protectorate + vassal_contract_has_flag = meritocratic_province_military + has_title = title:e_minister_grand_marshal + } + is_adult = yes + trigger_if = { + limit = { has_trait = devoted } + faith = { has_doctrine_parameter = clergy_can_fight } + } + save_temporary_scope_as = fighter_temp + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:fighter_temp } + } } NOR = { activity_tournament_shirtless_trigger = yes @@ -370,6 +415,37 @@ portrait_wear_helmet_trigger = { # Different from Armor, as Kings and Emperors s } } +portrait_wear_no_crown_trigger = { # Rulers should be coronated to wear a crown barring exceptions + exists = this + OR = { + trigger_if = { # No crowns for uncoronated characters + limit = { has_ach_dlc_trigger = yes } + has_realm_law = uncrowned + NOT = { coronation_proper_artifact_regalia_trigger = yes } #don't take off your fancy hat if you care about regalia. But do take it off if you care about crowns AND regalia + } + + trigger_if = { # Unlanded spouses of uncoronated ruler's shouldn't have crowns + limit = { + is_married = yes + has_ach_dlc_trigger = yes + NOT = { coronation_proper_artifact_regalia_trigger = yes } + } + is_landed = no + primary_spouse ?= { + is_landed = yes + has_realm_law = uncrowned + NOT = { coronation_proper_artifact_regalia_trigger = yes } + } + } + + has_character_flag = sold_crown_charmod # No crowns for characters who sold theirs + + has_character_modifier = vow_of_poverty_modifier # Or for characters with an active Vow of Poverty + + has_character_modifier = fp1_abased_before_highgod_modifier # Refuses to wear a crown due to HighGod + } +} + portrait_wear_christian_holy_order_trigger = { # Christian holy order members/vassals should wear different armor OR = { AND = { # Is a Christian holy order member @@ -389,6 +465,8 @@ portrait_has_trait_trigger = { trait:$TRAIT$ = { is_in_list = traits } } +# Animation related triggers + is_dwarf_height = { OR = { has_trait = dwarf @@ -446,15 +524,22 @@ should_use_fat_dwarf_pregnant_animation = { scope:current_weight >= 40 } +asian_variants = { + culture = { + OR = { + has_clothing_gfx = chinese_clothing_gfx + has_clothing_gfx = japanese_clothing_gfx + } + } +} + portrait_shared_clothing_contents_trigger = { trigger_if = { limit = { exists = top_liege.var:adopted_cultural_style } top_liege.var:adopted_cultural_style = flag:$CULTURE_FLAG$ } trigger_else_if = { - limit = { - exists = this.var:adopted_cultural_style - } + limit = { exists = this.var:adopted_cultural_style } var:adopted_cultural_style = flag:$CULTURE_FLAG$ has_variable = years_as_varangian is_landed = no @@ -483,9 +568,9 @@ portrait_ccp4_sami_travel_coat_trigger = { trigger_if = { limit = { exists = involved_activity - involved_activity = { + involved_activity = { NOR = { - has_activity_type = activity_hunt + has_activity_type = activity_hunt has_activity_type = activity_roaming } } @@ -920,7 +1005,7 @@ portrait_rus_clothing_trigger = { portrait_shared_clothing_contents_trigger = { CULTURE_SCOPE = scope:culture CULTURE_FLAG = east_slavic - } + } portrait_shared_clothing_contents_trigger = { CULTURE_SCOPE = scope:culture CULTURE_FLAG = west_slavic @@ -933,7 +1018,7 @@ portrait_rus_clothing_spouse_trigger = { portrait_shared_clothing_contents_trigger = { CULTURE_SCOPE = culture CULTURE_FLAG = east_slavic - } + } portrait_shared_clothing_contents_trigger = { CULTURE_SCOPE = culture CULTURE_FLAG = west_slavic @@ -958,6 +1043,133 @@ portrait_can_use_noble_headgear_trigger = { } } +### EP4 - Asia ### + +portrait_chinese_clothing_trigger = { + portrait_shared_clothing_contents_trigger = { + CULTURE_SCOPE = scope:culture + CULTURE_FLAG = chinese + } +} + +portrait_chinese_clothing_spouse_trigger = { + portrait_shared_clothing_contents_trigger = { + CULTURE_SCOPE = culture + CULTURE_FLAG = chinese + } +} + +portrait_japanese_clothing_trigger = { + portrait_shared_clothing_contents_trigger = { + CULTURE_SCOPE = scope:culture + CULTURE_FLAG = japanese + } +} + +portrait_japanese_clothing_spouse_trigger = { + portrait_shared_clothing_contents_trigger = { + CULTURE_SCOPE = culture + CULTURE_FLAG = japanese + } +} + +portrait_korean_clothing_trigger = { + portrait_shared_clothing_contents_trigger = { + CULTURE_SCOPE = scope:culture + CULTURE_FLAG = korean + } +} + +portrait_korean_clothing_spouse_trigger = { + portrait_shared_clothing_contents_trigger = { + CULTURE_SCOPE = culture + CULTURE_FLAG = korean + } +} + +portrait_malay_clothing_trigger = { + portrait_shared_clothing_contents_trigger = { + CULTURE_SCOPE = scope:culture + CULTURE_FLAG = malay + } +} + +portrait_malay_clothing_spouse_trigger = { + portrait_shared_clothing_contents_trigger = { + CULTURE_SCOPE = culture + CULTURE_FLAG = malay + } +} + +portrait_southeast_asian_clothing_trigger = { + portrait_shared_clothing_contents_trigger = { + CULTURE_SCOPE = scope:culture + CULTURE_FLAG = southeast_asian + } +} + +portrait_southeast_asian_clothing_spouse_trigger = { + portrait_shared_clothing_contents_trigger = { + CULTURE_SCOPE = culture + CULTURE_FLAG = southeast_asian + } +} + +portrait_papuan_clothing_trigger = { + portrait_shared_clothing_contents_trigger = { + CULTURE_SCOPE = scope:culture + CULTURE_FLAG = papuan + } +} + +portrait_papuan_clothing_spouse_trigger = { + portrait_shared_clothing_contents_trigger = { + CULTURE_SCOPE = culture + CULTURE_FLAG = papuan + } +} + +portrait_viet_clothing_trigger = { + portrait_shared_clothing_contents_trigger = { + CULTURE_SCOPE = scope:culture + CULTURE_FLAG = viet + } +} + +portrait_viet_clothing_spouse_trigger = { + portrait_shared_clothing_contents_trigger = { + CULTURE_SCOPE = culture + CULTURE_FLAG = viet + } +} + +portrait_tai_clothing_trigger = { + portrait_shared_clothing_contents_trigger = { + CULTURE_SCOPE = scope:culture + CULTURE_FLAG = tai + } +} + +portrait_tai_clothing_spouse_trigger = { + portrait_shared_clothing_contents_trigger = { + CULTURE_SCOPE = culture + CULTURE_FLAG = tai + } +} + +portrait_ainu_clothing_trigger = { + portrait_shared_clothing_contents_trigger = { + CULTURE_SCOPE = scope:culture + CULTURE_FLAG = ainu + } +} + +portrait_ainu_clothing_spouse_trigger = { + portrait_shared_clothing_contents_trigger = { + CULTURE_SCOPE = culture + CULTURE_FLAG = ainu + } +} ### General clothing triggers ### @@ -1064,7 +1276,7 @@ court_fashion_level_4_trigger = { court_owner ?= { has_royal_court = yes has_dlc_feature = royal_court - amenity_level = { type = court_fashion value = 4 } + amenity_level = { target = court_fashion value = 4 } } portrait_$CULTURE_INPUT$_clothing_trigger = yes } @@ -1079,7 +1291,7 @@ court_fashion_level_4_headgear_trigger = { court_owner ?= { has_royal_court = yes has_dlc_feature = royal_court - amenity_level = { type = court_fashion value >= 4 } + amenity_level = { target = court_fashion value >= 4 } } portrait_$CULTURE_INPUT$_clothing_trigger = yes } @@ -1094,7 +1306,7 @@ court_fashion_level_5_trigger = { court_owner ?= { has_royal_court = yes has_dlc_feature = royal_court - amenity_level = { type = court_fashion value = 5 } + amenity_level = { target = court_fashion value = 5 } } portrait_$CULTURE_INPUT$_clothing_trigger = yes } @@ -1167,9 +1379,9 @@ portrait_commoner_trigger = { highest_held_title_tier >= tier_duchy } OR = { - has_council_position = councillor_chancellor - has_council_position = councillor_steward - } + has_council_position = councillor_chancellor + has_council_position = councillor_steward + } } } trigger_if = { @@ -1178,7 +1390,7 @@ portrait_commoner_trigger = { has_dlc_feature = royal_court } court_owner = { - amenity_level = { type = court_fashion value < 4 } + amenity_level = { target = court_fashion value < 4 } } } } @@ -1221,7 +1433,7 @@ portrait_commoner_no_mayors_trigger = { has_dlc_feature = royal_court } court_owner = { - amenity_level = { type = court_fashion value < 4 } + amenity_level = { target = court_fashion value < 4 } } } } @@ -1239,11 +1451,15 @@ portrait_low_nobles_trigger = { limit = { exists = this } # To check if this is an actual character NOT = { primary_spouse ?= { - highest_held_title_tier >= tier_duchy - trigger_if = { - limit = { - government_has_flag = government_is_landless_adventurer + AND = { + highest_held_title_tier >= tier_duchy + trigger_if = { + limit = { government_is_japanese_trigger = yes } + NOT = { government_has_flag = government_is_japan_feudal } # Japanese bushi class always wear low/war nobility clothing } + } + trigger_if = { + limit = { government_has_flag = government_is_landless_adventurer } has_realm_law = camp_purpose_legitimists } } @@ -1269,10 +1485,10 @@ portrait_low_nobles_trigger = { highest_held_title_tier >= tier_duchy } OR = { - has_council_position = councillor_chancellor - has_council_position = councillor_steward - } - portrait_$CULTURE_INPUT$_clothing_trigger = yes + has_council_position = councillor_chancellor + has_council_position = councillor_steward + } + portrait_$CULTURE_INPUT$_clothing_trigger = yes } AND = { # Courtiers highest_held_title_tier < tier_county @@ -1297,9 +1513,12 @@ portrait_low_nobles_trigger = { portrait_$CULTURE_INPUT$_clothing_trigger = yes } AND = { - OR = { - highest_held_title_tier = tier_barony - highest_held_title_tier = tier_county + is_ruler = yes + highest_held_title_tier <= tier_county + # Japanese bushi class always wear low/war nobility clothing + trigger_if = { + limit = { government_has_flag = government_is_japan_feudal } + is_independent_ruler = no } NOR = { government_has_flag = government_is_herder @@ -1326,9 +1545,12 @@ portrait_low_nobles_trigger = { government_has_flag = government_is_mercenary AND = { government_has_flag = government_is_landless_adventurer - NOT = { - has_realm_law = camp_purpose_legitimists - } + NOT = { has_realm_law = camp_purpose_legitimists } + } + # Japanese bushi class always wear low/war nobility clothing + trigger_if = { + limit = { government_has_flag = government_is_japan_feudal } + is_independent_ruler = no } } NOR = { @@ -1378,7 +1600,12 @@ portrait_high_nobles_trigger = { OR = { AND = { # Rulers OR = { - highest_held_title_tier >= tier_duchy # Most cultures do not have specific clothes for royalty and imperial tier, so we use the high nobility for anything from duke/duchess and up + trigger_if = { + limit = { culture = { has_clothing_gfx = japanese_clothing_gfx } } + tgp_japanese_high_nobility_clothing_trigger = yes + } + # Most cultures do not have specific clothes for royalty and imperial tier, so we use the high nobility for anything from duke/duchess and up + trigger_else = { highest_held_title_tier >= tier_duchy } AND = { government_has_flag = government_is_special_republic primary_title.tier > tier_barony @@ -1412,7 +1639,12 @@ portrait_high_nobles_trigger = { } primary_spouse ?= { OR = { - highest_held_title_tier >= tier_duchy + trigger_if = { + limit = { culture = { has_clothing_gfx = japanese_clothing_gfx } } + tgp_japanese_high_nobility_clothing_trigger = yes + } + # Most cultures do not have specific clothes for royalty and imperial tier, so we use the high nobility for anything from duke/duchess and up + trigger_else = { highest_held_title_tier >= tier_duchy } AND = { government_has_flag = government_is_special_republic primary_title.tier > tier_barony @@ -1450,9 +1682,20 @@ portrait_high_nobles_trigger = { } AND = { # Family members of rulers highest_held_title_tier <= tier_duchy - any_close_family_member = { - is_ruler = yes - highest_held_title_tier > tier_duchy + trigger_if = { + limit = { government_is_japanese_trigger = yes } + OR = { + tgp_japanese_high_nobility_clothing_family_trigger = yes + tgp_is_in_ceremonial_house_trigger = yes + } + } + trigger_else = { + any_close_family_member = { + AND = { + is_ruler = yes + highest_held_title_tier > tier_duchy + } + } } portrait_$CULTURE_INPUT$_clothing_trigger = yes } @@ -1478,7 +1721,12 @@ portrait_high_nobles_headgear_trigger = { OR = { AND = { # Rulers OR = { - highest_held_title_tier = tier_duchy + # Most cultures do not have specific clothes for royalty and imperial tier, so we use the high nobility for anything from duke/duchess and up + trigger_if = { + limit = { culture = { has_clothing_gfx = japanese_clothing_gfx } } + tgp_japanese_high_nobility_clothing_trigger = yes + } + trigger_else = { highest_held_title_tier >= tier_duchy } AND = { government_has_flag = government_is_special_republic primary_title.tier > tier_county @@ -1488,7 +1736,7 @@ portrait_high_nobles_headgear_trigger = { government_has_flag = government_is_theocracy } AND = { - highest_held_title_tier = tier_kingdom + highest_held_title_tier >= tier_kingdom is_governor = yes } } @@ -1511,7 +1759,12 @@ portrait_high_nobles_headgear_trigger = { } primary_spouse = { OR = { - highest_held_title_tier = tier_duchy + # Most cultures do not have specific clothes for royalty and imperial tier, so we use the high nobility for anything from duke/duchess and up + trigger_if = { + limit = { culture = { has_clothing_gfx = japanese_clothing_gfx } } + tgp_japanese_high_nobility_clothing_trigger = yes + } + trigger_else = { highest_held_title_tier >= tier_duchy } AND = { government_has_flag = government_is_special_republic primary_title.tier > tier_county @@ -1520,14 +1773,16 @@ portrait_high_nobles_headgear_trigger = { is_ruler = yes government_has_flag = government_is_theocracy } + AND = { + highest_held_title_tier >= tier_kingdom + is_governor = yes + } } NOR = { # Blocked for mercenaries and adventurers government_has_flag = government_is_mercenary AND = { government_has_flag = government_is_landless_adventurer - NOT = { - has_realm_law = camp_purpose_legitimists - } + NOT = { has_realm_law = camp_purpose_legitimists } } } portrait_$CULTURE_INPUT$_clothing_spouse_trigger = yes @@ -1548,9 +1803,20 @@ portrait_high_nobles_headgear_trigger = { } AND = { # Family members of rulers highest_held_title_tier <= tier_duchy - any_close_family_member = { - is_ruler = yes - highest_held_title_tier > tier_duchy + trigger_if = { + limit = { government_is_japanese_trigger = yes } + OR = { + tgp_japanese_high_nobility_clothing_family_trigger = yes + tgp_is_in_ceremonial_house_trigger = yes + } + } + trigger_else = { + any_close_family_member = { + AND = { + is_ruler = yes + highest_held_title_tier > tier_duchy + } + } } portrait_$CULTURE_INPUT$_clothing_trigger = yes } @@ -1582,7 +1848,8 @@ portrait_royalty_trigger = { OR = { # Rulers AND = { - highest_held_title_tier = tier_kingdom + is_governor = no + tgp_portrait_liege_or_ceremonial_liege_king_trigger = yes NOR = { AND = { government_has_flag = government_is_special_republic @@ -1592,7 +1859,6 @@ portrait_royalty_trigger = { is_ruler = yes government_has_flag = government_is_theocracy } - is_governor = yes } portrait_$CULTURE_INPUT$_clothing_trigger = yes } @@ -1604,7 +1870,7 @@ portrait_royalty_trigger = { } primary_spouse ?= { is_governor = no - highest_held_title_tier = tier_kingdom + tgp_portrait_liege_or_ceremonial_liege_king_trigger = yes NOR = { AND = { government_has_flag = government_is_special_republic @@ -1744,7 +2010,8 @@ portrait_imperial_trigger = { OR = { # Rulers AND = { - highest_held_title_tier = tier_empire + is_governor = no + tgp_portrait_liege_or_ceremonial_liege_emperor_trigger = yes NOR = { AND = { government_has_flag = government_is_special_republic @@ -1765,7 +2032,8 @@ portrait_imperial_trigger = { highest_held_title_tier <= primary_spouse.highest_held_title_tier } primary_spouse = { - highest_held_title_tier = tier_empire + is_governor = no + tgp_portrait_liege_or_ceremonial_liege_emperor_trigger = yes NOR = { AND = { government_has_flag = government_is_special_republic @@ -1782,7 +2050,7 @@ portrait_imperial_trigger = { } } trigger_else = { - scope:highest_held_title_tier = tier_empire + scope:highest_held_title_tier >= tier_empire portrait_$CULTURE_INPUT$_clothing_trigger = yes } } @@ -1798,6 +2066,7 @@ portrait_imperial_nobles_headgear_trigger = { trigger_if = { limit = { exists = this } portrait_can_use_noble_headgear_trigger = yes + is_governor = no NOR = { AND = { is_ruler = yes @@ -1814,7 +2083,7 @@ portrait_imperial_nobles_headgear_trigger = { } } } - scope:highest_held_title_tier = tier_empire + tgp_portrait_liege_or_ceremonial_liege_emperor_trigger = yes portrait_$CULTURE_INPUT$_clothing_trigger = yes } @@ -2084,8 +2353,14 @@ portrait_beggar_trigger = { portrait_prisoner_trigger = { exists = this - is_imprisoned = yes - is_in_prison_type = dungeon + trigger_if = { + limit = { is_alive = no } + death_reason = death_dungeon + } + trigger_else = { + is_imprisoned = yes + is_in_prison_type = dungeon + } } @@ -2168,7 +2443,15 @@ portrait_religious_high_trigger = { is_ruler = yes government_has_flag = government_is_theocracy } - has_council_position = councillor_court_chaplain + AND = { + has_council_position = councillor_court_chaplain + liege = { + NAND = { + highest_held_title_tier >= tier_hegemony + government_has_flag = government_is_celestial + } + } + } } NOT = { faith = { @@ -2208,7 +2491,15 @@ portrait_religious_high_no_poverty_trigger = { is_ruler = yes government_has_flag = government_is_theocracy } - has_council_position = councillor_court_chaplain + AND = { + has_council_position = councillor_court_chaplain + liege = { + NAND = { + highest_held_title_tier >= tier_hegemony + government_has_flag = government_is_celestial + } + } + } } } @@ -2260,26 +2551,15 @@ portrait_religious_head_popes_trigger = { exists = this OR = { AND = { - faith = faith:roman_catholic + faith = faith:catholic is_adult = yes - religion = religion:catholic_religion + religion = religion:christianity_religion primary_title ?= { is_head_of_faith = yes } } - AND = { - faith = faith:sevillian - is_adult = yes - religion = religion:catholic_religion - primary_title ?= { - is_head_of_faith = yes - } - } - AND = { - exists = this - any_equipped_character_artifact = { - has_variable = pope_hat - } + any_equipped_character_artifact = { + has_variable = pope_hat } } } @@ -2317,17 +2597,13 @@ portrait_religious_faith_or_foundational_trigger = { } portrait_religious_christian_trigger = { - OR = { - religion = religion:christianity_religion - religion = religion:catholic_religion - religion = religion:anglican_religion - religion = religion:lutheranism_religion - religion = religion:calvinist_religion - } + religion = religion:christianity_religion } portrait_religious_catholic_trigger = { - religion = religion:catholic_religion + faith = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:catholic } + } } portrait_religious_orthodox_trigger = { @@ -2401,10 +2677,13 @@ portrait_religious_buddhist_trigger = { faith = { portrait_religious_faith_or_foundational_trigger = { FAITH = faith:bon } } - religion = religion:taoism_religion } } +portrait_religious_taoist_trigger = { + religion = religion:taoism_religion +} + portrait_religious_hindu_trigger = { religion = religion:hinduism_religion } @@ -2442,7 +2721,8 @@ portrait_religious_african_trigger = { ### DDE HRE ### portrait_reichskrone_trigger = { - AND = { + exists = this + OR = { has_primary_title = title:e_hre any_equipped_character_artifact = { has_variable = reichskrone @@ -2600,3 +2880,22 @@ portrait_ep2_wedding_clothes_trigger = { } ### General headgear triggers ### + +portrait_shared_makeup_trigger = { + # Not naked + should_be_naked_trigger = no + # Not ill + portrait_sickness_trigger = no + # Not in an army + portrait_wear_armor_trigger = no + # Not religious characters + NOR = { + has_trait = devoted + government_has_flag = government_is_theocracy + has_council_position = councillor_court_chaplain + } +} + +use_longsword_default_trigger = { + culture = { has_cultural_pillar = heritage_japonic } +} diff --git a/N3OW/common/scripted_triggers/00_coa_triggers.txt b/N3OW/common/scripted_triggers/00_coa_triggers.txt index b1907382..c248e2c8 100644 --- a/N3OW/common/scripted_triggers/00_coa_triggers.txt +++ b/N3OW/common/scripted_triggers/00_coa_triggers.txt @@ -21,13 +21,15 @@ coa_african_religion_trigger = { scope:faith.religion = { save_temporary_scope_as = religion } - OR = { - scope:religion = religion:akom_religion - scope:religion = religion:waaqism_religion - scope:religion = religion:west_african_religion - scope:religion = religion:west_african_bori_religion - scope:religion = religion:west_african_orisha_religion - scope:religion = religion:west_african_roog_religion + scope:religion = { + OR = { + this = religion:akom_religion + this = religion:waaqism_religion + this = religion:west_african_religion + this = religion:west_african_bori_religion + this = religion:west_african_orisha_religion + this = religion:west_african_roog_religion + } } } @@ -39,12 +41,9 @@ coa_bishopric_trigger = { coa_breton_trigger = { OR = { scope:culture = { has_coa_gfx = breton_coa_gfx } - AND = { - exists = scope:title - scope:title = { - any_this_title_or_de_jure_above = { - this = title:k_brittany - } + scope:title ?= { + any_this_title_or_de_jure_above = { + this = title:k_brittany } } } @@ -53,12 +52,9 @@ coa_breton_trigger = { coa_byzantine_trigger = { OR = { scope:culture = { has_coa_gfx = byzantine_group_coa_gfx } - AND = { - exists = scope:title - scope:title = { - any_this_title_or_de_jure_above = { - this = title:e_byzantium - } + scope:title ?= { + any_this_title_or_de_jure_above = { + this = title:e_byzantium } } } @@ -67,12 +63,9 @@ coa_byzantine_trigger = { coa_castilian_trigger = { OR = { scope:culture = { has_coa_gfx = castilian_coa_gfx } - AND = { - exists = scope:title - scope:title = { - any_this_title_or_de_jure_above = { - this = title:k_castille - } + scope:title ?= { + any_this_title_or_de_jure_above = { + this = title:k_castille } } } @@ -80,10 +73,7 @@ coa_castilian_trigger = { coa_coptic_trigger = { OR = { - # TODO graphical faith trigger scope:faith = faith:coptic - #scope:faith = faith:armenian_apostolic - #scope:faith = faith:paulician } } @@ -149,12 +139,9 @@ coa_french_trigger = { coa_irish_trigger = { OR = { scope:culture = { has_coa_gfx = irish_coa_gfx } - AND = { - exists = scope:title - scope:title = { - any_this_title_or_de_jure_above = { - this = title:k_ireland - } + scope:title ?= { + any_this_title_or_de_jure_above = { + this = title:k_ireland } } } @@ -162,36 +149,34 @@ coa_irish_trigger = { coa_indian_culture_trigger = { - OR = { - scope:culture = { has_coa_gfx = burman_group_coa_gfx } - scope:culture = { has_coa_gfx = dravidian_group_coa_gfx } - scope:culture = { has_coa_gfx = indo_aryan_group_coa_gfx } - scope:culture = { has_coa_gfx = tibetan_group_coa_gfx } + scope:culture = { + OR = { + has_coa_gfx = burman_group_coa_gfx + has_coa_gfx = dravidian_group_coa_gfx + has_coa_gfx = indo_aryan_group_coa_gfx + has_coa_gfx = tibetan_group_coa_gfx + } } } coa_indian_region_trigger = { exists = scope:title scope:title = { - any_this_title_or_de_jure_above = { - OR = { - this = title:e_india - this = title:e_bengal - this = title:e_deccan - this = title:e_rajastan - this = title:e_tibet - } - } + is_landless_type_title = no + title_province ?= { geographical_region = world_india } } } coa_indian_religion_trigger = { scope:faith.religion = { save_temporary_scope_as = religion } - OR = { - scope:religion = religion:bon_religion - scope:religion = religion:buddhism_religion - scope:religion = religion:hinduism_religion - scope:religion = religion:jainism_religion + scope:religion = { + OR = { + this = { is_in_family = rf_eastern } + this = religion:bon_religion + this = religion:buddhism_religion + this = religion:hinduism_religion + this = religion:jainism_religion + } } } coa_indian_trigger = { @@ -200,6 +185,7 @@ coa_indian_trigger = { coa_indian_region_trigger = yes coa_indian_religion_trigger = yes } + scope:culture = { has_graphical_east_asia_culture_group_trigger = no } } coa_jewish_trigger = { @@ -212,12 +198,9 @@ coa_jewish_trigger = { coa_leonese_trigger = { OR = { scope:culture = { has_coa_gfx = leonese_coa_gfx } - AND = { - exists = scope:title - scope:title = { - any_this_title_or_de_jure_above = { - this = title:k_leon - } + scope:title ?= { + any_this_title_or_de_jure_above = { + this = title:k_leon } } } @@ -225,12 +208,9 @@ coa_leonese_trigger = { coa_manx_trigger = { OR = { - AND = { - exists = scope:title - scope:title = { - any_this_title_or_de_jure_above = { - this = title:d_the_isles # Mann - } + scope:title ?= { + any_this_title_or_de_jure_above = { + this = title:d_the_isles # Mann } } AND = { @@ -289,12 +269,9 @@ coa_polish_trigger = { coa_scottish_trigger = { OR = { scope:culture = { has_coa_gfx = scottish_coa_gfx } - AND = { - exists = scope:title - scope:title = { - any_this_title_or_de_jure_above = { - this = title:k_scotland - } + scope:title ?= { + any_this_title_or_de_jure_above = { + this = title:k_scotland } } } @@ -304,17 +281,7 @@ coa_theocratic_trigger = { exists = root OR = { government_has_flag = government_is_theocracy - AND = { - exists = liege - liege = { - any_sub_realm_barony = { - lessee = ROOT - title_province = { - has_holding_type = church_holding - } - } - } - } + is_theocratic_lessee = yes } } @@ -327,10 +294,12 @@ coa_tamga_trigger = { } coa_scandinavian_trigger = { - OR = { - scope:culture = { has_coa_gfx = swedish_coa_gfx } - scope:culture = { has_coa_gfx = norwegian_coa_gfx } - scope:culture = { has_coa_gfx = danish_coa_gfx } + scope:culture = { + OR = { + has_coa_gfx = swedish_coa_gfx + has_coa_gfx = norwegian_coa_gfx + has_coa_gfx = danish_coa_gfx + } } } @@ -347,12 +316,10 @@ coa_iberian_trigger = { scope:culture = { has_coa_gfx = iberian_group_coa_gfx } AND = { scope:culture = { has_coa_gfx = arabic_group_coa_gfx } - AND = { - exists = scope:title - scope:title = { - any_this_title_or_de_jure_above = { - this = title:e_spain - } + scope:title ?= { + OR = { + this = title:e_spain + empire ?= title:e_spain } } } @@ -361,4 +328,197 @@ coa_iberian_trigger = { coa_iranian_trigger = { scope:culture = { has_coa_gfx = iranian_group_coa_gfx } -} \ No newline at end of file +} + +has_recognizable_chinese_seal = { + trigger_if = { + limit = { exists = scope:title } + scope:title = { is_noble_family_title = yes } + } + house ?= { + OR = { + ### CHINESE ### + has_base_name = "dynn_Wang_738B" + has_base_name = "dynn_Wang_738B_KO" + has_base_name = "dynn_Li_674E" + has_base_name = "dynn_Zhang_5F35" + has_base_name = "dynn_Liu_5289" + has_base_name = "dynn_Chen_9673" + has_base_name = "dynn_Yang_694A" + has_base_name = "dynn_Yang_694A_KO" + has_base_name = "dynn_Huang_9EC3" + has_base_name = "dynn_Zhao_8D99" + has_base_name = "dynn_Wu_5433" + has_base_name = "dynn_Zhou_5468" + has_base_name = "dynn_Xu_5F90" + has_base_name = "dynn_Sun_5B6B" + has_base_name = "dynn_Ma_99AC" + has_base_name = "dynn_Ma_99AC_KO" + has_base_name = "dynn_Zhu_6731" + has_base_name = "dynn_Hu_80E1" + has_base_name = "dynn_Guo_90ED" + has_base_name = "dynn_He_4F55" + has_base_name = "dynn_Lin_6797" + has_base_name = "dynn_Gao_9AD8" + has_base_name = "dynn_Luo_7F85" + has_base_name = "dynn_Zheng_912D" + has_base_name = "dynn_Liang_6881" + has_base_name = "dynn_Xie_8B1D" + has_base_name = "dynn_Song_5B8B" + has_base_name = "dynn_Song_5B8B_KO" + has_base_name = "dynn_Tang_5510" + has_base_name = "dynn_Xu_8A31" + has_base_name = "dynn_Deng_9127" + has_base_name = "dynn_Han_97D3" + has_base_name = "dynn_Han_97D3_KO" + has_base_name = "dynn_Feng_99AE" + has_base_name = "dynn_Cao_66F9" + has_base_name = "dynn_Peng_5F6D" + has_base_name = "dynn_Zeng_66FE" + has_base_name = "dynn_Xiao_856D" + has_base_name = "dynn_Tian_7530" + has_base_name = "dynn_Dong_8463" + has_base_name = "dynn_Pan_6F58" + has_base_name = "dynn_Yuan_8881" + has_base_name = "dynn_Cai_8521" + has_base_name = "dynn_Jiang_8523" + has_base_name = "dynn_Yu_4F59" + has_base_name = "dynn_Yu_4E8E" + has_base_name = "dynn_Du_675C" + has_base_name = "dynn_Du_675C_KO" + has_base_name = "dynn_Ye_8449" + has_base_name = "dynn_Cheng_7A0B" + has_base_name = "dynn_Wei_9B4F" + has_base_name = "dynn_Su_8607" + has_base_name = "dynn_Lu_5442" + has_base_name = "dynn_Ding_4E01" + has_base_name = "dynn_Ren_4EFB" + has_base_name = "dynn_Lu_76E7" + has_base_name = "dynn_Yao_59DA" + has_base_name = "dynn_Shen_6C88" + has_base_name = "dynn_Zhong_937E" + has_base_name = "dynn_Jiang_59DC" + has_base_name = "dynn_Cui_5D14" + has_base_name = "dynn_Tan_8B5A" + has_base_name = "dynn_Lu_9678" + has_base_name = "dynn_Fan_8303" + has_base_name = "dynn_Wang_6C6A" + has_base_name = "dynn_Liao_5ED6" + has_base_name = "dynn_Shi_77F3" + has_base_name = "dynn_Jin_91D1" + has_base_name = "dynn_Wei_97CB" + has_base_name = "dynn_Jia_8CC8" + has_base_name = "dynn_Xia_590F" + has_base_name = "dynn_Fu_5085" + has_base_name = "dynn_Fang_65B9" + has_base_name = "dynn_Zou_9112" + has_base_name = "dynn_Xiong_718A" + has_base_name = "dynn_Bai_767D" + has_base_name = "dynn_Meng_5B5F" + has_base_name = "dynn_Qin_79E6" + has_base_name = "dynn_Qiu_90B1" + has_base_name = "dynn_Hou_4FAF" + has_base_name = "dynn_Jiang_6C5F" + has_base_name = "dynn_Yin_5C39" + has_base_name = "dynn_Xue_859B" + has_base_name = "dynn_Yan_95BB" + has_base_name = "dynn_Duan_6BB5" + has_base_name = "dynn_Lei_96F7" + has_base_name = "dynn_Long_9F8D" + has_base_name = "dynn_Li_9ECE" + has_base_name = "dynn_Shi_53F2" + has_base_name = "dynn_Tao_9676" + has_base_name = "dynn_He_8CC0" + has_base_name = "dynn_Mao_6BDB" + has_base_name = "dynn_Hao_90DD" + has_base_name = "dynn_Gu_9867" + has_base_name = "dynn_Gong_9F94" + has_base_name = "dynn_Shao_90B5" + has_base_name = "dynn_Wan_842C" + has_base_name = "dynn_Tan_8983" + has_base_name = "dynn_Wu_6B66" + has_base_name = "dynn_Qian_9322" + has_base_name = "dynn_Dai_6234" + has_base_name = "dynn_Yan_56B4" + has_base_name = "dynn_Ou_6B50" + has_base_name = "dynn_Mo_83AB" + has_base_name = "dynn_Kong_5B54" + has_base_name = "dynn_Xiang_5411" + has_base_name = "dynn_Xin_8F9B" + has_base_name = "dynn_Xie_90aa" + has_base_name = "dynn_Ximen_897F" + has_base_name = "dynn_Situ_53F8" + has_base_name = "dynn_Nan_5357" + has_base_name = "dynn_Nangong_5357" + has_base_name = "dynn_Shan_55AE" + has_base_name = "dynn_Da_5927" + has_base_name = "dynn_Po_6734" # (Bak/Phac) 朴 + has_base_name = "dynn_Quan_6B0A" # (Gwon/Quyen) 權 + has_base_name = "dynn_Wen_6587" # (Mun/Van) 文 + has_base_name = "dynn_Liao_907C" # (Ryo/Lieu) 遼 + has_base_name = "dynn_Yue_8D8A" # (Viet) # 越 + has_base_name = "dynn_Zhao_8A54" # (Jo/Li) # 詔 + has_base_name = "dynn_Meng_8499" # 蒙 + ### KOREAN/BALHAE ### + has_base_name = "dynn_An_694A" + has_base_name = "dynn_Baek_767D" + has_base_name = "dynn_Chae_8521" + has_base_name = "dynn_Choe_5D14" + has_base_name = "dynn_Gang_59DC" + has_base_name = "dynn_Gim_91D1" + has_base_name = "dynn_Go_9AD8" + has_base_name = "dynn_Gwak_90ED" + has_base_name = "dynn_Ha_590F" + has_base_name = "dynn_Ha_8CC0" + has_base_name = "dynn_I_674E" + has_base_name = "dynn_Im_4EFB" + has_base_name = "dynn_Jang_5F35" + has_base_name = "dynn_Jeong_912D" + has_base_name = "dynn_Jo_8D99" + has_base_name = "dynn_Ju_5468" + has_base_name = "dynn_Ju_6731" + has_base_name = "dynn_O_5433" + has_base_name = "dynn_Pung_99AE" + has_base_name = "dynn_Ra_7F85" + has_base_name = "dynn_Rim_6797" + has_base_name = "dynn_Sa_53F2" + has_base_name = "dynn_Yang_6881" + has_base_name = "dynn_Yeo_5442" + has_base_name = "dynn_Yu_5289" + has_base_name = "dynn_Yun_5C39" + ### VIET ### + has_base_name = "dynn_Bach_767D" + has_base_name = "dynn_Cao_9AD8" + has_base_name = "dynn_Chu_6731" + has_base_name = "dynn_Dao_9676" + has_base_name = "dynn_Dinh_4E01" + has_base_name = "dynn_Doan_6BB5" + has_base_name = "dynn_Dong_8463_VN" + has_base_name = "dynn_Duong_694A" + has_base_name = "dynn_Ha_4F55" + has_base_name = "dynn_Ho_80E1" + has_base_name = "dynn_Hoang_9EC3" + has_base_name = "dynn_Lam_6797" + has_base_name = "dynn_Le_9ECE" + has_base_name = "dynn_Loi_96F7" + has_base_name = "dynn_Luu_5289" + has_base_name = "dynn_Ly_674E" + has_base_name = "dynn_Mac_83AB" + has_base_name = "dynn_Ngo_5433" + has_base_name = "dynn_Phan_6F58" + has_base_name = "dynn_Pham_8303" + has_base_name = "dynn_Phung_99AE" + has_base_name = "dynn_Quach_90ED" + has_base_name = "dynn_Ta_8B1D" + has_base_name = "dynn_To_8607" + has_base_name = "dynn_Ton_5B6B" + has_base_name = "dynn_Tong_5B8B" + has_base_name = "dynn_Tran_9673" + has_base_name = "dynn_Trieu_8D99" + has_base_name = "dynn_Trinh_912D" + has_base_name = "dynn_Truong_5F35" + has_base_name = "dynn_Vu_6B66" + has_base_name = "dynn_Vuong_738B" + } + } +} diff --git a/N3OW/common/scripted_triggers/00_councillor_triggers.txt b/N3OW/common/scripted_triggers/00_councillor_triggers.txt index e9c00b0e..f82e5245 100644 --- a/N3OW/common/scripted_triggers/00_councillor_triggers.txt +++ b/N3OW/common/scripted_triggers/00_councillor_triggers.txt @@ -11,8 +11,11 @@ #TRIGGERS can_be_councillor_basics_trigger = { - is_capable_adult = yes - is_imprisoned = no + is_available_quick = { + adult = yes + incapable = no + imprisoned = no + } is_at_war_with_liege = no trigger_if = { limit = { has_variable = block_hire_councillor } @@ -29,13 +32,11 @@ can_be_chancellor_trigger = { has_council_position = councillor_court_chaplain faith = { has_doctrine_parameter = clerical_appointment_fixed } } - NOT = { - OR = { - has_council_position = councillor_spouse - AND = { - this = liege.diarch - liege = { has_diarchy_active_parameter = diarchy_is_vizierate } - } + NOR = { + has_council_position = councillor_spouse + AND = { + this = liege.diarch + liege = { has_diarchy_active_parameter = diarchy_is_vizierate } } } OR = { @@ -60,13 +61,11 @@ can_be_steward_trigger = { has_council_position = councillor_court_chaplain faith = { has_doctrine_parameter = clerical_appointment_fixed } } - NOT = { - OR = { - has_council_position = councillor_spouse - AND = { - this = liege.diarch - liege = { has_diarchy_active_parameter = diarchy_is_vizierate } - } + NOR = { + has_council_position = councillor_spouse + AND = { + this = liege.diarch + liege = { has_diarchy_active_parameter = diarchy_is_vizierate } } } OR = { @@ -87,18 +86,16 @@ can_be_marshal_trigger = { $COURT_OWNER$ ?= { NOT = { government_has_flag = government_is_nomadic } } - is_hostage = no + is_hostage = no NAND = { has_council_position = councillor_court_chaplain faith = { has_doctrine_parameter = clerical_appointment_fixed } } - NOT = { - OR = { - has_council_position = councillor_spouse - AND = { - this = liege.diarch - liege = { has_diarchy_active_parameter = diarchy_is_vizierate } - } + NOR = { + has_council_position = councillor_spouse + AND = { + this = liege.diarch + liege = { has_diarchy_active_parameter = diarchy_is_vizierate } } } OR = { @@ -124,13 +121,11 @@ can_be_spymaster_trigger = { has_council_position = councillor_court_chaplain faith = { has_doctrine_parameter = clerical_appointment_fixed } } - NOT = { - OR = { - has_council_position = councillor_spouse - AND = { - this = liege.diarch - liege = { has_diarchy_active_parameter = diarchy_is_vizierate } - } + NOR = { + has_council_position = councillor_spouse + AND = { + this = liege.diarch + liege = { has_diarchy_active_parameter = diarchy_is_vizierate } } } exists = $COURT_OWNER$ #so we can have the argument but get no errors @@ -142,13 +137,11 @@ can_be_court_chaplain_trigger = { $COURT_OWNER$ ?= { NOT = { government_has_flag = government_is_nomadic } } - NOT = { - OR = { - has_council_position = councillor_spouse - AND = { - this = liege.diarch - liege = { has_diarchy_active_parameter = diarchy_is_vizierate } - } + NOR = { + has_council_position = councillor_spouse + AND = { + this = liege.diarch + liege = { has_diarchy_active_parameter = diarchy_is_vizierate } } } $COURT_OWNER$.faith = { has_allowed_gender_for_clergy = scope:court_chaplain_check } @@ -184,13 +177,11 @@ can_be_spouse_councillor_trigger = { #} trigger_if = { limit = { is_ruler = yes } - exists = liege - liege = $COUNCIL_OWNER$ + liege ?= $COUNCIL_OWNER$ $COUNCIL_OWNER$ = { primary_spouse = scope:spouse_councillor_check } } trigger_else = { - exists = $COUNCIL_OWNER$ - $COUNCIL_OWNER$ = { primary_spouse = scope:spouse_councillor_check } + $COUNCIL_OWNER$ ?= { primary_spouse = scope:spouse_councillor_check } } } @@ -333,23 +324,13 @@ councillor_loyalty_trigger = { } } - -councillor_positive_event_opinion_trigger = { - always = yes - # opinion = { - # target = liege - # value >= -20 - # } -} - ############################ #SPOUSE COUNCILLOR TRIGGERS# ############################ valid_spouse_councillor_trigger = { - exists = cp:councillor_spouse scope:councillor = { is_available = yes } - cp:councillor_spouse = scope:councillor + cp:councillor_spouse ?= scope:councillor } is_blocked_from_being_fired_from_council_trigger = { @@ -403,19 +384,19 @@ same_faith_or_culture_as_councillor_trigger = { different_faith_and_or_culture_from_councillor_trigger = { OR = { - NOT = { culture = scope:councillor.culture } - NOT = { faith = scope:councillor.faith } + culture != scope:councillor.culture + faith != scope:councillor.faith } } character_same_faith_as_councillor_but_different_from_root_trigger = { faith = scope:councillor.faith - NOT = { faith = root.faith } + faith != root.faith } character_same_culture_as_councillor_but_different_from_root_trigger = { culture = scope:councillor.culture - NOT = { culture = root.culture } + culture != root.culture } @@ -451,11 +432,11 @@ province_same_faith_or_culture_as_councillor_but_different_from_root_trigger = { OR = { AND = { culture = scope:councillor.culture - NOT = { culture = root.culture } + culture != root.culture } AND = { faith = scope:councillor.faith - NOT = { faith = root.faith } + faith != root.faith } } } @@ -778,7 +759,7 @@ spymaster_task_find_secrets_block_spymaster_self_reveal_trigger = { exists = secret_target NOT = { secret_type = secret_murder_attempt } } - NOT = { secret_target = scope:councillor } + secret_target != scope:councillor } # If the spymaster is the father of a secret bastard, don't reveal that trigger_if = { @@ -789,7 +770,7 @@ spymaster_task_find_secrets_block_spymaster_self_reveal_trigger = { } exists = secret_target.real_father } - NOT = { secret_target.real_father = scope:councillor } + secret_target.real_father != scope:councillor } } @@ -844,16 +825,16 @@ spymaster_task_find_secrets_court_has_minor_secrets_trigger = { } any_vassal = { has_any_secrets = yes - NOT = { this = scope:councillor_liege } - NOT = { this = scope:councillor } + this != scope:councillor_liege + this != scope:councillor any_secret = { spymaster_task_find_secrets_suitable_minor_secret_trigger = yes } } any_courtier_or_guest = { has_any_secrets = yes - NOT = { this = scope:councillor_liege } - NOT = { this = scope:councillor } + this != scope:councillor_liege + this != scope:councillor any_secret = { spymaster_task_find_secrets_suitable_minor_secret_trigger = yes } @@ -871,16 +852,16 @@ spymaster_task_find_secrets_court_has_major_secrets_trigger = { } any_vassal = { has_any_secrets = yes - NOT = { this = scope:councillor_liege } - NOT = { this = scope:councillor } + this != scope:councillor_liege + this != scope:councillor any_secret = { spymaster_task_find_secrets_suitable_major_secret_trigger = yes } } any_courtier_or_guest = { has_any_secrets = yes - NOT = { this = scope:councillor_liege } - NOT = { this = scope:councillor } + this != scope:councillor_liege + this != scope:councillor any_secret = { spymaster_task_find_secrets_suitable_major_secret_trigger = yes } @@ -892,8 +873,7 @@ spymaster_find_secrets_secret_holder_is_interesting_to_me_trigger = { scope:councillor_liege = { save_temporary_scope_as = me } - exists = scope:secret_holder - scope:secret_holder = { + scope:secret_holder ?= { OR = { is_ruler = yes is_close_or_extended_family_of = scope:me @@ -965,35 +945,29 @@ steward_task_county_corruption_county_trigger = { councillor_spouse_learning_2603_valid_councillor_trigger = { is_available_ai_adult = yes - NOT = { this = scope:councillor } + this != scope:councillor } councillor_liege_has_erudition_legacy_5_perk = { - exists = scope:councillor_liege.dynasty - scope:councillor_liege.dynasty = { has_dynasty_perk = erudition_legacy_5 } + scope:councillor_liege.dynasty ?= { has_dynasty_perk = erudition_legacy_5 } } councillor_liege_has_customs_legacy_perk = { - exists = scope:councillor_liege.dynasty - scope:councillor_liege.dynasty = { has_dynasty_perk = ep1_culture_legacy_2 } + scope:councillor_liege.dynasty ?= { has_dynasty_perk = ep1_culture_legacy_2 } } councillor_liege_has_family_business_bonus = { - exists = scope:councillor_liege.culture - exists = scope:councillor - scope:councillor_liege.culture = { has_cultural_parameter = close_family_better_councillors } - scope:councillor = { + scope:councillor_liege.culture ?= { has_cultural_parameter = close_family_better_councillors } + scope:councillor ?= { is_close_family_of = scope:councillor_liege } } councillor_liege_has_consulted_house_bonus = { scope:councillor_liege ?= { has_character_flag = fp3_consulted_house } - exists = scope:councillor_liege.house - exists = scope:councillor.house - scope:councillor ?= { house = scope:councillor_liege.house } + scope:councillor.house ?= scope:councillor_liege.house } councillor_is_unskilled_trigger = { @@ -1075,10 +1049,12 @@ councillor_liege_has_khvarenah_legacy_perk = { } can_be_knight_now_light_trigger = { - is_alive = yes - is_ai = yes # Players can't be knights - is_adult = yes - is_imprisoned = no + is_available_quick = { + ai = yes # Players can't be knights + imprisoned = no + adult = yes + alive = yes + } } can_be_trained_as_knight_now_light_trigger = { @@ -1092,6 +1068,7 @@ can_be_trained_as_knight_now_light_trigger = { exists = involved_activity has_variable = homage_liege_scope has_character_flag = meditation_character_flag + has_character_flag = local_shrine_rite has_character_flag = petition_liege_character_flag has_character_flag = holding_court_character_flag is_being_visited_on_tour_strict = yes diff --git a/N3OW/common/scripted_triggers/00_county_corruption_triggers.txt b/N3OW/common/scripted_triggers/00_county_corruption_triggers.txt index 088876e8..67739a5f 100644 --- a/N3OW/common/scripted_triggers/00_county_corruption_triggers.txt +++ b/N3OW/common/scripted_triggers/00_county_corruption_triggers.txt @@ -36,6 +36,8 @@ immune_to_county_corruption_trigger = { has_variable = county_corruption_recent_removal is_target_of_council_task = task_increase_control has_county_modifier = marshal_task_military_presence_modifier + is_noble_family_title = yes + is_landless_type_title = yes } } diff --git a/N3OW/common/scripted_triggers/00_court_position_triggers.txt b/N3OW/common/scripted_triggers/00_court_position_triggers.txt index 8305d602..ea35b384 100644 --- a/N3OW/common/scripted_triggers/00_court_position_triggers.txt +++ b/N3OW/common/scripted_triggers/00_court_position_triggers.txt @@ -4,6 +4,7 @@ any_court_position_available_trigger = { NOT = { employs_court_position = royal_architect_court_position } NOT = { employs_court_position = seneschal_court_position } NOT = { employs_court_position = court_tutor_court_position } + NOT = { employs_court_position = court_guru_court_position } NOT = { employs_court_position = high_almoner_court_position } NOT = { employs_court_position = court_physician_court_position } NOT = { employs_court_position = antiquarian_court_position } @@ -84,6 +85,42 @@ any_court_position_available_trigger = { } } +#@info! Used together with assign_appropriate_court_position_effect and distribute_determined_court_position_effect -- update the flags here if you add any Court Positions in the effects +has_any_court_position_flag_trigger = { + OR = { + has_character_flag = physician_flag + has_character_flag = tutor_flag + has_character_flag = almoner_flag + has_character_flag = antiquarian_flag + has_character_flag = qadi_flag + has_character_flag = taster_flag + has_character_flag = executioner_flag + has_character_flag = cupbearer_flag + has_character_flag = lady_in_waiting_flag + has_character_flag = jester_flag + has_character_flag = poet_flag + has_character_flag = musician_flag + has_character_flag = gardener_flag + has_character_flag = architect_flag + has_character_flag = swan_flag + has_character_flag = seneschal_flag + has_character_flag = horse_flag + has_character_flag = garuda_flag + has_character_flag = hunt_flag + has_character_flag = bodyguard_flag + has_character_flag = travel_leader_flag + has_character_flag = wet_nurse_flag + has_character_flag = akolouthos_flag + has_character_flag = court_astrologer_flag + has_character_flag = boyan_flag + has_character_flag = siege_engineer_flag + has_character_flag = yurtchi_flag + has_character_flag = yeke_jarquchi_flag + has_character_flag = foreign_emissary_flag + has_character_flag = keeper_of_the_horses_flag + } +} + # Used in the trigger for court positions to make sure that they don't already have a "job" # If a court position is considered a full time job, the character cannot hold another similar position court_position_does_not_already_have_a_job_trigger = { @@ -91,6 +128,7 @@ court_position_does_not_already_have_a_job_trigger = { text = does_not_have_a_full_time_job NOR = { has_court_position = court_tutor_court_position + has_court_position = court_guru_court_position has_court_position = food_taster_court_position has_court_position = seneschal_court_position has_court_position = cupbearer_court_position @@ -105,6 +143,11 @@ court_position_does_not_already_have_a_job_trigger = { has_court_position = travel_leader_court_position has_court_position = wet_nurse_court_position has_court_position = akolouthos_court_position + has_court_position = grand_preceptor_court_position + has_court_position = grand_guardian_court_position + has_court_position = grand_mentor_court_position + has_court_position = fire_dragon_engineer_court_position + has_court_position = keeper_of_the_harem_court_position is_councillor = yes } } @@ -119,7 +162,7 @@ can_appoint_char_to_court_position = { save_temporary_scope_as = hiring_liege can_employ_court_position_type = $COURT_POS$ $CHAR$ = { - NOT = { this = scope:hiring_liege } + this != scope:hiring_liege NOT = { has_court_position = $COURT_POS$ } can_be_employed_as = $COURT_POS$ } @@ -138,6 +181,7 @@ can_appoint_char_to_any_court_position = { can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = travel_leader_court_position } can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = wet_nurse_court_position } can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = court_tutor_court_position } + can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = court_guru_court_position } can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = food_taster_court_position } can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = master_of_horse_court_position } can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = master_of_hunt_court_position } @@ -219,6 +263,7 @@ has_intrigue_court_position = { has_learning_court_position = { OR = { has_court_position = court_tutor_court_position + has_court_position = court_guru_court_position has_court_position = high_almoner_court_position has_court_position = court_physician_court_position has_court_position = antiquarian_court_position @@ -262,7 +307,12 @@ court_position_learning_trigger = { # Is courtier suited to learning positions? base_court_position_validity_trigger = { # would_be_valid_for_court_position ultimately traces back to this, so touch with caution is_imprisoned = no NOT = { is_at_war_with = $EMPLOYER$ } + custom_tooltip = { + text = is_not_a_ceremonial_liege_trigger + tgp_is_ceremonial_liege_trigger = no + } } + royal_architect_validity_trigger = { base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } } @@ -286,6 +336,23 @@ seneschal_validity_trigger = { } } +khlon_glan_validity_trigger = { + base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } + stewardship >= 10 + martial >= 10 + custom_tooltip = { + text = NONE_NOT_THE_SPOUSE_OF_CHARACTER_COURT_POSITION + NOT = { is_spouse_of = $EMPLOYER$ } + } + custom_tooltip = { + text = none_does_not_have_a_full_time_job + trigger_if = { + limit = { NOT = { has_court_position = khlon_glan_court_position } } + court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position + } + } +} + court_tutor_validity_trigger = { base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } OR = { @@ -299,7 +366,12 @@ court_tutor_validity_trigger = { custom_tooltip = { text = none_does_not_have_a_full_time_job trigger_if = { - limit = { NOT = { has_court_position = court_tutor_court_position } } + limit = { + NOR = { + has_court_position = court_tutor_court_position + has_court_position = court_guru_court_position + } + } court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position } } @@ -313,6 +385,15 @@ high_almoner_validity_trigger = { } } +court_brahmin_validity_trigger = { + base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } + OR = { + has_religion = religion:buddhism_religion + has_religion = religion:hinduism_religion + } + learning >= 12 +} + court_physician_validity_trigger = { base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } is_landed = no @@ -398,6 +479,21 @@ court_poet_validity_trigger = { } } +house_poet_validity_trigger = { + base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } + custom_tooltip = { + text = NONE_NOT_THE_SPOUSE_OF_CHARACTER_COURT_POSITION + NOT = { is_spouse_of = $EMPLOYER$ } + } + custom_tooltip = { + text = none_does_not_have_a_full_time_job + trigger_if = { + limit = { NOT = { has_court_position = house_poet_court_position } } + court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position + } + } +} + court_musician_validity_trigger = { base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } OR = { @@ -1008,7 +1104,9 @@ camp_officer_generator_pickable_trigger = { # Set to 0 with Dynasty Perk Inner Circle court_position_inner_circle_salary_trigger = { trigger_if = { - limit = { exists = scope:liege } + limit = { + exists = scope:liege + } scope:liege ?= { dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } employs_court_position = $POS$_court_position @@ -1046,7 +1144,6 @@ court_position_obligation_hook_salary_trigger = { } trigger_else = { always = no } } - can_be_employed_as_any_court_position_trigger = { OR = { can_be_employed_as = court_poet_court_position @@ -1068,6 +1165,7 @@ can_be_employed_as_any_court_position_trigger = { can_be_employed_as = chief_eunuch_court_position can_be_employed_as = master_assassin_court_position can_be_employed_as = court_tutor_court_position + can_be_employed_as = court_guru_court_position can_be_employed_as = high_almoner_court_position can_be_employed_as = court_physician_court_position can_be_employed_as = antiquarian_court_position @@ -1075,6 +1173,11 @@ can_be_employed_as_any_court_position_trigger = { can_be_employed_as = court_scholar_court_position can_be_employed_as = court_brewmaster_court_position can_be_employed_as = court_astrologer_court_position + can_be_employed_as = grand_preceptor_court_position + can_be_employed_as = grand_mentor_court_position + can_be_employed_as = grand_guardian_court_position + can_be_employed_as = fire_dragon_engineer_court_position + can_be_employed_as = keeper_of_the_harem_court_position can_be_employed_as = boyan_court_position can_be_employed_as = siege_engineer_court_position can_be_employed_as = yurtchi_court_position @@ -1431,7 +1534,7 @@ master_bard_validity_trigger = { has_trait = deceitful has_trait = diligent # Misc. - has_trait = poet + has_trait = lifestyle_poet has_trait = drunkard } } @@ -1610,7 +1713,7 @@ laureate_validity_trigger = { has_trait = arrogant has_trait = fickle # Misc. - has_trait = poet + has_trait = lifestyle_poet has_trait = lifestyle_reveler } } @@ -1674,9 +1777,104 @@ bookmaker_validity_trigger = { } } +grand_preceptor_validity_trigger = { + base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } + custom_tooltip = { + text = none_does_not_have_a_full_time_job + trigger_if = { + limit = { NOT = { has_court_position = grand_preceptor_court_position } } + court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position + } + } +} + +grand_guardian_validity_trigger = { + base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } + custom_tooltip = { + text = none_does_not_have_a_full_time_job + trigger_if = { + limit = { NOT = { has_court_position = grand_guardian_court_position } } + court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position + } + } +} + +fire_dragon_engineer_validity_trigger = { + base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } + custom_tooltip = { + text = none_does_not_have_a_full_time_job + trigger_if = { + limit = { NOT = { has_court_position = fire_dragon_engineer_court_position } } + court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position + } + } +} + +grand_mentor_validity_trigger = { + base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } + custom_tooltip = { + text = none_does_not_have_a_full_time_job + trigger_if = { + limit = { NOT = { has_court_position = grand_mentor_court_position } } + court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position + } + } +} + +keeper_of_the_harem_validity_trigger = { + base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } + custom_tooltip = { + text = none_does_not_have_a_full_time_job + trigger_if = { + limit = { NOT = { has_court_position = keeper_of_the_harem_court_position } } + court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position + } + } +} + +court_guru_validity_trigger = { + base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } + has_trait = lifestyle_mystic + OR = { + has_religion = religion:buddhism_religion + has_religion = religion:hinduism_religion + } + custom_tooltip = { + text = NONE_NOT_THE_SPOUSE_OF_CHARACTER_COURT_POSITION + NOT = { is_spouse_of = $EMPLOYER$ } + } + custom_tooltip = { + text = none_does_not_have_a_full_time_job + trigger_if = { + limit = { + NOR = { + has_court_position = court_tutor_court_position + has_court_position = court_guru_court_position + } + } + court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position + } + } +} ### Court Position Task Triggers ### wet_nurse_instill_virtue_trigger = { NOT = { has_trait = $TRAIT$ } scope:notification_character.faith = { trait_is_virtue = $TRAIT$ } } + +court_position_employee_shown_trigger = { + is_imprisoned = no + tgp_is_ceremonial_liege_trigger = no +} + +can_employ_court_eunuchs_trigger = { + $CHAR$ = { + custom_tooltip = { + text = can_appoint_chief_eunuch_name_tt + culture = { # Culture that has eunuchs + has_cultural_parameter = can_appoint_chief_eunuch + } + } + } +} diff --git a/N3OW/common/scripted_triggers/00_court_role_triggers.txt b/N3OW/common/scripted_triggers/00_court_role_triggers.txt index a34d6297..dadca052 100644 --- a/N3OW/common/scripted_triggers/00_court_role_triggers.txt +++ b/N3OW/common/scripted_triggers/00_court_role_triggers.txt @@ -36,7 +36,7 @@ is_available_schemer = { is_available_non_primary_consort = { is_available = yes - NOT = {this = primary_spouse } + this != primary_spouse } is_available_non_child_family = { diff --git a/N3OW/common/scripted_triggers/00_courtier_guest_management_triggers.txt b/N3OW/common/scripted_triggers/00_courtier_guest_management_triggers.txt index 07ea702b..706ffd4c 100644 --- a/N3OW/common/scripted_triggers/00_courtier_guest_management_triggers.txt +++ b/N3OW/common/scripted_triggers/00_courtier_guest_management_triggers.txt @@ -142,7 +142,6 @@ courtier_allowed_to_leave_trigger = { } } } - has_epidemic_disease_trigger = yes #Keep daughters/sons for marriages AND = { OR = { @@ -199,10 +198,8 @@ courtier_allowed_to_leave_trigger = { is_married = yes any_spouse = { OR = { - AND = { - exists = liege - liege = scope:leaving_courtier.liege - } + liege ?= scope:leaving_courtier.liege + AND = { exists = host exists = scope:leaving_courtier.host @@ -241,13 +238,19 @@ courtier_allowed_to_leave_trigger = { has_character_modifier = mellowed_spirit # Courtiers with sponsored inspirations won't leave on their own. - AND = { - exists = inspiration - inspiration = { exists = inspiration_sponsor } - } + inspiration ?= { exists = inspiration_sponsor } scope:liege = { government_has_flag = government_is_landless_adventurer } is_obedient_to = scope:liege + + AND = { + scope:liege.primary_title = title:h_china + OR = { + is_child_of = scope:liege + is_grandchild_of = scope:liege + is_great_grandchild_of = scope:liege + } + } } } @@ -280,8 +283,6 @@ guest_allowed_to_leave_trigger = { # Diarchs don't leave their court. is_diarch = yes is_designated_diarch = yes - #Too sick to travel - has_epidemic_disease_trigger = yes #Would be leaving without spouse or underage child any_child_not_in_traveling_family_trigger = yes any_consort_not_in_traveling_family_trigger = yes @@ -299,7 +300,7 @@ guest_allowed_to_arrive_trigger = { limit = { exists = host } NOT = { host = $HOST$ } } - has_epidemic_disease_trigger = no + NOT = { has_trait_with_flag = epidemic_disease } NOT = { has_relation_rival = $HOST$ } #Compatible faiths faith = { @@ -348,10 +349,19 @@ can_recruit_character_to_court_trigger = { trigger_if = { limit = { exists = host + host = { is_ai = no } NOT = { is_player_heir_of = scope:recruiter } } is_player_heir_of = host } + trigger_if = { + limit = { + exists = host + host = { is_ai = yes } + NOT = { is_player_heir_of = scope:recruiter } + } + is_primary_heir_of = host + } trigger_if = { limit = { exists = host } is_consort_of = host @@ -399,7 +409,7 @@ can_recruit_character_to_court_trigger = { } trigger_if = { limit = { - scope:recruiter = { is_landless_adventurer = yes } + scope:recruiter = { has_government = landless_adventurer_government } } custom_tooltip = { text = can_recruit_character_to_court_trigger.tt.laamps_invitation_restrictions @@ -427,8 +437,7 @@ can_recruit_character_to_court_trigger = { any_spouse = { is_female = yes matrilinear_marriage = yes - exists = host - host = scope:recruitee.host + host ?= scope:recruitee.host save_temporary_scope_as = spouse OR = { #Is employed in some way is_councillor_of = scope:recruitee.host @@ -473,8 +482,7 @@ can_recruit_character_to_court_trigger = { any_spouse = { is_male = yes patrilinear_marriage = yes - exists = host - host = scope:recruitee.host + host ?= scope:recruitee.host save_temporary_scope_as = spouse OR = { #Is employed in some way is_councillor_of = scope:recruitee.host @@ -719,16 +727,14 @@ guest_marriage_candidate_trigger = { ###POOL TRIGGERS### is_visitable_relation_trigger = { - exists = capital_province - capital_province = { local_pool_is_full_trigger = no } + capital_province ?= { local_pool_is_full_trigger = no } NOR = { this = $CHARACTER$.host has_relation_rival = $CHARACTER$ } $CHARACTER$ = { - NAND = { - exists = var:last_visited_ruler - var:last_visited_ruler = prev + NOT = { + var:last_visited_ruler ?= prev } } } @@ -742,8 +748,6 @@ pool_character_is_pruneable_trigger = { save_temporary_scope_as = pool_prune_check is_adult = yes NOR = { - has_trait = peasant_leader - has_trait = gallowsbait has_trait = heresiarch has_trait = populist_leader has_trait = adventurer_follower @@ -751,9 +755,8 @@ pool_character_is_pruneable_trigger = { has_trait = historical_character has_character_flag = ai_will_not_convert is_married = yes - any_claim = { always = yes } + any_claim = { } any_child = { is_adult = no } - num_of_good_genetic_traits >= 1 any_relation = { type = lover is_ruler = yes @@ -763,10 +766,7 @@ pool_character_is_pruneable_trigger = { is_ruler = yes } any_close_or_extended_family_member = { is_ruler = yes } - AND = { #Belongs to a dynasty with more than 1 member - exists = dynasty - dynasty = { any_dynasty_member = { NOT = { this = scope:pool_prune_check } } } - } + #Belongs to a dynasty with more than 1 member any_relation = { type = rival is_ai = no @@ -784,6 +784,7 @@ pool_character_is_pruneable_trigger = { intrigue >= high_skill_rating learning >= high_skill_rating prowess >= high_skill_rating + dynasty ?= { any_dynasty_member = { this != scope:pool_prune_check } } any_relation = { type = rival is_ruler = yes @@ -826,4 +827,4 @@ guest_herder_candidate_trigger = { } age < 45 age >= 25 -} \ No newline at end of file +} diff --git a/N3OW/common/scripted_triggers/00_crime_triggers.txt b/N3OW/common/scripted_triggers/00_crime_triggers.txt index 84c717cd..212ed8f1 100644 --- a/N3OW/common/scripted_triggers/00_crime_triggers.txt +++ b/N3OW/common/scripted_triggers/00_crime_triggers.txt @@ -9,7 +9,7 @@ is_witch_trigger = { subject = this OR = { has_trait = witch - any_secret = { secret_type = secret_witch } + any_secret = { type = secret_witch } } } } @@ -22,7 +22,7 @@ is_witch_known_by_trigger = { subject = this object = $CHARACTER$ any_secret = { - secret_type = secret_witch + type = secret_witch is_known_by = $CHARACTER$ } } @@ -32,7 +32,7 @@ is_witch_known_by_trigger = { is_deviant_trigger = { OR = { has_trait = deviant - any_secret = { secret_type = secret_deviant } + any_secret = { type = secret_deviant } } } @@ -40,7 +40,7 @@ is_incestuous_trigger = { OR = { has_trait = incestuous any_secret = { - secret_type = secret_incest + type = secret_incest } } } diff --git a/N3OW/common/scripted_triggers/00_crypto_religionist_triggers.txt b/N3OW/common/scripted_triggers/00_crypto_religionist_triggers.txt index 286b8725..6567c990 100644 --- a/N3OW/common/scripted_triggers/00_crypto_religionist_triggers.txt +++ b/N3OW/common/scripted_triggers/00_crypto_religionist_triggers.txt @@ -10,7 +10,7 @@ has_crypto_religionist_secret_known_by_character_trigger = { any_secret = { - secret_type = secret_crypto_religionist + type = secret_crypto_religionist any_secret_knower = { this = $CHARACTER$ } } } \ No newline at end of file diff --git a/N3OW/common/scripted_triggers/00_cultural_heritage_triggers.txt b/N3OW/common/scripted_triggers/00_cultural_heritage_triggers.txt index c0c11d64..bcac7584 100644 --- a/N3OW/common/scripted_triggers/00_cultural_heritage_triggers.txt +++ b/N3OW/common/scripted_triggers/00_cultural_heritage_triggers.txt @@ -1,14 +1,13 @@ - -### Cultural heritage triggers +### Cultural heritage triggers # By their nature these triggers will be a bit lose and inaccurate, so keep that in mind when using them! - #ASIA culture_has_asian_heritage_pillar_trigger = { OR = { culture_has_east_asian_heritage_pillar_trigger = yes culture_has_west_asian_heritage_pillar_trigger = yes culture_has_south_asian_heritage_pillar_trigger = yes + culture_has_southeast_asian_heritage_pillar_trigger = yes culture_has_north_asian_heritage_pillar_trigger = yes culture_has_central_asian_heritage_pillar_trigger = yes } @@ -18,10 +17,12 @@ culture_has_east_asian_heritage_pillar_trigger = { OR = { has_cultural_pillar = heritage_tibetan has_cultural_pillar = heritage_chinese - has_cultural_pillar = heritage_mongolic - has_cultural_pillar = heritage_turkic - has_cultural_pillar = heritage_burman + has_cultural_pillar = heritage_japonic + has_cultural_pillar = heritage_korean + has_cultural_pillar = heritage_buyeo has_cultural_pillar = heritage_qiangic + has_cultural_pillar = heritage_viet + has_cultural_pillar = heritage_hmongic } } } @@ -30,12 +31,15 @@ culture_has_west_asian_heritage_pillar_trigger = { OR = { has_cultural_pillar = heritage_iranian has_cultural_pillar = heritage_turkic + has_cultural_pillar = heritage_tocharian + has_cultural_pillar = heritage_hunnic } } } culture_has_south_asian_heritage_pillar_trigger = { culture = { OR = { + has_cultural_pillar = heritage_austronesian has_cultural_pillar = heritage_indo_aryan has_cultural_pillar = heritage_dravidian has_cultural_pillar = heritage_burman @@ -43,12 +47,39 @@ culture_has_south_asian_heritage_pillar_trigger = { } } } + +culture_has_southeast_asian_heritage_pillar_trigger = { + culture = { + OR = { + has_cultural_pillar = heritage_viet + has_cultural_pillar = heritage_mon_khmer + has_cultural_pillar = heritage_malayic + has_cultural_pillar = heritage_burman + has_cultural_pillar = heritage_austronesian + has_cultural_pillar = heritage_tai + } + } +} + culture_has_north_asian_heritage_pillar_trigger = { culture = { OR = { has_cultural_pillar = heritage_turkic has_cultural_pillar = heritage_mongolic has_cultural_pillar = heritage_ugro_permian + has_cultural_pillar = heritage_nivkh + has_cultural_pillar = heritage_ainuic + has_cultural_pillar = heritage_tungusic + } + } +} + +culture_has_north_east_asian_heritage_pillar_trigger = { + culture = { + OR = { + has_cultural_pillar = heritage_nivkh + has_cultural_pillar = heritage_ainuic + has_cultural_pillar = heritage_tungusic } } } @@ -58,6 +89,15 @@ culture_has_central_asian_heritage_pillar_trigger = { has_cultural_pillar = heritage_qiangic has_cultural_pillar = heritage_turkic has_cultural_pillar = heritage_mongolic + has_cultural_pillar = heritage_tocharian + } + } +} +culture_has_east_central_asian_heritage_pillar_trigger = { + culture = { + OR = { + has_cultural_pillar = heritage_qiangic + has_cultural_pillar = heritage_mongolic } } } @@ -88,12 +128,16 @@ culture_has_east_african_heritage_pillar_trigger = { OR = { has_cultural_pillar = heritage_somalian has_cultural_pillar = heritage_east_african + has_cultural_pillar = heritage_bantu } } } culture_has_north_african_heritage_pillar_trigger = { culture = { - has_cultural_pillar = heritage_berber + OR = { + has_cultural_pillar = heritage_berber + has_cultural_pillar = heritage_egyptian + } } } culture_has_central_african_heritage_pillar_trigger = { @@ -107,6 +151,7 @@ culture_has_mena_heritage_pillar_trigger = { OR = { culture = { has_cultural_pillar = heritage_arabic } culture = { has_cultural_pillar = heritage_syriac } + culture = { has_cultural_pillar = heritage_iranian } culture_has_north_african_heritage_pillar_trigger = yes } } @@ -148,6 +193,7 @@ culture_has_north_european_heritage_pillar_trigger = { has_cultural_pillar = heritage_balto_finnic has_cultural_pillar = heritage_north_germanic has_cultural_pillar = heritage_ugro_permian + has_cultural_pillar = heritage_gothic } } } @@ -159,6 +205,8 @@ culture_has_south_european_heritage_pillar_trigger = { has_cultural_pillar = heritage_byzantine has_cultural_pillar = heritage_south_slavic has_cultural_pillar = heritage_israelite + has_cultural_pillar = heritage_vlach + has_cultural_pillar = heritage_ancient_greek } } } diff --git a/N3OW/common/scripted_triggers/00_cultural_triggers.txt b/N3OW/common/scripted_triggers/00_cultural_triggers.txt index 5805b07c..525a1e72 100644 --- a/N3OW/common/scripted_triggers/00_cultural_triggers.txt +++ b/N3OW/common/scripted_triggers/00_cultural_triggers.txt @@ -69,6 +69,11 @@ culture_in_winter_geographical_region_trigger = { geographical_region = world_europe_east geographical_region = world_steppe geographical_region = world_tibet + geographical_region = world_asia_china + geographical_region = world_asia_japan + geographical_region = world_asia_sakhalin_hokkaido + geographical_region = world_asia_korea + geographical_region = world_asia_north_east } } } @@ -80,9 +85,7 @@ culture_in_non_sedentary_geographical_region_trigger = { text = culture_in_non_sedentary_geographical_region_trigger_desc any_culture_county = { any_county_province = { - OR = { - geographical_region = world_steppe - } + geographical_region = world_steppe } } } @@ -112,6 +115,10 @@ culture_not_warlike_trigger = { culture_tradition:tradition_hunters = { is_in_list = traits } culture_tradition:tradition_warrior_culture = { is_in_list = traits } culture_tradition:tradition_martial_admiration = { is_in_list = traits } + culture_tradition:tradition_tgp_bushido = { is_in_list = traits } + culture_tradition:tradition_tgp_defiant_ambushers = { is_in_list = traits } + culture_tradition:tradition_tgp_warrior_monks = { is_in_list = traits } + culture_tradition:tradition_tgp_art_of_war = { is_in_list = traits } } } custom_description = { @@ -224,6 +231,7 @@ culture_has_skirmisher_maa = { has_cultural_parameter = unlock_maa_shomer has_cultural_parameter = unlock_maa_abudrar has_cultural_parameter = unlock_maa_guinea_warrior + has_cultural_parameter = unlock_maa_pesilat has_innovation = innovation_adaptive_militia #Goedendag - Later Era MAA has_cultural_parameter = unlock_maa_akritai } @@ -241,6 +249,12 @@ culture_has_archer_maa = { } } +culture_has_improved_crossbowmen = { + OR = { + has_innovation = innovation_repeating_crossbow #Chu-ko-nu Archers + } +} + culture_has_heavy_infantry_maa = { OR = { has_cultural_parameter = unlock_maa_ayyar @@ -252,6 +266,10 @@ culture_has_heavy_infantry_maa = { has_cultural_parameter = unlock_maa_huscarls has_cultural_parameter = unlock_maa_mountaineer has_cultural_parameter = unlock_maa_zbrojnosh + has_cultural_parameter = unlock_infantry_samurai_units + has_cultural_parameter = unlock_zhanmadao + has_cultural_parameter = unlock_burenjia + has_innovation = innovation_sarawit #Sarawit - Later Era MAA has_innovation = innovation_legionnaires #Praetorian has_cultural_parameter = unlock_maa_varangian_guards @@ -261,6 +279,7 @@ culture_has_heavy_infantry_maa = { culture_has_pikemen_maa = { #I.e. Spearmen OR = { has_cultural_parameter = unlock_maa_zupin_warrior + has_cultural_parameter = unlock_warrior_monk_units has_innovation = innovation_rectilinear_schiltron #Schiltron - Later Era MAA has_innovation = innovation_pike_columns #Picchieri - Later Era MAA has_innovation = innovation_zweihanders #Later Era MAA @@ -296,6 +315,10 @@ culture_has_archer_cavalry_maa = { OR = { has_cultural_parameter = unlock_maa_horse_archers has_cultural_parameter = unlock_maa_mangudai + has_cultural_parameter = unlock_emishi_horse_archers_units + has_cultural_parameter = unlock_mounted_samurai_units + + culture_head ?= { mpo_can_recruit_nomad_maa_trigger = yes } @@ -339,6 +362,8 @@ culture_specializes_in_heavy_infantry_maa = { has_cultural_tradition = tradition_stand_and_fight has_cultural_tradition = tradition_mobile_guards has_cultural_tradition = tradition_mountaineer_ruralism + has_cultural_tradition = tradition_tgp_art_of_war + has_cultural_tradition = tradition_tgp_bushido culture_has_heavy_infantry_maa = yes } } @@ -351,6 +376,7 @@ culture_specializes_in_pikemen_maa = { has_cultural_tradition = tradition_formation_fighting has_cultural_tradition = tradition_stand_and_fight has_cultural_tradition = tradition_mobile_guards + has_cultural_tradition = tradition_tgp_warrior_monks culture_has_pikemen_maa = yes } } @@ -375,6 +401,7 @@ culture_specializes_in_heavy_cavalry_maa = { has_cultural_tradition = tradition_mobile_guards has_cultural_tradition = tradition_ep3_indomitable_azatani has_cultural_tradition = tradition_mountaineer_ruralism + has_cultural_tradition = tradition_tgp_art_of_war culture_has_heavy_cavalry_maa = yes } } @@ -385,6 +412,8 @@ culture_specializes_in_archer_cavalry_maa = { has_cultural_tradition = tradition_horse_breeder has_cultural_tradition = tradition_mpo_iron_cavalry has_cultural_tradition = tradition_devoted_horsemanship + has_cultural_tradition = tradition_tgp_bushido + has_cultural_tradition = tradition_tgp_defiant_ambushers culture_has_archer_cavalry_maa = yes } } @@ -551,6 +580,30 @@ cultures_share_relevant_region_trigger = { culture_overlaps_geographical_region = world_africa } } + AND = { + culture_overlaps_geographical_region = world_asia_china + scope:culture = { + culture_overlaps_geographical_region = world_asia_china + } + } + AND = { + culture_overlaps_geographical_region = world_asia_china + scope:culture = { + culture_overlaps_geographical_region = world_asia_korea + } + } + AND = { + culture_overlaps_geographical_region = world_asia_china + scope:culture = { + culture_overlaps_geographical_region = world_asia_southeast + } + } + AND = { + culture_overlaps_geographical_region = world_asia_japan + scope:culture = { + culture_overlaps_geographical_region = world_asia_japan + } + } } } diff --git a/N3OW/common/scripted_triggers/00_diarchy_scripted_triggers.txt b/N3OW/common/scripted_triggers/00_diarchy_scripted_triggers.txt index c0c7af25..1c61bba6 100644 --- a/N3OW/common/scripted_triggers/00_diarchy_scripted_triggers.txt +++ b/N3OW/common/scripted_triggers/00_diarchy_scripted_triggers.txt @@ -54,7 +54,10 @@ is_diarch_valid_trigger = { ## Viziers. trigger_if = { limit = { - liege = { has_diarchy_parameter = diarchy_is_vizierate } + liege = { + has_diarchy_parameter = diarchy_is_vizierate + NOT = { government_has_flag = government_is_celestial } + } } # Must match their liege's gender preference. diarch_matches_liege_faith_gender_preference_trigger = yes @@ -91,11 +94,12 @@ is_diarch_valid_trigger = { } ## Else, we're an ordinary, gods-fearing root scope, so use that. trigger_else = { - travel_would_cause_regency_trigger = { REALM_HOLDER = this.liege } + travel_would_cause_regency_trigger = { REALM_HOLDER = liege } } } } } + tgp_is_ceremonial_liege_trigger = no } # This is hooked up to the is_diarch_able rule, referenced by Code. @@ -124,7 +128,12 @@ is_diarch_able_trigger = { # And *this* needs to be added to guest activity intents to keep diarchs from showing up to the same parties as their liege. bannable_serving_diarch_trigger = { - liege?= { NOT = { is_landless_adventurer = yes } } + liege ?= { + NOR = { + is_landless_adventurer = yes + has_diarchy_type = grand_secretariat + } + } OR = { # Diarchs with official responsibilities can't come out to play. is_diarch = yes @@ -176,10 +185,10 @@ diarch_matches_liege_faith_gender_preference_trigger = { # Setup Triggers basic_eligible_for_diarchy_trigger = { - is_landed_or_landless_administrative = yes - NOT = { government_has_flag = government_is_landless_adventurer } # Laamps don't use diarchs highest_held_title_tier >= tier_county - NOT = { has_active_diarchy = yes } + is_landed_or_landless_administrative = yes + has_active_diarchy = no + NOT = { government_has_flag = government_is_landless_adventurer } # Laamps don't use diarchs } regency_for_personal_reasons_trigger = { @@ -211,33 +220,38 @@ imprisonment_would_cause_regency_trigger = { } travel_would_cause_regency_trigger = { - OR = { - # Travelling one-way. - AND = { - # Make sure that we _aren't_ going bilaterally. - NOT = { current_travel_plan.final_destination_province = current_travel_plan.departure_location } - # Then check that we're actually going outside of the realm. - current_travel_plan.final_destination_province.county.holder = { - NOR = { - any_liege_or_above = { this = $REALM_HOLDER$ } - this = $REALM_HOLDER$ - } - } - } - # Travelling in a circle. - AND = { - # Make sure that we _are_ going bilaterally. - current_travel_plan.final_destination_province = current_travel_plan.departure_location - # Check the next destination province instead. - ## We put a break in to check if there _is_ a county because you might be travelling through the ocean. - current_travel_plan.next_destination_province.county ?= { - holder = { + trigger_if = { + limit = { exists = current_travel_plan } + OR = { + # Travelling one-way. + AND = { + exists = current_travel_plan + # Make sure that we _aren't_ going bilaterally. + NOT = { current_travel_plan.final_destination_province = current_travel_plan.departure_location } + # Then check that we're actually going outside of the realm. + current_travel_plan.final_destination_province.county.holder ?= { NOR = { any_liege_or_above = { this = $REALM_HOLDER$ } this = $REALM_HOLDER$ } } } + # Travelling in a circle. + AND = { + exists = current_travel_plan + # Make sure that we _are_ going bilaterally. + current_travel_plan.final_destination_province = current_travel_plan.departure_location + # Check the next destination province instead. + ## We put a break in to check if there _is_ a county because you might be travelling through the ocean. + current_travel_plan.next_destination_province.county ?= { + holder = { + NOR = { + any_liege_or_above = { this = $REALM_HOLDER$ } + this = $REALM_HOLDER$ + } + } + } + } } } } @@ -411,9 +425,9 @@ appointment_interactions_recipient_is_suitable_co_emperor_trigger = { # Don't get the bonus just because we're promoting our courtiers in our realm. trigger_if = { limit = { - NOT = { scope:target = scope:actor.primary_title } + scope:target != scope:actor.primary_title } - NOT = { scope:target.holder = scope:actor } + scope:target.holder != scope:actor } } @@ -421,8 +435,7 @@ may_appoint_co_emperors_trigger = { highest_held_title_tier >= tier_empire has_realm_law = acclamation_succession_law OR = { - has_title = title:e_byzantium - has_title = title:e_roman_empire + is_roman_emperor_trigger = yes culture = { has_cultural_parameter = unlock_co_emperors } } } @@ -430,6 +443,10 @@ may_appoint_co_emperors_trigger = { may_appoint_co_monarchs_trigger = { highest_held_title_tier >= tier_kingdom government_has_flag = may_elevate_co_monarch + NOR = { + has_realm_law = japanese_regency_succession_law + has_realm_law = meritocratic_regency_succession_law + } } valid_junior_emperor_candidate_trigger = { @@ -530,7 +547,7 @@ governor_can_be_called_as_ally_in_expedition_war_basic_trigger = { scope:recipient = { liege ?= scope:actor.liege # Must be a governor. - government_has_flag = government_is_administrative + government_has_flag = government_is_special_administrative } } @@ -619,7 +636,7 @@ diarch_candidate_shares_relationship_with_lesser_consort_trigger = { is_consort_of = scope:char_temp.liege OR = { NOT = { exists = scope:char_temp.liege.primary_spouse } - NOT = { this = scope:char_temp.liege.primary_spouse } + this != scope:char_temp.liege.primary_spouse } } } @@ -830,8 +847,6 @@ diarch_coup_attempt_grabbable_capital_and_duchies_trigger = { ################################################## # Mandates -#TODO_CD_EP2; rig these up to the actual loyalty value. - diarch_loyalty_due_to_hook_trigger = { $LIEGE$ = { OR = { diff --git a/N3OW/common/scripted_triggers/00_distance_triggers.txt b/N3OW/common/scripted_triggers/00_distance_triggers.txt index c4da1322..fa09cebe 100644 --- a/N3OW/common/scripted_triggers/00_distance_triggers.txt +++ b/N3OW/common/scripted_triggers/00_distance_triggers.txt @@ -16,7 +16,7 @@ should_notify_player_about_neighboring_rulers_wars_trigger = { } character_realm_neighbors_target_trigger = { TARGET_CHARACTER = $TARGET_CHARACTER$ } OR = { - $TARGET_CHARACTER$ = { is_independent_ruler = yes } # Independent rulers are always relevant. + $TARGET_CHARACTER$ = { top_liege = this } # Independent rulers are always relevant. liege = $TARGET_CHARACTER$.liege # Rulers are also relevant if we have the same direct liege (We might be able to DoW them, or at least want to stay informed as to relative power level). top_liege = $TARGET_CHARACTER$.liege # Alternatively, if their direct liege is our top liege, we can still DoW them (If I am a Duke under a King under an Emperor, I might still want to DoW one of the Emperor's other King or Duke vassals.) } diff --git a/N3OW/common/scripted_triggers/00_dynasty_triggers.txt b/N3OW/common/scripted_triggers/00_dynasty_triggers.txt index af7b4d26..9608dc7d 100644 --- a/N3OW/common/scripted_triggers/00_dynasty_triggers.txt +++ b/N3OW/common/scripted_triggers/00_dynasty_triggers.txt @@ -6,8 +6,7 @@ is_house_head = { # For unevaluated triggers exists = this } save_temporary_scope_as = house_check - exists = house - house = { + house ?= { house_head = scope:house_check } } @@ -19,16 +18,14 @@ is_dynast = { text = is_dynast subject = scope:dynast_check - exists = dynasty - dynasty = { + dynasty ?= { dynast = scope:dynast_check } } } can_start_new_legacy_track_trigger = { - exists = dynasty - dynasty = { + dynasty ?= { OR = { NOT = { has_dynasty_perk = blood_legacy_1 } has_dynasty_perk = blood_legacy_5 @@ -107,6 +104,26 @@ can_start_new_legacy_track_trigger = { NOT = { has_dynasty_perk = ep3_administrative_legacy_1 } has_dynasty_perk = ep3_administrative_legacy_5 } + OR = { + NOT = { has_dlc_feature = khans_of_the_steppe } + NOT = { has_dynasty_perk = mpo_nomad_legacy_1 } + has_dynasty_perk = mpo_nomad_legacy_5 + } + OR = { + NOT = { has_dlc_feature = all_under_heaven } + NOT = { has_dynasty_perk = tgp_chinese_legacy_1 } + has_dynasty_perk = tgp_chinese_legacy_5 + } + OR = { + NOT = { has_dlc_feature = all_under_heaven } + NOT = { has_dynasty_perk = tgp_japan_legacy_1 } + has_dynasty_perk = tgp_japan_legacy_5 + } + OR = { + NOT = { has_dlc_feature = all_under_heaven } + NOT = { has_dynasty_perk = tgp_sea_legacy_1 } + has_dynasty_perk = tgp_sea_legacy_5 + } } } diff --git a/N3OW/common/scripted_triggers/00_economic_triggers.txt b/N3OW/common/scripted_triggers/00_economic_triggers.txt index 3e44615d..7eea20bc 100644 --- a/N3OW/common/scripted_triggers/00_economic_triggers.txt +++ b/N3OW/common/scripted_triggers/00_economic_triggers.txt @@ -16,62 +16,69 @@ } county_has_any_special_mine_building_trigger = { - OR = { - # Rammelsberg Mines - has_building_or_higher = rammelsberg_mines_01 - # Kutna_hora Mines - has_building_or_higher = kutna_hora_mines_01 - # Kremnica Mines - has_building_or_higher = kremnica_mines_01 - # Falun Mines - has_building_or_higher = falun_mines_01 - # Schwaz Mines - has_building_or_higher = schwaz_mines_01 - # Argentiera Mines - has_building_or_higher = argentiera_mines_01 - # Kollur Mines - has_building_or_higher = kollur_mines_01 - # Siderokausia Mines - has_building_or_higher = siderokausia_mines_01 - # Mali Mines - has_building_or_higher = mali_mines_01 - # Konasamudram Mines - has_building_or_higher = konasamudram_mines_01 - # Dean Mines - has_building_or_higher = dean_mines_01 - # Zawar Mines - has_building_or_higher = zawar_mines_01 - # Takkeda Mines - has_building_or_higher = takkeda_mines_01 - # Khetri Mines - has_building_or_higher = khetri_mines_01 - # Taghaza Mines - has_building_or_higher = taghaza_mines_01 - # Ijil Mines - has_building_or_higher = ijil_mines_01 - # Turda Mines - has_building_or_higher = turda_mines_01 - # Phocaea Mines - has_building_or_higher = phocaea_mines_01 - # Pansjhir Mines - has_building_or_higher = pansjhir_mines_01 - # Trepca Mines - has_building_or_higher = trepca_mines_01 - # Rudnik Mines - has_building_or_higher = rudnik_mines_01 - # Cevennes Mines - has_building_or_higher = cevennes_mines_01 - # Allaq Mines - has_building_or_higher = allaq_mines_01 - # Verespatak Mines - has_building_or_higher = verespatak_mines_01 - # Nishapur Mines - has_building_or_higher = nishapur_mines_01 - # Srebrenica Mines - has_building_or_higher = srebrenica_mines_01 - # Ratnapura Mines - has_building_or_higher = ratnapura_mines_01 - } + has_building_with_flag = special_mine + #OR = { + # # Rammelsberg Mines + # has_building_or_higher = rammelsberg_mines_01 + # # Kutna_hora Mines + # has_building_or_higher = kutna_hora_mines_01 + # # Kremnica Mines + # has_building_or_higher = kremnica_mines_01 + # # Falun Mines + # has_building_or_higher = falun_mines_01 + # # Schwaz Mines + # has_building_or_higher = schwaz_mines_01 + # # Argentiera Mines + # has_building_or_higher = argentiera_mines_01 + # # Kollur Mines + # has_building_or_higher = kollur_mines_01 + # # Siderokausia Mines + # has_building_or_higher = siderokausia_mines_01 + # # Mali Mines + # has_building_or_higher = mali_mines_01 + # # Konasamudram Mines + # has_building_or_higher = konasamudram_mines_01 + # # Dean Mines + # has_building_or_higher = dean_mines_01 + # # Phnom Dek Mines + # has_building_or_higher = phnom_dek_mines_01 + # # Zawar Mines + # has_building_or_higher = zawar_mines_01 + # # Takkeda Mines + # has_building_or_higher = takkeda_mines_01 + # # Khetri Mines + # has_building_or_higher = khetri_mines_01 + # # Taghaza Mines + # has_building_or_higher = taghaza_mines_01 + # # Ijil Mines + # has_building_or_higher = ijil_mines_01 + # # Turda Mines + # has_building_or_higher = turda_mines_01 + # # Phocaea Mines + # has_building_or_higher = phocaea_mines_01 + # # Pansjhir Mines + # has_building_or_higher = pansjhir_mines_01 + # # Trepca Mines + # has_building_or_higher = trepca_mines_01 + # # Rudnik Mines + # has_building_or_higher = rudnik_mines_01 + # # Cevennes Mines + # has_building_or_higher = cevennes_mines_01 + # # Allaq Mines + # has_building_or_higher = allaq_mines_01 + # # Verespatak Mines + # has_building_or_higher = verespatak_mines_01 + # # Nishapur Mines + # has_building_or_higher = nishapur_mines_01 + # # Srebrenica Mines + # has_building_or_higher = srebrenica_mines_01 + # # Ratnapura Mines + # has_building_or_higher = ratnapura_mines_01 + # # Sar i Sang Mines + # has_building_or_higher = sar_i_sang_mines_01 + # # Mogok Valley Mines + # has_building_or_higher = mogok_mines_01 + #} } location_has_multi_story_buildings_trigger = { diff --git a/N3OW/common/scripted_triggers/00_education_triggers.txt b/N3OW/common/scripted_triggers/00_education_triggers.txt index b565baf7..77f158a3 100644 --- a/N3OW/common/scripted_triggers/00_education_triggers.txt +++ b/N3OW/common/scripted_triggers/00_education_triggers.txt @@ -90,126 +90,51 @@ has_education_rank_trigger = { has_education_rank_1_trigger = { OR = { - has_trait_rank = { - trait = education_diplomacy - rank = 1 - } - has_trait_rank = { - trait = education_martial - rank = 1 - } - has_trait_rank = { - trait = education_stewardship - rank = 1 - } - has_trait_rank = { - trait = education_intrigue - rank = 1 - } - has_trait_rank = { - trait = education_learning - rank = 1 - } + has_trait = education_martial_1 + has_trait = education_diplomacy_1 + has_trait = education_stewardship_1 + has_trait = education_intrigue_1 + has_trait = education_learning_1 } } has_education_rank_2_trigger = { OR = { - has_trait_rank = { - trait = education_diplomacy - rank = 2 - } - has_trait_rank = { - trait = education_martial - rank = 2 - } - has_trait_rank = { - trait = education_stewardship - rank = 2 - } - has_trait_rank = { - trait = education_intrigue - rank = 2 - } - has_trait_rank = { - trait = education_learning - rank = 2 - } + has_trait = education_martial_2 + has_trait = education_diplomacy_2 + has_trait = education_stewardship_2 + has_trait = education_intrigue_2 + has_trait = education_learning_2 } } has_education_rank_3_trigger = { OR = { - has_trait_rank = { - trait = education_diplomacy - rank = 3 - } - has_trait_rank = { - trait = education_martial - rank = 3 - } - has_trait_rank = { - trait = education_stewardship - rank = 3 - } - has_trait_rank = { - trait = education_intrigue - rank = 3 - } - has_trait_rank = { - trait = education_learning - rank = 3 - } + has_trait = education_martial_3 + has_trait = education_diplomacy_3 + has_trait = education_stewardship_3 + has_trait = education_intrigue_3 + has_trait = education_learning_3 } } has_education_rank_4_trigger = { OR = { - has_trait_rank = { - trait = education_diplomacy - rank = 4 - } - has_trait_rank = { - trait = education_martial - rank = 4 - } - has_trait_rank = { - trait = education_stewardship - rank = 4 - } - has_trait_rank = { - trait = education_intrigue - rank = 4 - } - has_trait_rank = { - trait = education_learning - rank = 4 - } + has_trait = education_martial_4 + has_trait = education_diplomacy_4 + has_trait = education_stewardship_4 + has_trait = education_intrigue_4 + has_trait = education_learning_4 } } has_education_rank_5_trigger = { OR = { - has_trait_rank = { - trait = education_diplomacy - rank = 5 - } - has_trait_rank = { - trait = education_martial - rank = 5 - } - has_trait_rank = { - trait = education_stewardship - rank = 5 - } - has_trait_rank = { - trait = education_intrigue - rank = 5 - } - has_trait_rank = { - trait = education_learning - rank = 5 - } + has_trait = education_martial_5 + has_trait = education_diplomacy_5 + has_trait = education_stewardship_5 + has_trait = education_intrigue_5 + has_trait = education_learning_5 } } @@ -389,17 +314,7 @@ had_learning_education_disaffinity_childhood_trait_trigger = { } has_university_building_trigger = { - OR = { - has_building_or_higher = generic_university - has_building_or_higher = al_azhar_university - has_building_or_higher = sankore_university - has_building_or_higher = siena_university - has_building_or_higher = nalanda_university - has_building_or_higher = house_of_wisdom_01 - has_building_or_higher = al_qarawiyyin_university_01 - has_building_or_higher = somapura_university_01 - has_building_or_higher = cluny_abbey_01 - } + has_building_with_flag = special_university } characters_have_same_education_group_trigger = { diff --git a/N3OW/common/scripted_triggers/00_elective_triggers.txt b/N3OW/common/scripted_triggers/00_elective_triggers.txt index 18263701..dffa4c3a 100644 --- a/N3OW/common/scripted_triggers/00_elective_triggers.txt +++ b/N3OW/common/scripted_triggers/00_elective_triggers.txt @@ -38,9 +38,11 @@ has_unelectable_government_trigger = { } this_is_martial_society_trigger = { - NOR = { - faith = { has_doctrine = tenet_pacifism } - faith = { has_doctrine = tenet_dharmic_pacifism } + faith = { + NOR = { + has_doctrine = tenet_pacifism + has_doctrine = tenet_dharmic_pacifism + } } OR = { government_has_flag = government_is_clan @@ -54,6 +56,9 @@ this_is_martial_society_trigger = { has_doctrine_parameter = cheaper_holy_wars_active } } + culture = { + has_cultural_tradition = tradition_tgp_bushido + } } } @@ -100,7 +105,7 @@ ere_elective_politician_titles_trigger = { #Used in Byzantine Elective to determ } parent_for_elective_succession_trigger = { #This trigger is used to prevent grandchildren from being selectable when their parent is still available as a candidate. - NOT = { this = scope:holder } #Not the current ruler. + this != scope:holder #Not the current ruler. dynasty = scope:holder.dynasty is_child_of = scope:holder @@ -119,14 +124,15 @@ parent_for_elective_succession_trigger = { #This trigger is used to prevent gran OR = { #Candidate should not be a landless Courtier that is about to inherit a Theocracy or Republic AND = { - is_ruler = yes - is_playable_character = yes + is_available_quick = { + ruler = yes + advanced_ruler = yes + } has_unelectable_government_trigger = no } NOT = { any_heir_title = { - exists = holder - holder = { + holder ?= { has_unelectable_government_trigger = yes } } @@ -153,7 +159,7 @@ feudal_elective_potential_landed_candidate_trigger = { any_liege_or_above = { this = scope:holder } - scope:holder = { is_independent_ruler = yes } + scope:holder = { top_liege = this } scope:holder = { exists = liege NOT = { @@ -188,7 +194,7 @@ feudal_elective_potential_landless_claimant_candidate_trigger = { this = scope:holder } is_ruler = no - scope:holder = { is_independent_ruler = yes } + scope:holder = { top_liege = this } scope:holder = { exists = liege NOT = { @@ -204,8 +210,7 @@ feudal_elective_potential_landless_claimant_candidate_trigger = { } NOT = { #Landless characters should not be heirs to Theocracies/Republics. any_heir_title = { - exists = holder - holder = { + holder ?= { has_unelectable_government_trigger = yes } } @@ -231,7 +236,7 @@ feudal_elective_potential_landless_dynastic_candidate_trigger = { this = scope:holder } is_ruler = no - scope:holder = { is_independent_ruler = yes } + scope:holder = { top_liege = this } scope:holder = { exists = liege NOT = { @@ -247,8 +252,7 @@ feudal_elective_potential_landless_dynastic_candidate_trigger = { } NOT = { #Landless characters should not be heirs to Theocracies/Republics. any_heir_title = { - exists = holder - holder = { + holder ?= { has_unelectable_government_trigger = yes } } @@ -283,19 +287,13 @@ feudal_elective_potential_landless_dynastic_candidate_trigger = { } # We don't want grandkids to show as candidates if their parent is eligable and still alive NOR = { - AND = { - exists = mother - mother = { - is_alive = yes - parent_for_elective_succession_trigger = yes - } + mother ?= { + is_alive = yes + parent_for_elective_succession_trigger = yes } - AND = { - exists = father - father = { - is_alive = yes - parent_for_elective_succession_trigger = yes - } + father ?= { + is_alive = yes + parent_for_elective_succession_trigger = yes } } } @@ -303,17 +301,11 @@ feudal_elective_potential_landless_dynastic_candidate_trigger = { trigger_else_if = { limit = { OR = { - AND = { - exists = mother - mother = { - is_alive = yes - } + mother ?= { + is_alive = yes } - AND = { - exists = father - father = { - is_alive = yes - } + father ?= { + is_alive = yes } } } diff --git a/N3OW/common/scripted_triggers/00_faction_triggers.txt b/N3OW/common/scripted_triggers/00_faction_triggers.txt index 0c8aea97..01e98edd 100644 --- a/N3OW/common/scripted_triggers/00_faction_triggers.txt +++ b/N3OW/common/scripted_triggers/00_faction_triggers.txt @@ -10,6 +10,7 @@ ############################ # General Faction Triggers # ############################ +############################ immune_to_factions_trigger = { OR = { # Genghis Khan is immune to factions @@ -50,6 +51,20 @@ common_character_validity_trigger = { } } + # You cannot start a faction against your bloc members + trigger_if = { + limit = { + government_is_japanese_trigger = yes + $FACTION_TARGET$ = { government_is_japanese_trigger = yes } + exists = house.house_confederation + exists = $FACTION_TARGET$.house.house_confederation + } + custom_tooltip = { + text = CONFEDERATION_BLOC_YOURS_HEADER # TODO Better tooltip + house.house_confederation != $FACTION_TARGET$.house.house_confederation + } + } + NOT = { has_relation_blood_brother = $FACTION_TARGET$ } } @@ -78,6 +93,20 @@ common_can_character_join_trigger = { text = character_has_faction_disabling_modifier character_has_faction_disabling_modifier_trigger = yes } + + # You cannot join a faction against your bloc members + trigger_if = { + limit = { + government_is_japanese_trigger = yes + $FACTION_TARGET$ = { government_is_japanese_trigger = yes } + exists = house.house_confederation + exists = $FACTION_TARGET$.house.house_confederation + } + custom_tooltip = { + text = CONFEDERATION_BLOC_YOURS_HEADER # TODO Better tooltip + house.house_confederation != $FACTION_TARGET$.house.house_confederation + } + } } common_can_character_create_trigger = { @@ -85,6 +114,60 @@ common_can_character_create_trigger = { common_character_validity_trigger = { FACTION_TARGET = $FACTION_TARGET$ } + trigger_if = { + limit = { + government_has_flag = government_has_house_blocs + $FACTION_TARGET$ = top_liege + is_confederation_member = yes + } + custom_tooltip = { + text = is_house_head_of_noble_family_tt + OR = { + joined_faction ?= { + any_faction_member = { + OR = { + this = root.house.house_confederation.leading_house.house_head + is_ai = no + } + } + } + AND = { + is_house_head = yes + any_held_title = { is_noble_family_title = yes } + } + AND = { + house.house_confederation.leading_house.house_head ?= { + tgp_is_ceremonial_liege_trigger = yes + } + joined_faction.faction_leader ?= { + is_leading_faction_type = restore_ceremonial_liege_faction + } + } + } + } + custom_tooltip = { + text = must_be_leading_house_of_bloc_trigger + OR = { + joined_faction ?= { + any_faction_member = { + OR = { + this = root.house.house_confederation.leading_house.house_head + is_ai = no + } + } + } + house.house_confederation.leading_house ?= house + AND = { + house.house_confederation.leading_house.house_head ?= { + tgp_is_ceremonial_liege_trigger = yes + } + joined_faction.faction_leader ?= { + is_leading_faction_type = restore_ceremonial_liege_faction + } + } + } + } + } #### # BLOCKERS #### @@ -150,10 +233,124 @@ has_valid_faction_members_trigger = { is_landless_adventurer = no is_forced_into_faction = no } - any_faction_county_member = { - count >= 1 + any_faction_county_member = { } + } + } + } +} + +############################ +# Liberty Faction Triggers # +############################ + +has_valid_realm_laws_for_liberty_faction_trigger = { + trigger_if = { + limit = { $TARGET$ = { realm_law_use_imperial_bureaucracy = yes } } + custom_description = { + text = has_lowest_imperial_bureaucracy + subject = $TARGET$ + $TARGET$ = { + OR = { + has_realm_law = imperial_bureaucracy_1 + has_realm_law = imperial_bureaucracy_2 + has_realm_law = imperial_bureaucracy_3 + } + } + } + } + trigger_else_if = { + limit = { $TARGET$ = { government_has_flag = government_is_tribal } } + custom_description = { + text = has_lowest_tribal_authority + subject = $TARGET$ + $TARGET$ = { + OR = { + has_realm_law = tribal_authority_1 + has_realm_law = tribal_authority_2 + has_realm_law = tribal_authority_3 + } + } + } + } + trigger_else_if = { + limit = { $TARGET$ = { realm_law_use_celestial_bureaucracy = yes } } + custom_description = { + text = has_lowest_celestial_bureaucracy + subject = $TARGET$ + $TARGET$ = { + OR = { + has_realm_law = celestial_bureaucracy_1 + has_realm_law = celestial_bureaucracy_2 + has_realm_law = celestial_bureaucracy_3 + } + } + } + } + trigger_else_if = { + limit = { $TARGET$ = { realm_law_use_meritocratic_bureaucracy = yes } } + custom_description = { + text = has_lowest_meritocratic_bureaucracy + subject = $TARGET$ + $TARGET$ = { + OR = { + has_realm_law = meritocratic_bureaucracy_1 + has_realm_law = meritocratic_bureaucracy_2 + has_realm_law = meritocratic_bureaucracy_3 + } + } + } + } + trigger_else_if = { + limit = { $TARGET$ = { realm_law_use_japanese_bureaucracy = yes } } + custom_description = { + text = has_lowest_japanese_bureaucracy + subject = $TARGET$ + $TARGET$ = { + OR = { + has_realm_law = japanese_bureaucracy_1 + has_realm_law = japanese_bureaucracy_2 + has_realm_law = japanese_bureaucracy_3 + } + } + } + } + trigger_else = { + custom_description = { + text = has_lowest_crown_authority + subject = $TARGET$ + $TARGET$ = { + OR = { + has_realm_law = crown_authority_1 + has_realm_law = crown_authority_2 + has_realm_law = crown_authority_3 } } } } } + +############################# +# Japanese Faction Triggers # +############################# +can_become_leader_of_faction_trigger = { + is_playable_character = yes + tgp_is_ceremonial_liege_trigger = no + trigger_if = { + limit = { + government_has_flag = government_has_house_blocs + } + OR = { + is_confederation_member = no + house.house_confederation.leading_house ?= house + AND = { + house.house_confederation.leading_house.house_head ?= { + tgp_is_ceremonial_liege_trigger = yes + } + joined_faction.faction_leader ?= { + is_leading_faction_type = restore_ceremonial_liege_faction + } + } + NOT = { exists = faction_leader } + } + } +} diff --git a/N3OW/common/scripted_triggers/00_family_triggers.txt b/N3OW/common/scripted_triggers/00_family_triggers.txt index acb622e8..02ad89bb 100644 --- a/N3OW/common/scripted_triggers/00_family_triggers.txt +++ b/N3OW/common/scripted_triggers/00_family_triggers.txt @@ -77,49 +77,49 @@ is_sibling_in_law_of_root_trigger = { is_cousin_in_law_of_root_trigger = { any_spouse = { is_cousin_of = root - NOT = { this = root } + this != root } } is_auntuncle_in_law_of_root_trigger = { any_spouse = { is_uncle_or_aunt_of = root - NOT = { this = root } + this != root } } is_grandmotherfather_in_law_of_root_trigger = { any_spouse = { is_grandparent_of = root - NOT = { this = root } + this != root } } is_great_grandmotherfather_in_law_of_root_trigger = { any_spouse = { is_great_grandparent_of = root - NOT = { this = root } + this != root } } is_granddaughterson_in_law_of_root_trigger = { any_spouse = { is_grandchild_of = root - NOT = { this = root } + this != root } } is_great_granddaughterson_in_law_of_root_trigger = { any_spouse = { is_great_grandchild_of = root - NOT = { this = root } + this != root } } is_nibling_in_law_of_root_trigger = { any_spouse = { is_nibling_of = root - NOT = { this = root } + this != root } } diff --git a/N3OW/common/scripted_triggers/00_feast_activity_triggers.txt b/N3OW/common/scripted_triggers/00_feast_activity_triggers.txt index f5dc3a77..5733987a 100644 --- a/N3OW/common/scripted_triggers/00_feast_activity_triggers.txt +++ b/N3OW/common/scripted_triggers/00_feast_activity_triggers.txt @@ -21,25 +21,30 @@ is_murder_feast = { } feast_default_participant_including_player_trigger = { - is_ai = yes - NOT = { this = root } - is_alive = yes - is_imprisoned = no + is_available_quick = { + alive = yes + imprisoned = no + } + this != root } feast_default_participant_trigger = { - is_ai = yes - NOT = { this = root } - is_alive = yes - is_imprisoned = no + is_available_quick = { + ai = yes + alive = yes + imprisoned = no + } + this != root } feast_default_adult_participant_trigger = { - is_ai = yes - NOT = { this = root } - is_adult = yes - is_alive = yes - is_imprisoned = no + is_available_quick = { + ai = yes + adult = yes + alive = yes + imprisoned = no + } + this != root } has_hosted_feast_opinion_targeting_character = { diff --git a/N3OW/common/scripted_triggers/00_food_scripted_triggers.txt b/N3OW/common/scripted_triggers/00_food_scripted_triggers.txt index da68c3ea..fe1e0de8 100644 --- a/N3OW/common/scripted_triggers/00_food_scripted_triggers.txt +++ b/N3OW/common/scripted_triggers/00_food_scripted_triggers.txt @@ -11,6 +11,7 @@ province_has_vegetable_carrot_trigger = { geographical_region = world_europe geographical_region = world_steppe_west geographical_region = world_asia_minor + geographical_region = world_asia_china } } @@ -31,17 +32,27 @@ province_has_vegetable_yams_trigger = { geographical_region = world_burma geographical_region = world_steppe_east geographical_region = world_steppe_tarim + geographical_region = world_asia_china + geographical_region = world_asia_southeast + geographical_region = world_asia_korea } } province_has_vegetable_kokoro_trigger = { - geographical_region = world_africa + OR = { + geographical_region = world_africa + geographical_region = world_asia_southeast + } } province_has_vegetable_ginger_trigger = { OR = { geographical_region = world_india geographical_region = world_burma + geographical_region = world_asia_southeast + geographical_region = world_asia_china + geographical_region = world_asia_korea + geographical_region = world_asia_japan } } @@ -52,5 +63,44 @@ province_has_vegetable_taro_trigger = { geographical_region = world_tibet geographical_region = world_steppe_east geographical_region = world_steppe_tarim + geographical_region = world_asia_southeast + geographical_region = world_asia_japan } } + +province_has_vegetable_daikon_radish_trigger = { + OR = { + geographical_region = world_asia_china + geographical_region = world_asia_korea + geographical_region = world_asia_japan + } +} + +province_has_vegetable_yam_bean_trigger = { + OR = { + geographical_region = world_asia_philippines + geographical_region = world_asia_borneo + } +} + +province_has_vegetable_lotus_root_trigger = { + OR = { + geographical_region = world_asia_china + geographical_region = world_asia_korea + geographical_region = world_asia_japan + geographical_region = world_asia_southeast_mainland + } +} + +province_has_vegetable_burdock_root_trigger = { + OR = { + geographical_region = world_asia_china + geographical_region = world_asia_korea + geographical_region = world_asia_japan + geographical_region = world_asia_north_east + } +} + +province_has_vegetable_arrowroot_trigger = { + geographical_region = world_asia_southeast_islands +} diff --git a/N3OW/common/scripted_triggers/00_game_rule_triggers.txt b/N3OW/common/scripted_triggers/00_game_rule_triggers.txt index aafa1a59..b3e51193 100644 --- a/N3OW/common/scripted_triggers/00_game_rule_triggers.txt +++ b/N3OW/common/scripted_triggers/00_game_rule_triggers.txt @@ -5,7 +5,7 @@ is_at_war = no highest_held_title_tier <= tier_kingdom OR = { - is_independent_ruler = yes + top_liege = this NOT = { liege = { culture = culture:mogyer } } @@ -25,7 +25,7 @@ hungarian_migration_valid_pannonian_target_trigger = { } exclave_independence_trigger = { - is_independent_ruler = yes + top_liege = this NOT = { has_title = title:k_papal_state } exists = root.capital_province any_sub_realm_title = { @@ -42,7 +42,7 @@ exclave_independence_trigger = { } primary_heir = { NOR = { - is_independent_ruler = yes # Disallow this when the heir is independent, lest we risk breaking up realms that should be connected + top_liege = this # Disallow this when the heir is independent, lest we risk breaking up realms that should be connected is_ai = no # Players always inherit everything } } diff --git a/N3OW/common/scripted_triggers/00_general_trait_triggers.txt b/N3OW/common/scripted_triggers/00_general_trait_triggers.txt index bbd50d2c..bde80ea1 100644 --- a/N3OW/common/scripted_triggers/00_general_trait_triggers.txt +++ b/N3OW/common/scripted_triggers/00_general_trait_triggers.txt @@ -1233,4 +1233,40 @@ has_any_high_skill_rating = { martial >= high_skill_rating stewardship >= high_skill_rating } -} \ No newline at end of file +} + +has_any_decent_skill_rating = { + OR = { + diplomacy >= decent_skill_rating + intrigue >= decent_skill_rating + prowess >= decent_skill_rating + learning >= decent_skill_rating + martial >= decent_skill_rating + stewardship >= decent_skill_rating + } +} + +has_same_highest_skill = { + OR = { + AND = { + highest_skill = diplomacy + $CHARACTER$ = { highest_skill = diplomacy } + } + AND = { + highest_skill = martial + $CHARACTER$ = { highest_skill = martial } + } + AND = { + highest_skill = stewardship + $CHARACTER$ = { highest_skill = stewardship } + } + AND = { + highest_skill = intrigue + $CHARACTER$ = { highest_skill = intrigue } + } + AND = { + highest_skill = learning + $CHARACTER$ = { highest_skill = learning } + } + } +} diff --git a/N3OW/common/scripted_triggers/00_generic_event_sensibility_triggers.txt b/N3OW/common/scripted_triggers/00_generic_event_sensibility_triggers.txt index 388dea5c..44e22b15 100644 --- a/N3OW/common/scripted_triggers/00_generic_event_sensibility_triggers.txt +++ b/N3OW/common/scripted_triggers/00_generic_event_sensibility_triggers.txt @@ -29,7 +29,7 @@ are_characters_sensible_lovers_trigger = { $TARGET_OF_LOVE$ = { save_temporary_scope_as = target_of_love } scope:instigating_character = { - NOT = { this = scope:target_of_love } + this != scope:target_of_love is_physically_able_adult = yes might_cheat_on_every_partner_trigger = yes can_set_relation_lover_trigger = { CHARACTER = scope:target_of_love } @@ -60,7 +60,7 @@ are_characters_sensible_lovers_trigger = { } scope:target_of_love = { - NOT = { this = scope:instigating_character } + this != scope:instigating_character might_cheat_on_every_partner_trigger = yes can_set_relation_lover_trigger = { CHARACTER = scope:instigating_character } is_attracted_to_gender_of = scope:instigating_character diff --git a/N3OW/common/scripted_triggers/00_generic_struggle_scripted_triggers.txt b/N3OW/common/scripted_triggers/00_generic_struggle_scripted_triggers.txt index 2782f446..d3dcb8aa 100644 --- a/N3OW/common/scripted_triggers/00_generic_struggle_scripted_triggers.txt +++ b/N3OW/common/scripted_triggers/00_generic_struggle_scripted_triggers.txt @@ -471,7 +471,7 @@ struggle_conquest_cb_target_is_ocm_trigger = { holder = { any_held_title = { count = 1 - tier = tier_county + title_tier = county } NOT = { any_vassal = { highest_held_title_tier >= tier_county } diff --git a/N3OW/common/scripted_triggers/00_government_triggers.txt b/N3OW/common/scripted_triggers/00_government_triggers.txt index b1275570..d2f2d91f 100644 --- a/N3OW/common/scripted_triggers/00_government_triggers.txt +++ b/N3OW/common/scripted_triggers/00_government_triggers.txt @@ -57,7 +57,10 @@ faith_qualifies_for_west_african_pagan_feudalisation_trigger = { should_use_temple_character_background_trigger = { trigger_if = { limit = { is_landed = yes } - government_has_flag = government_is_theocracy + OR = { + government_has_flag = government_is_theocracy + has_government = mandala_government + } } trigger_else = { OR = { @@ -68,3 +71,26 @@ should_use_temple_character_background_trigger = { } } } + +has_mandala_culture_trigger = { + culture = { + OR = { + has_cultural_pillar = heritage_austronesian + has_cultural_pillar = heritage_tai + has_cultural_pillar = heritage_mon_khmer + has_cultural_pillar = heritage_viet + has_cultural_pillar = heritage_indo_aryan + has_cultural_pillar = heritage_burman + } + } +} + +has_mandala_faith_trigger = { + custom_description = { + text = "hof_interaction_unreformed_faith" + NOT = { + faith = { has_doctrine_parameter = unreformed } + } + } + faith = { has_doctrine = doctrine_polytheist } +} diff --git a/N3OW/common/scripted_triggers/00_great_holy_war_triggers.txt b/N3OW/common/scripted_triggers/00_great_holy_war_triggers.txt index 549bc262..1daec082 100644 --- a/N3OW/common/scripted_triggers/00_great_holy_war_triggers.txt +++ b/N3OW/common/scripted_triggers/00_great_holy_war_triggers.txt @@ -114,10 +114,10 @@ ghw_pope_annoyed_at_lack_of_participation_trigger = { } } OR = { #Either be independent, or all lieges above you MUST be of the same Faith declaring the war to avoid messy situations of vassals and lieges fighting against each other. - is_independent_ruler = yes + top_liege = this NOT = { any_liege_or_above = { - NOT = { faith = scope:the_faith } + faith != scope:the_faith } } } @@ -126,7 +126,7 @@ ghw_pope_annoyed_at_lack_of_participation_tier_trigger = { #Either King/Emperor, OR = { highest_held_title_tier > 3 AND = { - is_independent_ruler = yes + top_liege = this highest_held_title_tier >= tier_duchy is_landless_adventurer = no } diff --git a/N3OW/common/scripted_triggers/00_has_dlc_scripted_triggers.txt b/N3OW/common/scripted_triggers/00_has_dlc_scripted_triggers.txt index febc6c19..81850a85 100644 --- a/N3OW/common/scripted_triggers/00_has_dlc_scripted_triggers.txt +++ b/N3OW/common/scripted_triggers/00_has_dlc_scripted_triggers.txt @@ -37,6 +37,10 @@ has_bp3_dlc_trigger = { has_dlc_feature = wandering_nobles } +has_ach_dlc_trigger = { + has_dlc_feature = coronations +} + ################################################## # Flavour Pack Triggers @@ -84,6 +88,10 @@ has_ep3_dlc_trigger = { has_dlc_feature = roads_to_power } +has_tgp_dlc_trigger = { + has_dlc_feature = all_under_heaven +} + has_playable_adventurer_dlc_trigger = { has_dlc_feature = roads_to_power } diff --git a/N3OW/common/scripted_triggers/00_hunt_triggers.txt b/N3OW/common/scripted_triggers/00_hunt_triggers.txt index d911f021..bad22479 100644 --- a/N3OW/common/scripted_triggers/00_hunt_triggers.txt +++ b/N3OW/common/scripted_triggers/00_hunt_triggers.txt @@ -66,8 +66,7 @@ hunt_animal_roe_trigger = { geographical_region = world_europe trigger_if = { limit = { - exists = empire - empire = title:e_scandinavia + empire ?= title:e_scandinavia } NOR = { terrain = taiga @@ -80,6 +79,11 @@ hunt_animal_roe_trigger = { geographical_region = world_india geographical_region = world_burma geographical_region = world_tibet + geographical_region = world_steppe_east + geographical_region = world_asia_china + geographical_region = world_asia_korea + geographical_region = world_asia_sakhalin_hokkaido + geographical_region = world_asia_north_east } } @@ -156,6 +160,8 @@ hunt_animal_hyena_trigger = { geographical_region = world_africa geographical_region = world_middle_east geographical_region = world_india + geographical_region = world_asia_china + geographical_region = world_asia_southeast_mainland } } @@ -167,6 +173,10 @@ hunt_animal_lynx_trigger = { geographical_region = world_steppe_east geographical_region = world_steppe_west geographical_region = world_tibet + geographical_region = world_asia_china + geographical_region = world_asia_korea + geographical_region = world_asia_sakhalin_hokkaido + geographical_region = world_asia_north_east } } @@ -189,6 +199,7 @@ hunt_animal_caracal_trigger = { geographical_region = world_india_rajastan geographical_region = world_africa geographical_region = world_asia_minor + geographical_region = world_asia_china } OR = { terrain = drylands @@ -203,6 +214,8 @@ hunt_animal_crocodile_trigger = { geographical_region = world_africa_north_east geographical_region = world_africa_west geographical_region = world_africa_east + geographical_region = world_asia_southeast_mainland + geographical_region = world_asia_southeast_islands # Restrict our Mesopotamian crocs preemptively to _only_ floodplains. AND = { terrain = floodplains @@ -215,7 +228,7 @@ hunt_animal_crocodile_trigger = { terrain = jungle AND = { is_coastal = yes - # Nile crocodiles aren't ocean-dwellers. + # Nile crocodiles aren't ocean-dwellers. NOT = { geographical_region = world_africa_north_east } } } @@ -268,6 +281,13 @@ hunt_animal_tiger_trigger = { geographical_region = world_india geographical_region = world_burma geographical_region = world_middle_east_persia + geographical_region = world_asia_korea + geographical_region = world_asia_china + geographical_region = world_asia_sakhalin_hokkaido + geographical_region = world_asia_southeast_mainland + geographical_region = world_asia_borneo + geographical_region = world_asia_sulawesi_maluku + geographical_region = world_asia_indonesia } OR = { terrain = jungle @@ -292,7 +312,13 @@ hunt_animal_leopard_trigger = { geographical_region = world_burma geographical_region = world_steppe_east geographical_region = world_tibet - geographical_region = world_asia_minor + geographical_region = world_asia_korea + geographical_region = world_asia_china + geographical_region = world_asia_sakhalin_hokkaido + geographical_region = world_asia_southeast_mainland + geographical_region = world_asia_borneo + geographical_region = world_asia_sulawesi_maluku + geographical_region = world_asia_indonesia } NOR = { terrain = farmlands @@ -556,8 +582,7 @@ hunt_story_trigger = { } activity_befriend_woo_trigger = { - exists = intent_target - intent_target = $CHARACTER$ + intent_target ?= $CHARACTER$ OR = { has_activity_intent = befriend_attendee_intent has_activity_intent = woo_attendee_intent @@ -632,7 +657,7 @@ hunt_murder_target_trigger = { # Schemes scope:activity = { any_attending_character = { - NOT = { this = root } + this != root hunt_valid_accidental_murder_target_trigger = yes OR = { # Rival @@ -663,7 +688,7 @@ hunt_abduct_target_trigger = { # Schemes scope:activity = { any_attending_character = { - NOT = { this = root } + this != root hunt_valid_accidental_murder_target_trigger = yes OR = { # Rival @@ -706,13 +731,12 @@ hunt_murder_scheme_target_trigger = { hunt_murder_intent_target_trigger = { has_activity_intent = murder_attendee_intent - exists = intent_target - intent_target = { hunt_valid_accidental_murder_target_trigger = yes } + intent_target ?= { hunt_valid_accidental_murder_target_trigger = yes } save_temporary_scope_as = murder_target_temp } hunt_valid_murder_accomplice_trigger = { - NOT = { this = root } + this != root is_adult = yes is_participant_in_activity = scope:activity can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } @@ -762,16 +786,8 @@ hunt_potential_murder_risk_trigger = { # Rival has_relation_rival = root # Feud - AND = { - exists = house.house_head - NOT = { house = root.house } - house.house_head = { - any_owned_story = { - story_type = story_cycle_house_feud - var:house_feud_house = root.house - } - } - } + house_has_feud_relation_with_trigger = { TARGET = root } + # Heir AND = { this = root.player_heir @@ -853,10 +869,8 @@ hunt_elective_accomplice_trigger = { hunt_claimant_faction_trigger = { faction_is_type = claimant_faction - exists = special_character - special_character = $MURDERER$ - exists = special_title - special_title = $TARGET$.primary_title + special_character ?= $MURDERER$ + special_title ?= $TARGET$.primary_title } hunt_pertinent_friendly_trigger = { @@ -991,7 +1005,10 @@ hunt_legendary_animal_custom_loc_trigger = { scope:story = { story_type = story_cycle_hunt_mystical_animal } } trigger_else_if = { - limit = { exists = $ACTIVITY$ } + limit = { + exists = $ACTIVITY$ + $ACTIVITY$ != root + } $ACTIVITY$ = { has_activity_option = { category = special_type option = hunt_type_legendary } } diff --git a/N3OW/common/scripted_triggers/00_illustration_triggers.txt b/N3OW/common/scripted_triggers/00_illustration_triggers.txt index a834e413..d3c27c81 100644 --- a/N3OW/common/scripted_triggers/00_illustration_triggers.txt +++ b/N3OW/common/scripted_triggers/00_illustration_triggers.txt @@ -13,7 +13,25 @@ has_graphical_mena_culture_group_trigger = { } has_graphical_india_culture_group_trigger = { - has_building_gfx = indian_building_gfx + OR = { + has_building_gfx = indian_building_gfx + has_building_gfx = southeast_asian_building_gfx + } +} + +has_graphical_east_asia_culture_group_trigger = { + OR = { + has_building_gfx = chinese_building_gfx + has_building_gfx = japanese_building_gfx + } +} + +has_graphical_east_asia_or_southeast_asia_group_trigger = { + OR = { + has_building_gfx = chinese_building_gfx + has_building_gfx = japanese_building_gfx + has_building_gfx = southeast_asian_building_gfx + } } has_graphical_mediterranean_culture_group_trigger = { @@ -47,6 +65,13 @@ has_graphical_iranian_culture_group_trigger = { has_building_gfx = iranian_building_gfx } +has_graphical_chinese_culture_group_trigger = { + has_building_gfx = chinese_building_gfx +} + +has_graphical_japanese_culture_group_trigger = { + has_building_gfx = japanese_building_gfx +} graphical_wilderness_desert_trigger = { OR = { @@ -202,6 +227,58 @@ has_graphical_india_region_trigger = { trigger_else = { always = yes } } +has_graphical_east_asia_region_trigger = { + trigger_if = { + limit = { + exists = capital_province + } + capital_province = { + OR = { + geographical_region = graphical_east_asia + geographical_region = world_steppe_east + } + } + } + trigger_else_if = { + limit = { + NOT = { exists = capital_province } + } + trigger_if = { + limit = { exists = host.capital_province } + host.capital_province = { + OR = { + geographical_region = graphical_east_asia + geographical_region = world_steppe_east + } + } + } + trigger_else_if = { + limit = { + exists = liege.capital_province + } + liege.capital_province = { + OR = { + geographical_region = graphical_east_asia + geographical_region = world_steppe_east + } + } + } + trigger_else_if = { + limit = { + exists = location.province_owner.capital_province + } + location.province_owner.capital_province = { + OR = { + geographical_region = graphical_east_asia + geographical_region = world_steppe_east + } + } + } + trigger_else = { always = yes } + } + trigger_else = { always = yes } +} + #has_mediterranean_culture_trigger = { has_graphical_mediterranean_region_trigger = { trigger_if = { @@ -254,7 +331,6 @@ has_graphical_mena_region_trigger = { geographical_region = graphical_mena geographical_region = world_steppe_tarim geographical_region = world_steppe_central - geographical_region = world_steppe_east AND = { prev = { government_has_flag = government_is_clan @@ -278,7 +354,6 @@ has_graphical_mena_region_trigger = { geographical_region = graphical_mena geographical_region = world_steppe_tarim geographical_region = world_steppe_central - geographical_region = world_steppe_east AND = { province_owner = { government_has_flag = government_is_clan @@ -300,7 +375,6 @@ has_graphical_mena_region_trigger = { geographical_region = graphical_mena geographical_region = world_steppe_tarim geographical_region = world_steppe_central - geographical_region = world_steppe_east AND = { province_owner = { government_has_flag = government_is_clan @@ -322,7 +396,6 @@ has_graphical_mena_region_trigger = { geographical_region = graphical_mena geographical_region = world_steppe_tarim geographical_region = world_steppe_central - geographical_region = world_steppe_east AND = { province_owner = { government_has_flag = government_is_clan @@ -394,6 +467,7 @@ has_graphical_western_region_trigger = { geographical_region = world_steppe_tarim geographical_region = world_steppe_central geographical_region = world_steppe_east + geographical_region = world_asia } } } @@ -412,6 +486,7 @@ has_graphical_western_region_trigger = { geographical_region = world_steppe_tarim geographical_region = world_steppe_central geographical_region = world_steppe_east + geographical_region = world_asia } } } @@ -427,6 +502,7 @@ has_graphical_western_region_trigger = { geographical_region = world_steppe_tarim geographical_region = world_steppe_central geographical_region = world_steppe_east + geographical_region = world_asia } } } @@ -442,6 +518,7 @@ has_graphical_western_region_trigger = { geographical_region = world_steppe_tarim geographical_region = world_steppe_central geographical_region = world_steppe_east + geographical_region = world_asia } } } @@ -502,7 +579,6 @@ has_graphical_iran_region_trigger = { geographical_region = world_middle_east_persia geographical_region = world_steppe_tarim geographical_region = world_steppe_central - geographical_region = world_steppe_east } } } @@ -517,7 +593,6 @@ has_graphical_iran_region_trigger = { geographical_region = world_middle_east_persia geographical_region = world_steppe_tarim geographical_region = world_steppe_central - geographical_region = world_steppe_east } } } @@ -530,7 +605,6 @@ has_graphical_iran_region_trigger = { geographical_region = world_middle_east_persia geographical_region = world_steppe_tarim geographical_region = world_steppe_central - geographical_region = world_steppe_east } } } @@ -543,7 +617,6 @@ has_graphical_iran_region_trigger = { geographical_region = world_middle_east_persia geographical_region = world_steppe_tarim geographical_region = world_steppe_central - geographical_region = world_steppe_east } } } @@ -554,7 +627,7 @@ has_graphical_iran_region_trigger = { steppe_building_gfx_use_mena_trigger = { AND = { - culture = { has_building_gfx = steppe_building_gfx } + culture ?= { has_building_gfx = steppe_building_gfx } OR = { #western steppe should only be mena if you are clan NOR = { @@ -564,6 +637,8 @@ steppe_building_gfx_use_mena_trigger = { geographical_region = world_india geographical_region = world_burma geographical_region = world_tibet + geographical_region = world_asia + geographical_region = world_steppe_east } AND = { faith.religion = religion:islam_religion @@ -577,19 +652,20 @@ steppe_building_gfx_use_mena_trigger = { } steppe_building_gfx_use_indian_trigger = { AND = { - culture = { has_building_gfx = steppe_building_gfx } + culture ?= { has_building_gfx = steppe_building_gfx } OR = { #western steppe should only be mena if you are clan geographical_region = world_india geographical_region = world_burma geographical_region = world_tibet + geographical_region = world_asia_southeast } } } steppe_building_gfx_use_mediterranean_trigger = { AND = { - culture = { has_building_gfx = steppe_building_gfx } + culture ?= { has_building_gfx = steppe_building_gfx } OR = { geographical_region = world_europe_south_east geographical_region = world_europe_south_italy @@ -601,11 +677,10 @@ steppe_building_gfx_use_mediterranean_trigger = { steppe_building_gfx_use_iranian_trigger = { AND = { OR = { - geographical_region = world_steppe_east geographical_region = world_steppe_central geographical_region = world_middle_east_persia } - culture = { has_building_gfx = steppe_building_gfx } + culture ?= { has_building_gfx = steppe_building_gfx } } } steppe_building_gfx_use_western_trigger = { @@ -614,6 +689,192 @@ steppe_building_gfx_use_western_trigger = { geographical_region = world_europe_north geographical_region = world_europe_west } - culture = { has_building_gfx = steppe_building_gfx } + culture ?= { has_building_gfx = steppe_building_gfx } } } +steppe_building_gfx_use_east_asian_trigger = { + AND = { + culture ?= { has_building_gfx = steppe_building_gfx } + OR = { + geographical_region = world_asia + geographical_region = world_steppe_east + } + NOT = { geographical_region = world_asia_southeast } + } +} +steppe_building_gfx_use_japanese_trigger = { + AND = { + culture ?= { has_building_gfx = steppe_building_gfx } + geographical_region = world_asia_japan + } +} +steppe_building_gfx_use_southeast_asian_trigger = { + AND = { + culture ?= { has_building_gfx = steppe_building_gfx } + geographical_region = world_asia_southeast + } +} + +high_tier_throne_room_trigger = { + OR = { + AND = { + tgp_is_ceremonial_regent_trigger = no # Not 'actual' ruler + primary_title ?= { tier >= tier_kingdom } + } + tgp_is_ceremonial_liege_trigger = yes + } + has_graphical_$REGION$_region_trigger = yes +} + +high_tier_throne_room_spouse_trigger = { + OR = { + primary_spouse ?= { + high_tier_throne_room_trigger = { REGION = $REGION$ } + has_graphical_$REGION$_region_trigger = yes + } + AND = { + betrothed ?= { + high_tier_throne_room_trigger = { REGION = $REGION$ } + has_graphical_$REGION$_region_trigger = yes + } + } + AND = { + liege.diarch ?= this + liege ?= { + high_tier_throne_room_trigger = { REGION = $REGION$ } + has_graphical_$REGION$_region_trigger = yes + } + } + } +} + +byzantine_governor_trigger = { + is_landed = yes + government_allows = administrative + liege ?= { + OR = { + is_roman_emperor_primary_title_trigger = yes + AND = { + culture = { + OR = { + has_cultural_pillar = heritage_byzantine + has_cultural_pillar = heritage_caucasian + } + } + primary_title.tier >= tier_empire + } + } + } +} + +byzantine_governor_close_family_trigger = { + location = prev.location + is_landed = yes + government_has_flag = government_is_special_administrative + exists = top_liege + top_liege = { + OR = { + is_roman_emperor_primary_title_trigger = yes + AND = { + culture = { + OR = { + has_cultural_pillar = heritage_byzantine + has_cultural_pillar = heritage_caucasian + } + } + primary_title.tier >= tier_empire + } + } + } +} + +east_asian_governor_trigger = { + is_landed = yes + government_allows = administrative + top_liege ?= { + OR = { + primary_title = title:h_china + primary_title.de_jure_liege = title:h_china + AND = { + culture_has_east_asian_heritage_pillar_trigger = yes + primary_title.tier >= tier_empire + } + } + } +} + +east_asian_governor_close_family_trigger = { + location = prev.location + is_landed = yes + government_has_flag = government_is_special_administrative + top_liege ?= { + OR = { + primary_title = title:h_china + primary_title.de_jure_liege = title:h_china + AND = { + culture_has_east_asian_heritage_pillar_trigger = yes + primary_title.tier >= tier_empire + } + } + } +} + +has_graphical_chinese_region_trigger = { + trigger_if = { + limit = { exists = capital_province } + capital_province = { geographical_region = world_asia_china } + } + trigger_else_if = { + limit = { exists = host.capital_province } + host.capital_province = { geographical_region = world_asia_china } + } + trigger_else_if = { + limit = { exists = liege.capital_province } + liege.capital_province = { geographical_region = world_asia_china } + } + trigger_else_if = { + limit = { exists = location.province_owner.capital_province } + location.province_owner.capital_province = { geographical_region = world_asia_china } + } + trigger_else = { always = yes } +} + +has_graphical_japanese_region_trigger = { + trigger_if = { + limit = { exists = capital_province } + capital_province = { geographical_region = world_asia_japan } + } + trigger_else_if = { + limit = { exists = host.capital_province } + host.capital_province = { geographical_region = world_asia_japan } + } + trigger_else_if = { + limit = { exists = liege.capital_province } + liege.capital_province = { geographical_region = world_asia_japan } + } + trigger_else_if = { + limit = { exists = location.province_owner.capital_province } + location.province_owner.capital_province = { geographical_region = world_asia_japan } + } + trigger_else = { always = yes } +} + +has_graphical_korean_region_trigger = { + trigger_if = { + limit = { exists = capital_province } + capital_province = { geographical_region = world_asia_korea } + } + trigger_else_if = { + limit = { exists = host.capital_province } + host.capital_province = { geographical_region = world_asia_korea } + } + trigger_else_if = { + limit = { exists = liege.capital_province } + liege.capital_province = { geographical_region = world_asia_korea } + } + trigger_else_if = { + limit = { exists = location.province_owner.capital_province } + location.province_owner.capital_province = { geographical_region = world_asia_korea } + } + trigger_else = { always = yes } +} diff --git a/N3OW/common/scripted_triggers/00_important_actions_triggers.txt b/N3OW/common/scripted_triggers/00_important_actions_triggers.txt new file mode 100644 index 00000000..76b65921 --- /dev/null +++ b/N3OW/common/scripted_triggers/00_important_actions_triggers.txt @@ -0,0 +1,18 @@ +is_relevant_for_succession_notification = { + # no one cares about baronies + tier >= tier_county + + # strange titles + is_nomad_title = no + is_noble_family_title = no + + # title is inherited via merit pools (candidate lists) + holder ?= { + NOR = { + has_realm_law = celestial_appointment_succession_law + has_realm_law = celestial_military_appointment_succession_law + has_realm_law = meritocratic_appointment_succession_law + has_realm_law = meritocratic_military_appointment_succession_law + } + } +} diff --git a/N3OW/common/scripted_triggers/00_interaction_triggers.txt b/N3OW/common/scripted_triggers/00_interaction_triggers.txt index adda0bd9..5ebaf377 100644 --- a/N3OW/common/scripted_triggers/00_interaction_triggers.txt +++ b/N3OW/common/scripted_triggers/00_interaction_triggers.txt @@ -3,10 +3,7 @@ #If I am the child this = scope:actor #The ward has actor as its liege - AND = { - exists = employer - employer = scope:actor - } + employer ?= scope:actor #The guardian is actor any_relation = { type = guardian @@ -21,12 +18,10 @@ } remove_guardian_interaction_available_ward_trigger = { - is_busy_in_events_localised = yes #is_imprisoned = no } kick_from_court_validity_trigger = { - is_busy_in_events_localised = yes NOR = { is_spouse_of = scope:actor is_concubine_of = scope:actor @@ -53,7 +48,7 @@ kick_from_court_validity_trigger = { ask_for_pardon_available_trigger = { $ACTOR$ = { - is_independent_ruler = no + top_liege != this any_liege_or_above = { OR = { has_imprisonment_reason = $ACTOR$ @@ -83,7 +78,6 @@ title_revocation_standard_valid_showing_failures_only_trigger = { } } scope:recipient = { - is_busy_in_events_localised = yes NOT = { has_strong_hook = scope:actor } } } @@ -112,16 +106,15 @@ diarch_revocation_has_claim_check_trigger = { object = scope:recipient scope:actor = { any_claim = { - exists = holder - holder = scope:recipient + holder ?= scope:recipient } } } } title_revocation_is_admin_governor_trigger = { - government_has_flag = government_is_administrative - is_independent_ruler = yes + government_allows = administrative + top_liege = this save_temporary_scope_as = liege_temp $VASSAL$ = { is_landed_or_landless_administrative = yes @@ -166,9 +159,9 @@ vassal_revocation_is_tyrannical_trigger = { NOR = { exists = scope:administrative_revocation AND = { - government_has_flag = government_is_administrative + government_allows = administrative $VASSAL$ = { - government_has_flag = government_is_administrative + government_allows = administrative } } has_revoke_title_reason = $VASSAL$ @@ -197,11 +190,6 @@ vassal_retraction_standard_valid_showing_failures_only_trigger = { NOT = { scope:actor = { is_at_war_with = scope:recipient } } - scope:recipient = { is_busy_in_events_localised = yes } - trigger_if = { - limit = { exists = scope:secondary_recipient } - scope:secondary_recipient = { is_busy_in_events_localised = yes } - } scope:recipient = { NOT = { has_strong_hook = scope:actor } } @@ -226,8 +214,7 @@ is_de_jure_vassal_of_liege_trigger = { primary_title = { OR = { de_jure_liege = { - exists = holder - holder = scope:my_liege + holder ?= scope:my_liege } trigger_if = { limit = { @@ -235,8 +222,7 @@ is_de_jure_vassal_of_liege_trigger = { } de_jure_liege = { de_jure_liege = { - exists = holder - holder = scope:my_liege + holder ?= scope:my_liege } } } @@ -272,12 +258,11 @@ can_any_traveling_family_members_travel_trigger = { is_child_of = scope:recipient.host is_adult = no } - NOT = { dynasty = scope:recipient.host.dynasty } + dynasty != scope:recipient.host.dynasty } } imprison_neutral_is_valid_showing_failures_only_triggers_trigger = { - scope:recipient = { is_busy_in_events_localised = yes } scope:actor.liege = { trigger_if = { limit = { has_realm_law_flag = imprisonment_toggle_enable } @@ -387,8 +372,7 @@ should_avoid_hostile_action_against_due_to_personal_relations_trigger = { should_avoid_hostile_action_against_due_to_liege_relations_trigger = { $ACTOR$ = { - exists = liege - liege = { + liege ?= { OR = { has_any_good_relationship_with_character_trigger = { CHARACTER = $RECIPIENT$ } is_allied_to = $RECIPIENT$ diff --git a/N3OW/common/scripted_triggers/00_laamp_triggers.txt b/N3OW/common/scripted_triggers/00_laamp_triggers.txt index dd1e2828..abf1789a 100644 --- a/N3OW/common/scripted_triggers/00_laamp_triggers.txt +++ b/N3OW/common/scripted_triggers/00_laamp_triggers.txt @@ -136,14 +136,18 @@ disable_interaction_for_hasan_trigger = { } laamp_request_likely_marriable_woman_trigger = { - is_female = yes - is_adult = yes + is_available_quick = { + female = yes + adult = yes + } can_marry_trigger = yes } laamp_request_likely_marriable_man_trigger = { - is_male = yes - is_adult = yes + is_available_quick = { + female = no + adult = yes + } can_marry_trigger = yes } @@ -151,14 +155,24 @@ laamp_request_likely_marriable_man_trigger = { # Transition Triggers is_valid_for_laampdom = { - custom_tooltip = { - text = adventurer_not_nf_head_trigger_tt - NOT = { - any_held_title = { is_noble_family_title = yes } - } - } save_temporary_scope_as = potential_laamp_temp - is_landless_ruler = no # Admin gov vassals should not become laamps + trigger_if = { + limit = { + NAND = { + is_ai = no + government_allows = administrative + top_liege = this + is_landed = no + } + } + custom_tooltip = { + text = adventurer_not_nf_head_trigger_tt + NOT = { + any_held_title = { is_noble_family_title = yes } + } + } + is_landless_ruler = no # Admin gov vassals should not become laamps + } trigger_if = { limit = { is_ai = yes } trigger_if = { @@ -231,20 +245,24 @@ ep3_laamp_interesting_enough_to_be_a_laamp_trigger = { } playable_relative_trigger = { - is_playable_character = yes - is_ai = yes + is_available_quick = { + ai = yes + advanced_ruler = yes + } house = root.house } ep3_laamp_interesting_sibling_trigger = { - is_ai = yes # Not already played - is_landed = no # Landless enough to venture forth + is_available_quick = { + ai = yes + landed = no + advanced_ruler = no + } NOT = { any_consort = { is_ruler = yes } } - is_playable_character = no # Not already playable is_valid_for_laampdom = yes # Age, health, personality ep3_laamp_interesting_enough_to_be_a_laamp_trigger = { COMPARISON = $COMPARISON$ } } @@ -262,7 +280,7 @@ ep3_negotiate_settlement_valid_county_trigger = { holder = scope:actor trigger_if = { limit = { - scope:actor = { government_has_flag = government_is_administrative } + scope:actor = { government_has_flag = government_is_special_administrative } } holder = { target_is_liege_or_above = scope:actor } } @@ -303,7 +321,7 @@ ep3_adventurer_landless_allowed_against_character_trigger = { } # Scope:defender cannot be liege of attacker. scope:defender = { - NOT = { this = scope:attacker.liege } + this != scope:attacker.liege } } @@ -319,9 +337,8 @@ ep3_adventurer_landless_should_invalidate_trigger = { list = target_titles any_in_de_jure_hierarchy = { tier = tier_county - holder = { - target_is_same_character_or_above = scope:defender - } + is_landless_type_title = no + holder = { target_is_same_character_or_above = scope:defender } } } } @@ -449,7 +466,7 @@ valid_laamp_basic_accept_only_trigger = { employer_has_treasury_to_offer_job_trigger = { trigger_if = { limit = { is_ai = no } - scope:employer.gold >= 50 + scope:employer.treasury_or_gold >= 50 } } @@ -457,9 +474,11 @@ employer_has_treasury_to_offer_job_trigger = { ## So we don't penalise you if their circumstances change beyond your control, but _also_ so that there aren't local job listings going up in Middlesex for someone currently pilgrimaging in Jerusalem. valid_laamp_sensible_start_trigger = { scope:employer = { - is_travelling = no - is_in_army = no - is_imprisoned = no + is_available_quick = { + travel = no + in_army = no + imprisoned = no + } } trigger_if = { limit = { @@ -726,7 +745,7 @@ valid_laamp_contract_foe_trigger = { # Which means making sure that they're not located too far away from our contractor. "squared_distance(root.task_contract_taker.location)" <= squared_distance_large # And that they're not located in the exact same province, else travel logic'll break. - NOT = { this = scope:employer_ref.location } + this != scope:employer_ref.location } } @@ -788,7 +807,7 @@ can_access_reject_inheritance_decision_trigger = { OR = { has_trait = content has_perk = carefree_perk - is_landless_adventurer = yes + has_government = landless_adventurer_government } } @@ -928,8 +947,6 @@ laamp_youth_cultural_tradition_trigger = { } } NOT = { - any_heir_title = { - count >= 1 - } + any_heir_title = { } } } diff --git a/N3OW/common/scripted_triggers/00_law_triggers.txt b/N3OW/common/scripted_triggers/00_law_triggers.txt index a9d99d77..a990a23e 100644 --- a/N3OW/common/scripted_triggers/00_law_triggers.txt +++ b/N3OW/common/scripted_triggers/00_law_triggers.txt @@ -62,11 +62,7 @@ has_partition_succession_realm_law_trigger = { } realm_law_use_crown_authority = { - # We separate this out into a different trigger for moddability purposes, per community request: this allows more diverse authority laws to be easily modded in without needing to override 00_realm_laws.txt, and thus for greater inter-mod compatibility. - realm_law_use_tribal_authority = no - realm_law_use_camp_purpose = no - realm_law_use_imperial_bureaucracy = no - realm_law_use_nomadic_authority = no + government_has_flag = government_uses_crown_authority } realm_law_use_tribal_authority = { @@ -78,17 +74,48 @@ realm_law_use_camp_purpose = { } realm_law_use_imperial_bureaucracy = { - government_has_flag = government_is_administrative + government_allows = administrative + NOR = { + government_has_flag = government_is_celestial + government_has_flag = government_is_meritocratic + government_has_flag = government_is_steppe_admin + government_has_flag = government_is_japan_administrative + } } realm_law_use_nomadic_authority = { government_has_flag = government_is_nomadic } +realm_law_use_celestial_bureaucracy = { + government_has_flag = government_is_celestial +} + +realm_law_is_mandala = { + government_has_flag = government_is_mandala +} + +realm_law_use_meritocratic_bureaucracy = { + OR = { + government_has_flag = government_is_meritocratic + government_has_flag = government_is_steppe_admin + } +} + +realm_uses_treasury_laws_trigger = { + government_allows = treasury +} + +realm_law_use_japanese_bureaucracy = { + government_is_japanese_trigger = yes +} + can_have_confederate_partition_succession_law_trigger = { OR = { government_has_flag = government_is_feudal government_has_flag = government_is_tribal + # TGP + government_has_flag = government_is_japan_feudal } } @@ -106,11 +133,14 @@ can_keep_partition_succession_law_trigger = { has_title = title:e_ilkhanate has_title = title:e_golden_horde has_title = title:e_chagatai - has_title = title:e_black_horde + has_title = title:e_red_horde has_title = title:e_white_horde has_title = title:e_aarlud_khanate has_title = title:e_togskol_khanate has_title = title:e_baruun_khanate + has_title = title:e_great_yuan + has_title = title:e_blue_horde + has_title = title:e_omnod_dalai_khanate } } NOT = { government_has_flag = government_is_clan } @@ -122,9 +152,8 @@ can_have_partition_succession_law_trigger = { } custom_description = { text = succession_laws_must_have_organised_government_tooltip - OR = { - government_has_flag = government_is_feudal - } + government_has_flag = government_is_feudal + } } @@ -142,11 +171,14 @@ can_keep_high_partition_succession_law_trigger = { has_title = title:e_ilkhanate has_title = title:e_golden_horde has_title = title:e_chagatai - has_title = title:e_black_horde + has_title = title:e_red_horde has_title = title:e_white_horde has_title = title:e_aarlud_khanate has_title = title:e_togskol_khanate has_title = title:e_baruun_khanate + has_title = title:e_great_yuan + has_title = title:e_blue_horde + has_title = title:e_omnod_dalai_khanate } } NOT = { government_has_flag = government_is_clan} @@ -175,15 +207,27 @@ can_keep_single_heir_succession_law_trigger = { } OR = { can_have_single_heir_succession_law_trigger = yes - # Byzantine Empire + # Byzantine Empire / Ceremonial Liege historical_succession_access_single_heir_succession_law_trigger = yes + has_variable = purge_oath_previous_law # ACH Purge Pretenders Oath } } } can_have_single_heir_succession_law_trigger = { - culture = { - has_innovation = innovation_primogeniture + OR = { + culture = { + has_innovation = innovation_primogeniture + } + AND = { # Meritocratic/Celestial/Soryo + is_independent_ruler = yes + OR = { + government_allows = merit + government_has_flag = government_is_japan_feudal + } + } + # Ceremonial + tgp_has_ceremonial_liege_title_trigger = yes } # Non-tribals only trigger_if = { # We split the tooltip into two, to make sure we don't show admin unless you actually have it @@ -195,7 +239,7 @@ can_have_single_heir_succession_law_trigger = { OR = { government_has_flag = government_is_feudal government_has_flag = government_is_clan - government_has_flag = government_is_administrative + government_allows = administrative } } } @@ -210,9 +254,12 @@ can_have_single_heir_succession_law_trigger = { } trigger_if = { limit = { - government_has_flag = government_is_administrative + government_allows = administrative + } + OR = { + is_independent_ruler = yes + exists = primary_title.var:ceremonial_title } - is_independent_ruler = yes } } @@ -243,7 +290,7 @@ can_have_single_heir_youngest_succession_law_trigger = { OR = { government_has_flag = government_is_feudal government_has_flag = government_is_clan - government_has_flag = government_is_administrative + government_allows = administrative } } } @@ -258,7 +305,7 @@ can_have_single_heir_youngest_succession_law_trigger = { } trigger_if = { limit = { - government_has_flag = government_is_administrative + government_allows = administrative } is_independent_ruler = yes } @@ -304,7 +351,7 @@ can_have_single_heir_dynasty_house_trigger = { government_has_flag = government_is_clan } } - NOT = { government_has_flag = government_is_administrative } + NOT = { government_allows = administrative } } can_have_bishop_theocratic_succession_law_trigger = { @@ -371,8 +418,13 @@ can_pass_law_ca3_trigger = { can_have_acclamation_succession_law_trigger = { has_ep3_dlc_trigger = yes - government_has_flag = government_is_administrative - is_independent_ruler = yes + top_liege = this + government_allows = administrative + NOR = { + government_has_flag = government_is_celestial + government_has_flag = government_is_japan_administrative + government_has_flag = government_is_meritocratic + } } can_keep_acclamation_succession_law_trigger = { @@ -383,7 +435,7 @@ can_keep_acclamation_succession_law_trigger = { } OR = { can_have_acclamation_succession_law_trigger = yes - has_title = title:e_britannia + has_title = title:e_byzantium } } } @@ -394,7 +446,12 @@ can_change_acclamation_succession_law_trigger = { can_have_appointment_succession_law_trigger = { has_ep3_dlc_trigger = yes - government_has_flag = government_is_administrative + government_allows = administrative + NOR = { + government_has_flag = government_is_celestial + government_has_flag = government_is_japan_administrative + government_has_flag = government_is_meritocratic + } is_independent_ruler = no } diff --git a/N3OW/common/scripted_triggers/00_lifestyle_perk_triggers.txt b/N3OW/common/scripted_triggers/00_lifestyle_perk_triggers.txt index 752612ae..7b3563d8 100644 --- a/N3OW/common/scripted_triggers/00_lifestyle_perk_triggers.txt +++ b/N3OW/common/scripted_triggers/00_lifestyle_perk_triggers.txt @@ -20,7 +20,7 @@ extortion_powerful_vassal_trigger = { extortion_county_trigger = { tier = tier_county - NOT = { this = root.capital_county } + this != root.capital_county county_control >= medium_county_control NOR = { has_county_modifier = county_extorted_modifier @@ -70,18 +70,17 @@ can_challenge_rival_to_single_combat_trigger = { has_perk = stalwart_leader_perk culture = { has_cultural_parameter = can_duel_rivals } government_has_flag = government_is_nomadic + government_has_flag = government_is_japan_feudal } } rival_single_combat_shown_and_not_invalid_trigger = { - # Scope:actor must be able to fight personally. - scope:actor = { can_start_single_combat_trigger = yes } - # Scope:actor cannot challenge someone they have a ceasefire against. scope:actor = { + # Scope:actor must be able to fight personally. + can_start_single_combat_trigger = yes + # Scope:actor cannot challenge someone they have a ceasefire against. NOT = { has_truce = scope:recipient } - } - # Scope:actor *definitely* cannot challenge someone they're at war with. - scope:actor = { + # Scope:actor *definitely* cannot challenge someone they're at war with. NOT = { is_at_war_with = scope:recipient } } } diff --git a/N3OW/common/scripted_triggers/00_major_decision_triggers.txt b/N3OW/common/scripted_triggers/00_major_decision_triggers.txt index 68a4cfc2..c46817e5 100644 --- a/N3OW/common/scripted_triggers/00_major_decision_triggers.txt +++ b/N3OW/common/scripted_triggers/00_major_decision_triggers.txt @@ -12,8 +12,8 @@ launch_hungarian_migration_ducal_processing_trigger = { #Doesn't hold a valid duchy-tier title in Pannonia. NOT = { any_held_title = { + title_tier = duchy title_capital_county.title_province = { geographical_region = custom_hungary } - tier = tier_duchy } } } @@ -22,7 +22,7 @@ launch_hungarian_migration_count_processing_trigger = { #Doesn't hold a valid county-tier title in Pannonia. NOT = { any_held_title = { - tier = tier_county + title_tier = county title_province = { geographical_region = custom_hungary } } } @@ -36,7 +36,7 @@ launch_hungarian_migration_sub_vassal_liege_pairing_trigger = { scope:receiving_vassal.liege = { any_held_title = { count >= 2 - tier = tier_county + title_tier = county title_province = { geographical_region = custom_hungary } } } @@ -55,8 +55,7 @@ launch_hungarian_migration_county_is_within_custom_hungary_trigger = { launch_hungarian_migration_misplaced_count_suitable_liege_trigger = { launch_hungarian_migration_county_is_within_custom_hungary_trigger = yes duchy = { - exists = holder - holder = { + holder ?= { NOT = { this = $INVADER$ } liege = $INVADER$ } @@ -102,7 +101,7 @@ negotiate_the_danelaw_basic_filter_trigger = { } negotiate_the_danelaw_additional_filter_trigger = { # Independent only, please. - is_independent_ruler = yes + top_liege = this # Kings & Emperors are too high a rank to make concessions. highest_held_title_tier <= tier_duchy # Plus, a capital inside title:k_england. Not strictly necessary, but removes *so* many edge-cases. @@ -171,7 +170,7 @@ favour_the_countryside_basques_rationale_sinful_traits_trigger = { favour_the_countryside_basques_rationale_virtuous_basque_pagan_traits_trigger = { num_virtuous_traits = { value >= favour_the_countryside_basques_decision_basque_pagan_virtues_tally_value - faith = faith:basque_pagan + target = faith:basque_pagan } } diff --git a/N3OW/common/scripted_triggers/00_marriage_triggers.txt b/N3OW/common/scripted_triggers/00_marriage_triggers.txt index 48c4f18e..6c4cd9f0 100644 --- a/N3OW/common/scripted_triggers/00_marriage_triggers.txt +++ b/N3OW/common/scripted_triggers/00_marriage_triggers.txt @@ -238,7 +238,6 @@ marriage_between_characters_unlocks_alliance_of_min_tier_trigger = { is_close_family_of = scope:alliance_unlocker } } - #todo shouldn't this use yields_alliance trigger $THEIR_CHARACTER$ = { OR = { AND = { @@ -254,7 +253,12 @@ marriage_between_characters_unlocks_alliance_of_min_tier_trigger = { } can_become_concubine_of_character_trigger = { - is_hostage = no + is_available_quick = { + adult = yes + ruler = no + advanced_ruler = no + hostage = no + } trigger_if = { limit = { NOT = { is_imprisoned_by = $CHARACTER$ } @@ -275,14 +279,16 @@ can_become_concubine_of_character_trigger = { is_concubine_of = $CHARACTER$ has_character_flag = has_been_offered_as_concubine } - is_ruler = no - is_playable_character = no - is_adult = yes could_marry_character_trigger = { CHARACTER = $CHARACTER$ } #Gender, recent divorce, allowed to marry, no illegal incest etc. } # Same as above, switching out could_marry_character_trigger for can_take_as_concubine_character_trigger, in order to better inform the player that they cannot take their ex-spouse as a concubine can_become_concubine_of_character_valid_trigger = { + is_available_quick = { + adult = yes + ruler = no + advanced_ruler = no + } trigger_if = { limit = { NOT = { is_imprisoned_by = $CHARACTER$ } @@ -290,6 +296,7 @@ can_become_concubine_of_character_valid_trigger = { is_married = no is_betrothed = no is_concubine = no + is_diarch = no number_of_concubines = 0 } trigger_if = { @@ -303,19 +310,24 @@ can_become_concubine_of_character_valid_trigger = { is_concubine_of = $CHARACTER$ has_character_flag = has_been_offered_as_concubine } - is_ruler = no - is_playable_character = no - is_adult = yes can_take_as_concubine_character_trigger = { CHARACTER = $CHARACTER$ } #Gender, allowed to marry, no illegal incest etc. + has_any_disease_trigger = no + has_easily_mocked_physical_attribute_trigger = no } can_be_offered_as_concubine_to_character_trigger = { + is_available_quick = { + adult = yes + ruler = no + advanced_ruler = no + } trigger_if = { limit = { NOT = { is_imprisoned_by = $GIVER$ } } is_married = no is_betrothed = no + is_diarch = no OR = { is_concubine = no is_concubine_of = $GIVER$ @@ -336,9 +348,6 @@ can_be_offered_as_concubine_to_character_trigger = { is_concubine_of = $CHARACTER$ has_character_flag = has_been_offered_as_concubine } - is_ruler = no - is_playable_character = no - is_adult = yes NOT = { is_theocratic_lessee = yes } @@ -362,8 +371,10 @@ ready_to_marry_betrothed_trigger = { marriage_interaction_can_be_picked_trigger = { can_marry_trigger = yes - is_imprisoned = no - is_hostage = no + is_available_quick = { + hostage = no + imprisoned = no + } } marriage_interaction_valid_target_trigger = { @@ -540,7 +551,6 @@ make_concubine_is_valid_trigger = { } } } - is_busy_in_events_localised = yes OR = { AND = { is_imprisoned_by = scope:actor @@ -569,13 +579,17 @@ marriage_interaction_non_loyal_diarchs_refuse_secondary_marriage_trigger = { } wants_very_young_wife = { - is_female = no - is_adult = no + is_available_quick = { + female = no + adult = no + } } wants_young_wife = { - is_female = no - is_adult = yes + is_available_quick = { + female = no + adult = yes + } age < 30 NOT = { any_child = { @@ -610,3 +624,12 @@ is_ruler_or_close_family = { } } } + +can_have_concubines_trigger = { + $CHAR$ = { + custom_tooltip = { + text = can_have_concubines_name_tt + allowed_more_concubines = yes + } + } +} diff --git a/N3OW/common/scripted_triggers/00_military_triggers.txt b/N3OW/common/scripted_triggers/00_military_triggers.txt index 04bdf858..9d8cef75 100644 --- a/N3OW/common/scripted_triggers/00_military_triggers.txt +++ b/N3OW/common/scripted_triggers/00_military_triggers.txt @@ -17,7 +17,7 @@ military_strength_greater_than_ratio_trigger = { valid_for_maa_trigger = { OR = { AND = { - is_landless_adventurer = yes + has_government = landless_adventurer_government has_perk = planned_cultivation_perk location.county.culture ?= { has_cultural_parameter = $PARAMETER$ } } diff --git a/N3OW/common/scripted_triggers/00_opinion_scripted_triggers.txt b/N3OW/common/scripted_triggers/00_opinion_scripted_triggers.txt index 065e4da1..be97e65b 100644 --- a/N3OW/common/scripted_triggers/00_opinion_scripted_triggers.txt +++ b/N3OW/common/scripted_triggers/00_opinion_scripted_triggers.txt @@ -160,6 +160,10 @@ has_any_major_revenge_opinion_against_character_trigger = { modifier = embezzled_opinion target = $CHARACTER$ } + has_opinion_modifier = { + modifier = siphoned_treasury_crime + target = $CHARACTER$ + } has_opinion_modifier = { modifier = attempted_arrest_opinion target = $CHARACTER$ diff --git a/N3OW/common/scripted_triggers/00_personality_triggers.txt b/N3OW/common/scripted_triggers/00_personality_triggers.txt index af7337eb..134b43d1 100644 --- a/N3OW/common/scripted_triggers/00_personality_triggers.txt +++ b/N3OW/common/scripted_triggers/00_personality_triggers.txt @@ -66,6 +66,7 @@ has_trait_extroverted_trigger = { has_trait = gregarious has_trait = curious has_trait = charming + has_trait = lifestyle_reveler } } @@ -76,6 +77,7 @@ has_trait_introverted_trigger = { has_trait = craven has_trait = shy has_trait = pensive + has_trait = reclusive } } diff --git a/N3OW/common/scripted_triggers/00_pet_triggers.txt b/N3OW/common/scripted_triggers/00_pet_triggers.txt index 48f2408c..e035e100 100644 --- a/N3OW/common/scripted_triggers/00_pet_triggers.txt +++ b/N3OW/common/scripted_triggers/00_pet_triggers.txt @@ -17,20 +17,20 @@ has_named_cat_or_dog_trigger = { has_cat_trigger = { any_owned_story = { - story_type = story_cycle_pet_cat + type = story_cycle_pet_cat } } has_named_cat_trigger = { any_owned_story = { - story_type = story_cycle_pet_cat + type = story_cycle_pet_cat } exists = var:story_cycle_cat_name } has_dog_trigger = { any_owned_story = { - story_type = story_cycle_pet_dog + type = story_cycle_pet_dog } } @@ -65,7 +65,7 @@ has_named_eagle_trigger = { has_named_dog_trigger = { any_owned_story = { - story_type = story_cycle_pet_dog + type = story_cycle_pet_dog } exists = var:story_cycle_dog_name } diff --git a/N3OW/common/scripted_triggers/00_pilgrimage_triggers.txt b/N3OW/common/scripted_triggers/00_pilgrimage_triggers.txt index 77980876..95699929 100644 --- a/N3OW/common/scripted_triggers/00_pilgrimage_triggers.txt +++ b/N3OW/common/scripted_triggers/00_pilgrimage_triggers.txt @@ -1,7 +1,6 @@  is_on_a_pilgrimage_trigger = { - exists = involved_activity - involved_activity = { has_activity_type = activity_pilgrimage } + involved_activity ?= { has_activity_type = activity_pilgrimage } #No more pilgrimage events if you're on your way home :colbert: exists = capital_province NOT = { @@ -12,8 +11,7 @@ is_on_a_pilgrimage_trigger = { } is_on_a_hajj_trigger = { - exists = involved_activity - involved_activity = { + involved_activity ?= { has_activity_option = { category = special_type option = pilgrimage_type_hajj diff --git a/N3OW/common/scripted_triggers/00_playdate_activity_triggers.txt b/N3OW/common/scripted_triggers/00_playdate_activity_triggers.txt index 38cbd031..60917b2e 100644 --- a/N3OW/common/scripted_triggers/00_playdate_activity_triggers.txt +++ b/N3OW/common/scripted_triggers/00_playdate_activity_triggers.txt @@ -1,16 +1,18 @@  playdate_default_participant_trigger = { - is_ai = yes - NOT = { this = root } - is_alive = yes - is_imprisoned = no - is_incapable = no + is_available_quick = { + ai = yes + alive = yes + imprisoned = no + incapable = no + } + this != root } playdate_potential_guest_check_trigger = { - NOT = { this = scope:activity.activity_host } + this != scope:activity.activity_host is_available_for_child_activity_trigger = yes NOT = { is_in_list = potential_guests } } diff --git a/N3OW/common/scripted_triggers/00_relation_triggers.txt b/N3OW/common/scripted_triggers/00_relation_triggers.txt index e78a0eff..a4ea8245 100644 --- a/N3OW/common/scripted_triggers/00_relation_triggers.txt +++ b/N3OW/common/scripted_triggers/00_relation_triggers.txt @@ -12,8 +12,8 @@ can_set_relation_potential_friend_trigger = { } can_set_relation_friend_trigger = { - NOT = { this = $CHARACTER$ } NOR = { + this = $CHARACTER$ has_relation_friend = $CHARACTER$ has_relation_best_friend = $CHARACTER$ has_relation_rival = $CHARACTER$ @@ -22,8 +22,8 @@ can_set_relation_friend_trigger = { } can_set_relation_best_friend_trigger = { - NOT = { this = $CHARACTER$ } NOR = { + this = $CHARACTER$ has_relation_best_friend = $CHARACTER$ has_relation_rival = $CHARACTER$ has_relation_nemesis = $CHARACTER$ @@ -40,29 +40,31 @@ can_set_relation_potential_lover_trigger = { can_set_relation_lover_trigger = { is_adult = yes - NOT = { this = $CHARACTER$ } + NOR = { + this = $CHARACTER$ + has_relation_lover = $CHARACTER$ + } is_attracted_to_gender_of = $CHARACTER$ $CHARACTER$ = { is_adult = yes is_attracted_to_gender_of = prev } - NOT = { has_relation_lover = $CHARACTER$ } } can_set_relation_soulmate_trigger = { is_adult = yes - NOT = { this = $CHARACTER$ } is_attracted_to_gender_of = $CHARACTER$ - $CHARACTER$ = { - is_adult = yes - is_attracted_to_gender_of = prev - } NOR = { + this = $CHARACTER$ has_relation_rival = $CHARACTER$ has_relation_nemesis = $CHARACTER$ } + $CHARACTER$ = { + is_adult = yes + is_attracted_to_gender_of = prev + num_of_relation_soulmate = 0 + } num_of_relation_soulmate = 0 - $CHARACTER$ = { num_of_relation_soulmate = 0 } } ### RIVAL ### @@ -72,8 +74,8 @@ can_set_relation_potential_rival_trigger = { } can_set_relation_rival_if_adult_trigger = { - NOT = { this = $CHARACTER$ } NOR = { + this = $CHARACTER$ has_relation_friend = $CHARACTER$ has_relation_best_friend = $CHARACTER$ has_relation_rival = $CHARACTER$ @@ -89,21 +91,23 @@ can_set_relation_rival_trigger = { can_set_relation_nemesis_trigger = { is_adult = yes - NOT = { this = $CHARACTER$ } - $CHARACTER$ = { is_adult = yes } NOR = { + this = $CHARACTER$ has_relation_friend = $CHARACTER$ has_relation_best_friend = $CHARACTER$ } num_of_relation_nemesis = 0 - $CHARACTER$ = { num_of_relation_nemesis = 0 } + $CHARACTER$ = { + is_adult = yes + num_of_relation_nemesis = 0 + } } can_set_relation_bully_trigger = { is_adult = no - NOT = { this = $CHARACTER$ } $CHARACTER$ = { is_adult = no } NOR = { + this = $CHARACTER$ has_relation_friend = $CHARACTER$ has_relation_best_friend = $CHARACTER$ has_relation_bully = $CHARACTER$ @@ -113,9 +117,9 @@ can_set_relation_bully_trigger = { can_set_relation_victim_trigger = { is_adult = no - NOT = { this = $CHARACTER$ } $CHARACTER$ = { is_adult = no } NOR = { + this = $CHARACTER$ has_relation_friend = $CHARACTER$ has_relation_best_friend = $CHARACTER$ has_relation_bully = $CHARACTER$ @@ -148,8 +152,8 @@ can_set_relation_nemesis_even_if_teen_trigger = { child_is_teen_trigger = yes } } - NOT = { this = $CHARACTER$ } NOR = { + this = $CHARACTER$ has_relation_friend = $CHARACTER$ has_relation_best_friend = $CHARACTER$ } @@ -343,6 +347,8 @@ has_any_mild_good_relationship_with_character_trigger = { has_relation_potential_friend = $CHARACTER$ has_relation_guardian = $CHARACTER$ has_relation_ward = $CHARACTER$ + has_relation_elder = $CHARACTER$ + has_relation_disciple = $CHARACTER$ } } @@ -383,23 +389,12 @@ has_any_best_good_relationship_with_character_trigger = { likes_character_trigger = { OR = { - opinion = { - target = $CHARACTER$ - value >= 25 - } has_relation_lover = $CHARACTER$ has_relation_friend = $CHARACTER$ has_relation_crush = $CHARACTER$ - AND = { - OR = { - has_relation_potential_friend = $CHARACTER$ - has_relation_guardian = $CHARACTER$ - } - opinion = { - target = $CHARACTER$ - value >= 0 - } - } + has_relation_potential_friend = $CHARACTER$ + has_relation_elder = $CHARACTER$ + has_relation_disciple = $CHARACTER$ AND = { has_trait = loyal OR = { @@ -408,6 +403,10 @@ likes_character_trigger = { is_close_or_extended_family_of = $CHARACTER$ } } + opinion = { + target = $CHARACTER$ + value >= 25 + } } NOR = { has_relation_victim = $CHARACTER$ @@ -418,6 +417,40 @@ likes_character_trigger = { } } +dislikes_character_trigger = { + OR = { + opinion = { + target = $CHARACTER$ + value <= 25 + } + has_relation_grudge = $CHARACTER$ + has_relation_victim = $CHARACTER$ + has_relation_bully = $CHARACTER$ + has_relation_rival = $CHARACTER$ + + AND = { + has_relation_potential_rival = $CHARACTER$ + opinion = { + target = $CHARACTER$ + value <= 0 + } + } + AND = { + has_trait = disloyal + OR = { + liege ?= $CHARACTER$ + is_consort_of = $CHARACTER$ + is_close_or_extended_family_of = $CHARACTER$ + } + } + } + NOR = { + has_relation_lover = $CHARACTER$ + has_relation_friend = $CHARACTER$ + has_relation_crush = $CHARACTER$ + } +} + has_any_good_relationship_with_character_trigger = { OR = { has_any_mild_good_relationship_with_character_trigger = { CHARACTER = $CHARACTER$ } @@ -473,7 +506,7 @@ has_any_bad_relationship_with_root_trigger = { lover_is_secret_trigger = { any_secret = { - secret_type = secret_lover + type = secret_lover secret_target = $CHARACTER$ } } @@ -515,6 +548,8 @@ has_any_relation_trigger = { has_relation_friend = $CHARACTER$ has_relation_guardian = $CHARACTER$ has_relation_ward = $CHARACTER$ + has_relation_elder = $CHARACTER$ + has_relation_disciple = $CHARACTER$ AND = { has_employed_any_court_position = yes @@ -553,7 +588,7 @@ is_of_major_interest_trigger = { } trigger_if = { limit = { - is_independent_ruler = yes + top_liege = this } any_neighboring_top_liege_realm_owner = { this = $CHARACTER$ @@ -587,6 +622,8 @@ is_of_minor_interest_trigger = { has_relation_friend = $CHARACTER$ has_relation_guardian = $CHARACTER$ has_relation_ward = $CHARACTER$ + has_relation_elder = $CHARACTER$ + has_relation_disciple = $CHARACTER$ AND = { $CHARACTER$ = { target_is_liege_or_above = prev } NOT = { this = $CHARACTER$.liege } @@ -620,8 +657,7 @@ has_no_real_status_trigger = { OR = { is_lowborn = yes AND = { - exists = dynasty - dynasty = { + dynasty ?= { any_dynasty_member = { count <= 2 } @@ -645,12 +681,9 @@ has_no_particular_noble_roots_trigger = { text = has_no_particular_noble_roots_trigger OR = { is_lowborn = yes - AND = { - exists = dynasty - dynasty = { - any_dynasty_member = { - count <= 2 - } + dynasty ?= { + any_dynasty_member = { + count <= 2 } } highest_held_title_tier <= tier_barony @@ -844,8 +877,7 @@ minor_interest_close_relatives_trigger = { #Support trigger minor_interest_betrothed_trigger = { - exists = betrothed - betrothed = { NOT = { is_in_list = $LISTNAME$ } } + betrothed ?= { NOT = { is_in_list = $LISTNAME$ } } } #Support trigger @@ -1005,7 +1037,7 @@ get_potential_enemies_effect = { } trigger_if = { limit = { - is_independent_ruler = no + top_liege != this } liege = { add_to_temporary_list = temp_$LISTNAME$ @@ -1013,7 +1045,7 @@ get_potential_enemies_effect = { } trigger_if = { limit = { - is_independent_ruler = yes + top_liege = this any_neighboring_top_liege_realm_owner = { always = yes } @@ -1045,7 +1077,7 @@ get_potential_enemies_effect = { has_relation_rival = $CHARACTER$ #Lieges AND = { - $CHARACTER$ = { is_independent_ruler = no } + $CHARACTER$ = { top_liege != this } this = $CHARACTER$.liege opinion = { target = $CHARACTER$ @@ -1095,8 +1127,7 @@ has_RelationToMe_relation = { is_concubine = yes } $CHARACTER$ = { - exists = player_heir - player_heir = scope:relation_check + player_heir ?= scope:relation_check } is_heir_of = $CHARACTER$ has_relation_rival = $CHARACTER$ @@ -1108,15 +1139,13 @@ has_RelationToMe_relation = { any_spouse = { any_child = { this = $CHARACTER$ } } any_parent = { any_spouse = { this = $CHARACTER$ } } any_parent = { any_spouse = { any_child = { this = $CHARACTER$ } } } - AND = { - exists = liege - liege = $CHARACTER$ - } + liege ?= $CHARACTER$ + this = { is_tributary_of = $CHARACTER$ } any_courtier = { this = $CHARACTER$ } any_vassal_or_below = { this = $CHARACTER$ } AND = { - is_independent_ruler = no - $CHARACTER$ = { is_independent_ruler = no } + top_liege != this + $CHARACTER$ = { top_liege != this } liege = $CHARACTER$.liege } has_relation_crush = $CHARACTER$ @@ -1124,6 +1153,8 @@ has_RelationToMe_relation = { has_relation_guardian = $CHARACTER$ has_relation_mentor = $CHARACTER$ has_relation_student = $CHARACTER$ + has_relation_elder = $CHARACTER$ + has_relation_disciple = $CHARACTER$ AND = { has_employed_any_court_position = yes any_court_position_holder = { @@ -1138,7 +1169,7 @@ has_RelationToMe_relation = { } $CHARACTER$ = { any_owned_story = { - story_type = story_peasant_affair + type = story_peasant_affair var:peasant_character = { this = root } @@ -1148,8 +1179,7 @@ has_RelationToMe_relation = { is_courtier_of = scope:relation_check OR = { AND = { - exists = inspiration - inspiration = { + inspiration ?= { inspiration_sponsor = { this = scope:relation_check } } } @@ -1166,13 +1196,9 @@ has_RelationToMe_relation = { } is_imprisoned_by = $CHARACTER$ $CHARACTER$ = { is_imprisoned_by = scope:relation_check } - AND = { - exists = host - host = $CHARACTER$ - } + host ?= $CHARACTER$ $CHARACTER$ = { - exists = host - host = scope:relation_check + host ?= scope:relation_check } is_knight_of = $CHARACTER$ AND = { diff --git a/N3OW/common/scripted_triggers/00_religious_triggers.txt b/N3OW/common/scripted_triggers/00_religious_triggers.txt index 504498ec..bd5a2031 100644 --- a/N3OW/common/scripted_triggers/00_religious_triggers.txt +++ b/N3OW/common/scripted_triggers/00_religious_triggers.txt @@ -57,9 +57,7 @@ has_strong_religious_conviction_trigger = { } is_christian_trigger = { - OR = { - faith = { religion_tag = christianity_religion } - } + faith = { religion_tag = christianity_religion } } # Not-non-XYZ triggers allow us to check for specific historical faiths whilst still defaulting to something positive for variant faiths. @@ -120,10 +118,7 @@ can_be_combatant_based_on_gender_trigger = { # Priests only fight if faith has war priests trigger_if = { limit = { - OR = { - has_trait = devoted - is_clergy = yes - } + is_clergy = yes } OR = { faith = { has_doctrine_parameter = clergy_can_fight } @@ -141,38 +136,39 @@ can_be_combatant_based_on_gender_trigger = { limit = { has_dlc_feature = diverge_culture # Can modify pillars } - OR = { - $ARMY_OWNER$ = { culture = { has_cultural_parameter = martial_custom_equal_combatant } } - AND = { - $ARMY_OWNER$ = { culture = { has_cultural_parameter = martial_custom_male_only_combatant } } - is_male = yes - } - AND = { - $ARMY_OWNER$ = { culture = { has_cultural_parameter = martial_custom_female_only_combatant } } - is_female = yes + trigger_if = { + limit = { + $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 } + } + is_female = yes + } + trigger_else = {} } trigger_else = { # Does not have the Royal Court and thus combatant is governed by faith OR = { - $ARMY_OWNER$ = { faith = { has_doctrine_parameter = combatant_can_be_either_gender_if_no_roco } } + $ARMY_OWNER$.faith = { has_doctrine_parameter = combatant_can_be_either_gender_if_no_roco } AND = { - $ARMY_OWNER$ = { faith = { has_doctrine_parameter = combatant_must_be_male_if_no_roco } } + $ARMY_OWNER$.faith = { has_doctrine_parameter = combatant_must_be_male_if_no_roco } is_male = yes } AND = { - $ARMY_OWNER$ = { faith = { has_doctrine_parameter = combatant_must_be_female_if_no_roco } } + $ARMY_OWNER$.faith = { has_doctrine_parameter = combatant_must_be_female_if_no_roco } is_female = yes } } } AND = { + # 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 } } - # 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 } # Event-based special exceptions OR = { @@ -180,18 +176,16 @@ can_be_combatant_based_on_gender_trigger = { has_character_modifier = mpo_destined_leader_modifier } AND = { - $ARMY_OWNER$ = { culture = { has_cultural_parameter = high_prowess_ignores_knight_restrictions } } - NOT = { $ARMY_OWNER$ = { culture = { has_cultural_parameter = minimum_prowess_for_knights } } } prowess >= 10 + $ARMY_OWNER$.culture = { has_cultural_parameter = high_prowess_ignores_knight_restrictions } + NOT = { $ARMY_OWNER$.culture = { has_cultural_parameter = minimum_prowess_for_knights } } } AND = { - $ARMY_OWNER$ = { - culture = { - has_cultural_parameter = high_prowess_ignores_knight_restrictions - has_cultural_parameter = minimum_prowess_for_knights - } - } prowess >= 12 + $ARMY_OWNER$.culture = { + has_cultural_parameter = high_prowess_ignores_knight_restrictions + has_cultural_parameter = minimum_prowess_for_knights + } } } } @@ -226,7 +220,7 @@ is_wrong_gender_in_faith_trigger = { faith_is_aniconic_trigger = { faith = { - OR = { + OR = { religion = religion:islam_religion has_doctrine = tenet_aniconism } @@ -236,7 +230,15 @@ faith_is_aniconic_trigger = { #Needs CHARACTER and FAITH relation_with_character_is_incestuous_in_faith_trigger = { OR = { - #doctrine_consanguinity_restricted; absolutely no family business + # doctrine_consanguinity_dynastic; not within the same descent group + AND = { + $FAITH$ = { has_doctrine = doctrine_consanguinity_dynastic } + OR = { + is_close_or_extended_family_of = $CHARACTER$ + dynasty = $CHARACTER$.dynasty + } + } + #doctrine_consanguinity_restricted; absolutely no family business AND = { $FAITH$ = { has_doctrine = doctrine_consanguinity_restricted } is_close_or_extended_family_of = $CHARACTER$ #[parents, children, siblings, grandparents, grandchildren, cousins, uncles, aunts, nephews, nieces] @@ -252,11 +254,11 @@ relation_with_character_is_incestuous_in_faith_trigger = { } #doctrine_consanguinity_aunt_nephew_and_uncle_niece; extended family is ok AND = { - $FAITH$ = { has_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece } + $FAITH$ = { has_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece } is_close_family_of = $CHARACTER$ } #doctrine_consanguinity_unrestricted; all forms of incest is acceptable - } + } } #Note: only checks from the viewpoint of current scope. Needs CHARACTER @@ -274,8 +276,7 @@ relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { relation_with_character_is_incestuous_in_faith_trigger = { CHARACTER = $CHARACTER$ FAITH = scope:check_faith } } AND = { #Liege's faith doesn't approve - exists = liege - liege = { + liege ?= { faith = { save_temporary_scope_as = check_faith } @@ -301,9 +302,9 @@ faith_allows_marriage_consanguinity_trigger = { relation_between_characters_is_sodomy_in_my_faith_trigger = { $CHARACTER_1$ = { is_male = yes } $CHARACTER_2$ = { is_male = yes } - faith = { + faith = { OR = { - has_doctrine_parameter = homosexuality_shunned + has_doctrine_parameter = homosexuality_shunned has_doctrine_parameter = homosexuality_illegal } } @@ -338,8 +339,7 @@ relation_with_character_is_sodomy_in_my_or_lieges_faith_trigger = { relation_with_character_is_sodomy_in_faith_trigger = { CHARACTER = $CHARACTER$ FAITH = scope:check_faith } } AND = { #Liege's faith doesn't approve - exists = liege - liege = { + liege ?= { faith = { save_temporary_scope_as = check_faith } @@ -364,8 +364,7 @@ murdering_character_is_kinslaying_in_my_or_same_dynasty_lieges_faith_trigger = { } trigger_if = { limit = { - exists = liege - liege = { dynasty = scope:kinslayer_me.dynasty } + liege ?= { dynasty = scope:kinslayer_me.dynasty } } liege = { faith = { @@ -376,8 +375,7 @@ murdering_character_is_kinslaying_in_my_or_same_dynasty_lieges_faith_trigger = { OR = { murdering_character_is_kinslaying_in_faith_trigger = { CHARACTER = $CHARACTER$ FAITH = scope:check_faith } #My faith doesn't approve AND = { #Liege's faith doesn't approve - exists = liege - liege = { dynasty = scope:kinslayer_me.dynasty } + liege ?= { dynasty = scope:kinslayer_me.dynasty } murdering_character_is_kinslaying_in_faith_trigger = { CHARACTER = $CHARACTER$ FAITH = scope:check_faith_liege } } } @@ -398,7 +396,7 @@ trait_is_shunned_in_faith_trigger = { } #WITCH AND = { - scope:shunned_trait_check = flag:witch + scope:shunned_trait_check = flag:witch $FAITH$ = { has_doctrine_parameter = witchcraft_shunned } } #SODOMITE @@ -417,6 +415,12 @@ trait_is_shunned_in_faith_trigger = { scope:shunned_trait_check = flag:adulterer scope:shunned_trait_check = flag:fornicator } + $GENDER_CHARACTER$ = { + trigger_if = { + limit = { exists = faith } + accepts_adultery_without_penalty_trigger = no + } + } OR = { AND = { $FAITH$ = { has_doctrine_parameter = adultery_female_shunned } @@ -510,7 +514,7 @@ trait_is_criminal_in_faith_trigger = { } } } - } + } } scoped_trait_is_criminal_in_faith_trigger = { @@ -579,7 +583,7 @@ scoped_trait_is_criminal_in_faith_trigger = { } } } - } + } } trait_is_shunned_or_criminal_in_faith_trigger = { @@ -598,8 +602,7 @@ trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = $TRAIT$ FAITH = scope:check_faith GENDER_CHARACTER = $GENDER_CHARACTER$ } } AND = { #Liege's faith doesn't approve - exists = liege - liege = { + liege ?= { faith = { save_temporary_scope_as = check_faith } @@ -715,6 +718,59 @@ has_any_criminal_trait_in_faith_trigger = { } } +has_any_shunned_trait_in_faith_trigger = { + $CHARACTER$ = { + OR = { + #KINSLAYER + AND = { + has_trait = kinslayer_3 + trait_isshunnedl_in_faith_trigger = { TRAIT = kinslayer_3 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + AND = { + has_trait = kinslayer_2 + trait_is_shunned_in_faith_trigger = { TRAIT = kinslayer_2 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + AND = { + has_trait = kinslayer_1 + trait_is_shunned_in_faith_trigger = { TRAIT = kinslayer_1 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + #WITCH + AND = { + has_trait = witch + trait_is_shunned_in_faith_trigger = { TRAIT = witch FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + #CANNIBAL + AND = { + has_trait = cannibal + trait_is_shunned_in_faith_trigger = { TRAIT = cannibal FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + #SODOMITE + AND = { + has_trait = sodomite + trait_is_shunned_in_faith_trigger = { TRAIT = sodomite FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + #DEVIANT + AND = { + has_trait = deviant + trait_is_shunned_in_faith_trigger = { TRAIT = deviant FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + AND = { + has_trait = incestuous + trait_is_shunned_in_faith_trigger = { TRAIT = incestuous FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + #ADULTERER/FORNICATOR + AND = { + has_trait = adulterer + trait_is_shunned_in_faith_trigger = { TRAIT = adulterer FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + AND = { + has_trait = fornicator + trait_is_shunned_in_faith_trigger = { TRAIT = fornicator FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + } + } +} + has_negative_attitude_towards_trait_trigger = { save_temporary_scope_value_as = { @@ -727,17 +783,17 @@ has_negative_attitude_towards_trait_trigger = { #INCESTUOUS AND = { scope:negative_status_check = flag:incestuous - any_secret = { secret_type = secret_incest } + any_secret = { type = secret_incest } } #WITCH AND = { scope:negative_status_check = flag:witch - any_secret = { secret_type = secret_witch } + any_secret = { type = secret_witch } } #CANNIBAL AND = { scope:negative_status_check = flag:cannibal - any_secret = { secret_type = secret_cannibal } + any_secret = { type = secret_cannibal } } #SODOMITE AND = { @@ -747,7 +803,7 @@ has_negative_attitude_towards_trait_trigger = { has_sexuality = bisexual } any_secret = { - secret_type = secret_homosexual + type = secret_homosexual } } #ADULTERER @@ -828,7 +884,7 @@ is_preferred_heresy = { faiths_are_in_muhakkima_islam_group = { FAITH_1 = $ORIGIN_FAITH$ FAITH_2 = $HERETICAL_FAITH$} } } - #If we're Zoroastrian, we don't want Sogdian faith in Armenia and vice versa + #If we're Zoroastrian, we don't want Sogdian faith in Armenia and vice versa AND = { religion_tag = zoroastrianism_religion OR = { @@ -838,12 +894,10 @@ is_preferred_heresy = { } #Otherwise, we don't have any special preferences. - AND = { - NOT = { - religion_tag = islam_religion - religion_tag = christianity_religion - religion_tag = zoroastrianism_religion - } + NOT = { + religion_tag = islam_religion + religion_tag = christianity_religion + religion_tag = zoroastrianism_religion } } } @@ -884,7 +938,7 @@ is_valid_heresy = { } } } - AND = { #FP3: for Zoroastrianism, Bedhin faiths are never heresies of each other + AND = { #FP3: for Zoroastrianism, Bedhin faiths are never heresies of each other religion_tag = zoroastrianism_religion NAND = { $ORIGIN_FAITH$ = { @@ -899,13 +953,11 @@ is_valid_heresy = { religion_tag = islam_religion religion_tag = judaism_religion #Eastern Faiths can shift and spread amongst each other. - AND = { - OR = { - religion_tag = buddhism_religion - religion_tag = hinduism_religion - religion_tag = jainism_religion - religion_tag = dualism_religion - } + OR = { + religion_tag = buddhism_religion + religion_tag = hinduism_religion + religion_tag = jainism_religion + religion_tag = dualism_religion } #No special requirements for Pagan religions. has_doctrine = pagan_hostility_doctrine @@ -938,7 +990,7 @@ no_heretical_hof_faith_trigger = { #Head of Faith shouldn't convert. NOT = { exists = root.religious_head } AND = { exists = root.religious_head - NOT = { this = root.religious_head } + this != root.religious_head } } } @@ -1095,7 +1147,7 @@ faiths_are_eastern_zoroastrian = { #FP3 update - so that Armenian faith (Areword } } -faiths_are_western_zoroastrian = { #FP3 update - so that Sogdian faith (Khurmazta) don't appear as a heresy in Armenia +faiths_are_western_zoroastrian = { #FP3 update - so that Sogdian faith (Khurmazta) don't appear as a heresy in Armenia OR = { $FAITH_1$ = faith:mazdayasna $FAITH_1$ = faith:gayomarthianism @@ -1164,7 +1216,7 @@ barony_is_valid_for_holy_order_lease_trigger = { limit = { NOT = { holder = $CHARACTER$ } } - holder.primary_title.tier = tier_barony + holder.primary_title.tier = tier_barony } NOT = { is_leased_out = yes @@ -1236,15 +1288,14 @@ is_infidel_trigger = { } valid_demand_conversion_conditions_trigger = { - scope:recipient = { is_busy_in_events_localised = yes } - scope:recipient = { NOT = { has_strong_hook = scope:actor } } - scope:recipient = { NOT = { has_trait = devoted } } - scope:recipient = { NOT = { has_trait = order_member } } scope:recipient = { - NOT = { is_imprisoned_by = scope:actor } - } - scope:recipient = { - NOT = { is_at_war_with = scope:actor } + NOR = { + has_strong_hook = scope:actor + has_trait = devoted + has_trait = order_member + is_imprisoned_by = scope:actor + is_at_war_with = scope:actor + } } scope:actor = { trigger_if = { @@ -1257,8 +1308,6 @@ valid_demand_conversion_conditions_trigger = { domicile = { has_domicile_parameter = camp_enable_conversion } } } - } - scope:actor = { NAND = { has_trait = nomadic_philosophy has_trait = zealous @@ -1268,13 +1317,13 @@ valid_demand_conversion_conditions_trigger = { custom_description = { text = "is_head_of_religion" subject = scope:recipient - NOT = { scope:recipient.faith.religious_head = scope:recipient } + scope:recipient.faith.religious_head != scope:recipient } - custom_description = { text = "is_protected_via_contract" subject = scope:recipient - NAND = { # Vassal Contract forbids meddling by liege + # Vassal Contract forbids meddling by liege + NAND = { exists = scope:recipient.liege scope:recipient.liege = scope:actor scope:recipient = { @@ -1283,19 +1332,18 @@ valid_demand_conversion_conditions_trigger = { } } } - trigger_if = { limit = { - scope:recipient = { + scope:recipient = { AND = { has_variable = cannot_be_converted_by_value - var:cannot_be_converted_by_value = scope:actor + var:cannot_be_converted_by_value = scope:actor } } } custom_tooltip = { text = promised_to_not_convert_character - scope:recipient = { + scope:recipient = { NOR = { has_variable = cannot_be_converted_by_value var:cannot_be_converted_by_value = scope:actor @@ -1303,13 +1351,78 @@ valid_demand_conversion_conditions_trigger = { } } } - custom_tooltip = { text = cannot_take_overt_hostile_actions_against_diarch.tt NOT = { scope:recipient ?= scope:actor.diarch } } } +valid_ask_for_conversion_conditions_trigger = { # Deliberate variant of the above, so you can ask your diarch nicely to convert if you made a new faith + scope:recipient = { + NOR = { + has_strong_hook = scope:actor + has_trait = devoted + has_trait = order_member + is_imprisoned_by = scope:actor + is_at_war_with = scope:actor + } + } + scope:actor = { + trigger_if = { + limit = { + government_has_flag = government_is_landless_adventurer + scope:recipient = { is_courtier_of = scope:actor } + } + custom_tooltip = { + text = valid_demand_conversion_conditions_trigger.tt.domicile_requires_shrine + domicile = { has_domicile_parameter = camp_enable_conversion } + } + } + NAND = { + has_trait = nomadic_philosophy + has_trait = zealous + } + } + + custom_description = { + text = "is_head_of_religion" + subject = scope:recipient + scope:recipient.faith.religious_head != scope:recipient + } + custom_description = { + text = "is_protected_via_contract" + subject = scope:recipient + # Vassal Contract forbids meddling by liege + NAND = { + exists = scope:recipient.liege + scope:recipient.liege = scope:actor + scope:recipient = { + is_ruler = yes + vassal_contract_has_flag = religiously_protected + } + } + } + trigger_if = { + limit = { + scope:recipient = { + AND = { + has_variable = cannot_be_converted_by_value + var:cannot_be_converted_by_value = scope:actor + } + } + } + custom_tooltip = { + text = promised_to_not_convert_character + scope:recipient = { + NOR = { + has_variable = cannot_be_converted_by_value + var:cannot_be_converted_by_value = scope:actor + } + } + } + } +} + highgod_is_passive_trigger = { OR = { religion_tag = buddhism_religion @@ -1374,13 +1487,7 @@ can_reincarnate_trigger = { is_reincarnation_trigger = { can_become_reincarnation_trigger = yes - OR = { - AND = { - has_variable = reincarnation_of - - } - - } + has_variable = reincarnation_of } # Used in faith scope, COUNT is number of faiths to at least have and CHARACTER is who must own them @@ -1416,6 +1523,7 @@ num_realm_holy_sites_faithful_holders = { OR = { is_holy_site_controlled_by = $CHARACTER$ $CHARACTER$.confederation ?= { + is_house_based = no # any_confederation_member is not performant for house blocs any_confederation_member = { scope:current_holy_site = { is_holy_site_controlled_by = prev @@ -1438,7 +1546,7 @@ can_create_temporal_head_of_faith_title_trigger = { root = { piety_level >= high_piety_level } trigger_if = { limit = { - root = { is_independent_ruler = no } + root = { top_liege != this } } custom_description = { text = cannot_create_hof_title_at_or_above_liege_tier @@ -1473,7 +1581,7 @@ can_afford_create_head_of_faith_title_cost_trigger = { has_doctrine = muhammad_succession_sunni_doctrine has_doctrine = muhammad_succession_shia_doctrine } - } + } } trigger_if = { limit = { NOT = { has_trait = sayyid } } @@ -1544,7 +1652,7 @@ shared_faith_or_hof_trigger = { #Triggers that applies to both Monastery or Holy Order requirements can_take_religious_vows_trigger = { can_take_religious_vows_disregard_marriage_trigger = yes - + #Do they have the "wrong" marriage type? NOR = { custom_description = { @@ -1566,8 +1674,7 @@ can_take_religious_vows_trigger = { custom_description = { text = matrilinear_betrothal subject = scope:recipient - exists = betrothed - betrothed = { + betrothed ?= { is_female = yes matrilinear_betrothal = yes } @@ -1575,8 +1682,7 @@ can_take_religious_vows_trigger = { custom_description = { text = patrilinear_betrothal subject = scope:recipient - exists = betrothed - betrothed = { + betrothed ?= { is_male = yes patrilinear_betrothal = yes } @@ -1637,6 +1743,14 @@ does_religion_exist_in_world_region_trigger = { # The most efficient way I could faith.religion = $RELIGION$ } } + trigger_else_if = { + limit = { location = { geographical_region = world_asia } } + any_county_in_region = { + region = world_asia + faith.religion = $RELIGION$ + } + } + trigger_else_if = { # We group two smaller world regions into one limit = { location = { @@ -1725,7 +1839,7 @@ is_theological_character_trigger = { government_has_flag = government_is_theocracy } - } + } } would_be_sinful_adulterer_trigger = { @@ -1747,10 +1861,28 @@ has_tolerant_faith_or_culture_trigger = { OR = { faith = { 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 = { + faith = { has_doctrine = tenet_adaptive } + faith = { has_doctrine = unreformed_faith_doctrine } + faith = { has_doctrine = doctrine_pluralism_pluralistic } + culture = { has_cultural_tradition = tradition_religion_blending } + culture = { has_cultural_tradition = tradition_tgp_religious_hospitality } + } +} + +faith_is_open_minded_trigger = { + OR = { + has_doctrine = tenet_adaptive + has_doctrine = doctrine_pluralism_pluralistic + } +} + is_mainstream_jewish_faith = { religion = religion:judaism_religion NOT = { @@ -1887,6 +2019,24 @@ has_holy_building = { has_building_or_higher = konark_temple_01 has_building_or_higher = wawel_cathedral_01 has_building_or_higher = vatapi_caves_01 + # TGP + has_building_or_higher = holy_site_buddhist_grand_temple_01 + has_building_or_higher = holy_site_japanese_temple_01 + has_building_or_higher = holy_site_chinese_temple_01 + has_building_or_higher = holy_site_se_asia_pagan_temple_01 + has_building_or_higher = kofuku_ji_01 + has_building_or_higher = enryaku_ji_01 + has_building_or_higher = hwangnyongsa_01 + has_building_or_higher = besakih_temple_01 + has_building_or_higher = dau_temple_01 + has_building_or_higher = hanging_temple_01 + has_building_or_higher = liuhe_pagoda_01 + has_building_or_higher = pagoda_of_fogong_temple_01 + has_building_or_higher = giant_wild_goose_pagoda_01 + has_building_or_higher = maoshan_academy_01 + has_building_or_higher = tiantai_monasteries_01 + has_building_or_higher = jizu_shan_temples_01 + has_building_or_higher = nanhua_temple_01 } } @@ -1901,3 +2051,118 @@ invalid_for_heresy_events = { } } +is_faith_dominant_gender = { + OR = { + AND = { + is_male = yes + faith = { + OR = { + has_doctrine_parameter = male_dominated_law + has_doctrine_parameter = gender_equal_law + } + } + } + AND = { + is_female = yes + faith = { + OR = { + has_doctrine_parameter = female_dominated_law + has_doctrine_parameter = gender_equal_law + } + } + } + } +} + +religion_is_broadly_asian_trigger = { + OR = { + religion_is_east_asian_trigger = yes + broadly_dharmic_trigger = yes + broadly_chinese_religion_trigger = yes + } +} + +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 + } +} + +broadly_dharmic_trigger = { + OR = { + faith.religion = religion:buddhism_religion + faith.religion = religion:hinduism_religion + faith.religion = religion:jainism_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 + } +} + +south_east_asian_pagan_trigger = { + OR = { + faith.religion = religion:aluk_religion + faith.religion = religion:dayawism_religion + faith.religion = religion:hantuism_religion + faith.religion = religion:kaharingan_religion + faith.religion = religion:tolotang_religion + faith.religion = religion:biliku_religion + } +} + +broadly_jungle_dwelling_trigger = { + culture = { + OR = { + has_cultural_pillar = heritage_austronesian + has_cultural_pillar = heritage_burman + has_cultural_pillar = heritage_tai + has_cultural_pillar = heritage_hmongic + has_cultural_pillar = heritage_dravidian + has_cultural_pillar = heritage_malayic + has_cultural_pillar = heritage_mon_khmer + has_cultural_pillar = heritage_viet + has_cultural_pillar = heritage_indo_aryan + } + } +} + +broadly_chinese_religion_trigger = { + OR = { + faith.religion = religion:taoism_religion + faith.religion = religion:confucianism_religion + } +} + +broadly_mainland_east_asian_heritage_trigger = { + culture = { + OR = { + has_cultural_pillar = heritage_chinese + has_cultural_pillar = heritage_korean + has_cultural_pillar = heritage_buyeo + has_cultural_pillar = heritage_qiangic + has_cultural_pillar = heritage_viet + } + } +} + +broadly_japanese_island_heritage_trigger = { + culture = { + OR = { + has_cultural_pillar = heritage_japonic + has_cultural_pillar = heritage_ainuic + } + } +} diff --git a/N3OW/common/scripted_triggers/00_roaming_activity_triggers.txt b/N3OW/common/scripted_triggers/00_roaming_activity_triggers.txt index 38a12185..b57bc6be 100644 --- a/N3OW/common/scripted_triggers/00_roaming_activity_triggers.txt +++ b/N3OW/common/scripted_triggers/00_roaming_activity_triggers.txt @@ -70,7 +70,7 @@ roaming_activity_monsoon_trigger = { } roaming_activity_special_guest_trigger = { - NOT = { this = scope:host } + this != scope:host court_owner ?= scope:host is_healthy = yes is_available = yes diff --git a/N3OW/common/scripted_triggers/00_romance_and_seduction_triggers.txt b/N3OW/common/scripted_triggers/00_romance_and_seduction_triggers.txt index 25e60ade..4d6f570b 100644 --- a/N3OW/common/scripted_triggers/00_romance_and_seduction_triggers.txt +++ b/N3OW/common/scripted_triggers/00_romance_and_seduction_triggers.txt @@ -35,26 +35,14 @@ ###SEDUCE SCHEME TRIGGERS### use_seduce_secrecy_trigger = { - #TODO_CD_EP3_ERCC; this is breaking in a confusing way, with the secrecy no longer showing in the scheme start widget. Original version preserved below, not sure why it doesn't work. + $OWNER$ ?= { is_alive = yes } + $TARGET$ ?= { is_alive = yes } $TARGET$ = { NOR = { is_consort_of = $OWNER$ is_courtier_of = $OWNER$ } } - #$TARGET$ = { - #NOR = { - #is_consort_of = $OWNER$ - #is_courtier_of = $OWNER$ - #is_ruler = yes - #} - #exists = liege - #OR = { - #is_consort_of = $TARGET$.liege - #is_close_family_of = $TARGET$.liege - #house = $TARGET$.house - #} - #} } @@ -370,9 +358,9 @@ might_cheat_on_partner_trigger = { has_relation_lover = $PARTNER$ is_consort_of = $PARTNER$ # Includes both spouses and concubines } - # Additionally, in faiths with the Polyamory doctrine, extramarital relationships aren't considered to be cheating on partners. - NOT = { faith = { has_doctrine_parameter = no_unfaithfulness_penalty_active } } + # Additionally, some cultures do not have scruples about extramarital relationships. + accepts_adultery_without_penalty_trigger = no } NOT = { has_trait = loyal } # Loyal people never cheat @@ -498,7 +486,7 @@ dislikes_partner_cheating_trigger = { OR = { AND = { has_relation_soulmate = $PARTNER$ # Soulmates are exclusive - NOT = { faith = { has_doctrine_parameter = no_unfaithfulness_penalty_active } } + accepts_adultery_without_penalty_trigger = no } AND = { # Feels slighted is_consort_of = $PARTNER$ @@ -529,7 +517,7 @@ dislikes_partner_cheating_trigger = { #Would a soulmate expect you to be exclusively with them? soulmate_relation_is_exclusive_trigger = { - NOT = { faith = { has_doctrine_parameter = no_unfaithfulness_penalty_active } } + accepts_adultery_without_penalty_trigger = no } sexually_liberal_trigger = { @@ -573,7 +561,7 @@ eligible_for_affairs_trigger = { has_trait = celibate #Technically (and, historically, frequently) eunuchs can still have affairs, they just aren't able to impregnate. OR = { - faith = { has_doctrine_parameter = no_unfaithfulness_penalty_active } + accepts_adultery_without_penalty_trigger = yes trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = adulterer FAITH = root.faith @@ -594,7 +582,7 @@ freely_accepts_sodomy_with_trigger = { #Will ignore sodomy consequences (because NOT = { relation_with_character_is_sodomy_in_my_or_lieges_faith_trigger = { CHARACTER = $CHARACTER$ } } has_trait = deviant has_trait = sodomite - any_secret = { secret_type = secret_homosexual } + any_secret = { type = secret_homosexual } } } @@ -766,3 +754,14 @@ possible_pregnancy_after_sex_with_character_trigger = { } } } + +accepts_adultery_without_penalty_trigger = { + OR = { + faith = { has_doctrine_parameter = no_unfaithfulness_penalty_active } + culture = { has_cultural_parameter = adultery_always_accepted } + AND = { + government_has_flag = government_is_mandala + house ?= { has_house_power_parameter = aspect_of_creation } + } + } +} diff --git a/N3OW/common/scripted_triggers/00_scheme_befriend_triggers.txt b/N3OW/common/scripted_triggers/00_scheme_befriend_triggers.txt index d4c09b55..29781651 100644 --- a/N3OW/common/scripted_triggers/00_scheme_befriend_triggers.txt +++ b/N3OW/common/scripted_triggers/00_scheme_befriend_triggers.txt @@ -1,52 +1,49 @@ -#Scripted triggers relating to the Befriend Scheme - -##################################################################### -# TRIGGER LIST -##################################################################### -# !!! Remember to add all new triggers with a short description here !!! - -#befriend_target_is_close_to_owner_trigger <-Indicates someone is close to you already - -###################################################################### -# TRIGGERS -###################################################################### - -befriend_target_is_close_to_owner_trigger = { - OR = { - is_close_or_extended_family_of = scope:target - is_consort_of = scope:target - is_employer_of = scope:target - } -} - -befriend_owner_is_close_to_target_trigger = { - OR = { - is_close_or_extended_family_of = scope:owner - is_consort_of = scope:owner - court_owner = scope:owner - } -} - -befriend_scope_is_close_to_target_trigger = { - OR = { - is_close_or_extended_family_of = scope:target - is_consort_of = scope:target - has_relation_friend = scope:target - AND = { - OR = { - court_owner = scope:target - AND = { - exists = liege - liege = scope:target - } - any_vassal = { - this = scope:target - } - } - reverse_opinion = { - target = scope:target - value > 30 - } - } - } -} +#Scripted triggers relating to the Befriend Scheme + +##################################################################### +# TRIGGER LIST +##################################################################### +# !!! Remember to add all new triggers with a short description here !!! + +#befriend_target_is_close_to_owner_trigger <-Indicates someone is close to you already + +###################################################################### +# TRIGGERS +###################################################################### + +befriend_target_is_close_to_owner_trigger = { + OR = { + is_close_or_extended_family_of = scope:target + is_consort_of = scope:target + is_employer_of = scope:target + } +} + +befriend_owner_is_close_to_target_trigger = { + OR = { + is_close_or_extended_family_of = scope:owner + is_consort_of = scope:owner + court_owner = scope:owner + } +} + +befriend_scope_is_close_to_target_trigger = { + OR = { + is_close_or_extended_family_of = scope:target + is_consort_of = scope:target + has_relation_friend = scope:target + AND = { + OR = { + court_owner = scope:target + liege ?= scope:target + any_vassal = { + this = scope:target + } + } + reverse_opinion = { + target = scope:target + value > 30 + } + } + } +} diff --git a/N3OW/common/scripted_triggers/00_scheme_triggers.txt b/N3OW/common/scripted_triggers/00_scheme_triggers.txt index dad8e2ca..adf08a91 100644 --- a/N3OW/common/scripted_triggers/00_scheme_triggers.txt +++ b/N3OW/common/scripted_triggers/00_scheme_triggers.txt @@ -67,9 +67,7 @@ agent_valid_to_be_discovered_by_spymaster = { limit = { exists = scope:target.court_owner.cp:councillor_spymaster } - NOT = { - this = scope:target.court_owner.cp:councillor_spymaster - } + this != scope:target.court_owner.cp:councillor_spymaster } NOT = { has_character_flag = free_to_scheme @@ -188,7 +186,7 @@ is_good_familial_murder_target_trigger = { } } any_heir_title = { - NOT = { holder = root } + holder != root tier >= root.highest_held_title_tier place_in_line_of_succession = { target = root @@ -214,23 +212,15 @@ build_murder_targets_trigger = { trigger_if = { limit = { root = { - ai_honor <= low_positive_ai_value - can_start_scheme = { - target_character = prev - type = murder + trigger_if = { + limit = { + has_relation_nemesis = prev + } + ai_honor <= medium_positive_ai_value + } + trigger_else = { + ai_honor <= low_positive_ai_value } - } - } - add_to_temporary_list = murder_targets - } - } - any_relation = { # Same with nemeses - type = nemesis - count = all - trigger_if = { - limit = { - root = { - ai_honor <= medium_positive_ai_value can_start_scheme = { target_character = prev type = murder @@ -270,16 +260,16 @@ build_murder_targets_trigger = { trigger_if = { # Greedy people want to murder their liege's high aptitude tax collector... limit = { ai_greed >= low_positive_ai_value - is_independent_ruler = no - exists = liege - liege = { + top_liege != this + government_has_flag = government_is_clan + liege ?= { any_tax_collector = { any_tax_collector_vassal = { this = root } - check_tax_collector_aptitude = { - CHARACTER = this - VALUE >= 4 + tax_collector_aptitude = { + target = clan_tax_slot + value >= 4 } add_to_temporary_list = murder_targets } @@ -322,8 +312,7 @@ build_murder_targets_trigger = { trigger_if = { # Certain vassals will plot against their liege under certain conditions limit = { highest_held_title_tier > tier_barony - exists = liege - liege = { + liege ?= { tyranny >= medium_tyranny } opinion = { @@ -338,10 +327,10 @@ build_murder_targets_trigger = { } trigger_if = { # Murdering troublesome claimants is something you want to do... limit = { - is_playable_character = yes + is_landed = yes primary_title.tier >= tier_duchy any_targeting_faction = { - faction_is_type = claimant_faction + faction_type = claimant_faction special_character = { add_to_temporary_list = murder_targets } @@ -350,10 +339,10 @@ build_murder_targets_trigger = { } trigger_if = { # Paranoid characters want to murder claimants to their titles limit = { - has_trait = paranoid ai_compassion <= low_negative_ai_value ai_rationality <= 0 - is_playable_character = yes + is_landed = yes + has_trait = paranoid primary_title.tier >= tier_duchy any_held_title = { any_claimant = { @@ -365,11 +354,13 @@ build_murder_targets_trigger = { any_spouse = { # Murder infertile spouses if you've yet to have an heir (and you're heartless...) trigger_if = { limit = { + fertility < 0.1 + is_ai = yes root = { - is_playable_character = yes ai_compassion <= 0 ai_honor <= 0 fertility > 0.1 + is_playable_character = yes NOT = { any_child = { is_heir_of = root @@ -380,8 +371,6 @@ build_murder_targets_trigger = { type = murder } } - is_ai = yes - fertility < 0.1 add_to_temporary_list = murder_targets } } @@ -399,10 +388,13 @@ scheme_is_still_valid_trigger = { can_use_befriend_scheme_trigger = { OR = { + AND = { + house ?= { has_house_head_parameter = unlock_befriend_scheme } + is_house_head = yes + } has_perk = befriend_perk AND = { - exists = dynasty - dynasty = { + dynasty ?= { has_dynasty_perk = fp1_adventure_legacy_5 } target_is_vassal_or_below = $TARGET$ @@ -640,33 +632,18 @@ would_actor_consider_dramatic_enticement_trigger = { actor_has_valid_de_jure_enticement_county_trigger = { holder = scope:actor tier = tier_county - NOT = { this = scope:actor.capital_county } + this != scope:actor.capital_county } actor_has_valid_claimed_enticement_county_trigger = { holder = scope:actor tier = tier_county - NOT = { this = scope:actor.capital_county } + this != scope:actor.capital_county } ################################################## # Can Add Agent to Scheme Triggers -is_valid_agent_standard_trigger = { - # The usual standard restrictions. - is_adult = yes - is_imprisoned = no - # Can't be an existing agent in any scheme. - save_temporary_scope_as = char_temp - scope:owner = { - NOT = { - any_scheme = { - any_scheme_agent_character = { this = scope:char_temp } - } - } - } -} - char_can_fit_into_scheme_trigger = { save_temporary_scope_as = char_temp $SCHEME$ = { @@ -682,7 +659,6 @@ char_can_fit_into_scheme_trigger = { # Scheme APA Triggers scheme_apa_apply_modifier_plus_secrecy_trigger = { - #TODO_CD_EP3_ERCC; ask for scheme secrecy trigger. scheme_apa_apply_modifier_trigger = { MODIFIER = $MODIFIER$ } } @@ -916,6 +892,23 @@ scheme_countermeasure_access_t4_withdraw_from_view_trigger = { has_trait_with_flag = trait_unlocks_t4_withdraw_from_view } +# Can this character access the higher tiers of the Bribe Officials countermeasure? +scheme_countermeasure_access_t2_bribe_officials_trigger = { + OR = { + culture = { has_cultural_parameter = cultrad_unlocks_t2_countermeasures } + domicile ?= { has_domicile_parameter = estate_improve_political_scheme_countermeasure } + } +} +scheme_countermeasure_access_t3_bribe_officials_trigger = { + AND = { + culture = { has_cultural_parameter = cultrad_unlocks_t2_countermeasures } + domicile ?= { has_domicile_parameter = estate_improve_political_scheme_countermeasure } + } +} +scheme_countermeasure_access_t4_bribe_officials_trigger = { + always = no +} + scheme_generic_ai_blocker_trigger = { any_scheme = { OR = { diff --git a/N3OW/common/scripted_triggers/00_scripted_rule_triggers.txt b/N3OW/common/scripted_triggers/00_scripted_rule_triggers.txt index c580db2f..2378bb32 100644 --- a/N3OW/common/scripted_triggers/00_scripted_rule_triggers.txt +++ b/N3OW/common/scripted_triggers/00_scripted_rule_triggers.txt @@ -56,17 +56,17 @@ can_raid_trigger = { faith = { has_doctrine_parameter = holy_wars_forbidden } government_has_flag = government_is_landless_adventurer } - # But not for Nomads + # But not for Nomads or Wanua government_has_flag = government_is_nomadic + government_has_flag = government_is_wanua } } # Here so that you can plug in whatever dynasty modifiers you want without overwriting the whole scripted rule trigger. can_raid_dynasty_modifiers_that_enable_raiding_overseas_list_trigger = { - OR = { - # Yes, I realise the OR is redundant till someone else puts something in here. Shoosh. + # Yes, I realise the OR is redundant till someone else puts something in here. Shoosh. has_dynasty_modifier = fp1_legacy_of_piracy_modifier - } + } can_raid_dynasty_modifiers_that_enable_raiding_overland_list_trigger = { OR = { @@ -128,6 +128,8 @@ can_raid_across_water_trigger = { dynasty ?= { can_raid_dynasty_modifiers_that_enable_raiding_overseas_list_trigger = yes } # House logic. house ?= { can_raid_house_modifiers_that_enable_raiding_overseas_list_trigger = yes } + # Can raid overseas by government rules + government_has_flag = government_enables_naval_raiding #Is Hereward. has_trait = the_wake } diff --git a/N3OW/common/scripted_triggers/00_scripted_triggers.txt b/N3OW/common/scripted_triggers/00_scripted_triggers.txt index 66dd9045..42231fb7 100644 --- a/N3OW/common/scripted_triggers/00_scripted_triggers.txt +++ b/N3OW/common/scripted_triggers/00_scripted_triggers.txt @@ -96,7 +96,7 @@ is_cannibal_trigger = { OR = { has_trait = cannibal any_secret = { - secret_type = secret_cannibal + type = secret_cannibal } } } @@ -105,7 +105,7 @@ is_murderer_trigger = { OR = { has_trait = murderer any_secret = { - secret_type = secret_murder + type = secret_murder } } } @@ -144,8 +144,7 @@ tier_or_related_liege_tier_equal_trigger = { OR = { highest_held_title_tier = $TIER$ AND = { - exists = liege - liege = { highest_held_title_tier = $TIER$ } + liege ?= { highest_held_title_tier = $TIER$ } OR = { is_close_family_of = this.liege is_spouse_of = this.liege @@ -158,8 +157,7 @@ tier_or_related_liege_tier_greater_or_equal_trigger = { OR = { highest_held_title_tier >= $TIER$ AND = { - exists = liege - liege = { highest_held_title_tier >= $TIER$ } + liege ?= { highest_held_title_tier >= $TIER$ } OR = { is_close_family_of = this.liege is_spouse_of = this.liege @@ -174,9 +172,8 @@ torture_secret_trigger = { is_blackmailable_secret_trigger = { BLACKMAILER = scope:actor PARTICIPANT = $PARTICIPANT$ } secret_is_always_interesting_trigger = yes } - NAND = { - exists = secret_target - secret_target = scope:recipient + NOT = { + secret_target ?= scope:recipient } } @@ -199,8 +196,7 @@ has_interesting_portrait_altering_trait_trigger = { is_dangerous_faction_trigger = { OR = { AND = { - exists = faction_leader - faction_leader = { is_ai = no } # For now human factions are always dangerous + faction_leader ?= { is_ai = no } # For now human factions are always dangerous } AND = { @@ -222,7 +218,7 @@ basic_allowed_to_imprison_character_trigger = { #Only to be used in is_shown for is_foreign_court_or_pool_guest_of = scope:allowed_imprisoner AND = { # EP3 EVICTION - is_landless_adventurer = yes + has_government = landless_adventurer_government reverse_has_opinion_modifier = { target = scope:allowed_imprisoner modifier = eviction_ignored_opinion @@ -257,7 +253,7 @@ advanced_allowed_to_imprison_character_trigger = { NOT = { exists = var:hostage_travelling_to_warden } } trigger_if = { - limit = { is_landless_adventurer = yes } + limit = { has_government = landless_adventurer_government } scope:allowed_imprisoner = { is_landed = yes } reverse_has_opinion_modifier = { target = scope:allowed_imprisoner @@ -292,7 +288,7 @@ can_be_granted_titles_by = { #This is set up with trigger-ifs to allow for nice limit = { is_ruler = no #Rulers can always get additional titles is_theocratic_lessee = no #Theocratic lessees use other gender checks - NOT = { $RULER$ = { government_has_flag = government_is_administrative } } + NOT = { $RULER$ = { government_allows = administrative } } NOT = { $RULER$.faith = { has_dominant_ruling_gender = scope:title_grantee @@ -318,7 +314,7 @@ can_be_granted_titles_by = { #This is set up with trigger-ifs to allow for nice is_ruler = no #Rulers can always get additional titles is_theocratic_lessee = no #Theocratic lessees use other gender checks $RULER$ = { - government_has_flag = government_is_administrative + government_allows = administrative NOT = { has_realm_law = equal_law } } } @@ -492,3 +488,128 @@ has_purchased_truce_with_char = { this = $TARGET$ } } + +has_different_clothing_gfx = { + culture = { + switch = { + trigger = has_clothing_gfx + byzantine_clothing_gfx = { + NOT = { + $CHAR$.culture = { has_clothing_gfx = byzantine_clothing_gfx } + } + } + indian_clothing_gfx = { + NOT = { + $CHAR$.culture = { has_clothing_gfx = indian_clothing_gfx } + } + } + mena_clothing_gfx = { + NOT = { + $CHAR$.culture = { has_clothing_gfx = mena_clothing_gfx } + } + } + african_clothing_gfx = { + NOT = { + $CHAR$.culture = { has_clothing_gfx = african_clothing_gfx } + } + } + northern_clothing_gfx = { + NOT = { + $CHAR$.culture = { has_clothing_gfx = northern_clothing_gfx } + } + } + iberian_muslim_clothing_gfx = { + NOT = { + $CHAR$.culture = { has_clothing_gfx = iberian_muslim_clothing_gfx } + } + } + iberian_christian_clothing_gfx = { + NOT = { + $CHAR$.culture = { has_clothing_gfx = iberian_christian_clothing_gfx } + } + } + mongol_clothing_gfx = { + NOT = { + $CHAR$.culture = { has_clothing_gfx = mongol_clothing_gfx } + } + } + fp1_norse_clothing_gfx = { + NOT = { + $CHAR$.culture = { has_clothing_gfx = fp1_norse_clothing_gfx } + } + } + western_clothing_gfx = { + NOT = { + $CHAR$.culture = { has_clothing_gfx = western_clothing_gfx } + } + } + dde_hre_clothing_gfx = { + NOT = { + $CHAR$.culture = { has_clothing_gfx = dde_hre_clothing_gfx } + } + } + dde_abbasid_clothing_gfx = { + NOT = { + $CHAR$.culture = { has_clothing_gfx = dde_abbasid_clothing_gfx } + } + } + iranian_clothing_gfx = { + NOT = { + $CHAR$.culture = { has_clothing_gfx = iranian_clothing_gfx } + } + } + turkic_clothing_gfx = { + NOT = { + $CHAR$.culture = { has_clothing_gfx = turkic_clothing_gfx } + } + } + afr_berber_clothing_gfx = { + NOT = { + $CHAR$.culture = { has_clothing_gfx = afr_berber_clothing_gfx } + } + } + west_slavic_clothing_gfx = { + NOT = { + $CHAR$.culture = { has_clothing_gfx = west_slavic_clothing_gfx } + } + } + french_clothing_gfx = { + NOT = { + $CHAR$.culture = { has_clothing_gfx = french_clothing_gfx } + } + } + east_slavic_clothing_gfx = { + NOT = { + $CHAR$.culture = { has_clothing_gfx = east_slavic_clothing_gfx } + } + } + sami_clothing_gfx = { + NOT = { + $CHAR$.culture = { has_clothing_gfx = sami_clothing_gfx } + } + } + ugro_permian_clothing_gfx = { + NOT = { + $CHAR$.culture = { has_clothing_gfx = ugro_permian_clothing_gfx } + } + } + } + } +} + +current_date_is_start_date_trigger = { + OR = { + AND = { + game_start_date = 867.1.1 + current_date = 867.1.1 + } + AND = { + game_start_date = 1066.09.15 + current_date = 1066.09.15 + } + AND = { + game_start_date = 1178.10.1 + current_date = 1178.10.1 + } + } +} diff --git a/N3OW/common/scripted_triggers/00_secret_triggers.txt b/N3OW/common/scripted_triggers/00_secret_triggers.txt index 65bb3b77..436142d0 100644 --- a/N3OW/common/scripted_triggers/00_secret_triggers.txt +++ b/N3OW/common/scripted_triggers/00_secret_triggers.txt @@ -106,7 +106,7 @@ is_blackmailable_secret_trigger = { #Should not include is known limit = { secret_type = secret_lover } custom_description = { text = cannot_blackmail_own_lover_secret - NOT = { secret_target = scope:is_blackmailable_secret_blackmailer } + secret_target != scope:is_blackmailable_secret_blackmailer } } trigger_if = { @@ -160,9 +160,7 @@ secret_is_always_interesting_trigger = { #Even if they can't be used for blackma secret_is_incriminating_trigger = { OR = { exists = secret_target - any_secret_participant = { - count >= 1 - } + any_secret_participant = { } } OR = { AND = { @@ -287,7 +285,7 @@ give_random_likely_secret_murder_attempt_victim_trigger = { scope:murderer = { NOT = { any_secret = { - secret_type = secret_murder_attempt + type = secret_murder_attempt secret_target = scope:victim } } @@ -480,7 +478,7 @@ random_blackmailable_secret_can_be_added_simple_trigger = { scope:target = { NOT = { any_secret = { - secret_type = secret_deviant + type = secret_deviant } } } @@ -494,7 +492,7 @@ random_blackmailable_secret_can_be_added_simple_trigger = { scope:target = { NOT = { any_secret = { - secret_type = secret_homosexual + type = secret_homosexual } } } @@ -508,7 +506,7 @@ random_blackmailable_secret_can_be_added_simple_trigger = { scope:target = { NOT = { any_secret = { - secret_type = secret_cannibal + type = secret_cannibal } } } @@ -522,7 +520,7 @@ random_blackmailable_secret_can_be_added_simple_trigger = { scope:target = { NOT = { any_secret = { - secret_type = secret_non_believer + type = secret_non_believer } } } @@ -536,7 +534,7 @@ random_blackmailable_secret_can_be_added_simple_trigger = { scope:target = { NOT = { any_secret = { - secret_type = secret_incest + type = secret_incest } } } @@ -550,7 +548,7 @@ random_blackmailable_secret_can_be_added_simple_trigger = { scope:target = { NOT = { any_secret = { - secret_type = secret_witch + type = secret_witch } } } @@ -564,7 +562,7 @@ random_blackmailable_secret_can_be_added_simple_trigger = { scope:target = { NOT = { any_secret = { - secret_type = secret_crypto_religionist + type = secret_crypto_religionist } } } @@ -583,7 +581,10 @@ spymaster_task_courtier_valid_for_hook_fabrication_trigger = { } root = { any_scheme = { - scheme_target_character = scope:target_character + OR = { + scheme_target_character ?= scope:target_character + scheme_target_title ?= scope:target_character.primary_title + } scheme_is_character_agent = scope:target_check } } diff --git a/N3OW/common/scripted_triggers/00_secret_type_triggers.txt b/N3OW/common/scripted_triggers/00_secret_type_triggers.txt index fa39ab5f..5f64410f 100644 --- a/N3OW/common/scripted_triggers/00_secret_type_triggers.txt +++ b/N3OW/common/scripted_triggers/00_secret_type_triggers.txt @@ -142,9 +142,11 @@ secret_cannibal_is_criminal_trigger = { # SECRET LOVER secret_lover_is_valid_trigger = { $TARGET$ = { + is_alive = yes save_temporary_scope_as = target } $OWNER$ = { + is_alive = yes has_relation_lover = scope:target NOT = { is_consort_of = scope:target } } @@ -155,20 +157,17 @@ secret_lover_is_criminal_trigger = { $TARGET$ = { save_temporary_scope_as = criminal_partner } #Different name to the scope in the shunned trigger, to prevent issues $OWNER$ = { OR = { - #Female adultery criminal - AND = { - is_female = yes - OR = { - faith = { has_doctrine_parameter = adultery_female_crime } - any_liege_or_above = { faith = { has_doctrine_parameter = adultery_female_crime } } - } + # Adultery criminal + trait_is_criminal_in_faith_trigger = { + FAITH = faith + TRAIT = adulterer + GENDER_CHARACTER = $OWNER$ } - #Male adultery criminal - AND = { - is_male = yes - OR = { - faith = { has_doctrine_parameter = adultery_male_crime } - any_liege_or_above = { faith = { has_doctrine_parameter = adultery_male_crime } } + any_liege_or_above = { + trait_is_criminal_in_faith_trigger = { + FAITH = faith + TRAIT = adulterer + GENDER_CHARACTER = $OWNER$ } } #Sodomy criminal @@ -189,20 +188,17 @@ secret_lover_is_shunned_trigger = { $OWNER$ = { save_temporary_scope_as = lover_owner OR = { - #Female adultery shunned - AND = { - is_female = yes - OR = { - faith = { has_doctrine_parameter = adultery_female_shunned } - any_liege_or_above = { faith = { has_doctrine_parameter = adultery_female_shunned } } - } + #Adultery shunned + trait_is_shunned_in_faith_trigger = { + FAITH = faith + TRAIT = adulterer + GENDER_CHARACTER = scope:lover_owner } - #Male adultery shunned - AND = { - is_male = yes - OR = { - faith = { has_doctrine_parameter = adultery_male_shunned } - any_liege_or_above = { faith = { has_doctrine_parameter = adultery_male_shunned } } + any_liege_or_above = { + trait_is_shunned_in_faith_trigger = { + FAITH = faith + TRAIT = adulterer + GENDER_CHARACTER = scope:lover_owner } } #Sodomy shunned @@ -241,7 +237,7 @@ secret_murder_is_trivial_trigger = { #Is it a murder that people might care about? OR = { #Independent rulers have little fear in terms of legal consequences for their actions. - $OWNER$ = { is_independent_ruler = yes } + $OWNER$ = { top_liege = this } #Otherwise, certain victims are just not worth a strong hook. $TARGET$ = { NOR = { @@ -410,7 +406,7 @@ secret_embezzler_is_valid_trigger = { secret_embezzler_is_criminal_trigger = { $OWNER$ = { any_secret = { - secret_type = secret_embezzler + type = secret_embezzler secret_target ?= $OWNER$.liege var:embezzlement_stake >= { value = $OWNER$.monumental_gold_value @@ -427,8 +423,8 @@ secret_coup_plotter_is_valid_trigger = { # Can't coup yourself NOT = { $OWNER$ = $TARGET$ } # Both of y'all must still be admin - $OWNER$ = { government_has_flag = government_is_administrative } - $TARGET$ = { government_has_flag = government_is_administrative } + $OWNER$ = { government_allows = administrative } + $TARGET$ = { government_allows = administrative } } secret_coup_plotter_is_criminal_trigger = { @@ -445,3 +441,23 @@ secret_raid_estate_is_criminal_trigger = { $OWNER$.var:raid_estate_permission ?= $TARGET$.house } } + +secret_siphoned_treasury_is_valid_trigger = { + # Both of y'all must still have treasuries + $OWNER$ = { has_treasury = yes } + $TARGET$ = { has_treasury = yes } +} + +# criminal only if the target is your liege or the Hegemon +secret_siphoned_treasury_is_criminal_trigger = { + $TARGET$ = { + OR = { + is_liege_or_above_of = $OWNER$ + AND = { + exists = title:h_china + has_title = title:h_china + } + } + } + +} diff --git a/N3OW/common/scripted_triggers/00_single_combat_scripted_triggers.txt b/N3OW/common/scripted_triggers/00_single_combat_scripted_triggers.txt index 0f0235b3..b90eab90 100644 --- a/N3OW/common/scripted_triggers/00_single_combat_scripted_triggers.txt +++ b/N3OW/common/scripted_triggers/00_single_combat_scripted_triggers.txt @@ -15,11 +15,9 @@ can_start_single_combat_eligibility_checks_trigger = { is_adult = yes custom_description = { text = banned_from_combat_old_and_frail - NOT = { - AND = { - age >= 70 - prowess < 10 - } + NAND = { + age >= 70 + prowess < 10 } } # Filter out traits. @@ -62,6 +60,7 @@ single_combat_location_has_crocodilians_trigger = { geographical_region = world_middle_east_persia geographical_region = world_burma geographical_region = world_india + geographical_region = world_asia_southeast } # Then, if any of those apply, drill down. OR = { diff --git a/N3OW/common/scripted_triggers/00_stress_triggers.txt b/N3OW/common/scripted_triggers/00_stress_triggers.txt index 5170abdb..68787ccd 100644 --- a/N3OW/common/scripted_triggers/00_stress_triggers.txt +++ b/N3OW/common/scripted_triggers/00_stress_triggers.txt @@ -100,6 +100,11 @@ can_be_hashishiyah = { has_trait = temperate } + NAND = { # Cannot be Zealous if faith views hashish as sinful + faith = { trait_is_sin = hashishiyah } + has_trait = zealous + } + OR = { # Muslims always have access to Hashish... faith = { @@ -108,25 +113,17 @@ can_be_hashishiyah = { # Otherwise you must not be located in Europe (where Hashish was relatively unknown until modern times.) AND = { OR = { - AND = { - exists = capital_province - capital_province = { - save_temporary_scope_as = my_home_province - } + capital_province ?= { + save_temporary_scope_as = my_home_province } - AND = { - exists = liege - exists = liege.capital_province - liege = { - capital_province = { - save_temporary_scope_as = my_home_province - } - } + liege.capital_province ?= { + save_temporary_scope_as = my_home_province } } scope:my_home_province = { - NOT = { + NOR = { geographical_region = world_europe + geographical_region = world_asia } } } @@ -163,7 +160,9 @@ can_be_reclusive = { # Must have a fitting personality or lifestyle } can_be_irritable = { # Must have a fitting personality or lifestyle - NOT = { has_trait = irritable } + NOT = { + has_trait = irritable + } OR = { has_trait = wrathful has_trait = impatient @@ -175,7 +174,10 @@ can_be_irritable = { # Must have a fitting personality or lifestyle } can_be_flagellant = { # Must have a fitting personality or lifestyle - NOT = { has_trait = flagellant } + NOR = { + has_trait = flagellant + faith = { has_doctrine = special_doctrine_immaterial_harmony } + } OR = { has_trait = zealous has_trait = chaste @@ -294,7 +296,7 @@ can_do_lustful_stress_conversion = { religion = { is_in_family = rf_abrahamic } # So the Caliph doesn't just convert after a bad day - NOT = { this = faith.religious_head } + this != faith.religious_head } can_inflict_torture = { @@ -318,4 +320,39 @@ can_be_eccentric = { has_witnessed_stress_coping_trait = { NOT = { has_trait = $TRAIT$ } var:witnessed_trait ?= flag:$TRAIT$ +} + +can_be_burdened = { + NOT = { + has_trait = burdened + } + is_adult = no + trigger_if = { + limit = { + faith = { has_doctrine = doctrine_gender_female_dominated } + } + is_female = yes + } + trigger_else_if = { + limit = { + faith = { has_doctrine = doctrine_gender_male_dominated } + } + is_female = no + } + trigger_else = { always = yes } + # TGP flavor stress trait + government_allows = merit + OR = { + # This stress trait is for children only, after all + has_trait = bossy + has_trait = pensive + has_trait = rowdy + # But kids get adult traits too + has_trait = wrathful + has_trait = impatient + has_trait = arrogant + has_trait = stubborn + has_trait = vengeful + has_trait = callous + } } \ No newline at end of file diff --git a/N3OW/common/scripted_triggers/00_succession_triggers.txt b/N3OW/common/scripted_triggers/00_succession_triggers.txt index 467f7370..1d11118f 100644 --- a/N3OW/common/scripted_triggers/00_succession_triggers.txt +++ b/N3OW/common/scripted_triggers/00_succession_triggers.txt @@ -23,25 +23,39 @@ special_succession_jirga_trigger = { } historical_succession_access_single_heir_succession_law_trigger = { - OR = { - has_title = title:k_austria - has_title = title:e_roman_empire - has_title = title:e_byzantium - AND = { - has_title = title:e_france - is_target_in_global_variable_list = { - name = unavailable_unique_decisions - target = flag:flag_reformed_carolingian_empire - } + trigger_if = { + limit = { government_allows = administrative } + OR = { + tgp_japan_single_heir_succession_override_trigger = yes + tgp_korea_single_heir_succession_override_trigger = yes + has_title = title:e_hindustan + has_title = title:h_china + } + } + trigger_else = { + OR = { + has_title = title:k_austria + is_roman_emperor_trigger = yes + AND = { + has_title = title:e_france + is_target_in_global_variable_list = { + name = unavailable_unique_decisions + target = flag:flag_reformed_carolingian_empire + } + } + has_title = title:e_hindustan + has_title = title:h_china + AND = { + government_has_flag = government_is_japan_feudal + is_independent_ruler = yes + } + #Add any subsequent exceptions here. } - has_title = title:e_hindustan - #Add any subsequent exceptions here. } - NOT = { government_has_flag = government_is_administrative } } historical_succession_access_single_heir_succession_law_youngest_trigger = { - NOT = { government_has_flag = government_is_administrative } + NOT = { government_allows = administrative } OR = { #has_title = title:e_byzantium #Add any subsequent exceptions here. @@ -49,9 +63,16 @@ historical_succession_access_single_heir_succession_law_youngest_trigger = { } historical_succession_access_single_heir_dynasty_house_trigger = { - NOT = { government_has_flag = government_is_administrative } + NOT = { government_allows = administrative } AND = { has_title = title:d_bohemia culture = { has_innovation = innovation_table_of_princes } } } + +can_have_meritocratic_regency_succession_law_trigger = { + has_tgp_dlc_trigger = yes + is_independent_ruler = yes + government_allows = administrative + government_allows = merit +} diff --git a/N3OW/common/scripted_triggers/00_task_contract_triggers.txt b/N3OW/common/scripted_triggers/00_task_contract_triggers.txt index 354a3fb0..922ebacb 100644 --- a/N3OW/common/scripted_triggers/00_task_contract_triggers.txt +++ b/N3OW/common/scripted_triggers/00_task_contract_triggers.txt @@ -265,4 +265,28 @@ can_create_transport_contract_trigger = { } } } -} \ No newline at end of file +} + +contract_is_tier_3_contract_trigger = { + scope:task_contract.task_contract_tier = define:NTaskContract|HIGH_TASK_CONTRACT_TIER +} + +contract_is_tier_2_contract_trigger = { + scope:task_contract.task_contract_tier = define:NTaskContract|MEDIUM_TASK_CONTRACT_TIER +} + +contract_is_tier_1_contract_trigger = { + scope:task_contract.task_contract_tier = define:NTaskContract|LOW_TASK_CONTRACT_TIER +} + +is_tier_3_contract_trigger = { + task_contract_tier = define:NTaskContract|HIGH_TASK_CONTRACT_TIER +} + +is_tier_2_contract_trigger = { + task_contract_tier = define:NTaskContract|MEDIUM_TASK_CONTRACT_TIER +} + +is_tier_1_contract_trigger = { + task_contract_tier = define:NTaskContract|LOW_TASK_CONTRACT_TIER +} diff --git a/N3OW/common/scripted_triggers/00_title_triggers.txt b/N3OW/common/scripted_triggers/00_title_triggers.txt index af46d602..2b284893 100644 --- a/N3OW/common/scripted_triggers/00_title_triggers.txt +++ b/N3OW/common/scripted_triggers/00_title_triggers.txt @@ -57,7 +57,8 @@ has_mythical_founder_trigger = { this = title:k_romagna this = title:k_sardinia this = title:e_italy - this = title:e_roman_empire + this = title:h_roman_empire + this = title:h_eastern_roman_empire } OR = { # Ardashir this = title:k_persia @@ -122,7 +123,7 @@ title_lost_from_realm_on_foreign_ruler_succession_trigger = { NOR = { this = $LIEGE$ target_is_liege_or_above = $LIEGE$ - government_has_flag = government_is_administrative # Ignoring because admin counts do not take it with them, but immediately resign it when they inherit a governorship + government_has_flag = government_is_special_administrative # Ignoring because admin counts do not take it with them, but immediately resign it when they inherit a governorship } } } @@ -135,14 +136,14 @@ character_title_allows_off_screen_wandering_trigger = { AND = { highest_held_title_tier >= tier_empire OR = { - government_has_flag = government_is_administrative + government_has_flag = government_is_special_administrative government_has_flag = government_is_clan } } # No administrative kings. AND = { highest_held_title_tier = tier_kingdom - government_has_flag = government_is_administrative + government_has_flag = government_is_special_administrative } # No religious heads. faith.religious_head ?= this diff --git a/N3OW/common/scripted_triggers/00_travel_triggers.txt b/N3OW/common/scripted_triggers/00_travel_triggers.txt index 40c6d7fc..94b375bd 100644 --- a/N3OW/common/scripted_triggers/00_travel_triggers.txt +++ b/N3OW/common/scripted_triggers/00_travel_triggers.txt @@ -252,5 +252,6 @@ has_any_travel_poi_trigger = { has_travel_point_of_interest = poi_mausoleum_at_halicarnassus has_travel_point_of_interest = poi_lighthouse_of_alexandria has_travel_point_of_interest = poi_natural_feature + has_travel_point_of_interest = poi_mandala_capital } -} \ No newline at end of file +} diff --git a/N3OW/common/scripted_triggers/00_vassal_stance_triggers.txt b/N3OW/common/scripted_triggers/00_vassal_stance_triggers.txt index 15d38bd3..2346da31 100644 --- a/N3OW/common/scripted_triggers/00_vassal_stance_triggers.txt +++ b/N3OW/common/scripted_triggers/00_vassal_stance_triggers.txt @@ -4,10 +4,10 @@ # has_same_vassal_stance_as_trigger has_same_vassal_stance_as_trigger = { - is_independent_ruler = no + top_liege != this save_temporary_scope_as = vassal_temp $COMPARE$ = { - is_independent_ruler = no + top_liege != this save_temporary_scope_as = compare_temp } scope:compare_temp = { @@ -25,7 +25,7 @@ has_same_vassal_stance_as_trigger = { } vassal_is_valid_and_follows_directive_trigger = { - is_independent_ruler = no + top_liege != this is_landed = yes highest_held_title_tier >= tier_county is_ai = yes @@ -39,7 +39,7 @@ vassal_follows_directive_valid_trigger = { scope:directive_vassal = { trigger_if = { limit = { - scope:directive_liege = { government_has_flag = government_is_administrative } + scope:directive_liege = { government_allows = administrative } } is_vassal_of = scope:directive_liege } @@ -63,7 +63,7 @@ vassal_follows_directive_trigger = { } custom_tooltip = { text = has_admin_gov - government_has_flag = government_is_administrative + government_allows = administrative } } opinion = { diff --git a/N3OW/common/scripted_triggers/00_war_and_peace_triggers.txt b/N3OW/common/scripted_triggers/00_war_and_peace_triggers.txt index 0d8c34ce..98cda8b3 100644 --- a/N3OW/common/scripted_triggers/00_war_and_peace_triggers.txt +++ b/N3OW/common/scripted_triggers/00_war_and_peace_triggers.txt @@ -25,11 +25,11 @@ at_war_with_any_non_coreligionist_trigger = { OR = { primary_attacker = { is_at_war_with = root - NOT = { faith = root.faith } + faith != root.faith } primary_defender = { is_at_war_with = root - NOT = { faith = root.faith } + faith != root.faith } } } @@ -44,11 +44,11 @@ at_war_only_with_coreligionists_trigger = { OR = { primary_attacker = { is_at_war_with = root - NOT = { faith = root.faith } + faith != root.faith } primary_defender = { is_at_war_with = root - NOT = { faith = root.faith } + faith != root.faith } } } @@ -87,7 +87,7 @@ joiner_not_already_in_another_war_with_any_target_war_participants_trigger = { subject = $JOINER$ NOT = { any_war_enemy = { - NOT = { this = scope:primary_enemy } #Already handled above + this != scope:primary_enemy #Already handled above OR = { AND = { scope:target = { primary_defender = scope:primary_enemy } @@ -146,7 +146,7 @@ joiner_not_already_in_another_war_with_any_target_war_participants_trigger = { subject = $JOINER$ NOT = { any_war_ally = { - NOT = { this = scope:primary_enemy } #Already handled above + this != scope:primary_enemy #Already handled above OR = { AND = { scope:target = { primary_defender = scope:primary_enemy } @@ -170,9 +170,9 @@ can_potentially_call_ally_trigger = { $JOINER$ = { trigger_if = { limit = { - NOT = { + NOT = { # Diarchs can join against other vassals. - this ?= $WARRIOR$.diarch + this ?= $WARRIOR$.diarch # Confederation members can join the confederation leader's defensive wars AND = { is_confederation_member = yes @@ -222,39 +222,21 @@ can_potentially_call_ally_trigger = { war_declarer_needs_hook_on_liege = { scope:actor = { - trigger_if = { - limit = { - is_independent_ruler = no + top_liege != this + liege != scope:recipient + NAND = { + government_allows = administrative + liege = { government_allows = administrative } + } + NOT = { + vassal_contract_has_flag = vassal_contract_war_override + } + OR = { + AND = { liege = scope:recipient.liege - NOT = { liege = scope:recipient } - NAND = { - government_has_flag = government_is_administrative - liege = { government_has_flag = government_is_administrative } - } liege = { has_realm_law_flag = vassal_internal_wars_banned } - NOT = { - vassal_contract_has_flag = vassal_contract_war_override - } } - always = yes - } - trigger_else_if = { - limit = { - is_independent_ruler = no - NOT = { liege = scope:recipient } - NAND = { - government_has_flag = government_is_administrative - liege = { government_has_flag = government_is_administrative } - } - liege = { has_realm_law_flag = vassal_all_wars_banned } - NOT = { - vassal_contract_has_flag = vassal_contract_war_override - } - } - always = yes - } - trigger_else = { - always = no + liege = { has_realm_law_flag = vassal_all_wars_banned } } } } @@ -274,31 +256,64 @@ can_use_conquest_cbs_trigger = { government_has_flag = government_is_tribal government_has_flag = government_is_clan government_has_flag = government_is_nomadic + government_has_flag = government_is_steppe_admin faith = { has_doctrine_parameter = conquest_cb_enabled } culture = { has_cultural_parameter = can_use_conquest_cbs } + AND = { + government_has_flag = government_is_japan_feudal + has_realm_law = imperial_expansion_law + } } } can_be_warrior_trigger = { - is_adult = yes - is_imprisoned = no - NOT = { has_trait = incapable } + is_available_quick = { + adult = yes + imprisoned = no + incapable = no + } + tgp_is_ceremonial_liege_trigger = no 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$.culture = { has_cultural_parameter = high_prowess_ignores_knight_restrictions } prowess >= 10 } + # Japan Onna-musha + trigger_if = { + limit = { + #not for admin + $ARMY_OWNER$ = { + NOT = { + government_allows = administrative + } + culture = { has_cultural_parameter = non_admin_close_family_non_martial_gender_knights_in_defensive_wars } + } + culture = { has_cultural_parameter = non_admin_close_family_non_martial_gender_knights_in_defensive_wars } + } + AND = { + $ARMY_OWNER$ = { is_at_war_as_defender = yes } + OR = { + is_spouse_of = $ARMY_OWNER$ + AND = { + is_close_family_of = $ARMY_OWNER$ + is_married = no + } + } + } + } } } can_be_knight_trigger = { - is_hostage = no + is_available_quick = { + ai = yes + hostage = no + } + can_be_warrior_trigger = { ARMY_OWNER = $ARMY_OWNER$ } trigger_if = { # Admin governors cannot be knights limit = { - $ARMY_OWNER$ = { government_has_flag = government_is_administrative } + $ARMY_OWNER$ = { government_allows = administrative } is_courtier = no } primary_title ?= { @@ -317,13 +332,9 @@ can_be_knight_trigger = { } prowess >= 12 } - can_be_warrior_trigger = { ARMY_OWNER = $ARMY_OWNER$ } trigger_if = { limit = { - OR = { - has_trait = devoted - is_clergy = yes - } + is_clergy = yes } OR = { faith = { has_doctrine_parameter = clergy_can_fight } @@ -353,27 +364,24 @@ can_be_knight_trigger = { limit = { exists = liege.diarch } - NOT = { this = liege.diarch } + this != liege.diarch } - is_ai = yes } +# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. can_be_commander_basic_trigger = { - is_alive = yes - is_adult = yes - is_hostage = no - NOR = { - has_trait = incapable - AND = { - OR = { - has_trait = devoted - is_clergy = yes - } - NOR = { - has_trait = order_member # Order Members will fight for their faith even if their faith says no - faith = { has_doctrine_parameter = clergy_can_fight } - culture = { has_cultural_parameter = culture_clergy_can_fight } - } + is_available_quick = { + alive = yes + adult = yes + incapable = no + hostage = no + } + NAND = { + is_clergy = yes + NOR = { + has_trait = order_member # Order Members will fight for their faith even if their faith says no + faith = { has_doctrine_parameter = clergy_can_fight } + culture = { has_cultural_parameter = culture_clergy_can_fight } } } @@ -385,25 +393,41 @@ can_be_commander_basic_trigger = { trigger_if = { limit = { $ARMY_OWNER$ = { is_ai = yes } } is_ai = yes + highest_held_title_tier < tier_hegemony } } +# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. can_be_commander_now_trigger = { - can_be_commander_basic_trigger = { ARMY_OWNER = $ARMY_OWNER$ } - is_imprisoned = no + is_available_quick = { + alive = yes + adult = yes + imprisoned = no + travel = no + } + + OR = { # You can always lead your own armies + this = $ARMY_OWNER$ + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = $ARMY_OWNER$ } + } + + trigger_if = { + limit = { $ARMY_OWNER$ = { is_ai = yes } } + is_ai = yes + } + custom_description = { text = ALREADY_IN_ACTIVITY NOR = { exists = involved_activity has_variable = homage_liege_scope has_character_flag = meditation_character_flag + has_character_flag = local_shrine_rite has_character_flag = petition_liege_character_flag has_character_flag = holding_court_character_flag is_being_visited_on_tour_strict = yes } } - # Must not be currently coming from or going somewhere - is_travelling = no } get_valid_commander_list_trigger = { @@ -531,8 +555,7 @@ special_invasion_cb_seize_land_in_region_trigger = { } # Title is owned by the current holder of the invasion's target kingdom AND = { - exists = holder - holder = $TARGET_KINGDOM$.holder + holder ?= $TARGET_KINGDOM$.holder kingdom = $TARGET_KINGDOM$ } } @@ -545,16 +568,14 @@ special_invasion_cb_seize_land_in_region_trigger = { geographical_region = $TARGET_REGION$ } AND = { - exists = holder - holder = $TARGET_KINGDOM$.holder + holder ?= $TARGET_KINGDOM$.holder kingdom = $TARGET_KINGDOM$ } } trigger_if = { # If our de jure liege is an existing duchy that would have been siezed in the duchy step, do not transfer the county (it has already been transferred). limit = { - exists = de_jure_liege - de_jure_liege = { + de_jure_liege ?= { exists = holder OR = { capital_vassal = { @@ -563,8 +584,7 @@ special_invasion_cb_seize_land_in_region_trigger = { } } AND = { - exists = holder - holder = $TARGET_KINGDOM$.holder + holder ?= $TARGET_KINGDOM$.holder kingdom = $TARGET_KINGDOM$ } } @@ -636,8 +656,7 @@ pressing_claim_of_character_trigger = { save_temporary_scope_as = claim_presser any_character_war = { primary_attacker = scope:claim_presser - exists = claimant - claimant = $CHARACTER$ + claimant ?= $CHARACTER$ } } } @@ -659,7 +678,7 @@ conquest_cb_holder_under_target_can_be_vassalized = { # We can only vassalize characters of a lower tier than us. highest_held_title_tier < scope:attacker.highest_held_title_tier # We can't vassalize Governors - NOT = { government_has_flag = government_is_administrative } + NOT = { government_has_flag = government_is_special_administrative } # Only (sub)vassals of the defender can be considered for transfer (no poaching vassals from 3rd parties without fighting them!) target_is_liege_or_above = scope:defender # *All* of a character's subrealm must be within the target area. If we're attacking for Jerusalem, we don't want to also be stealing parts of Egypt, Syria, etc. @@ -705,47 +724,42 @@ desirable_for_capture_trigger = { } can_use_viking_invasion_cbs_trigger = { - OR = { - # Vanilla behaviour. - AND = { - has_fp1_dlc_trigger = no - can_use_viking_invasion_cbs_dlc_trigger = yes + trigger_if = { # Conquerors go for neighbors, no need to go overseas + limit = { + has_trait = conqueror + is_ai = yes } - # DLC behaviour.. - AND = { + always = no + } + trigger_else_if = { + limit = { has_fp1_dlc_trigger = yes - OR = { - #Players are under no restrictions. - AND = { - is_ai = no - can_use_viking_invasion_cbs_dlc_trigger = yes - } - #If the host has fp1, then we want Scandis to beat each other up and export the losers overseas, not form huge overseas empires themselves. - AND = { - can_use_viking_invasion_cbs_dlc_trigger = yes - top_liege = { - any_realm_county = { - count = all - title_province = { - NOT = { geographical_region = world_europe_north } - } - } - } - } - } } + can_use_viking_invasion_cbs_dlc_trigger = yes + OR = { + #If the host has fp1, then we want Scandis to beat each other up and export the losers overseas, not form huge overseas empires themselves. + capital_province = { + NOT = { geographical_region = world_europe_north } + } + #Players are under no restrictions. + is_ai = no + } + } + trigger_else = { + has_fp1_dlc_trigger = no + can_use_viking_invasion_cbs_dlc_trigger = yes } } can_use_viking_invasion_cbs_dlc_trigger = { - faith = { has_doctrine = tenet_warmonger } culture = { has_innovation = innovation_longboats } + faith = { has_doctrine = tenet_warmonger } any_sub_realm_county = { is_coastal_county = yes } trigger_if = { limit = { is_ai = yes } prestige >= 75 OR = { - is_independent_ruler = yes + top_liege = this primary_title.tier >= tier_kingdom } NOT = { @@ -858,12 +872,12 @@ character_is_potential_valuable_prisoner = { religious_war_vassals_constraints = { trigger_if = { limit = { - scope:attacker = { is_independent_ruler = no } + scope:attacker = { top_liege != this } } scope:attacker = { NOT = { character_is_land_realm_neighbor = scope:defender } } - scope:defender = { is_independent_ruler = yes } + scope:defender = { top_liege = this } } trigger_else = { always = no @@ -906,6 +920,18 @@ herders_and_tributary_constraints = { } } } + #Mandala Vassals shouldn't attack their Liege's Tributaries + trigger_if = { + limit = { + scope:attacker = { + is_independent_ruler = no + liege ?= { government_has_flag = government_is_mandala } + } + } + NOT = { + scope:defender = { is_tributary_of = scope:attacker.liege } + } + } } } @@ -940,11 +966,11 @@ feudal_clan_tribal_conquest_constraints = { government_has_flag = government_is_tribal government_has_flag = government_is_nomadic } - gold < 200 + short_term_gold < 200 OR = { AND = { - government_has_flag = government_is_administrative - gold < 700 + government_has_flag = government_is_special_administrative + short_term_gold < 700 this != top_liege } any_sub_realm_county = { diff --git a/N3OW/common/scripted_triggers/00_weather_triggers.txt b/N3OW/common/scripted_triggers/00_weather_triggers.txt index 10cd151c..8536e635 100644 --- a/N3OW/common/scripted_triggers/00_weather_triggers.txt +++ b/N3OW/common/scripted_triggers/00_weather_triggers.txt @@ -84,6 +84,9 @@ temperate_seasons_trigger = { geographical_region = world_africa_north geographical_region = world_steppe geographical_region = world_tibet + geographical_region = world_asia_china + geographical_region = world_asia_japan + geographical_region = world_asia_korea } } } @@ -100,6 +103,8 @@ tropical_seasons_region_trigger = { geographical_region = world_africa_east geographical_region = world_india_deccan geographical_region = world_burma + geographical_region = world_asia_china + geographical_region = world_asia_southeast } } @@ -177,17 +182,6 @@ current_season_winter = { current_month < 2 } } - trigger_else_if = { - limit = { - location = { - geographical_region = seasonal_region_burma - } - } - OR = { - current_month >= 11 - current_month < 3 - } - } trigger_else = { #Generic Northern Hemisphere OR = { @@ -199,6 +193,8 @@ current_season_winter = { NOR = { geographical_region = seasonal_region_east_africa geographical_region = seasonal_region_west_africa + geographical_region = seasonal_region_maritime_southeast_asia + geographical_region = seasonal_region_peninsular_southeast_asia } } } @@ -242,7 +238,8 @@ current_season_autumn = { NOR = { geographical_region = seasonal_region_west_africa geographical_region = seasonal_region_deccan - geographical_region = seasonal_region_burma + geographical_region = seasonal_region_peninsular_southeast_asia + geographicaL_region = seasonal_region_maritime_southeast_asia } } } @@ -277,15 +274,6 @@ current_season_summer = { current_month >= 4 current_month < 6 } - trigger_else_if = { - limit = { - location = { - geographical_region = seasonal_region_burma - } - } - current_month >= 3 - current_month < 5 - } trigger_else = { #Generic Northern Hemisphere current_month >= 6 @@ -295,6 +283,8 @@ current_season_summer = { NOR = { geographical_region = seasonal_region_west_africa geographical_region = seasonal_region_east_africa + geographical_region = seasonal_region_peninsular_southeast_asia + geographical_region = seasonal_region_maritime_southeast_asia } } } @@ -330,7 +320,8 @@ current_season_spring = { geographical_region = seasonal_region_west_africa geographical_region = seasonal_region_rajasthan geographical_region = seasonal_region_deccan - geographical_region = seasonal_region_burma + geographical_region = seasonal_region_peninsular_southeast_asia + geographical_region = seasonal_region_maritime_southeast_asia } } } @@ -342,6 +333,10 @@ current_season_dry_season = { OR = { geographical_region = seasonal_region_west_africa geographical_region = seasonal_region_east_africa + geographical_region = seasonal_region_peninsular_southeast_asia + geographical_region = seasonal_region_maritime_southeast_asia + geographical_region = seasonal_region_bengal + geographical_region = seasonal_region_deccan } } trigger_if = { @@ -353,9 +348,51 @@ current_season_dry_season = { current_month < 5 } } + trigger_else_if = { + limit = { + location = { + geographical_region = seasonal_region_east_africa + } + } + OR = { + current_month >= 12 + current_month < 3 + } + } + trigger_else_if = { + limit = { + location = { + geographical_region = seasonal_region_maritime_southeast_asia + }#April to September + } + current_month >= 4 + current_month < 10 + } + trigger_else_if = { + limit = { + location = { + geographical_region = seasonal_region_peninsular_southeast_asia + } + } + OR = { #November to May + current_month >= 11 + current_month < 6 + } + } + trigger_else_if = { + limit = { + location = { + geographical_region = seasonal_region_bengal + } + } + OR = { + current_month >= 12 + current_month < 3 + } + } trigger_else = { location = { - geographical_region = seasonal_region_east_africa + geographical_region = seasonal_region_deccan } OR = { current_month >= 12 @@ -368,12 +405,13 @@ current_season_rainy_season = { #Jasons triggers here location = { OR = { - geographical_region = seasonal_region_deccan - geographical_region = seasonal_region_rajasthan - geographical_region = seasonal_region_bengal - geographical_region = seasonal_region_burma geographical_region = seasonal_region_west_africa geographical_region = seasonal_region_east_africa + geographical_region = seasonal_region_peninsular_southeast_asia + geographical_region = seasonal_region_maritime_southeast_asia + geographical_region = seasonal_region_bengal + geographical_region = seasonal_region_deccan + geographical_region = seasonal_region_rajasthan } } #southern region with rainy/dry seasons @@ -407,20 +445,22 @@ current_season_rainy_season = { trigger_else_if = { limit = { location = { - geographical_region = seasonal_region_burma + geographical_region = seasonal_region_peninsular_southeast_asia } - } - current_month >= 5 + } #June to October + current_month >= 6 current_month < 11 } trigger_else_if = { limit = { location = { - geographical_region = seasonal_region_west_africa + geographical_region = seasonal_region_maritime_southeast_asia } + } #October to March + OR = { + current_month >= 10 + current_month < 4 } - current_month >= 5 - current_month < 11 } trigger_else = { location = { diff --git a/N3OW/common/scripted_triggers/00_witch_triggers.txt b/N3OW/common/scripted_triggers/00_witch_triggers.txt index 8fc597cb..8e5aea00 100644 --- a/N3OW/common/scripted_triggers/00_witch_triggers.txt +++ b/N3OW/common/scripted_triggers/00_witch_triggers.txt @@ -1,6 +1,6 @@ use_convert_to_witchcraft_secrecy_trigger = { $OWNER$ = { - any_secret = { secret_type = secret_witch } + any_secret = { type = secret_witch } save_temporary_scope_as = witchract_secrecy_check trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = witch GENDER_CHARACTER = scope:witchract_secrecy_check } } diff --git a/N3OW/common/scripted_triggers/02_ep1_scripted_triggers.txt b/N3OW/common/scripted_triggers/02_ep1_scripted_triggers.txt index 56c57e4e..71d71a9d 100644 --- a/N3OW/common/scripted_triggers/02_ep1_scripted_triggers.txt +++ b/N3OW/common/scripted_triggers/02_ep1_scripted_triggers.txt @@ -74,10 +74,7 @@ ep1_character_had_or_has_inspiration_type_trigger = { exists = var:created_artifact_type var:created_artifact_type = flag:$TYPE$ } - AND = { - exists = inspiration - inspiration = { has_inspiration_type = $TYPE$_inspiration } - } + inspiration ?= { has_inspiration_type = $TYPE$_inspiration } } } @@ -182,6 +179,10 @@ character_can_be_employed_in_a_court_position_trigger = { can_employ_court_position_type = court_tutor_court_position $CHARACTER$ = { can_be_employed_as = court_tutor_court_position } } + AND = { + can_employ_court_position_type = court_guru_court_position + $CHARACTER$ = { can_be_employed_as = court_guru_court_position } + } AND = { can_employ_court_position_type = cupbearer_court_position $CHARACTER$ = { can_be_employed_as = cupbearer_court_position } @@ -253,6 +254,7 @@ can_be_employed_in_any_court_position_trigger = { can_be_employed_as = high_almoner_court_position can_be_employed_as = seneschal_court_position can_be_employed_as = court_tutor_court_position + can_be_employed_as = court_guru_court_position can_be_employed_as = cupbearer_court_position can_be_employed_as = chief_eunuch_court_position can_be_employed_as = antiquarian_court_position @@ -299,7 +301,7 @@ target_of_powerful_faction_trigger = { } trigger_if = { limit = { exists = special_character } - NOT = { special_character = faction_target.liege } + special_character != faction_target.liege } } @@ -312,6 +314,7 @@ province_has_no_holding_trigger = { # province has no holding has_holding_type = church_holding has_holding_type = herder_holding has_holding_type = nomad_holding + has_holding_type = temple_citadel_holding } } @@ -377,7 +380,7 @@ indebt_guest_interaction_basic_checks_trigger = { has_dlc_feature = royal_court # Gotta have maxed servants to help. amenity_level = { - type = court_servants + target = court_servants value >= max_amenity_level } } @@ -398,3 +401,14 @@ artifact_house_not_owns_or_claims_trigger = { house_head.dynasty = scope:familial_banner.var:banner_dynasty } } + +is_composite_bow_culture_trigger = { + OR = { + has_cultural_tradition = tradition_horse_lords + has_cultural_pillar = heritage_byzantine + has_cultural_pillar = heritage_caucasian + has_cultural_pillar = heritage_turkic + has_cultural_pillar = heritage_mongolic + has_innovation = innovation_advanced_bowmaking + } +} diff --git a/N3OW/common/scripted_triggers/03_bp1_scripted_triggers.txt b/N3OW/common/scripted_triggers/03_bp1_scripted_triggers.txt index 6a02f2f2..f0e10917 100644 --- a/N3OW/common/scripted_triggers/03_bp1_scripted_triggers.txt +++ b/N3OW/common/scripted_triggers/03_bp1_scripted_triggers.txt @@ -1,58 +1,49 @@ ##### FAMILY FEUD ##### -# Story has variable with specified flag -house_feud_story_flag_trigger = { - story_type = story_cycle_house_feud +# Relation has variable with specified flag +house_relation_feud_flag_trigger = { + has_bp1_dlc_trigger = yes + has_house_relation_level = feud exists = var:$VARIABLE$ var:$VARIABLE$ = flag:$FLAG$ } -# Feud story targets a specified House -existing_feud_against_target_trigger = { +# Feud relation targeting a specified House +house_has_feud_relation_with_trigger = { + exists = house + exists = $TARGET$.house + house != $TARGET$.house OR = { - house.house_head ?= { - any_owned_story = { - story_type = story_cycle_house_feud - var:house_feud_house ?= $TARGET$.house + house = { + any_house_relation = { + has_house_relation_level = feud + any_relation_house = { $TARGET$.house = this } } } exists = scope:return_feud_as_true_for_debug } + has_bp1_dlc_trigger = yes } # General checks house head can start a feud -house_head_can_start_feud_trigger = { +valid_for_feud_events_trigger = { + has_bp1_dlc_trigger = yes # Must be House Head is_house_head = yes - # Stop unlanded AI going crazy with feuds + # Stop unlanded AI going crazy is_playable_character = yes - NOR = { - # House must not have started a feud recently - exists = house.var:house_feud_cooldown - # Only one Feud can be started per House Head - has_character_flag = had_house_feud_story - # Cannot already be Feuding - any_owned_story = { story_type = story_cycle_house_feud } - } - # Has not recently ended a Feud - house_feud_house_any_end_modifier_trigger = no - # House must be sufficiently large to support a Feud - house = { - any_house_member = { - count >= 5 - is_alive = yes - is_adult = yes - } - } + is_available_adult = yes # Save scopes for checking against save_temporary_scope_as = house_head_temp } -house_head_can_start_feud_against_trigger = { - # General checks that house head can start a feud - house_head_can_start_feud_trigger = yes +valid_for_feud_events_with_target_trigger = { + # General checks + valid_for_feud_events_trigger = yes # Victim House Head must exist exists = $TARGET$.house.house_head + # Target House must be different + NOT = { house = $TARGET$.house } # Ensure target is 'equal' trigger_if = { limit = { @@ -79,8 +70,6 @@ house_head_can_start_feud_against_trigger = { is_close_family_of = $TARGET$.house.house_head # Is not friendly with target House Head has_any_good_relationship_with_character_trigger = { CHARACTER = $TARGET$.house.house_head } - # Target House must be different - house = $TARGET$.house } # Avoid starting Feuds between Vassals and Lieges, as they are not 'equals' trigger_if = { @@ -99,15 +88,6 @@ house_head_can_start_feud_against_trigger = { $TARGET$.house.house_head = { save_temporary_scope_as = target_house_head_temp } } -# Feud target house has living members -house_feud_target_house_alive_trigger = { - any_owned_story = { - story_type = story_cycle_house_feud - exists = var:house_feud_house - var:house_feud_house.house_head = { is_alive = yes } - } -} - # House Head, and House is valid to be a Feud target house_feud_valid_feud_target_trigger = { exists = house @@ -160,30 +140,16 @@ house_feud_member_trigger = { } } -# House has no ongoing Fued modifiers or rewards -house_feud_house_any_end_modifier_trigger = { - OR = { - exists = var:house_feud_swapped_house - house = { - OR = { - has_house_modifier = house_feud_terrible_modifier - has_house_modifier = house_feud_bad_modifier - has_house_modifier = house_feud_even_modifier - has_house_modifier = house_feud_good_modifier - has_house_modifier = house_feud_excellent_modifier - } - } - } -} - # House has no remaining members house_feud_wiped_out_trigger = { - trigger_if = { - limit = { exists = var:house_feud_first_rival.house } - var:house_feud_first_rival.house = { - NOT = { exists = house_head } - NOT = { - any_house_member = { is_alive = yes } + house ?= { + any_house_relation = { + has_house_relation_level = feud + any_relation_house = { + this = $TARGET$.house + NOT = { + any_house_member = { is_alive = yes } + } } } } @@ -216,54 +182,59 @@ bp1_yearly_8100_sycophant_trigger = { has_relation_friend = $LIEGE$ can_set_relation_friend_trigger = { CHARACTER = $LIEGE$ } any_secret = { - secret_type = secret_lover + type = secret_lover secret_target = $LIEGE$ } } NOT = { is_close_or_extended_family_of = $LIEGE$ } } -house_feud_ai_scheme_trigger = { - is_adult = yes - is_ai = yes - ai_honor < medium_positive_ai_value - any_scheme = { count < 1 } - OR = { - house_feud_ai_murder_join_trigger = yes - house_feud_ai_murder_start_trigger = yes - house_feud_ai_seduce_start_trigger = yes - } -} +################################################## +# Feud AI Scheme Triggers house_feud_ai_murder_join_trigger = { - house = { + save_temporary_scope_as = instigator_temp + house ?= { any_house_member = { any_scheme = { - scheme_type = murder - exists = scheme_target_character.house - scheme_target_character.house = scope:story.var:house_feud_house + type = murder + scope:scheme_target_character.house ?= { + NOT = { this = scope:instigator_temp.house } + any_house_relation = { + has_house_relation_parameter = members_more_likely_to_scheme_hostile + any_relation_house = { this = scope:instigator_temp.house } + } + } save_temporary_scope_as = murder_scheme_temp } } } trigger_if = { limit = { exists = scope:murder_scheme_temp } - char_can_fit_into_scheme_trigger = { SCHEME = scope:murder_scheme_temp } NOR = { is_scheming_against = { target = scope:murder_scheme_temp.scheme_target_character } has_any_good_relationship_with_character_trigger = { CHARACTER = scope:murder_scheme_temp.scheme_target_character } } + char_can_fit_into_scheme_trigger = { SCHEME = scope:murder_scheme_temp } } trigger_else = { always = no } } house_feud_ai_murder_start_trigger = { - scope:story.var:house_feud_house = { - any_house_member = { save_temporary_scope_as = murder_victim_temp } + save_temporary_scope_as = instigator_temp + house ?= { + any_house_relation = { + has_house_relation_parameter = members_more_likely_to_scheme_hostile + any_relation_house = { + NOT = { this = scope:instigator_temp.house } + any_house_member = { save_temporary_scope_as = murder_victim_temp } + } + } } trigger_if = { limit = { exists = scope:murder_victim_temp } - NOT = { + NOR = { + is_scheming_against = { target = scope:murder_victim_temp } has_any_good_relationship_with_character_trigger = { CHARACTER = scope:murder_victim_temp } } can_start_scheme = { @@ -275,25 +246,33 @@ house_feud_ai_murder_start_trigger = { } house_feud_ai_seduce_start_trigger = { + save_temporary_scope_as = instigator_temp NOR = { - has_trait = celibate has_trait = chaste + has_trait = devoted } - scope:story.var:house_feud_house = { - any_house_member = { - is_married = yes - save_temporary_scope_as = seduce_victim_temp - any_spouse = { - trigger_if = { - limit = { - exists = house - NOT = { house = scope:seduce_victim_temp.house } - } + might_cheat_on_every_partner_trigger = yes + house ?= { + any_house_relation = { + has_house_relation_parameter = members_more_likely_to_scheme_hostile + any_relation_house = { + NOT = { this = scope:instigator_temp.house } + any_house_member = { + is_married = yes + save_temporary_scope_as = seduce_victim_temp + any_spouse = { + trigger_if = { + limit = { + exists = house + house != scope:seduce_victim_temp.house + } + } + NOT = { + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:seduce_victim_temp } + } + save_temporary_scope_as = seduce_spouse_temp + } } - NOT = { - has_any_good_relationship_with_character_trigger = { CHARACTER = scope:seduce_victim_temp } - } - save_temporary_scope_as = seduce_spouse_temp } } } diff --git a/N3OW/common/scripted_triggers/03_bp2_scripted_triggers.txt b/N3OW/common/scripted_triggers/03_bp2_scripted_triggers.txt index ca908c33..d718cbd7 100644 --- a/N3OW/common/scripted_triggers/03_bp2_scripted_triggers.txt +++ b/N3OW/common/scripted_triggers/03_bp2_scripted_triggers.txt @@ -66,13 +66,13 @@ hostage_oath_of_friendship_trigger = { OR = { scope:actor = { any_memory = { - has_memory_type = hostage_oath_of_friendship + memory_type = hostage_oath_of_friendship has_memory_participant = scope:recipient } } scope:recipient = { any_memory = { - has_memory_type = hostage_oath_of_friendship + memory_type = hostage_oath_of_friendship has_memory_participant = scope:actor } } diff --git a/N3OW/common/scripted_triggers/03_fp2_scripted_triggers.txt b/N3OW/common/scripted_triggers/03_fp2_scripted_triggers.txt index 93638a76..5878b2a7 100644 --- a/N3OW/common/scripted_triggers/03_fp2_scripted_triggers.txt +++ b/N3OW/common/scripted_triggers/03_fp2_scripted_triggers.txt @@ -50,12 +50,9 @@ eligible_for_fp2_dynasty_legacies_trigger = { culture = { has_cultural_pillar = heritage_iberian } - AND = { - exists = capital_province - capital_province = { + capital_province ?= { geographical_region = world_europe_west_iberia } - } } } } @@ -104,7 +101,6 @@ valid_ritualised_best_friendship_one_way_trigger = { # ... and that they've got a best friend... any_relation = { type = best_friend - count >= 1 # ... who also still has the cultural parameter. culture_valid_for_ritualised_best_friends_trigger = yes } @@ -279,8 +275,8 @@ fp2_struggle_ending_other_percent_iberia_trigger = { NOT = { any_involved_ruler = { exists = primary_title # Max figured out that is_independent_ruler causes errors if you are unlanded - NOT = { this = root } - is_independent_ruler = yes + this != root + top_liege = this primary_title = { is_mercenary_company = no } any_county_in_region = { region = world_europe_west_iberia @@ -299,16 +295,16 @@ fp2_struggle_ending_compromise_independent_duchy_trigger = { exists = holder OR = { # Is not the heartland of an existing kingdom - NOT = { title_capital_county = de_jure_liege.title_capital_county } + title_capital_county != de_jure_liege.title_capital_county # Capital duke doesn't control kingdom, edge case AND = { exists = de_jure_liege.holder - NOT = { holder = de_jure_liege.holder } + holder != de_jure_liege.holder } } # Is ruled by an independent duke holder = { - is_independent_ruler = yes + top_liege = this save_temporary_scope_as = duchy_holder primary_title = { is_mercenary_company = no @@ -337,7 +333,7 @@ fp2_struggle_ending_compromise_split_duchy_trigger = { # Is not created NOT = { exists = holder } # Is not heartland of an existing kingdom - NOT = { title_capital_county = de_jure_liege.title_capital_county } + title_capital_county != de_jure_liege.title_capital_county save_temporary_scope_as = duchy # Less than half is owned by de jure kingdom, if created trigger_if = { @@ -358,7 +354,7 @@ fp2_struggle_ending_compromise_titular_trigger = { exists = holder # Is ruled by an independent duke holder = { - is_independent_ruler = yes + top_liege = this primary_title = { is_mercenary_company = no tier = tier_duchy @@ -385,7 +381,7 @@ fp2_struggle_ending_compromise_create_title_trigger = { # Only if no other same rank rulers in title (e.g. multiple kings under empire) any_direct_de_jure_vassal_title = { exists = holder - NOT = { holder = scope:new_owner_temp } + holder != scope:new_owner_temp } } } @@ -476,7 +472,7 @@ fp2_struggle_compromise_transfer_duchy_trigger = { # De jure liege does not control duchy trigger_if = { limit = { exists = kingdom.holder } - NOT = { kingdom = scope:transfer_duchy.title_capital_county.holder.top_liege.capital_county.kingdom } + kingdom != scope:transfer_duchy.title_capital_county.holder.top_liege.capital_county.kingdom } # Is controlled by a kingdom tier trigger_else = { title_capital_county.holder.top_liege.primary_title.tier >= tier_kingdom } @@ -544,7 +540,7 @@ fp2_iberian_reclamation_vassalize_iberian_trigger = { is_struggle_type = iberian_struggle } liege = scope:defender - NOT = { this = scope:defender } + this != scope:defender capital_county = { any_county_struggle = { is_struggle_type = iberian_struggle } } @@ -592,9 +588,9 @@ fp2_struggle_enforce_truce_war_leader_trigger = { custom_tooltip = { text = fp2_enforce_truce_liege_or_independent_tt OR = { - scope:recipient = { is_independent_ruler = yes } + scope:recipient = { top_liege = this } scope:recipient.top_liege = scope:actor.top_liege - is_independent_ruler = yes + top_liege = this top_liege = scope:actor.top_liege } } @@ -694,13 +690,13 @@ fp2_lyonese_monk_0000_out_of_popes_trigger = { fp2_lyonese_monk_0000_out_of_faith_trigger = { OR = { - NOT = { scope:acolyte.faith.religious_head = scope:story.var:base_faith.religious_head } - NOT = { scope:acolyte_host.faith.religious_head = scope:story.var:base_faith.religious_head } + scope:acolyte.faith.religious_head != scope:story.var:base_faith.religious_head + scope:acolyte_host.faith.religious_head != scope:story.var:base_faith.religious_head } } fp2_does_this_player_care_about_the_fate_of_iberia = { - NOT = { this = root } + this != root OR = { location = { OR = { # Is in region @@ -718,15 +714,13 @@ fp2_eligible_for_yearly_events_trigger = { OR = { any_character_struggle = { involvement = involved + is_struggle_type = iberian_struggle } culture = { has_cultural_pillar = heritage_iberian } - AND = { - exists = capital_province - capital_province = { - geographical_region = world_europe_west_iberia - } + capital_province ?= { + geographical_region = world_europe_west_iberia } } } diff --git a/N3OW/common/scripted_triggers/04_ep2_accolade_triggers.txt b/N3OW/common/scripted_triggers/04_ep2_accolade_triggers.txt index 4541da18..797e517b 100644 --- a/N3OW/common/scripted_triggers/04_ep2_accolade_triggers.txt +++ b/N3OW/common/scripted_triggers/04_ep2_accolade_triggers.txt @@ -3,7 +3,9 @@ ep2_can_be_accolade_successor_base_trigger = { is_acclaimed = no is_accolade_successor = no + is_available_quick = { + alive = yes + adult = yes + } highest_held_title_tier <= tier_barony - is_alive = yes - is_adult = yes } diff --git a/N3OW/common/scripted_triggers/04_ep2_tour_triggers.txt b/N3OW/common/scripted_triggers/04_ep2_tour_triggers.txt index 81902e51..e5af7042 100644 --- a/N3OW/common/scripted_triggers/04_ep2_tour_triggers.txt +++ b/N3OW/common/scripted_triggers/04_ep2_tour_triggers.txt @@ -7,12 +7,10 @@ ep2_phase_general_location_checks = { trigger_if = { limit = { has_province_owner = yes } province_owner = { - exists = liege - liege = scope:host - NOT = { this = scope:host } + liege ?= scope:host + this != scope:host highest_held_title_tier >= tier_county - exists = capital_province - capital_province = root + capital_province ?= root is_available = yes age >= 12 } @@ -23,8 +21,7 @@ ep2_phase_general_location_checks = { } ep2_tour_phase_invalidation_check = { - scope:activity = { - # TODO_CD_EP2, make their heir visitable if they weren't landed before inheriting. Should be doable in an on_action by checking if the heir is currently in the vassals to visit list, and if not, add them to it. + scope:activity = { NOT = { any_activity_phase_location_past = { province_owner = scope:province.province_owner @@ -32,10 +29,9 @@ ep2_tour_phase_invalidation_check = { } } scope:province = { - NOT = { province_owner = scope:host } + province_owner != scope:host province_owner = { - exists = liege - liege = scope:host + liege ?= scope:host location = scope:province highest_held_title_tier >= tier_county #Checks mostly matching is_available: diff --git a/N3OW/common/scripted_triggers/04_ep2_tournament_triggers.txt b/N3OW/common/scripted_triggers/04_ep2_tournament_triggers.txt index 9382ad3c..9da2bf74 100644 --- a/N3OW/common/scripted_triggers/04_ep2_tournament_triggers.txt +++ b/N3OW/common/scripted_triggers/04_ep2_tournament_triggers.txt @@ -1,537 +1,539 @@ -chariot_race_trigger = { - involved_activity.activity_host.culture = { - OR = { - AND = { - has_cultural_tradition = tradition_ep3_roman_ceremonies - NOT = { has_cultural_era_or_later = culture_era_late_medieval } - } - this = culture:roman - } - } -} - -activity_is_valid_tournament_contestant_training_decision = { - is_alive = yes - is_adult = yes - is_imprisoned = no - # Exclude clergy who don't fight - trigger_if = { - limit = { is_clergy = yes } - faith = { has_doctrine_parameter = clergy_can_fight } - } -} - -activity_is_competing_trigger = { - activity_is_valid_tournament_contestant = yes - is_in_guest_subset = { name = contestant } - exists = var:progress_to_victory # Ensure they have a PtV as a valid contestant -} - -activity_is_valid_tournament_contestant = { - exists = involved_activity - involved_activity = { has_activity_type = activity_tournament } - is_alive = yes - is_adult = yes - is_imprisoned = no - # Exclude clergy who don't fight - trigger_if = { - limit = { is_clergy = yes } - OR = { - faith = { has_doctrine_parameter = clergy_can_fight } - culture = { has_cultural_parameter = culture_clergy_can_fight } - } - } - # Has not opted out - NOR = { - has_character_flag = tournament_not_competing - is_in_guest_subset = { name = spectator } - } - trigger_if = { - limit = { - involved_activity = { - NOR = { - has_current_phase = tournament_phase_horse_race - has_current_phase = tournament_phase_board_game - has_current_phase = tournament_phase_recital - } - } - } - # Only martial sex competes - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = involved_activity.activity_host } - NOR = { - has_trait = wounded_2 - has_trait = wounded_3 - } - } - # Mulan is clever enough not to reveal themselves - trigger_if = { - limit = { - involved_activity = { has_current_phase = tournament_phase_wrestling } - } - NOT = { has_character_modifier = ignores_gender_army_rules } - } - NOT = { - has_trait = incapable - } - trigger_if = { - limit = { - NOT = { - involved_activity = { has_current_phase = tournament_phase_horse_race } - } - } - NOR = { - has_trait = blind - has_trait = infirm - } - } - trigger_if = { # Blind and maimed people don't do archery - limit = { - NOT = { - involved_activity = { has_current_phase = tournament_phase_archery } - } - } - NOR = { - has_trait = blind - has_trait = maimed - } - } -} - -activity_tournament_contest_non_martial_gender_allowed = { - involved_activity ?= { - OR = { - has_current_phase = tournament_phase_horse_race - has_current_phase = tournament_phase_board_game - has_current_phase = tournament_phase_recital - } - } -} - -activity_tournament_contest_martial_gender_only = { - involved_activity ?= { - OR = { - has_current_phase = tournament_phase_duel - has_current_phase = tournament_phase_wrestling - has_current_phase = tournament_phase_melee - has_current_phase = tournament_phase_archery - has_current_phase = tournament_phase_joust - } - } -} - -activity_has_reason_to_cheer_character_trigger = { - exists = $CHAR$ - OR = { - this = $CHAR$ - AND = { - opinion = { - target = $CHAR$ - value >= 25 - } - OR = { - is_close_family_of = $CHAR$ - is_consort_of = $CHAR$ - has_any_good_relationship_with_character_trigger = { CHARACTER = $CHAR$ } - } - } - } -} - -activity_has_reason_to_anger_character_trigger = { - exists = $CHAR$ - NOT = { this = $CHAR$ } - opinion = { - target = $CHAR$ - value < 25 - } - has_any_bad_relationship_with_character_trigger = { CHARACTER = $CHAR$ } -} - -tournament_contest_wager_trigger = { - AND = { - has_current_phase = tournament_phase_$CONTEST$ - NOT = { - any_guest_subset = { - name = winner - phase = tournament_phase_$CONTEST$ - } - } - } - any_guest_subset_current_phase = { - name = qualified - count >= 3 - } - trigger_if = { - limit = { exists = var:contest_versus_progress } - var:contest_versus_progress <= 3 - } -} - -activity_tournament_armor_trigger = { - involved_activity ?= { has_activity_type = activity_tournament } - OR = { - AND = { - is_in_guest_subset = { name = qualified } - involved_activity = { - OR = { - has_current_phase = tournament_phase_melee - has_current_phase = tournament_phase_duel - has_current_phase = tournament_phase_joust - } - } - } - AND = { - has_character_modifier = ignores_gender_army_rules - is_in_guest_subset = { name = qualified } - } - } -} - -activity_tournament_shirtless_trigger = { - involved_activity ?= { - has_activity_type = activity_tournament - has_current_phase = tournament_phase_wrestling - } - is_in_guest_subset = { name = qualified } -} - -activity_tournament_valid_winner_trigger = { - is_alive = yes - exists = var:contest_aptitude - exists = var:progress_to_victory -} - -activity_adult_available_or_attending_same_activity_trigger = { - is_adult = yes - OR = { - is_available = yes - AND = { - exists = involved_activity - involved_activity = scope:activity - } - } -} - -activity_tournament_versus_contest_trigger = { - OR = { - has_current_phase = tournament_phase_joust - has_current_phase = tournament_phase_wrestling - has_current_phase = tournament_phase_duel - has_current_phase = tournament_phase_board_game - } -} - -activity_tournament_team_contest_trigger = { - scope:activity = { has_current_phase = tournament_phase_melee } -} - -activity_tournament_turn_contest_trigger = { - scope:activity = { - OR = { - has_current_phase = tournament_phase_archery - has_current_phase = tournament_phase_recital - } - } -} - -activity_tournament_mind_contest_trigger = { - scope:activity = { - OR = { - has_current_phase = tournament_phase_recital - has_current_phase = tournament_phase_board_game - } - } -} - -activity_tournament_prowess_contest_trigger = { - scope:activity = { - OR = { - has_current_phase = tournament_phase_melee - has_current_phase = tournament_phase_joust - has_current_phase = tournament_phase_duel - has_current_phase = tournament_phase_wrestling - } - } -} - -activity_tournament_armor_contest_trigger = { - scope:activity = { - OR = { - has_current_phase = tournament_phase_melee - has_current_phase = tournament_phase_joust - has_current_phase = tournament_phase_duel - } - } -} - -activity_tournament_horse_contest_trigger = { - scope:activity = { - OR = { - has_current_phase = tournament_phase_horse_race - has_current_phase = tournament_phase_joust - has_current_phase = tournament_phase_melee - } - } -} - -activity_tournament_race_contest_trigger = { - scope:activity = { has_current_phase = tournament_phase_horse_race } -} - -activity_tournament_same_team_trigger = { - scope:activity = { - OR = { - AND = { - any_guest_subset = { - name = team_alpha - this = $FIRST$ - } - any_guest_subset = { - name = team_alpha - this = $SECOND$ - } - } - AND = { - any_guest_subset = { - name = team_beta - this = $FIRST$ - } - any_guest_subset = { - name = team_beta - this = $SECOND$ - } - } - } - } -} - -tournament_character_any_contest_winner_trigger = { - involved_activity = { - any_guest_subset = { - name = winner - this = $CHAR$ - phase = tournament_phase_$CONTEST$ - } - } -} - -contest_versus_player_vs_ai_trigger = { - calc_true_if = { - amount = 1 - scope:versus_matchee = { is_ai = no } - scope:versus_matcher = { is_ai = no } - } - calc_true_if = { - amount = 1 - scope:versus_matchee = { is_ai = yes } - scope:versus_matcher = { is_ai = yes } - } - NOR = { - scope:versus_matchee = { has_character_flag = resigned_contest_flag } - scope:versus_matcher = { has_character_flag = resigned_contest_flag } - } -} - -contest_event_general_contestant_valid_trigger = { - is_alive = yes - exists = var:contest_aptitude - exists = var:progress_to_victory - is_ai = yes - NOT = { this = root } -} - -has_ongoing_grand_activity_trigger = { - trigger_if = { - limit = { exists = involved_activity } - involved_activity = { - OR = { - has_activity_type = activity_tournament - has_activity_type = activity_tour - has_activity_type = activity_wedding - } - } - } - trigger_else = { - always = no - } -} - -is_grand_activity_trigger = { - OR = { - has_activity_type = activity_tournament - has_activity_type = activity_tour - has_activity_type = activity_wedding - } -} - -tournament_contest_event_trigger = { - is_ai = no - is_in_guest_subset = { name = qualified } - exists = var:progress_to_victory - NOT = { has_character_flag = busy_in_contest_event } -} - -tournament_contest_versus_event_trigger = { - is_ai = no - exists = var:progress_to_victory - is_in_guest_subset = { name = qualified } - NOT = { has_character_flag = resigned_contest_flag } - save_temporary_scope_as = versus_event_scope - # Only fire events if the bout has not been pre-decided - involved_activity = { - switch = { - trigger = has_current_phase - tournament_phase_joust = { - scope:versus_event_scope = { - switch = { - trigger = involved_activity.var:contest_versus_progress - 0 = { exists = var:contest_qualified_match_joust.var:progress_to_victory } - 1 = { exists = var:contest_semi_finalist_match_joust.var:progress_to_victory } - 2 = { exists = var:contest_finalist_match_joust.var:progress_to_victory } - } - } - } - tournament_phase_duel = { - scope:versus_event_scope = { - switch = { - trigger = involved_activity.var:contest_versus_progress - 0 = { exists = var:contest_qualified_match_duel.var:progress_to_victory } - 1 = { exists = var:contest_semi_finalist_match_duel.var:progress_to_victory } - 2 = { exists = var:contest_finalist_match_duel.var:progress_to_victory } - } - } - } - tournament_phase_wrestling = { - scope:versus_event_scope = { - switch = { - trigger = involved_activity.var:contest_versus_progress - 0 = { exists = var:contest_qualified_match_wrestling.var:progress_to_victory } - 1 = { exists = var:contest_semi_finalist_match_wrestling.var:progress_to_victory } - 2 = { exists = var:contest_finalist_match_wrestling.var:progress_to_victory } - } - } - } - tournament_phase_board_game = { - scope:versus_event_scope = { - switch = { - trigger = involved_activity.var:contest_versus_progress - 0 = { exists = var:contest_qualified_match_board_game.var:progress_to_victory } - 1 = { exists = var:contest_semi_finalist_match_board_game.var:progress_to_victory } - 2 = { exists = var:contest_finalist_match_board_game.var:progress_to_victory } - } - } - } - } - } - -} - -tournament_contest_can_compete_trigger = { - exists = var:progress_to_victory - NOT = { - is_in_guest_subset = { name = qualified } - } - activity_is_valid_tournament_contestant = yes -} - -tournament_contest_can_compete_race_trigger = { - is_adult = yes - exists = var:progress_to_victory - OR = { - is_lowborn = no - AND = { - is_playable_character = yes - primary_title.tier >= tier_county - } - gold >= major_gold_value - } - NOT = { - is_in_guest_subset = { name = qualified } - } -} - -contest_team_enemy_member_exists_trigger = { - scope:activity = { - OR = { - is_in_guest_subset = { name = team_alpha } - is_in_guest_subset = { name = team_beta } - } - trigger_if = { - limit = { - is_in_guest_subset = { name = team_alpha } - } - any_guest_subset_current_phase = { - name = team_beta - is_alive = yes - is_ai = yes - } - } - trigger_else = { - any_guest_subset_current_phase = { - name = team_alpha - is_alive = yes - is_ai = yes - } - } - } -} - -tournament_pertinent_contestant_trigger = { - OR = { - root.var:contest_murder_attempt ?= this - has_any_good_relationship_with_character_trigger = { CHARACTER = root } - has_any_bad_relationship_with_character_trigger = { CHARACTER = root } - is_consort_of = root - is_close_family_of = root - AND = { - has_court_position = champion_court_position - liege = root - } - is_knight_of = root - AND = { - exists = root.house - house ?= root.house - } - root.var:tournament_wager_target ?= this - } -} - -tournament_is_knightly_entourage_character_trigger = { - is_knight = yes - is_playable_character = no - save_temporary_scope_as = char_temp - involved_activity = { - any_attending_character = { this = scope:char_temp.liege } - } -} - -would_want_to_attend_tournament = { - trigger_if = { - limit = { is_playable_character = yes } - NOR = { - government_has_flag = government_is_tribal - government_has_flag = government_is_mercenary - government_has_flag = government_is_holy_order - } - } - trigger_else = { is_clergy = no } - OR = { - is_ai = no - has_trait = tourney_participant - has_trait = education_martial - has_trait = education_martial_prowess - has_trait = gregarious - has_trait = brave - prowess >= decent_skill_rating - has_court_position = champion_court_position - is_knight = yes - number_of_commander_traits >= 1 - has_any_scripted_relation = scope:inviter - } -} - -is_available_ai_adult_locale_person = { #to prevent bishops from being anything else than temple priests - is_available_ai_adult = yes - has_no_particular_noble_roots_trigger = yes - is_clergy = no -} +chariot_race_trigger = { + involved_activity.activity_host.culture = { + OR = { + AND = { + has_cultural_tradition = tradition_ep3_roman_ceremonies + NOT = { has_cultural_era_or_later = culture_era_late_medieval } + } + this = culture:roman + } + } +} + +activity_is_valid_tournament_contestant_training_decision = { + is_alive = yes + is_adult = yes + is_imprisoned = no + # Exclude clergy who don't fight + trigger_if = { + limit = { is_clergy = yes } + faith = { has_doctrine_parameter = clergy_can_fight } + } +} + +activity_is_competing_trigger = { + activity_is_valid_tournament_contestant = yes + is_in_guest_subset = { name = contestant } + exists = var:progress_to_victory # Ensure they have a PtV as a valid contestant +} + +activity_is_valid_tournament_contestant = { + involved_activity ?= { has_activity_type = activity_tournament } + is_alive = yes + is_adult = yes + is_imprisoned = no + # Exclude clergy who don't fight + trigger_if = { + limit = { is_clergy = yes } + OR = { + faith = { has_doctrine_parameter = clergy_can_fight } + culture = { has_cultural_parameter = culture_clergy_can_fight } + } + } + # Has not opted out + NOR = { + has_character_flag = tournament_not_competing + is_in_guest_subset = { name = spectator } + } + trigger_if = { + limit = { + involved_activity = { + NOR = { + has_current_phase = tournament_phase_horse_race + has_current_phase = tournament_phase_board_game + has_current_phase = tournament_phase_recital + } + } + } + # Only martial sex competes + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = involved_activity.activity_host } + NOR = { + has_trait = wounded_2 + has_trait = wounded_3 + } + } + # Mulan is clever enough not to reveal themselves + trigger_if = { + limit = { + involved_activity = { has_current_phase = tournament_phase_wrestling } + } + NOT = { has_character_modifier = ignores_gender_army_rules } + } + NOT = { + has_trait = incapable + } + trigger_if = { + limit = { + NOT = { + involved_activity = { has_current_phase = tournament_phase_horse_race } + } + } + NOR = { + has_trait = blind + has_trait = infirm + } + } + trigger_if = { # Blind and maimed people don't do archery + limit = { + NOT = { + involved_activity = { has_current_phase = tournament_phase_archery } + } + } + NOR = { + has_trait = blind + has_trait = maimed + } + } +} + +activity_tournament_contest_non_martial_gender_allowed = { + involved_activity ?= { + OR = { + has_current_phase = tournament_phase_horse_race + has_current_phase = tournament_phase_board_game + has_current_phase = tournament_phase_recital + } + } +} + +activity_tournament_contest_martial_gender_only = { + involved_activity ?= { + OR = { + has_current_phase = tournament_phase_duel + has_current_phase = tournament_phase_wrestling + has_current_phase = tournament_phase_melee + has_current_phase = tournament_phase_archery + has_current_phase = tournament_phase_joust + } + } +} + +activity_has_reason_to_cheer_character_trigger = { + exists = $CHAR$ + OR = { + this = $CHAR$ + AND = { + opinion = { + target = $CHAR$ + value >= 25 + } + OR = { + is_close_family_of = $CHAR$ + is_consort_of = $CHAR$ + has_any_good_relationship_with_character_trigger = { CHARACTER = $CHAR$ } + } + } + } +} + +activity_has_reason_to_anger_character_trigger = { + exists = $CHAR$ + NOT = { this = $CHAR$ } + opinion = { + target = $CHAR$ + value < 25 + } + has_any_bad_relationship_with_character_trigger = { CHARACTER = $CHAR$ } +} + +tournament_contest_wager_trigger = { + AND = { + has_current_phase = tournament_phase_$CONTEST$ + NOT = { + any_guest_subset = { + name = winner + phase = tournament_phase_$CONTEST$ + } + } + } + any_guest_subset_current_phase = { + name = qualified + count >= 3 + } + trigger_if = { + limit = { exists = var:contest_versus_progress } + var:contest_versus_progress <= 3 + } +} + +activity_tournament_armor_trigger = { + involved_activity ?= { has_activity_type = activity_tournament } + OR = { + AND = { + is_in_guest_subset = { name = qualified } + involved_activity = { + OR = { + has_current_phase = tournament_phase_melee + has_current_phase = tournament_phase_duel + has_current_phase = tournament_phase_joust + } + } + } + AND = { + has_character_modifier = ignores_gender_army_rules + is_in_guest_subset = { name = qualified } + } + } +} + +activity_tournament_shirtless_trigger = { + involved_activity ?= { + has_activity_type = activity_tournament + has_current_phase = tournament_phase_wrestling + } + is_in_guest_subset = { name = qualified } +} + +activity_tournament_valid_winner_trigger = { + is_alive = yes + exists = var:contest_aptitude + exists = var:progress_to_victory +} + +activity_adult_available_or_attending_same_activity_trigger = { + is_adult = yes + OR = { + is_available = yes + involved_activity ?= scope:activity + } +} + +activity_tournament_versus_contest_trigger = { + OR = { + has_current_phase = tournament_phase_joust + has_current_phase = tournament_phase_wrestling + has_current_phase = tournament_phase_duel + has_current_phase = tournament_phase_board_game + } +} + +activity_tournament_team_contest_trigger = { + scope:activity = { has_current_phase = tournament_phase_melee } +} + +activity_tournament_turn_contest_trigger = { + scope:activity = { + OR = { + has_current_phase = tournament_phase_archery + has_current_phase = tournament_phase_recital + } + } +} + +activity_tournament_mind_contest_trigger = { + scope:activity = { + OR = { + has_current_phase = tournament_phase_recital + has_current_phase = tournament_phase_board_game + } + } +} + +activity_tournament_prowess_contest_trigger = { + scope:activity = { + OR = { + has_current_phase = tournament_phase_melee + has_current_phase = tournament_phase_joust + has_current_phase = tournament_phase_duel + has_current_phase = tournament_phase_wrestling + } + } +} + +activity_tournament_armor_contest_trigger = { + scope:activity = { + OR = { + has_current_phase = tournament_phase_melee + has_current_phase = tournament_phase_joust + has_current_phase = tournament_phase_duel + } + } +} + +activity_tournament_horse_contest_trigger = { + scope:activity = { + OR = { + has_current_phase = tournament_phase_horse_race + has_current_phase = tournament_phase_joust + has_current_phase = tournament_phase_melee + } + } +} + +activity_tournament_race_contest_trigger = { + scope:activity = { has_current_phase = tournament_phase_horse_race } +} + +activity_tournament_same_team_trigger = { + scope:activity = { + OR = { + AND = { + any_guest_subset = { + name = team_alpha + this = $FIRST$ + } + any_guest_subset = { + name = team_alpha + this = $SECOND$ + } + } + AND = { + any_guest_subset = { + name = team_beta + this = $FIRST$ + } + any_guest_subset = { + name = team_beta + this = $SECOND$ + } + } + } + } +} + +tournament_character_any_contest_winner_trigger = { + involved_activity = { + any_guest_subset = { + name = winner + this = $CHAR$ + phase = tournament_phase_$CONTEST$ + } + } +} + +contest_versus_player_vs_ai_trigger = { + calc_true_if = { + amount = 1 + scope:versus_matchee = { is_ai = no } + scope:versus_matcher = { is_ai = no } + } + calc_true_if = { + amount = 1 + scope:versus_matchee = { is_ai = yes } + scope:versus_matcher = { is_ai = yes } + } + NOR = { + scope:versus_matchee = { has_character_flag = resigned_contest_flag } + scope:versus_matcher = { has_character_flag = resigned_contest_flag } + } +} + +contest_event_general_contestant_valid_trigger = { + is_available_quick = { + ai = yes + alive = yes + } + exists = var:contest_aptitude + exists = var:progress_to_victory + this != root +} + +has_ongoing_grand_activity_trigger = { + trigger_if = { + limit = { exists = involved_activity } + involved_activity = { + OR = { + has_activity_type = activity_tournament + has_activity_type = activity_tour + has_activity_type = activity_wedding + } + } + } + trigger_else = { + always = no + } +} + +is_grand_activity_trigger = { + OR = { + has_activity_type = activity_tournament + has_activity_type = activity_tour + has_activity_type = activity_wedding + } +} + +tournament_contest_event_trigger = { + is_ai = no + is_in_guest_subset = { name = qualified } + exists = var:progress_to_victory + NOT = { has_character_flag = busy_in_contest_event } +} + +tournament_contest_versus_event_trigger = { + is_ai = no + exists = var:progress_to_victory + is_in_guest_subset = { name = qualified } + NOT = { has_character_flag = resigned_contest_flag } + save_temporary_scope_as = versus_event_scope + # Only fire events if the bout has not been pre-decided + involved_activity = { + switch = { + trigger = has_current_phase + tournament_phase_joust = { + scope:versus_event_scope = { + switch = { + trigger = involved_activity.var:contest_versus_progress + 0 = { exists = var:contest_qualified_match_joust.var:progress_to_victory } + 1 = { exists = var:contest_semi_finalist_match_joust.var:progress_to_victory } + 2 = { exists = var:contest_finalist_match_joust.var:progress_to_victory } + } + } + } + tournament_phase_duel = { + scope:versus_event_scope = { + switch = { + trigger = involved_activity.var:contest_versus_progress + 0 = { exists = var:contest_qualified_match_duel.var:progress_to_victory } + 1 = { exists = var:contest_semi_finalist_match_duel.var:progress_to_victory } + 2 = { exists = var:contest_finalist_match_duel.var:progress_to_victory } + } + } + } + tournament_phase_wrestling = { + scope:versus_event_scope = { + switch = { + trigger = involved_activity.var:contest_versus_progress + 0 = { exists = var:contest_qualified_match_wrestling.var:progress_to_victory } + 1 = { exists = var:contest_semi_finalist_match_wrestling.var:progress_to_victory } + 2 = { exists = var:contest_finalist_match_wrestling.var:progress_to_victory } + } + } + } + tournament_phase_board_game = { + scope:versus_event_scope = { + switch = { + trigger = involved_activity.var:contest_versus_progress + 0 = { exists = var:contest_qualified_match_board_game.var:progress_to_victory } + 1 = { exists = var:contest_semi_finalist_match_board_game.var:progress_to_victory } + 2 = { exists = var:contest_finalist_match_board_game.var:progress_to_victory } + } + } + } + } + } + +} + +tournament_contest_can_compete_trigger = { + exists = var:progress_to_victory + NOT = { + is_in_guest_subset = { name = qualified } + } + activity_is_valid_tournament_contestant = yes +} + +tournament_contest_can_compete_race_trigger = { + is_adult = yes + exists = var:progress_to_victory + OR = { + is_lowborn = no + AND = { + is_playable_character = yes + primary_title.tier >= tier_county + } + gold >= major_gold_value + } + NOT = { + is_in_guest_subset = { name = qualified } + } +} + +contest_team_enemy_member_exists_trigger = { + scope:activity = { + OR = { + is_in_guest_subset = { name = team_alpha } + is_in_guest_subset = { name = team_beta } + } + trigger_if = { + limit = { + is_in_guest_subset = { name = team_alpha } + } + any_guest_subset_current_phase = { + name = team_beta + is_available_quick = { + ai = yes + alive = yes + } + } + } + trigger_else = { + any_guest_subset_current_phase = { + name = team_alpha + is_available_quick = { + ai = yes + alive = yes + } + } + } + } +} + +tournament_pertinent_contestant_trigger = { + OR = { + root.var:contest_murder_attempt ?= this + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + is_consort_of = root + is_close_family_of = root + AND = { + has_court_position = champion_court_position + liege = root + } + is_knight_of = root + AND = { + exists = root.house + house ?= root.house + } + root.var:tournament_wager_target ?= this + } +} + +tournament_is_knightly_entourage_character_trigger = { + is_knight = yes + is_playable_character = no + save_temporary_scope_as = char_temp + involved_activity = { + any_attending_character = { this = scope:char_temp.liege } + } +} + +would_want_to_attend_tournament = { + trigger_if = { + limit = { is_playable_character = yes } + NOR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_mercenary + government_has_flag = government_is_holy_order + } + } + trigger_else = { is_clergy = no } + OR = { + is_ai = no + has_trait = tourney_participant + has_trait = education_martial + has_trait = education_martial_prowess + has_trait = gregarious + has_trait = brave + prowess >= decent_skill_rating + has_court_position = champion_court_position + is_knight = yes + number_of_commander_traits >= 1 + has_any_scripted_relation = scope:inviter + } +} + +is_available_ai_adult_locale_person = { #to prevent bishops from being anything else than temple priests + is_available_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + is_clergy = no +} diff --git a/N3OW/common/scripted_triggers/04_ep2_wedding_triggers.txt b/N3OW/common/scripted_triggers/04_ep2_wedding_triggers.txt index 851aca12..d7884550 100644 --- a/N3OW/common/scripted_triggers/04_ep2_wedding_triggers.txt +++ b/N3OW/common/scripted_triggers/04_ep2_wedding_triggers.txt @@ -29,7 +29,7 @@ activity_wedding_is_valid_guest = { } activity_wedding_diplomatic_intent_impressible_target = { - is_independent_ruler = yes + top_liege = this any_neighboring_and_across_water_top_liege_realm_owner = { this = root } highest_held_title_tier < root.highest_held_title_tier NOT = { government_has_flag = cannot_be_vassal_or_liege } diff --git a/N3OW/common/scripted_triggers/05_bp2_hostage_triggers.txt b/N3OW/common/scripted_triggers/05_bp2_hostage_triggers.txt index f9c55941..7decdf56 100644 --- a/N3OW/common/scripted_triggers/05_bp2_hostage_triggers.txt +++ b/N3OW/common/scripted_triggers/05_bp2_hostage_triggers.txt @@ -67,13 +67,8 @@ bp2_valid_to_offer_hostage_ai_trigger = { NOR = { scope:recipient = { has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:actor } + house_has_feud_relation_with_trigger = { TARGET = scope:actor } } - scope:actor.house.house_head ?= { - any_owned_story = { - story_type = story_cycle_house_feud - var:house_feud_house ?= scope:recipient.house - } - } } } @@ -87,12 +82,7 @@ bp2_valid_to_demand_hostage_ai_trigger = { NOR = { scope:recipient = { has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:actor } - } - scope:actor.house.house_head = { - any_owned_story = { - story_type = story_cycle_house_feud - var:house_feud_house ?= scope:recipient.house - } + house_has_feud_relation_with_trigger = { TARGET = scope:actor } } } } @@ -111,12 +101,7 @@ bp2_valid_to_exchange_hostage_ai_trigger = { NOR = { scope:recipient = { has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:actor } - } - scope:actor.house.house_head = { - any_owned_story = { - story_type = story_cycle_house_feud - var:house_feud_house ?= scope:recipient.house - } + house_has_feud_relation_with_trigger = { TARGET = scope:actor } } } } diff --git a/N3OW/common/scripted_triggers/05_bp2_scripted_triggers.txt b/N3OW/common/scripted_triggers/05_bp2_scripted_triggers.txt index 186eae8a..ef39b073 100644 --- a/N3OW/common/scripted_triggers/05_bp2_scripted_triggers.txt +++ b/N3OW/common/scripted_triggers/05_bp2_scripted_triggers.txt @@ -42,7 +42,7 @@ character_can_rites_of_passage_trigger = { text = rites_of_passage_trigger_not_proven NOT = { any_memory = { - has_memory_type = completed_rites_of_passage + memory_type = completed_rites_of_passage } } } diff --git a/N3OW/common/scripted_triggers/05_bp2_triggers.txt b/N3OW/common/scripted_triggers/05_bp2_triggers.txt index 540de9ed..eab04b46 100644 --- a/N3OW/common/scripted_triggers/05_bp2_triggers.txt +++ b/N3OW/common/scripted_triggers/05_bp2_triggers.txt @@ -1,8 +1,10 @@ #Adult Education Activity is_higher_studies_location = { + save_temporary_scope_as = temp_location OR = { has_university_building_trigger = yes is_religious_studies_location = yes + title:h_china.holder.capital_province ?= scope:temp_location # The capital of h_china is always a valid location } } @@ -44,6 +46,20 @@ is_religious_studies_location = { has_building_or_higher = vatapi_caves_01 has_building_or_higher = al_qarawiyyin_university_01 has_building_or_higher = somapura_university_01 + # TGP + has_building_or_higher = holy_site_buddhist_grand_temple_01 + has_building_or_higher = holy_site_japanese_temple_01 + has_building_or_higher = holy_site_chinese_temple_01 + has_building_or_higher = holy_site_se_asia_pagan_temple_01 + has_building_or_higher = kofuku_ji_01 + has_building_or_higher = enryaku_ji_01 + has_building_or_higher = hwangnyongsa_01 + has_building_or_higher = giant_wild_goose_pagoda_01 + has_building_or_higher = maoshan_academy_01 + has_building_or_higher = tiantai_monasteries_01 + has_building_or_higher = jizu_shan_temples_01 + has_building_or_higher = nanhua_temple_01 + has_building_or_higher = borobudur_01 } } diff --git a/N3OW/common/scripted_triggers/06_bp3_triggers.txt b/N3OW/common/scripted_triggers/06_bp3_triggers.txt index 4cb37db8..f1757cc6 100644 --- a/N3OW/common/scripted_triggers/06_bp3_triggers.txt +++ b/N3OW/common/scripted_triggers/06_bp3_triggers.txt @@ -1,218 +1,216 @@ -wayfarer_the_real_threat_trigger = { - is_councillor_of = root - is_ai = yes - opinion = { - target = root - value < 10 - } -} - -# Used to keep track of mines found after our time period, so they have a higher chance to spawn for the Inspection event, particularly in Norway -later_historical_gold_mine_trigger = { - OR = { - this = province:1705 # Kildonan Gold Rush, 1869 - this = province:1665 # Dolgellau Gold Rush, Mid-19th century - } -} - -later_historical_silver_mine_trigger = { - OR = { - this = province:248 # Kongsberg, 1623 - this = province:346 # Sala, 15th century - } -} - -later_historical_copper_mine_trigger = { - OR = { - this = province:241 # Røros, 1645 - } -} - -reminiscing_event_trigger = { - is_ai = no - has_variable = reminiscing_location - var:reminiscing_location = root.location -} - -local_guild_trigger = { - OR = { - has_building_or_higher = watermills_01 - has_building_or_higher = windmills_01 - has_building_or_higher = common_tradeport_01 - has_building_or_higher = pastures_01 - has_building_or_higher = hunting_grounds_01 - has_building_or_higher = orchards_01 - has_building_or_higher = logging_camps_01 - has_building_or_higher = quarries_01 - has_building_or_higher = smiths_01 - has_building_or_higher = stables_01 - has_building_or_higher = guild_halls_01 - has_building_or_higher = hospices_01 - has_building_or_higher = workshops_01 - } -} - -local_guild_compare_trigger = { - switch = { - trigger = scope:local_guild_scope - 1 = { - NOT = { has_building_or_higher = watermills_01 } - building_watermills_requirement_terrain = yes - } - 2 = { - NOT = { has_building_or_higher = windmills_01 } - building_windmills_requirement_terrain = yes - } - 3 = { - NOT = { has_building_or_higher = common_tradeport_01 } - building_common_tradeport_requirement_terrain = yes - } - 4 = { - NOT = { has_building_or_higher = pastures_01 } - building_pastures_requirement_terrain = yes - } - 5 = { - NOT = { has_building_or_higher = pastures_01 } - building_pastures_requirement_terrain = yes - } - 6 = { - NOT = { has_building_or_higher = pastures_01 } - building_pastures_requirement_terrain = yes - } - 7 = { - NOT = { has_building_or_higher = pastures_01 } - building_pastures_requirement_terrain = yes - } - 8 = { - NOT = { has_building_or_higher = hunting_grounds_01 } - building_hunting_grounds_requirement_terrain = yes - } - 9 = { - NOT = { has_building_or_higher = hunting_grounds_01 } - building_hunting_grounds_requirement_terrain = yes - } - 10 = { - NOT = { has_building_or_higher = hunting_grounds_01 } - building_hunting_grounds_requirement_terrain = yes - } - 11 = { - NOT = { has_building_or_higher = orchards_01 } - building_orchards_requirement_terrain = yes - } - 12 = { - NOT = { has_building_or_higher = logging_camps_01 } - building_logging_camps_requirement_terrain = yes - } - 13 = { - NOT = { has_building_or_higher = quarries_01 } - building_quarries_requirement_terrain = yes - } - 14 = { - NOT = { has_building_or_higher = quarries_01 } - building_quarries_requirement_terrain = yes - } - 15 = { - NOT = { has_building_or_higher = smiths_01 } - building_smiths_requirement_terrain = yes - } - 16 = { - NOT = { has_building_or_higher = stables_01 } - building_stables_requirement_terrain = yes - } - 17 = { - NOT = { has_building_or_higher = guild_halls_01 } - has_building_or_higher = city_01 - } - 18 = { - NOT = { has_building_or_higher = hospices_01 } - } - 19 = { - NOT = { has_building_or_higher = hospices_01 } - } - 20 = { - NOT = { has_building_or_higher = workshops_01 } - building_workshops_requirement_terrain = yes - } - } -} - -landless_inspector_terrain_knowing_the_land_trigger = { - trigger_if = { - limit = { - OR = { - terrain = forest - terrain = jungle - terrain = taiga - terrain = wetlands - } - } - landless_inspector_terrain_master_trigger = { TERRAIN = woodlands } - } - trigger_if = { - limit = { - OR = { - terrain = mountains - terrain = hills - terrain = desert_mountains - } - } - landless_inspector_terrain_master_trigger = { TERRAIN = highlands } - } - trigger_if = { - limit = { - OR = { - terrain = plains - terrain = steppe - terrain = farmlands - terrain = floodplains - } - } - landless_inspector_terrain_master_trigger = { TERRAIN = lowlands } - } - trigger_if = { - limit = { - OR = { - terrain = desert - terrain = oasis - terrain = drylands - } - } - landless_inspector_terrain_master_trigger = { TERRAIN = drylands } - } -} - -landless_inspector_terrain_master_trigger = { - root = { - OR = { - has_character_modifier = landless_inspector_$TERRAIN$_tier_1_modifier - has_character_modifier = landless_inspector_$TERRAIN$_tier_2_modifier - has_character_modifier = nomadic_inspector_$TERRAIN$_tier_2_modifier - has_character_modifier = landless_inspector_$TERRAIN$_tier_3_modifier - has_character_modifier = nomadic_inspector_$TERRAIN$_tier_3_modifier - } - } -} - -landless_inspector_king_of_the_wilds = { - switch = { - trigger = has_character_modifier - # Woodlands - master_terrain_forest_modifier = { root.location ?= { terrain = forest } } - master_terrain_jungle_modifier = { root.location ?= { terrain = jungle } } - master_terrain_taiga_modifier = { root.location ?= { terrain = taiga } } - master_terrain_wetlands_modifier = { root.location ?= { terrain = wetlands } } - # Highlands - master_terrain_mountains_modifier = { root.location ?= { terrain = mountains } } - master_terrain_hills_modifier = { root.location ?= { terrain = hills } } - master_terrain_desert_mountains_modifier = { root.location ?= { terrain = desert_mountains } } - # Lowlands - master_terrain_plains_modifier = { root.location ?= { terrain = plains } } - master_terrain_steppe_modifier = { root.location ?= { terrain = steppe } } - master_terrain_farmlands_modifier = { root.location ?= { terrain = farmlands } } - master_terrain_floodplains_modifier = { root.location ?= { terrain = floodplains } } - # Drylands - master_terrain_drylands_modifier = { root.location ?= { terrain = drylands } } - master_terrain_desert_modifier = { root.location ?= { terrain = desert } } - master_terrain_oasis_modifier = { root.location ?= { terrain = oasis } } - } -} +wayfarer_the_real_threat_trigger = { + is_councillor_of = root + is_ai = yes + opinion = { + target = root + value < 10 + } +} + +# Used to keep track of mines found after our time period, so they have a higher chance to spawn for the Inspection event, particularly in Norway +later_historical_gold_mine_trigger = { + OR = { + this = province:1705 # Kildonan Gold Rush, 1869 + this = province:1665 # Dolgellau Gold Rush, Mid-19th century + } +} + +later_historical_silver_mine_trigger = { + OR = { + this = province:248 # Kongsberg, 1623 + this = province:346 # Sala, 15th century + } +} + +later_historical_copper_mine_trigger = { + this = province:241 # Røros, 1645 +} + +reminiscing_event_trigger = { + is_ai = no + has_variable = reminiscing_location + var:reminiscing_location = root.location +} + +local_guild_trigger = { + OR = { + has_building_or_higher = watermills_01 + has_building_or_higher = windmills_01 + has_building_or_higher = common_tradeport_01 + has_building_or_higher = pastures_01 + has_building_or_higher = hunting_grounds_01 + has_building_or_higher = orchards_01 + has_building_or_higher = logging_camps_01 + has_building_or_higher = quarries_01 + has_building_or_higher = smiths_01 + has_building_or_higher = stables_01 + has_building_or_higher = guild_halls_01 + has_building_or_higher = hospices_01 + has_building_or_higher = workshops_01 + } +} + +local_guild_compare_trigger = { + switch = { + trigger = scope:local_guild_scope + 1 = { + NOT = { has_building_or_higher = watermills_01 } + building_watermills_requirement_terrain = yes + } + 2 = { + NOT = { has_building_or_higher = windmills_01 } + building_windmills_requirement_terrain = yes + } + 3 = { + NOT = { has_building_or_higher = common_tradeport_01 } + building_common_tradeport_requirement_terrain = yes + } + 4 = { + NOT = { has_building_or_higher = pastures_01 } + building_pastures_requirement_terrain = yes + } + 5 = { + NOT = { has_building_or_higher = pastures_01 } + building_pastures_requirement_terrain = yes + } + 6 = { + NOT = { has_building_or_higher = pastures_01 } + building_pastures_requirement_terrain = yes + } + 7 = { + NOT = { has_building_or_higher = pastures_01 } + building_pastures_requirement_terrain = yes + } + 8 = { + NOT = { has_building_or_higher = hunting_grounds_01 } + building_hunting_grounds_requirement_terrain = yes + } + 9 = { + NOT = { has_building_or_higher = hunting_grounds_01 } + building_hunting_grounds_requirement_terrain = yes + } + 10 = { + NOT = { has_building_or_higher = hunting_grounds_01 } + building_hunting_grounds_requirement_terrain = yes + } + 11 = { + NOT = { has_building_or_higher = orchards_01 } + building_orchards_requirement_terrain = yes + } + 12 = { + NOT = { has_building_or_higher = logging_camps_01 } + building_logging_camps_requirement_terrain = yes + } + 13 = { + NOT = { has_building_or_higher = quarries_01 } + building_quarries_requirement_terrain = yes + } + 14 = { + NOT = { has_building_or_higher = quarries_01 } + building_quarries_requirement_terrain = yes + } + 15 = { + NOT = { has_building_or_higher = smiths_01 } + building_smiths_requirement_terrain = yes + } + 16 = { + NOT = { has_building_or_higher = stables_01 } + building_stables_requirement_terrain = yes + } + 17 = { + NOT = { has_building_or_higher = guild_halls_01 } + has_building_or_higher = city_01 + } + 18 = { + NOT = { has_building_or_higher = hospices_01 } + } + 19 = { + NOT = { has_building_or_higher = hospices_01 } + } + 20 = { + NOT = { has_building_or_higher = workshops_01 } + building_workshops_requirement_terrain = yes + } + } +} + +landless_inspector_terrain_knowing_the_land_trigger = { + trigger_if = { + limit = { + OR = { + terrain = forest + terrain = jungle + terrain = taiga + terrain = wetlands + } + } + landless_inspector_terrain_master_trigger = { TERRAIN = woodlands } + } + trigger_if = { + limit = { + OR = { + terrain = mountains + terrain = hills + terrain = desert_mountains + } + } + landless_inspector_terrain_master_trigger = { TERRAIN = highlands } + } + trigger_if = { + limit = { + OR = { + terrain = plains + terrain = steppe + terrain = farmlands + terrain = floodplains + } + } + landless_inspector_terrain_master_trigger = { TERRAIN = lowlands } + } + trigger_if = { + limit = { + OR = { + terrain = desert + terrain = oasis + terrain = drylands + } + } + landless_inspector_terrain_master_trigger = { TERRAIN = drylands } + } +} + +landless_inspector_terrain_master_trigger = { + root = { + OR = { + has_character_modifier = landless_inspector_$TERRAIN$_tier_1_modifier + has_character_modifier = landless_inspector_$TERRAIN$_tier_2_modifier + has_character_modifier = nomadic_inspector_$TERRAIN$_tier_2_modifier + has_character_modifier = landless_inspector_$TERRAIN$_tier_3_modifier + has_character_modifier = nomadic_inspector_$TERRAIN$_tier_3_modifier + } + } +} + +landless_inspector_king_of_the_wilds = { + switch = { + trigger = has_character_modifier + # Woodlands + master_terrain_forest_modifier = { root.location ?= { terrain = forest } } + master_terrain_jungle_modifier = { root.location ?= { terrain = jungle } } + master_terrain_taiga_modifier = { root.location ?= { terrain = taiga } } + master_terrain_wetlands_modifier = { root.location ?= { terrain = wetlands } } + # Highlands + master_terrain_mountains_modifier = { root.location ?= { terrain = mountains } } + master_terrain_hills_modifier = { root.location ?= { terrain = hills } } + master_terrain_desert_mountains_modifier = { root.location ?= { terrain = desert_mountains } } + # Lowlands + master_terrain_plains_modifier = { root.location ?= { terrain = plains } } + master_terrain_steppe_modifier = { root.location ?= { terrain = steppe } } + master_terrain_farmlands_modifier = { root.location ?= { terrain = farmlands } } + master_terrain_floodplains_modifier = { root.location ?= { terrain = floodplains } } + # Drylands + master_terrain_drylands_modifier = { root.location ?= { terrain = drylands } } + master_terrain_desert_modifier = { root.location ?= { terrain = desert } } + master_terrain_oasis_modifier = { root.location ?= { terrain = oasis } } + } +} diff --git a/N3OW/common/scripted_triggers/06_ce1_epidemic_triggers.txt b/N3OW/common/scripted_triggers/06_ce1_epidemic_triggers.txt index c31e8411..c8c40336 100644 --- a/N3OW/common/scripted_triggers/06_ce1_epidemic_triggers.txt +++ b/N3OW/common/scripted_triggers/06_ce1_epidemic_triggers.txt @@ -9,10 +9,8 @@ would_follow_social_distancing_trigger = { realm_has_any_epidemic = { any_sub_realm_county = { count >= $SIZE$ - any_county_province = { - any_province_epidemic = { - outbreak_intensity >= $INTENSITY$ - } + any_county_province_epidemic = { + outbreak_intensity >= $INTENSITY$ } } } diff --git a/N3OW/common/scripted_triggers/06_ce1_legend_triggers.txt b/N3OW/common/scripted_triggers/06_ce1_legend_triggers.txt index f2376528..b6ff34bf 100644 --- a/N3OW/common/scripted_triggers/06_ce1_legend_triggers.txt +++ b/N3OW/common/scripted_triggers/06_ce1_legend_triggers.txt @@ -3,8 +3,8 @@ #has_legend_chapter_trigger - checks if you own a legend is_standard_legend_spreading_courtier = { - NOT = { this = root } - NOT = { this = root.promoted_legend.legend_protagonist } + this != root + this != root.promoted_legend.legend_protagonist NOT = { is_spouse_of = root } NOT = { is_child_of = root } is_available_ai_adult = yes @@ -111,6 +111,9 @@ has_any_point_of_interest_flag = { has_building_with_flag = { flag = travel_point_of_interest_natural_feature } + has_building_with_flag = { + flag = travel_point_of_interest_stress_relief + } } } diff --git a/N3OW/common/scripted_triggers/06_fp3_scripted_triggers.txt b/N3OW/common/scripted_triggers/06_fp3_scripted_triggers.txt index bc3ed3ed..da15ac56 100644 --- a/N3OW/common/scripted_triggers/06_fp3_scripted_triggers.txt +++ b/N3OW/common/scripted_triggers/06_fp3_scripted_triggers.txt @@ -91,9 +91,8 @@ fp3_eligible_for_yearly_events_trigger = { culture = { has_cultural_pillar = heritage_mongolic } culture = { has_cultural_pillar = heritage_arabic } } - any_realm_county = { # Most events are geographical in nature - any_county_province = { geographical_region = world_persian_empire } - } + # Most events are geographical in nature + capital_province ?= { geographical_region = world_persian_empire } } fp3_is_valid_futuwaa_member = { @@ -345,10 +344,10 @@ fp3_embellish_capital_decision_character_trigger = { fp3_name_read_in_friday_prayer_decision_liege_requirements_trigger = { OR = { - is_independent_ruler = yes + top_liege = this custom_description = { text = name_read_in_friday_prayer_crown_authority - is_independent_ruler = no + top_liege != this liege ?= { has_realm_law = crown_authority_0 } } AND = { @@ -357,7 +356,7 @@ fp3_name_read_in_friday_prayer_decision_liege_requirements_trigger = { } # We have to trigger_if this for tooltip reasons. trigger_if = { - limit = { is_independent_ruler = no } + limit = { top_liege != this } liege = { government_has_flag = government_is_tribal } } } @@ -421,7 +420,7 @@ favour_skilled_outsiders_decision_valid_county_to_generate_trigger = { } trigger_if = { limit = { - root = { is_independent_ruler = no } + root = { top_liege != this } } custom_tooltip = { text = favour_skilled_outsiders_decision.tt.not_share_liege_heritage diff --git a/N3OW/common/scripted_triggers/07_ep3_petition_triggers.txt b/N3OW/common/scripted_triggers/07_ep3_petition_triggers.txt index d7160c63..be9a9ed7 100644 --- a/N3OW/common/scripted_triggers/07_ep3_petition_triggers.txt +++ b/N3OW/common/scripted_triggers/07_ep3_petition_triggers.txt @@ -77,8 +77,7 @@ petition_liege_house_governorship_rights_trigger = { } petition_liege_admin_valid_trigger = { - government_has_flag = government_is_administrative - liege = { government_has_flag = government_is_administrative } + government_allows = administrative } petition_liege_governorship_county_request = { @@ -98,3 +97,56 @@ petition_liege_governorship_kingdom_request = { is_landless_type_title = no NOT = { $LIEGE$.capital_county.kingdom = this } } + +needs_more_valid_compensation_options_trigger = { + calc_true_if = { + amount < 2 + exists = scope:bribe_gold + exists = scope:bribe_factions + exists = scope:bribe_favor + exists = scope:bribe_contract + exists = scope:bribe_vows + exists = scope:bribe_knight + } +} + +petition_liege_vows_trigger = { + is_ruler = no + is_landed = no + is_adult = yes + is_married = no + number_of_concubines = 0 + religion = scope:petition_liege.religion + faith = { has_doctrine_parameter = take_vows_active } + scope:petition_vassal.faith = { has_doctrine_parameter = take_vows_active } + NOR = { + this = scope:petition_vassal.player_heir + has_trait = devoted + } + OR = { + has_trait = education_learning + learning >= medium_skill_rating + } + trigger_if = { + limit = { is_male = yes } + faith_dominant_gender_male_or_equal = yes + } + trigger_else_if = { + limit = { is_female = yes } + faith_dominant_gender_female_or_equal = yes + } + trigger_else = { always = yes } +} + +petition_liege_knight_trigger = { + is_ruler = no + is_landed = no + is_adult = yes + NOT = { this = scope:petition_vassal.player_heir } + OR = { + has_trait = education_martial + has_trait = education_martial_prowess + prowess >= medium_skill_rating + } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:petition_liege } +} diff --git a/N3OW/common/scripted_triggers/07_ep3_triggers.txt b/N3OW/common/scripted_triggers/07_ep3_triggers.txt index ed376469..5d582a37 100644 --- a/N3OW/common/scripted_triggers/07_ep3_triggers.txt +++ b/N3OW/common/scripted_triggers/07_ep3_triggers.txt @@ -2,6 +2,36 @@ culture = { has_building_gfx = byzantine_building_gfx } } +is_roman_emperor_trigger = { + OR = { + has_title = title:e_byzantium + has_title = title:h_roman_empire + has_title = title:h_eastern_roman_empire + } +} + +is_roman_emperor_excluding_byzantium_trigger = { + OR = { + has_title = title:h_roman_empire + has_title = title:h_eastern_roman_empire + } +} + +is_roman_emperor_primary_title_trigger = { + OR = { + primary_title ?= title:e_byzantium + primary_title ?= title:h_roman_empire + primary_title ?= title:h_eastern_roman_empire + } +} + +is_roman_emperor_primary_title_excluding_byzantium_trigger = { + OR = { + primary_title ?= title:h_roman_empire + primary_title ?= title:h_eastern_roman_empire + } +} + valid_for_byz_emperor_content_trigger = { has_ep3_dlc_trigger = yes culture = { @@ -11,8 +41,7 @@ valid_for_byz_emperor_content_trigger = { } } OR = { - primary_title = title:e_byzantium - primary_title = title:e_roman_empire + is_roman_emperor_primary_title_trigger = yes AND = { culture = { OR = { @@ -36,8 +65,7 @@ valid_for_byz_governor_content_trigger = { } top_liege = { OR = { - primary_title = title:e_byzantium - primary_title = title:e_roman_empire + is_roman_emperor_primary_title_trigger = yes AND = { culture = { OR = { @@ -88,14 +116,14 @@ ep3_varangian_trigger = { } is_competing_for_same_title_as = { - government_has_flag = government_is_administrative + government_allows = administrative any_heir_title = { exists = this is_noble_family_title = no save_temporary_scope_as = temp_title } $CHARACTER$ = { - government_has_flag = government_is_administrative + government_allows = administrative } scope:temp_title = { any_title_heir = { @@ -134,6 +162,7 @@ any_valid_title_to_grant_trigger = { # It uses a cloned version that has been optimized for AI usage # Please update that one too if you're updating this one $CANDIDATE$ ?= { + is_clergy = no save_temporary_scope_as = candidate_temp custom_tooltip = { text = support_candidacy_can_appoint_for_title_tt @@ -142,7 +171,6 @@ any_valid_title_to_grant_trigger = { continue = { tier > tier_duchy } - save_temporary_scope_as = title_temp scope:candidate_temp = { can_appoint_for_title = scope:title_temp } } @@ -166,7 +194,7 @@ any_valid_candidacy_trigger = { } } appointment_candidate_score = { - title = $TOP_LIEGE$.primary_title + target = $TOP_LIEGE$.primary_title value > 0 } } @@ -188,7 +216,7 @@ any_valid_candidacy_trigger = { limit = { exists = scope:title_temp } $CANDIDATE$ = { appointment_candidate_score = { - title = scope:title_temp + target = scope:title_temp value > 0 } } @@ -220,7 +248,7 @@ is_candidate_for_title_trigger = { } } appointment_candidate_score = { - title = $TITLE$ + target = $TITLE$ value > 0 } } @@ -228,21 +256,31 @@ is_candidate_for_title_trigger = { } valid_governor_contract_trigger = { - government_has_flag = government_is_administrative - is_alive = yes - is_adult = yes - is_incapable = no + government_allows = administrative + is_available_quick = { + adult = yes + alive = yes + incapable = no + } } valid_governor_contract_basic_trigger = { task_contract_taker = { #you have to be a governor - is_governor = yes + trigger_if = { + limit = { + government_has_flag = government_is_celestial + } + is_governor_or_admin_count = yes + } + trigger_else = { + is_governor = yes + } #and the location has to be in your realm custom_tooltip = { text = task_contract_location_not_in_realm any_sub_realm_county = { - any_county_province = { + any_county_province = { this = root.task_contract_location } } @@ -634,9 +672,11 @@ experienced_charioteer_trigger = { } ep3_ideal_castration_candidate_trigger = { - is_ai = yes - is_male = yes - is_adult = no + is_available_quick = { + ai = yes + female = no + adult = yes + } is_close_family_of = scope:actor is_eunuch_trigger = no is_available = yes @@ -764,7 +804,7 @@ valid_for_pagan_conversion_trigger = { ep3_story_cycle_admin_eunuch_valid_story_trigger = { any_owned_story = { - story_type = story_cycle_admin_eunuch + type = story_cycle_admin_eunuch save_temporary_scope_as = story_temp var:eunuch ?= { is_alive = yes @@ -813,59 +853,74 @@ ep3_story_cycle_admin_eunuch_involved_character = { } is_appointment_valid_trigger = { - $CANDIDATE$ = { + $TITLE$ = { save_temporary_scope_as = title_temp } + $CANDIDATE$ = { save_temporary_scope_as = candidate_temp } + $TOP_LIEGE$ = { save_temporary_scope_as = top_liege_temp } + custom_tooltip = { # Capital should be never a valid appointment (go for higher title instead + text = not_top_liege_capital_county_tt + NOT = { scope:title_temp ?= scope:candidate_temp.top_liege.capital_county } + } + scope:candidate_temp = { trigger_if = { - limit = { - exists = $TITLE$ - } - $TITLE$ = { - OR = { - has_title_law_flag = appointment_type_succession - holder = { - has_realm_law_flag = appointment_type_succession + limit = { exists = scope:title_temp } + custom_tooltip = { # Has relevant law + text = has_appointment_succession_tt + $TITLE$ = { + OR = { + has_title_law_flag = appointment_type_succession + holder ?= { has_realm_law_flag = appointment_type_succession } } } } - } - trigger_if = { - limit = { # We check independence, not tier, to allow for admin kingdoms - exists = $TITLE$ - NOT = { $CANDIDATE$.top_liege.highest_held_title_tier = $TITLE$.tier } + trigger_if = { + limit = { + NOT = { top_liege.highest_held_title_tier = scope:title_temp.tier } + } + is_adult = yes } - $CANDIDATE$ = { is_adult = yes } - } - trigger_if = { - limit = { - exists = $TITLE$ - $CANDIDATE$ = { + trigger_if = { + limit = { any_held_title = { count >= 1 } } - } - custom_tooltip = { # Only one province of highest rank - text = only_one_province_of_highest_rank_tt - NOT = { - $CANDIDATE$ = { - any_held_title = { - tier = $TITLE$.tier - is_landless_type_title = no - is_noble_family_title = no + trigger_if = { + limit = { government_has_flag = government_is_celestial } + custom_tooltip = { # Only one province of highest rank + text = cannot_compete_for_lower_rank_titles_tt + NOT = { + any_held_title = { + tier > scope:title_temp.tier + is_landless_type_title = no + is_noble_family_title = no + } } } } - } - custom_tooltip = { - text = promote_candidate_interaction_existing_holder_tt - this != $TITLE$.holder + trigger_else = { + custom_tooltip = { # Only one province of highest rank + text = only_one_province_of_highest_rank_tt + NOT = { + any_held_title = { + tier = scope:title_temp.tier + is_landless_type_title = no + is_noble_family_title = no + } + } + } + } + custom_tooltip = { + text = promote_candidate_interaction_existing_holder_tt + this != scope:title_temp.holder + } } } custom_tooltip = { text = can_be_appointed_interaction_tt OR = { - can_be_granted_titles_by = { RULER = $TOP_LIEGE$ } - can_be_granted_theocratic_titles_by = { RULER = $TOP_LIEGE$ } + can_be_granted_titles_by = { RULER = scope:top_liege_temp } + can_be_granted_theocratic_titles_by = { RULER = scope:top_liege_temp } AND = { - is_diarch_of_target = $TOP_LIEGE$ - $TOP_LIEGE$ = { has_diarchy_active_parameter = diarchy_is_co_rulership } + is_diarch_of_target = scope:top_liege_temp + scope:top_liege_temp = { has_diarchy_active_parameter = diarchy_is_co_rulership } } } } @@ -873,7 +928,7 @@ is_appointment_valid_trigger = { text = only_administrative_tt trigger_if = { limit = { is_landed = yes } - government_has_flag = government_is_administrative + government_allows = administrative } } is_clergy = no @@ -939,6 +994,11 @@ can_recruit_archer_cavalry_trigger = { can_create_maa = mangudai can_create_maa = asawira can_create_maa = accolade_maa_horse_archers + can_create_maa = emishi_horse_archers + can_create_maa = japanese_horse_archers + can_create_maa = kheshig + can_create_maa = heavy_horse_archers + can_create_maa = heavy_horse_archers } } } @@ -963,16 +1023,14 @@ ep3_vassal_will_become_admin = { #Have the State Faith #Aren't rivals of the admin liege #Dukes and above must like the main liege at least a little. - + highest_held_title_tier > tier_barony primary_title = { target_is_de_jure_liege_or_above = scope:administrative_liege.primary_title #We only auto convert de jure vassals } - NOR = { #We convert only clan and feudal vassals in this decision - government_has_flag = government_is_theocracy - government_has_flag = government_is_special_republic - government_has_flag = government_is_landless_adventurer - government_has_flag = government_is_tribal - government_has_flag = government_is_administrative + OR = { #We convert only clan and feudal vassals in this decision + government_has_flag = government_is_feudal + government_has_flag = government_is_clan + government_has_flag = government_is_japan_feudal } faith = scope:administrative_liege.faith #The future state faith } @@ -1009,9 +1067,8 @@ cid_story_cycle_start_trigger = { has_variable = ongoing_cid_story_cycle has_variable = had_cid_story_cycle } - is_landless_adventurer = yes - exists = top_liege - top_liege = { + has_government = landless_adventurer_government + top_liege ?= { any_courtier = { is_available_healthy_ai_adult = yes } } } @@ -1057,16 +1114,19 @@ has_any_gallowsbait_xp_trigger = { } ep3_restored_rome_hard_mode_trigger = { - this = title:e_roman_empire.holder + OR = { + this = title:h_roman_empire.holder + this = title:h_eastern_roman_empire.holder + } any_owned_story = { - story_type = ep3_story_cycle_restoring_rome + type = ep3_story_cycle_restoring_rome has_variable = roman_empire_hard_mode } } faith_is_interesting_heresy_to_state_faith_trigger = { religion = root.top_liege.primary_title.state_faith.religion - NOT = { this = root.top_liege.primary_title.state_faith } + this != root.top_liege.primary_title.state_faith num_county_followers >= 3 save_temporary_scope_as = temp_heresy root.top_liege.primary_title.state_faith = { @@ -1092,14 +1152,13 @@ ep3_boundary_dispute_county_trigger = { county_held_or_vassal_to_target_trigger = { TARGET = $OWNER$ } } } - } + } } } ep3_subsume_province_duchy_trigger = { tier = tier_duchy - exists = holder - holder = $TARGET$ + holder ?= $TARGET$ is_noble_family_title = no is_landless_type_title = no trigger_if = { @@ -1159,7 +1218,7 @@ ep3_interesting_courtier_to_ask_trigger = { ep3_admin_faction_trigger = { trigger_if = { # Enabled for all admin realms with EP3 limit = { has_ep3_dlc_trigger = yes } - $FACTION_TARGET$ = { government_has_flag = government_is_administrative } + $FACTION_TARGET$ = { government_allows = administrative } } trigger_else = { # Enabled for Byzantium without EP3 $FACTION_TARGET$ = { has_title = title:e_byzantium } @@ -1191,7 +1250,7 @@ ep3_switch_faction_war_sides_war_trigger = { # Recipient must not be a war leader NOT = { is_war_leader = scope:recipient } # Recipient must not be the claimant - NOT = { primary_attacker.joined_faction.special_character = scope:recipient } + primary_attacker.joined_faction.special_character != scope:recipient } ep3_raid_insight_trigger = { @@ -1247,7 +1306,7 @@ ep3_adventurer_ai_valid_war_target_trigger = { scope:war_target_temp = { any_held_title = { count >= 1 - tier = tier_empire + title_tier = empire save_temporary_scope_as = war_target_title_temp } } @@ -1261,7 +1320,7 @@ ep3_adventurer_ai_valid_war_target_trigger = { scope:war_target_temp = { any_held_title = { count >= 1 - tier = tier_kingdom + title_tier = kingdom save_temporary_scope_as = war_target_title_temp } } @@ -1275,7 +1334,7 @@ ep3_adventurer_ai_valid_war_target_trigger = { scope:war_target_temp = { any_held_title = { count >= 1 - tier = tier_duchy + title_tier = duchy save_temporary_scope_as = war_target_title_temp } } @@ -1289,7 +1348,7 @@ ep3_adventurer_ai_valid_war_target_trigger = { scope:war_target_temp = { any_held_title = { count >= 1 - tier = tier_county + title_tier = county save_temporary_scope_as = war_target_title_temp } } @@ -1314,7 +1373,7 @@ ep3_adventurer_ai_valid_legitimist_target_trigger = { save_temporary_scope_as = target_temp current_strength_with_allies_value < $ADVENTURER$.current_strength_with_allies_seventy_five_percent_value any_held_title = { - tier >= tier_kingdom + title_tier >= kingdom any_claimant = { this = $ADVENTURER$ } save_temporary_scope_as = claim_temp } @@ -1329,7 +1388,7 @@ ep3_adventurer_ai_valid_legitimist_target_trigger = { } ep3_adventurer_might_attack_target_trigger = { - is_landless_adventurer = yes + has_government = landless_adventurer_government # Army at least half the size current_strength_with_allies_value > $TARGET$.current_strength_with_allies_fifty_percent_value # Not allies @@ -1641,3 +1700,51 @@ estate_can_construct_olive_05_trigger = { estate_can_construct_olive_06_trigger = { domicile ?= { has_domicile_building_or_higher = estate_main_05 } } + +estate_can_construct_health_03_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_02 } +} +estate_can_construct_health_04_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_03 } +} +estate_can_construct_health_05_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_04 } +} +estate_can_construct_health_06_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_05 } +} + +estate_can_construct_japanese_tea_plantation_03_trigger = { + domicile ?= { has_domicile_building_or_higher = japanese_manor_main_02 } +} +estate_can_construct_japanese_tea_plantation_04_trigger = { + domicile ?= { has_domicile_building_or_higher = japanese_manor_main_03 } +} +estate_can_construct_japanese_tea_plantation_05_trigger = { + domicile ?= { has_domicile_building_or_higher = japanese_manor_main_04 } +} +estate_can_construct_japanese_tea_plantation_06_trigger = { + domicile ?= { has_domicile_building_or_higher = japanese_manor_main_05 } +} + +# Check succession law types for Influence Candidacy validity +# TYPE should always be 'realm' or 'title' +influence_candidacy_valid_succession_law_trigger = { + OR = { + # Byzantium + has_$TYPE$_law = acclamation_succession_law + has_$TYPE$_law = appointment_succession_law + # Celestial Governors + has_$TYPE$_law = celestial_appointment_succession_law + has_$TYPE$_law = celestial_military_appointment_succession_law + # Meritocratic Governors + has_$TYPE$_law = meritocratic_appointment_succession_law + has_$TYPE$_law = meritocratic_military_appointment_succession_law + # Japanese Governors + has_$TYPE$_law = japanese_appointment_succession_law + has_$TYPE$_law = japanese_military_appointment_succession_law + # Ceremonial Regents + has_$TYPE$_law = meritocratic_regency_succession_law + has_$TYPE$_law = japanese_regency_succession_law + } +} diff --git a/N3OW/common/scripted_triggers/07_frankokratia_triggers.txt b/N3OW/common/scripted_triggers/07_frankokratia_triggers.txt index 3574341c..e156c8f5 100644 --- a/N3OW/common/scripted_triggers/07_frankokratia_triggers.txt +++ b/N3OW/common/scripted_triggers/07_frankokratia_triggers.txt @@ -14,7 +14,7 @@ ep3_frankokratia_ghw_trigger = { trigger_if = { limit = { title:e_byzantium.holder = { - government_has_flag = government_is_administrative + government_has_flag = government_is_special_administrative } } #Byzantine state faith is not Catholic @@ -170,7 +170,7 @@ ep3_frankokratia_story_owner_trigger = { highest_held_title_tier <= tier_kingdom exists = faith.religious_head faith.religious_head = { is_ai = yes } - NOT = { scope:char_temp = faith.religious_head } + scope:char_temp != faith.religious_head exists = scope:char_temp.faith.great_holy_war #Not pals with the Byzantine emperor exists = title:e_byzantium.holder @@ -208,9 +208,8 @@ ep3_frankokratia_story_owner_trigger = { #Close family claimant any_close_or_extended_family_member = { OR = { - AND = { - ep3_frankokratia_claimant_trigger = yes - } + ep3_frankokratia_claimant_trigger = yes + AND = { ep3_frankokratia_transiting_relative_trigger = yes #In-law claimant @@ -430,8 +429,7 @@ ep3_frankokratia_financier_exists_trigger = { title:e_italy = { any_in_de_jure_hierarchy = { count >= 1 - exists = holder - holder = { + holder ?= { ep3_frankokratia_financier_sub_trigger = yes } } @@ -439,8 +437,7 @@ ep3_frankokratia_financier_exists_trigger = { title:k_sicily = { any_in_de_jure_hierarchy = { count >= 1 - exists = holder - holder = { + holder ?= { ep3_frankokratia_financier_sub_trigger = yes } } @@ -448,8 +445,7 @@ ep3_frankokratia_financier_exists_trigger = { title:k_croatia = { any_in_de_jure_hierarchy = { count >= 1 - exists = holder - holder = { + holder ?= { ep3_frankokratia_financier_sub_trigger = yes } } @@ -457,8 +453,7 @@ ep3_frankokratia_financier_exists_trigger = { title:k_burgundy = { any_in_de_jure_hierarchy = { count >= 1 - exists = holder - holder = { + holder ?= { ep3_frankokratia_financier_sub_trigger = yes } } @@ -466,8 +461,7 @@ ep3_frankokratia_financier_exists_trigger = { title:k_aquitaine = { any_in_de_jure_hierarchy = { count >= 1 - exists = holder - holder = { + holder ?= { ep3_frankokratia_financier_sub_trigger = yes } } @@ -475,8 +469,7 @@ ep3_frankokratia_financier_exists_trigger = { title:e_spain = { any_in_de_jure_hierarchy = { count >= 1 - exists = holder - holder = { + holder ?= { ep3_frankokratia_financier_sub_trigger = yes } } @@ -484,8 +477,7 @@ ep3_frankokratia_financier_exists_trigger = { title:e_italy = { any_in_de_jure_hierarchy = { count >= 1 - exists = holder - holder = { + holder ?= { highest_held_title_tier >= tier_county highest_held_title_tier < tier_empire ep3_frankokratia_financier_trigger = yes @@ -495,8 +487,7 @@ ep3_frankokratia_financier_exists_trigger = { title:k_sicily = { any_in_de_jure_hierarchy = { count >= 1 - exists = holder - holder = { + holder ?= { highest_held_title_tier >= tier_county highest_held_title_tier < tier_empire ep3_frankokratia_financier_trigger = yes @@ -506,8 +497,7 @@ ep3_frankokratia_financier_exists_trigger = { title:k_croatia = { any_in_de_jure_hierarchy = { count >= 1 - exists = holder - holder = { + holder ?= { highest_held_title_tier >= tier_county highest_held_title_tier < tier_empire ep3_frankokratia_financier_trigger = yes @@ -529,7 +519,7 @@ ep3_frankokratia_valid_joiner_trigger = { has_truce = title:e_byzantium.holder has_relation_friend = title:e_byzantium.holder any_owned_story = { - story_type = frankokratia_story + type = frankokratia_story } } } @@ -567,6 +557,7 @@ ep3_frankokratia_latin_kingdom_available_trigger = { ep3_frankokratia_discard_old_lands_trigger = { NAND = { primary_title = { + tier <= tier_empire empire = title:e_byzantium } any_sub_realm_county = { @@ -582,9 +573,7 @@ ep3_frankokratia_beneficiary_trigger = { faith = scope:frankokratia_crusader.faith NOR = { this = scope:financier - any_heir_title = { - count >= 1 - } + any_heir_title = { } has_trait = incapable has_trait = devoted AND = { diff --git a/N3OW/common/scripted_triggers/09_mpo_greatest_of_khans_triggers.txt b/N3OW/common/scripted_triggers/09_mpo_greatest_of_khans_triggers.txt index 3e356b20..ca514b2b 100644 --- a/N3OW/common/scripted_triggers/09_mpo_greatest_of_khans_triggers.txt +++ b/N3OW/common/scripted_triggers/09_mpo_greatest_of_khans_triggers.txt @@ -231,7 +231,7 @@ mpo_war_of_defiance_notified_player_trigger = { AND = { exists = root.capital_county realm_to_title_distance_squared = { - title = root.capital_county + target = root.capital_county value <= squared_distance_almost_massive } } @@ -240,7 +240,7 @@ mpo_war_of_defiance_notified_player_trigger = { gok_desirable_vassal_trigger = { OR = { - ai_boldness <= medium_negative_ai_value + ai_boldness <= low_negative_ai_value has_trait = loyal is_obedient_to = scope:gok has_any_good_relationship_with_character_trigger = { CHARACTER = scope:gok } @@ -251,7 +251,29 @@ gok_desirable_vassal_trigger = { is_allied_to = scope:gok opinion = { target = scope:gok - value >= 70 + value > 20 + } + #Dukes from pliant cultures are cool + AND = { + highest_held_title_tier < tier_kingdom + culture = { + OR = { + has_cultural_tradition = tradition_loyal_soldiers + has_cultural_tradition = tradition_pacifism + has_cultural_tradition = tradition_xenophilic + has_cultural_tradition = tradition_modest + has_cultural_tradition = tradition_fp2_malleable_subjects + } + } + } + trigger_if = { + limit = { + faith = scope:gok.faith + } + opinion = { + target = scope:gok + value >= -20 + } } } } @@ -405,6 +427,7 @@ gok_willing_new_admin_vassal_trigger = { } } NOR = { + government_has_flag = government_is_special_administrative government_has_flag = government_is_administrative government_has_flag = government_is_tribal } diff --git a/N3OW/common/scripted_triggers/10_ach_scripted_triggers.txt b/N3OW/common/scripted_triggers/10_ach_scripted_triggers.txt new file mode 100644 index 00000000..c705d932 --- /dev/null +++ b/N3OW/common/scripted_triggers/10_ach_scripted_triggers.txt @@ -0,0 +1,354 @@ +coronation_trigger = { + has_ach_dlc_trigger = yes + is_landed = yes + highest_held_title_tier >= tier_kingdom + OR = { + government_has_flag = government_is_feudal + government_has_flag = government_is_tribal + AND = { + government_has_flag = government_is_special_administrative + is_independent_ruler = yes + } + government_has_flag = government_is_nomadic + government_has_flag = government_is_clan + AND = { + government_has_flag = government_is_meritocratic + is_independent_ruler = yes + } + AND = { + government_has_flag = government_is_steppe_admin + is_independent_ruler = yes + } + AND = { + government_is_japanese_trigger = yes + has_title = title:e_japan + tgp_has_ceremonial_liege_title_trigger = yes + } + government_has_flag = government_is_mandala + } +} + +coronation_living_officiator_trigger = { + involved_activity = { + has_variable = officiator + var:officiator = { + is_alive = yes + is_imprisoned = no + } + } +} + +coronation_has_emperor_law = { + has_realm_law = crowned_emperor +} + +coronation_has_king_law = { + has_realm_law = crowned_king +} + +has_any_coronation_law = { + OR = { + coronation_has_emperor_law = yes + coronation_has_king_law = yes + } +} + +coronation_feast_phase = { + trigger_if = { + limit = { + has_activity_type = activity_coronation + } + has_current_phase = coronation_phase_feast + } +} + +coronation_hostile_to_host_trigger = { + OR = { + is_in_guest_subset = { name = detractor } + has_any_bad_relationship_with_character_trigger = { CHARACTER = involved_activity.activity_host } + has_activity_intent = coronation_disrupt_loyalists + } +} + +is_important_hof_trigger = { + faith = { + # The HoF actually matters + NOT = { has_doctrine = doctrine_theocracy_temporal } + # And this HoF is relevant to the activity + this = scope:host.faith + } + government_has_flag = government_is_theocracy + any_held_title = { is_head_of_faith = yes } +} + +coronation_has_proper_artifact_trigger = { + trigger_if = { + limit = { + coronation_proper_artifact_crown_trigger = yes + coronation_proper_artifact_regalia_trigger = no + } + any_character_artifact = { + artifact_slot_type = helmet + } + } + trigger_else_if = { + limit = { + coronation_proper_artifact_regalia_trigger = yes + coronation_proper_artifact_crown_trigger = no + } + any_character_artifact = { + artifact_slot_type = regalia + } + } + trigger_else = { + any_character_artifact = { + OR = { + artifact_slot_type = helmet + artifact_slot_type = regalia + } + } + } +} + +coronation_proper_artifact_crown_trigger = { + faith.religion = { + OR = { + this = religion:baltic_religion + this = religion:bon_religion + this = religion:christianity_religion + this = religion:dualism_religion + this = religion:hellenism_religion + this = religion:judaism_religion + this = religion:kushitism_religion + this = religion:siberian_religion + this = religion:tengrism_religion + this = religion:west_african_orisha_religion + this = religion:yazidi_religion + this = religion:zoroastrianism_religion + } + } +} + +coronation_proper_artifact_regalia_trigger = { + faith.religion = { + OR = { + this = religion:buddhism_religion + this = religion:finno_ugric_religion + this = religion:hinduism_religion + this = religion:jainism_religion + this = religion:slavic_religion + this = religion:west_african_bori_religion + } + } +} + +# Religions that are not included in the triggers above can have both regalia or a crown. +# The list is intentional and includes: +# akom_religion +# basque_paganism_religion +# donyipolism_religion +# germanic_religion +# islam_religion +# magyar_religion +# mundhum_religion +# north_african_religion +# paganism_religion +# qiangic_religion +# taoism_religion +# waaqism_religion +# west_african_roog_religion +# zunism_religion + +has_regal_presence_trait_trigger = { + #Done this way to prevent traits blocking event option text + trigger_if = { + limit = { + has_trait = greatest_of_khans + } + has_trait = greatest_of_khans + } + trigger_else_if = { + limit = { + has_trait = chakravarti + } + has_trait = chakravarti + } + trigger_else_if = { + limit = { + has_trait = augustus + } + has_trait = augustus + } + trigger_else_if = { + limit = { + has_trait = golden_lineage + } + has_trait = golden_lineage + } + trigger_else_if = { + limit = { + has_trait = legend + } + has_trait = legend + } + trigger_else_if = { + limit = { + has_trait = golden_lineage + } + has_trait = golden_lineage + } + trigger_else_if = { + limit = { + has_trait = conqueror + } + has_trait = conqueror + } + trigger_else_if = { + limit = { + has_trait = lifestyle_surveyor + } + has_trait = lifestyle_surveyor + } + trigger_else_if = { + limit = { + has_trait = administrator + } + has_trait = administrator + } + trigger_else_if = { + limit = { + has_trait = family_first + } + has_trait = family_first + } + trigger_else_if = { + limit = { + has_trait = august + } + has_trait = august + } + trigger_else_if = { + limit = { + has_trait = overseer + } + has_trait = overseer + } + trigger_else_if = { + limit = { + has_trait = giant + } + has_trait = giant + } + trigger_else_if = { + limit = { + has_trait = arrogant + } + has_trait = arrogant + } + trigger_else_if = { + limit = { + has_trait = gregarious + } + has_trait = gregarious + } + trigger_else_if = { + limit = { + has_trait = ambitious + } + has_trait = ambitious + } + trigger_else_if = { + limit = { + has_trait = just + } + has_trait = just + } + trigger_else_if = { + limit = { + has_trait = calm + } + has_trait = calm + } + trigger_else_if = { + limit = { + has_trait = zealous + } + has_trait = zealous + } + trigger_else_if = { + limit = { + has_trait = strong + } + has_trait = strong + } + trigger_else_if = { + limit = { + has_trait = beauty_good_3 + } + has_trait = beauty_good_3 + } + trigger_else_if = { + limit = { + has_trait = beauty_good_2 + } + has_trait = beauty_good_2 + } + trigger_else_if = { + limit = { + has_trait = physique_good_3 + } + has_trait = physique_good_3 + } + trigger_else = { + has_trait = physique_good_2 + } +} + +coronation_being_crowned_trigger = { + exists = involved_activity + coronation_living_officiator_trigger = yes + involved_activity.activity_host = { + OR = { + coronation_proper_artifact_crown_trigger = yes + AND = { + coronation_proper_artifact_regalia_trigger = no + any_character_artifact = { + artifact_slot_type = helmet + } + involved_activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + } + } + +} + +coronation_self_crowning_trigger = { + exists = involved_activity + involved_activity.activity_host = { + OR = { + coronation_proper_artifact_crown_trigger = yes + AND = { + coronation_proper_artifact_regalia_trigger = no + any_character_artifact = { + artifact_slot_type = helmet + } + #Doesn't have title regalia + save_temporary_scope_as = host_temp + NOT = { + any_character_artifact = { + artifact_slot_type = regalia + has_variable = artifact_succession_title + var:artifact_succession_title = { + this = scope:host_temp.primary_title + } + } + } + } + } + } +} diff --git a/N3OW/common/scripted_triggers/10_tgp_dynastic_cycle_triggers.txt b/N3OW/common/scripted_triggers/10_tgp_dynastic_cycle_triggers.txt new file mode 100644 index 00000000..b7baab94 --- /dev/null +++ b/N3OW/common/scripted_triggers/10_tgp_dynastic_cycle_triggers.txt @@ -0,0 +1,401 @@ + +################################################## +# Debug Triggers + +# Do we want to gather global variable tallies for the Chinese struggle? +## Toggled off for release, toggle back on to check how often we change phases & which catalysts are firing. +gather_debug_variables_for_dynastic_cycle_trigger = { debug_only = yes } + +################################################## +# General Triggers +## Miscellaneous assorted triggers related to bits of neutral struggle content. + +tgp_does_this_player_care_about_the_dynastic_cycle = { + save_temporary_scope_as = char_temp + situation:dynastic_cycle ?= { + OR = { + any_situation_participant = { + this = scope:char_temp + } + situation_top_has_province = scope:char_temp.capital_province + } + } +} + +tgp_is_hegemon_or_below_in_dynastic_cycle_trigger = { + custom_description = { + text = tgp_is_hegemon_or_below_in_dynastic_cycle_trigger_tt + trigger_if = { + limit = { + any_character_situation = { + situation_type = dynastic_cycle + } + } + top_participant_group:dynastic_cycle ?= { + NOT = { + participant_group_type = other_rulers + } + } + } + trigger_else = { + always = no + } + } +} + +is_valid_celestial_dynasty = { + government_has_flag = government_is_celestial + culture = { + has_cultural_pillar = heritage_chinese + } +} + +tgp_dynastic_cycle_is_the_mandate_loser = { + NOT = { exists = title:h_china.holder } + title:h_china.previous_holder ?= this +} + +tgp_dynastic_cycle_offensive_wars_ban_trigger = { + trigger_if = { + limit = { + scope:attacker ?= { has_title = title:h_china } + exists = situation:dynastic_cycle + } + custom_tooltip = { + text = dynastic_cycle_offensive_wars_ban_tt + scope:attacker = { + top_participant_group:dynastic_cycle ?= { + NOT = { has_participant_group_parameter = dynastic_cycle_offensive_wars_ban } + } + } + } + } +} + +tgp_dynastic_cycle_yearly_drift_blocked_trigger = { + trigger_if = { + limit = { + OR = { + situation_current_phase = situation_dynastic_cycle_phase_stability_expansion + situation_current_phase = situation_dynastic_cycle_phase_stability_advancement + } + } + title:h_china.holder.capital_county ?= { NOT = { has_county_modifier = tgp_strengthen_capital_modifier } } + } +} + +# use only with Dynastic Cycle, to determine if root is in the same Movement as the target character, including pro_hegemon and hegemon_ruler as the same group +is_in_same_movement_as = { + save_temporary_scope_as = temp_char + exists = $TARGET$.top_participant_group:dynastic_cycle + OR = { + top_participant_group:dynastic_cycle ?= $TARGET$.top_participant_group:dynastic_cycle + AND = { + is_in_pro_hegemon_or_hegemon_movement = yes + $TARGET$ = { + is_in_pro_hegemon_or_hegemon_movement = yes + } + } + } +} +# used to check if eligible for the pro_hegemon boost in ai chances +is_in_pro_hegemon_or_hegemon_movement = { + save_temporary_scope_as = temp_char + custom_tooltip = { + top_participant_group:dynastic_cycle ?= { + OR = { + participant_group_type = hegemon_ruler + participant_group_type = pro_hegemon_movement + } + } + text = is_in_pro_hegemon_or_hegemon_movement_tt + } +} + +# To determine if situation_participant_group is favored +# Use e.g. "MOVEMENT = expansion_movement" to check a specific movement +is_movement_in_power = { + situation:dynastic_cycle ?= { + situation_participant_group:$MOVEMENT$ = { + save_temporary_scope_as = my_movement + } + } + custom_tooltip = { + scope:my_movement = { + exists = var:movement_favored + } + text = my_movement_is_in_power + } +} + +# To check if a character is a leader of any movement +is_any_movement_leader = { + save_temporary_scope_as = leader + custom_description = { + text = is_any_movement_leader_tt + top_participant_group:dynastic_cycle.var:movement_leader ?= scope:leader + } +} + +# To check if a character is part of any movement that's NOT Unaligned +is_any_movement_member_not_undecided = { + top_participant_group:dynastic_cycle ?= { + OR = { + participant_group_type = expansion_movement + participant_group_type = advancement_movement + participant_group_type = pro_hegemon_movement + participant_group_type = conservative_movement + } + } +} + +is_celestial_governor_in_need_of_successor_trigger = { + government_has_flag = government_is_celestial + is_governor = yes + primary_title.tier >= tier_duchy + has_realm_law = celestial_appointment_succession_law # we don't want to make bureaucratic appointments for military provinces + primary_title = { + any_title_heir = { + dynasty != root.dynasty # nepotism very bad! + merit_level >= root.expected_primary_title_merit + root.liege != this + count = 0 + } + } +} + +is_province_valid_confucian_education_trigger = { + OR = { + #holder has confucian religion or culture + county.holder = { + faith = { + religion = religion:confucianism_religion + } + culture = { + has_cultural_pillar = heritage_chinese + } + } + #location is in China or has confucian religion or culture + geographical_region = world_asia_china + faith = { + religion = religion:confucianism_religion + } + culture = { + has_cultural_pillar = heritage_chinese + } + #location is part of the Dynastic Cycle region + county = { + any_county_situation_sub_region = { + this = situation:dynastic_cycle.situation_sub_region:core + } + } + } +} + +grand_campaign_valid_contributor_trigger = { + top_liege = scope:owner + custom_description = { + text = grand_campaign_target_border_tt + this != scope:owner + this != scope:founder + object = scope:great_project.var:attack_$ID$.holder + scope:great_project.var:attack_$ID$ ?= { + holder.top_overlord != scope:owner + any_title_to_title_neighboring_and_across_water_county = { + holder.top_overlord = scope:owner + } + } + } + custom_tooltip = { + text = grand_campaign_main_target_tt + scope:great_project = { + any_contribution = { + contribution_id = attack_1 + contribution_is_funded = yes + } + } + } +} + +hegemon_favors_advancement_trigger = { + title:h_china.holder ?= { + OR = { + var:favor_era ?= flag:advancement + AND = { + is_ai = yes + hegemon_favored_stability_phase_value >= 0 + } + } + } +} + +hegemon_favors_expansion_trigger = { + title:h_china.holder ?= { + OR = { + var:favor_era ?= flag:expansion + AND = { + is_ai = yes + hegemon_favored_stability_phase_value < 0 + } + } + } +} + + +### Exam triggers - check if the character in scope is considered to have passed (or failed) a specific examination tier + +# children examination +tgp_passed_children_examination = { + has_character_flag = passed_child_exam +} +tgp_failed_children_examination = { + not = { has_character_flag = passed_child_exam } + any_memory = { has_memory_type = failed_child_exam_memory } +} + +# provincial examination +tgp_passed_provincial_examination = { + has_character_flag = passed_provincial_exam +} +tgp_failed_provincial_examination = { + not = { has_character_flag = passed_provincial_exam } + any_memory = { has_memory_type = failed_provincial_exam_memory } +} + +# metropolitan examination +tgp_passed_metropolitan_examination = { + has_character_flag = passed_metropolitan_exam +} +tgp_failed_metropolitan_examination = { + not = { has_character_flag = passed_metropolitan_exam } + any_memory = { has_memory_type = failed_metropolitan_exam_memory } +} + +# palace examination +tgp_passed_palace_examination = { + has_character_flag = passed_palace_exam +} + +can_pass_candidate_score_prestige_law_trigger = { + top_liege = { + custom_description = { + text = conservative_ministers_tt + value = conservative_ministers_value + any_councillor = { + count >= needed_conservative_ministers_value + top_participant_group:dynastic_cycle ?= { + participant_group_type = conservative_movement + } + } + } + custom_description = { + text = conservative_powerful_families_tt + value = conservative_powerful_families_value + any_powerful_family = { + count >= needed_conservative_powerful_families_value + house_head = { + top_participant_group:dynastic_cycle ?= { + participant_group_type = conservative_movement + } + } + } + } + } +} + +can_pass_candidate_score_merit_law_trigger = { + top_liege = { + custom_description = { + text = not_conservative_ministers_tt + value = not_conservative_ministers_value + any_councillor = { + count >= needed_conservative_ministers_value + top_participant_group:dynastic_cycle ?= { + NOT = { participant_group_type = conservative_movement } + } + } + } + custom_description = { + text = not_conservative_powerful_families_tt + value = not_conservative_powerful_families_value + any_powerful_family = { + count >= needed_conservative_powerful_families_value + house_head = { + top_participant_group:dynastic_cycle ?= { + NOT = { participant_group_type = conservative_movement } + } + } + } + } + } +} + +#dynastic cycle sort to movement triggers +should_pick_pro_hegemon_movement_trigger = { + title:h_china.holder.legitimacy_level >= 2 + NOR = { + has_relation_victim = title:h_china.holder + has_relation_bully = title:h_china.holder + has_relation_rival = title:h_china.holder + is_at_war_with = title:h_china.holder + is_imprisoned_by = title:h_china.holder + house_has_feud_relation_with_trigger = { TARGET = title:h_china.holder } + } + OR = { + has_relation_lover = title:h_china.holder + has_relation_friend = title:h_china.holder + has_relation_crush = title:h_china.holder + has_relation_potential_friend = title:h_china.holder + has_relation_elder = title:h_china.holder + has_relation_disciple = title:h_china.holder + has_trait = loyal + house ?= title:h_china.holder.house + has_dread_level_towards = { + target = title:h_china.holder + level >= 1 + } + AND = { + title:h_china.holder.hegemon_favored_stability_phase_value >= 0 + ai_has_builder_or_pious_builder_personality = yes + } + AND = { + title:h_china.holder.hegemon_favored_stability_phase_value < 0 + ai_has_warlike_personality = yes + } + } +} + +should_pick_expansion_movement_trigger = { + OR = { + has_trait = strategist + has_trait = overseer + has_trait = gallant + ai_has_warlike_personality = yes + has_education_martial_trigger = yes + } +} + +should_pick_advancement_movement_trigger = { + OR = { + has_trait = scholar + has_trait = theologian + has_trait = architect + has_trait = administrator + ai_has_builder_or_pious_builder_personality = yes + } +} + +should_pick_conservative_movement_trigger = { + OR = { + has_trait = family_first + has_trait = august + has_trait = avaricious + is_powerful_vassal = yes + house ?= { + OR = { + is_powerful_family = yes + is_dominant_family = yes + } + } + } +} diff --git a/N3OW/common/scripted_triggers/10_tgp_house_bloc_triggers.txt b/N3OW/common/scripted_triggers/10_tgp_house_bloc_triggers.txt new file mode 100644 index 00000000..91ffda21 --- /dev/null +++ b/N3OW/common/scripted_triggers/10_tgp_house_bloc_triggers.txt @@ -0,0 +1,20 @@ + +tgp_uses_house_blocs_trigger = { + has_tgp_dlc_trigger = yes + government_has_flag = government_has_house_blocs # DO NOT CHANGE THIS + top_liege = { government_has_flag = government_has_house_blocs } # DO NOT CHANGE THIS +} + +tgp_is_valid_member_character_shared_trigger = { + leading_house.house_head.top_liege ?= scope:character.top_liege # Same realm as Leading House head + any_confederation_member_house = { this = scope:character.house } + scope:character = { tgp_uses_house_blocs_trigger = yes } +} + +tgp_is_valid_member_house_shared_trigger = { + scope:house.house_head ?= { + is_alive = yes + any_held_title = { is_noble_family_title = yes } # Members must be Noble Families + tgp_uses_house_blocs_trigger = yes + } +} diff --git a/N3OW/common/scripted_triggers/10_tgp_house_relation_triggers.txt b/N3OW/common/scripted_triggers/10_tgp_house_relation_triggers.txt new file mode 100644 index 00000000..3e1c9478 --- /dev/null +++ b/N3OW/common/scripted_triggers/10_tgp_house_relation_triggers.txt @@ -0,0 +1,204 @@ +### HOUSE RELATION TRIGGERS + +house_relation_is_valid_to_start_trigger = { + $HOUSE$ ?= { save_temporary_scope_as = house_1_temp } + $OTHER_HOUSE$ ?= { save_temporary_scope_as = house_2_temp } + trigger_if = { + limit = { + exists = scope:house_1_temp + exists = scope:house_2_temp + } + scope:house_1_temp = { + NOT = { this = scope:house_2_temp } + # IF HOUSE RELATION DOES NOT ALREADY EXIST, ENSURE IT IS WORTHWHILE TO START + trigger_if = { + limit = { + NOT = { has_house_relation_with = scope:house_2_temp } + } + # MINIMUM START CHECKS + house_head ?= { is_playable_character = yes } + scope:house_2_temp.house_head ?= { is_playable_character = yes } + # EXTRA CHECKS FOR AI + trigger_if = { + limit = { + NOR = { + any_player = { house ?= scope:house_1_temp } + any_player = { house ?= scope:house_2_temp } + } + } + # DON'T CREATE LOTS OF RELATIONS FOR TINY AI HOUSES + any_house_member = { count >= 5 } + scope:house_2_temp = { + any_house_member = { count >= 5 } + } + } + } + # GENERAL CHECKS + OR = { + # HOUSES IN SAME DYNASTY CAN ALWAYS MAKE RELATIONS + house_dynasty = scope:house_2_temp.house_dynasty + # TIER CHECKS IF BOTH INDEPENDENT + trigger_if = { + limit = { + house_head = { is_independent_ruler = yes } + scope:house_2_temp.house_head = { is_independent_ruler = yes } + } + house_head = { + tier_difference = { + target = scope:house_2_temp.house_head + value < 2 + } + tier_difference = { + target = scope:house_2_temp.house_head + value > -2 + } + } + } + # SAME REALM CHECK IF NOT BOTH INDEPENDENT (SHARED TOP LIEGE) + trigger_else = { house_head.top_liege = scope:house_2_temp.house_head.top_liege } + } + # DIPLO RANGE IS ALWAYS REQUIRED + house_head = { in_diplomatic_range = scope:house_2_temp.house_head } + } + } + # SCOPES ARE INVALID + trigger_else = { always = no } +} + +house_relation_is_valid_to_keep_trigger = { + $HOUSE$ ?= { save_temporary_scope_as = house_1_temp } + $OTHER_HOUSE$ ?= { save_temporary_scope_as = house_2_temp } + trigger_if = { + limit = { + exists = scope:house_1_temp + exists = scope:house_2_temp + } + scope:house_1_temp = { + NOT = { this = scope:house_2_temp } + # DIPLO RANGE IS ALWAYS REQUIRED + house_head = { in_diplomatic_range = scope:house_2_temp.house_head } + } + } + # SCOPES ARE INVALID + trigger_else = { always = no } +} + +has_better_house_relation_with_target_house_than_other_trigger = { + save_temporary_scope_as = house_temp + $TARGET$ = { save_temporary_scope_as = target_temp } + $OTHER$ = { save_temporary_scope_as = other_temp } + # If no relation with OTHER, TARGET relation must be positive + trigger_if = { + limit = { + any_house_relation = { + any_relation_house = { this = scope:target_temp } + save_temporary_scope_as = target_relation_temp + } + NOT = { + any_house_relation = { + any_relation_house = { this = scope:other_temp } + } + } + } + scope:target_relation_temp = { + OR = { + has_house_relation_level = cordial + has_house_relation_level = friendly + has_house_relation_level = amity + } + } + } + # If relation with both, TARGET relation must be better than OTHER relation + trigger_else_if = { + limit = { + any_house_relation = { + any_relation_house = { this = scope:target_temp } + save_temporary_scope_as = target_relation_temp + } + any_house_relation = { + any_relation_house = { this = scope:other_temp } + save_temporary_scope_as = other_relation_temp + } + } + scope:target_relation_temp = { + trigger_if = { + limit = { has_house_relation_level = feud } + scope:other_relation_temp = { + NOT = { has_house_relation_level = feud } + } + } + trigger_else_if = { + limit = { has_house_relation_level = rivalry } + scope:other_relation_temp = { + NOR = { + has_house_relation_level = rivalry + has_house_relation_level = feud + } + } + } + trigger_else_if = { + limit = { has_house_relation_level = quarrel } + scope:other_relation_temp = { + NOR = { + has_house_relation_level = quarrel + has_house_relation_level = rivalry + has_house_relation_level = feud + } + } + } + trigger_else_if = { + limit = { has_house_relation_level = neutral } + scope:other_relation_temp = { + NOR = { + has_house_relation_level = neutral + has_house_relation_level = quarrel + has_house_relation_level = rivalry + has_house_relation_level = feud + } + } + } + trigger_else_if = { + limit = { has_house_relation_level = cordial } + scope:other_relation_temp = { + NOR = { + has_house_relation_level = cordial + has_house_relation_level = neutral + has_house_relation_level = quarrel + has_house_relation_level = rivalry + has_house_relation_level = feud + } + } + } + trigger_else_if = { + limit = { has_house_relation_level = friendly } + scope:other_relation_temp = { + NOR = { + has_house_relation_level = friendly + has_house_relation_level = cordial + has_house_relation_level = neutral + has_house_relation_level = quarrel + has_house_relation_level = rivalry + has_house_relation_level = feud + } + } + } + trigger_else_if = { + limit = { has_house_relation_level = amity } + scope:other_relation_temp = { + NOR = { + has_house_relation_level = amity + has_house_relation_level = friendly + has_house_relation_level = cordial + has_house_relation_level = neutral + has_house_relation_level = quarrel + has_house_relation_level = rivalry + has_house_relation_level = feud + } + } + } + trigger_else = { always = no } + } + } + # Invalid + trigger_else = { always = no } +} diff --git a/N3OW/common/scripted_triggers/10_tgp_japan_triggers.txt b/N3OW/common/scripted_triggers/10_tgp_japan_triggers.txt new file mode 100644 index 00000000..75af392e --- /dev/null +++ b/N3OW/common/scripted_triggers/10_tgp_japan_triggers.txt @@ -0,0 +1,841 @@ + +tgp_is_japanese_emperor_trigger = { + title:k_chrysanthemum_throne.holder ?= this +} + +tgp_is_japanese_kampaku_trigger = { + has_title = title:e_japan + NOR = { + has_title = title:k_chrysanthemum_throne + has_global_variable = tenno_restored + has_global_variable = shogunate_established + } +} + +tgp_is_japanese_governor_trigger = { + custom_tooltip = { + text = tgp_is_japanese_governor_trigger + government_allows = administrative + is_landed = yes + is_ruler = yes + highest_held_title_tier >= tier_county + highest_held_title_tier < tier_kingdom + is_independent_ruler = no + exists = title:e_japan.holder + top_liege ?= title:e_japan.holder + NOT = { has_title = title:k_chrysanthemum_throne } + } +} + +can_have_kampaku_acclamation_succession_law_trigger = { + has_tgp_dlc_trigger = yes + government_allows = administrative + is_independent_ruler = yes +} + +can_keep_kampaku_acclamation_succession_law_trigger = { + has_tgp_dlc_trigger = yes + trigger_if = { + limit = { + has_realm_law = japanese_regency_succession_law + } + OR = { + can_have_kampaku_acclamation_succession_law_trigger = yes + has_title = title:e_japan + } + } +} + +any_descendants_are_governors = { + # A direct descendant is currently a Governor + any_child = { # Children + OR = { + tgp_is_japanese_governor_trigger = yes + any_child = { # Grandchildren + OR = { + tgp_is_japanese_governor_trigger = yes + any_child = { # Great-grandchildren + OR = { + tgp_is_japanese_governor_trigger = yes + any_child = { # Great-great-grandchildren + tgp_is_japanese_governor_trigger = yes + } + } + } + } + } + } + } +} + +any_liege_or_above_is_descendant = { + any_liege_or_above = { + is_liege_or_above_of = root + OR = { + is_child_of = root + is_grandchild_of = root + is_great_grandchild_of = root + } + } +} + +is_a_previous_title_holder_trigger = { + save_temporary_scope_as = previous_holder_compare + $TITLE$ ?= { + # Easy out + trigger_if = { + limit = { previous_holder ?= scope:previous_holder_compare } + always = yes + } + # Hard out + trigger_else = { + any_past_holder = { this = scope:previous_holder_compare } + } + } +} + +# Filter out dynasties of Emperors further away from you +# e.g. your father's brother's son +target_shares_nearest_related_title_holder_trigger = { + trigger_if = { + limit = { + any_parent = { + even_if_dead = yes + is_a_previous_title_holder_trigger = { TITLE = $TITLE$ } + } + } + is_child_of = $COMPARE$ + } + trigger_else_if = { + limit = { + any_parent = { + even_if_dead = yes + any_parent = { + even_if_dead = yes + is_a_previous_title_holder_trigger = { TITLE = $TITLE$ } + } + } + } + is_grandchild_of = $COMPARE$ + } + trigger_else = { is_great_grandchild_of = $COMPARE$ } +} + +is_culture_or_descended_from_trigger = { + culture = { + OR = { + this = $CULTURE$ + any_parent_culture_or_above = { this = $CULTURE$ } + } + } +} + +tgp_japan_offensive_wars_ban_trigger = { + trigger_if = { + limit = { + exists = scope:defender.top_liege + scope:attacker.top_liege ?= { + has_title = title:e_japan + scope:defender.top_liege != this + government_is_japanese_trigger = yes + realm_law_use_imperial_policy_trigger = yes + } + } + custom_tooltip = { + text = japan_offensive_wars_ban_tt + scope:attacker.top_liege = { has_realm_law = imperial_expansion_law } + } + } +} + +tgp_is_ceremonial_liege_or_direct_heir_trigger = { + save_temporary_scope_as = char_temp + top_liege.primary_title.var:administrative_ui_special_title ?= { + OR = { + holder ?= { + OR = { + this = scope:char_temp + is_parent_of = scope:char_temp + } + } + place_in_line_of_succession = { + target = scope:char_temp + value <= 5 + } + } + } +} + +tgp_ceremonial_candidacy_restriction_trigger = { + trigger_if = { + limit = { + exists = scope:target + scope:actor ?= { tgp_realm_has_ceremonial_liege_trigger = yes } + scope:secondary_recipient ?= { tgp_is_in_ceremonial_house_trigger = yes } + } + trigger_if = { # Top title only valid for ceremonial liege + limit = { + exists = scope:target.var:administrative_ui_special_title + scope:target.holder = { has_realm_law = japanese_regency_succession_law } + } + custom_tooltip = { + text = ceremonial_liege_house_can_not_be_ruler_trigger + scope:secondary_recipient = { tgp_is_ceremonial_liege_trigger = yes } + } + } + trigger_else_if = { # Top title only valid for ceremonial liege + limit = { + exists = scope:target.var:administrative_ui_special_title + scope:target.holder = { has_realm_law = meritocratic_regency_succession_law } + } + custom_tooltip = { + text = ceremonial_liege_only_heir_can_be_ruler_trigger + scope:secondary_recipient = scope:target.var:administrative_ui_special_title.holder.player_heir + } + } + trigger_else = { # Governor titles only valid for non-ceremonial liege + custom_tooltip = { + text = ceremonial_liege_line_cannot_be_governor_trigger + scope:secondary_recipient = { tgp_is_ceremonial_liege_or_direct_heir_trigger = no } + } + } + } +} + +tgp_japan_grant_titles_restriction_trigger = { + trigger_if = { + limit = { + $GRANTER$ ?= { tgp_realm_has_ceremonial_liege_trigger = yes } + exists = $GRANTEE$.house + } + custom_tooltip = { + text = ceremonial_liege_line_cannot_be_governor_trigger + NOT = { + $GRANTEE$ = { tgp_is_ceremonial_liege_or_direct_heir_trigger = yes } + } + } + } +} + +tgp_ceremonial_title_revoke_restriction_trigger = { + trigger_if = { + limit = { + exists = scope:recipient.house + scope:actor.top_liege.primary_title.var:administrative_ui_special_title.holder ?= scope:recipient + } + custom_tooltip = { + text = tgp_blocked_ceremonial_title_revocation_trigger + NOT = { scope:target ?= scope:actor.top_liege.primary_title.var:administrative_ui_special_title } + } + } +} + +can_have_japanese_regency_succession_law_trigger = { + has_tgp_dlc_trigger = yes + is_independent_ruler = yes + government_has_flag = government_is_japan_administrative + OR = { + has_title = title:k_chrysanthemum_throne + any_vassal_or_below = { has_title = title:k_chrysanthemum_throne } + } + NOT = { + has_global_variable = tenno_restored + } +} + +can_have_japanese_appointment_succession_law_trigger = { + has_tgp_dlc_trigger = yes + government_has_flag = government_is_japan_administrative + is_independent_ruler = no + NOT = { has_title = title:k_chrysanthemum_throne } +} + +can_keep_japanese_appointment_succession_law_trigger = { + has_tgp_dlc_trigger = yes + trigger_if = { + limit = { has_realm_law = japanese_appointment_succession_law } + can_have_japanese_appointment_succession_law_trigger = yes + } +} + +can_change_japanese_appointment_succession_law_trigger = { + has_tgp_dlc_trigger = yes +} + +tgp_japan_single_heir_succession_override_trigger = { + save_temporary_scope_as = holder_temp + OR = { + title:k_chrysanthemum_throne.holder ?= scope:holder_temp + AND = { + has_global_variable = tenno_restored + title:e_japan.holder ?= scope:holder_temp + } + } +} + +tgp_blocked_action_against_tenno_trigger = { + custom_description = { + text = tgp_blocked_ruler_against_ceremonial_action_trigger + NAND = { + $TARGET$ = { has_title = title:k_chrysanthemum_throne } + $TARGET$.top_liege = $ACTOR$.top_liege + } + } +} + +tgp_blocked_ruler_against_ceremonial_action_trigger = { + custom_description = { + text = tgp_blocked_ruler_against_ceremonial_action_trigger + NAND = { + $TENNO$ = { has_title = title:k_chrysanthemum_throne } + $REGENT$ = $TENNO$.liege + } + } +} + +japan_house_name_county_trigger = { + exists = $TITLE$ + save_temporary_scope_as = new_head_temp + trigger_if = { + limit = { + OR = { + $TITLE$.holder ?= scope:new_head_temp + scope:new_head_temp.domicile.domicile_location.county ?= $TITLE$ + } + } + always = yes + } + trigger_else_if = { + limit = { exists = scope:old_head } + OR = { + $TITLE$.holder ?= scope:old_head + scope:old_head.domicile.domicile_location.county ?= $TITLE$ + } + } + trigger_else_if = { + limit = { exists = scope:new_head_temp.house.house_head } + OR = { + $TITLE$.holder ?= scope:new_head_temp.house.house_head + scope:new_head_temp.house.house_head.domicile.domicile_location.county ?= $TITLE$ + } + } + trigger_else_if = { + limit = { exists = scope:old_head.house.house_head } + OR = { + $TITLE$.holder ?= scope:old_head.house.house_head + scope:old_head.house.house_head.domicile.domicile_location.county ?= $TITLE$ + } + } + trigger_else = { always = yes } + NOT = { + is_target_in_variable_list = { name = japanese_house_names target = $FLAG$ } + } +} + +japan_house_name_trigger = { + NOT = { + is_target_in_variable_list = { name = japanese_house_names target = $FLAG$ } + } +} + +tgp_japan_internal_soryo_war_is_crime_trigger = { + scope:defender = { + government_has_flag = government_is_japan_administrative + top_liege = { + government_has_flag = government_is_japan_administrative + this = scope:attacker.top_liege + } + } +} + +japan_imperial_expansion_cb_allowed_for_character_trigger = { + # DLC check + has_tgp_dlc_trigger = yes + # Must have a Japanese government form + government_is_japanese_trigger = yes + # Must be part of Japan with functional imperial family + tgp_realm_has_ceremonial_liege_trigger = yes +} + +government_is_japanese_trigger = { + OR = { + government_has_flag = government_is_japan_administrative + government_has_flag = government_is_japan_feudal + } +} + +japan_imperial_expansion_cb_allowed_against_character_trigger = { + # Cannot also be part of Japan + NOT = { top_liege ?= scope:attacker.top_liege } + # Must own Japanese non-de-jure land + any_sub_realm_county = { + NOT = { empire = title:e_japan } + title_province = { + OR = { + geographical_region = world_asia_japan + geographical_region = world_asia_sakhalin_hokkaido + } + } + } +} + +japan_imperial_reconquest_cb_allowed_for_character_trigger = { + # DLC check + has_tgp_dlc_trigger = yes + # Must have a Japanese government form + government_is_japanese_trigger = yes + # Must be part of Japan with functional imperial family + tgp_realm_has_ceremonial_liege_trigger = yes +} + +japan_imperial_reconquest_cb_allowed_against_character_trigger = { + # Cannot also be part of Japan + scope:defender.top_liege != scope:attacker.top_liege + # Must own Japanese de-jure land + any_sub_realm_county = { empire = title:e_japan } +} + +realm_law_use_imperial_policy_trigger = { + top_liege = { + highest_held_title_tier >= tier_empire + government_is_japanese_trigger = yes + } +} + +tgp_japan_defense_mobilization_valid_trigger = { + custom_tooltip = { + text = defense_mobilization_law_valid_trigger + OR = { + AND = { + is_at_war = yes + save_temporary_scope_as = liege_temp + any_character_war = { + is_civil_war = no + save_temporary_scope_as = war_temp + scope:liege_temp = { + is_leader_in_war = scope:war_temp + is_defender_in_war = scope:war_temp + } + OR = { + # CURRENT ATTACKERS COMBINED ARE A THREAT + war_attacker_total_strength_value > scope:liege_temp.max_strength_fifty_percent_value + # PRIMARY ATTACKER WITH ALLIES IS A THREAT + primary_attacker.max_strength_with_allies_value > scope:liege_temp.max_strength_fifty_percent_value + } + primary_attacker = { + OR = { + capital_county.empire != title:e_japan + culture = { + NOR = { + this = culture:japanese + any_parent_culture_or_above = { this = culture:japanese } + } + } + } + } + } + } + title:e_japan = { + any_de_jure_county = { holder.top_liege != title:e_japan.holder.top_liege } + } + } + } +} + +tgp_japan_valid_restore_monarchy_scion_trigger = { + is_landed = no + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:kampaku } + is_healthy = yes +} + +tgp_japan_imperial_expansion_internal_peace_trigger = { + custom_tooltip = { + text = imperial_expansion_internal_peace_trigger + top_liege = { + NOT = { + any_vassal_or_below = { + any_primary_war_enemy = { + top_liege = prev.top_liege + } + } + } + } + } +} + +tgp_install_regent_faction_target_valid_trigger = { + is_independent_ruler = yes + tgp_realm_has_ceremonial_liege_trigger = yes +} + +tgp_install_regent_faction_can_create_trigger = { + has_tgp_dlc_trigger = yes + scope:target ?= { tgp_install_regent_faction_target_valid_trigger = yes } + custom_tooltip = { + text = replace_ceremonial_regent_faction_kampaku_trigger + NOR = { + has_global_variable = shogunate_established + has_global_variable = tenno_restored + } + } + is_adult = yes + custom_tooltip = { + text = is_faith_dominant_gender_tt + is_faith_dominant_gender = yes + } + japan_faction_cohesion_hard_trigger = yes +} + +japan_faction_cohesion_trigger = { + trigger_if = { + limit = { + government_has_flag = government_has_house_blocs + is_confederation_member = yes + } + custom_tooltip = { + text = house_head_create_faction_cohesion_tt + OR = { + house.house_confederation ?= { cohesion >= 50 } + joined_faction ?= { + OR = { + faction_is_at_war = yes + any_faction_member = { + OR = { + this = root.house.house_confederation.leading_house.house_head + is_ai = no + } + } + } + } + } + } + } +} + +japan_faction_cohesion_hard_trigger = { + trigger_if = { + limit = { + government_has_flag = government_has_house_blocs + is_confederation_member = yes + } + custom_tooltip = { + text = house_head_create_faction_cohesion_hard_tt + OR = { + house.house_confederation ?= { cohesion >= 75 } + joined_faction ?= { + OR = { + faction_is_at_war = yes + any_faction_member = { + OR = { + this = root.house.house_confederation.leading_house.house_head + is_ai = no + } + } + } + } + } + } + } +} + +restore_ceremonial_liege_faction_can_create_trigger = { + tgp_realm_has_ceremonial_liege_trigger = yes + trigger_if = { + limit = { government_is_japanese_trigger = yes } + custom_tooltip = { + text = house_head_create_faction_cohesion_hard_tt + OR = { + house.house_confederation ?= { cohesion >= 75 } + joined_faction ?= { + faction_is_at_war = yes + } + } + } + custom_tooltip = { + text = bloc_leader_unlocks_restore_emperor_faction_tt + OR = { + house.house_confederation ?= { has_cohesion_level_parameter = bloc_leader_unlocks_restore_emperor_faction } + joined_faction ?= { + faction_is_at_war = yes + } + } + } + } + OR = { + custom_tooltip = { + text = is_house_head_of_noble_family_tt + is_house_head = yes + any_held_title = { is_noble_family_title = yes } + } + is_landed = yes + } + scope:target ?= { + is_independent_ruler = yes + tgp_realm_has_ceremonial_liege_trigger = yes + tgp_has_ceremonial_liege_title_trigger = no + } +} + +ceremonial_claimant_faction_can_create_trigger = { + scope:target ?= { + is_independent_ruler = yes + tgp_realm_has_ceremonial_liege_trigger = yes + tgp_has_ceremonial_liege_title_trigger = no + } + japan_faction_cohesion_hard_trigger = yes +} + +imperial_policy_faction_can_create_trigger = { + realm_law_use_imperial_policy_trigger = yes + scope:target = { + is_independent_ruler = yes + this = root.liege + } + japan_faction_cohesion_trigger = yes +} + +tgp_top_liege_is_not_royal_trigger = { # Petition Liege + tgp_is_japanese_kampaku_trigger = yes +} + +tgp_ritsuryo_bloc_house_head_trigger = { + top_liege = root.top_liege + government_has_flag = government_is_japan_administrative +} + +tgp_house_bloc_interaction_valid_trigger = { + is_ruler = yes + tgp_uses_house_blocs_trigger = yes + highest_held_title_tier >= tier_county + top_liege = { tgp_uses_house_blocs_trigger = yes } +} + +tgp_house_bloc_interaction_valid_showing_failures_trigger = { + custom_tooltip = { + text = tgp_house_bloc_house_head_tt + is_house_head = yes + any_held_title = { is_noble_family_title = yes } + } +} + +tgp_has_house_relation_level_trigger = { + exists = $HOUSE_1_MEMBER$.house + exists = $HOUSE_2_MEMBER$.house + $HOUSE_1_MEMBER$.house != $HOUSE_2_MEMBER$.house + $HOUSE_1_MEMBER$.house = { + any_house_relation = { + has_house_relation_level = $LEVEL$ + any_relation_house = { this = $HOUSE_2_MEMBER$.house } + } + } +} + +## Check who can join a House Bloc +# +# TODO_TGP_CD: Remove this? Functionality (if any) would do better on house confederation type). +# +# root: possibly viable character +# +tgp_should_join_house_bloc_trigger = { + # Not in a Bloc + NOT = { exists = confederation } + # Not vassal - TODO_CD_TGP + #NOT = { liege ?= house.house_head } + # Same liege + $BLOC$.leading_house.house_head.liege ?= liege + # General checks + tgp_house_bloc_interaction_valid_trigger = yes + is_landed = yes # TODO_CD_TGP UNLANDED CANNOT JOIN YET + # Government TODO_CD_TGP disabled for now + #trigger_if = { + # limit = { + # $BLOC$.leading_house.house_head ?= { government_has_flag = government_is_japan_administrative } + # } + # government_has_flag = government_is_japan_administrative + #} + #trigger_else = { government_has_flag = government_is_japan_feudal } +} + +tgp_house_bloc_inviter_or_leader_trigger = { + $JOINER$ = { save_temporary_scope_as = joiner_temp } + trigger_if = { + limit = { exists = $INVITER$.confederation.leading_house.house_head } + $INVITER$.confederation.leading_house.house_head = { save_temporary_scope_as = inviter_temp } + } + trigger_else = { $INVITER$ = { save_temporary_scope_as = inviter_temp } } +} + +tgp_japan_cadet_creates_dynasty_trigger = { + NOR = { + this = dynasty.dynast + this = house.house_head + } + dynasty.dynast ?= { government_allows = administrative } +} + +tgp_soryo_or_bushido_trigger = { + custom_tooltip = { + text = soryo_or_bushido_trigger + OR = { + government_has_flag = government_is_japan_feudal + culture = { has_cultural_tradition = tradition_tgp_bushido } + } + } +} + +has_house_aspiration_trigger = { + OR = { + has_house_power_parameter = aspiration_level_1 + has_house_power_parameter = aspiration_level_2 + has_house_power_parameter = aspiration_level_3 + } +} + +should_learn_chinese_trigger = { + save_temporary_scope_as = child_learned_chinese + #Make sure they don't already know Chinese + NOT = { + knows_language = language_chinese + } + num_of_known_languages < language_soft_cap + exists = house + age >= 10 + is_faith_dominant_gender = yes + probably_unintelligent_trigger = no + house.house_head ?= { + OR = { + government_is_japanese_trigger = yes + #This will account for korea and friends + government_allows = merit + } + OR = { + #Cultural acceptance will be our guiding light for teaching young, noblemen (dominate gender) adults Chinese. These values will be set in game_start.txt + culture = { + OR = { + cultural_acceptance = { + target = culture:han + value >= 65 + } + any_parent_culture_or_above = { this = culture:han } + } + } + top_liege = { + highest_held_title_tier >= tier_kingdom + has_dlc_feature = royal_court + has_court_language_of_culture = culture:han + } + } + } +} + +japan_government_japan_kingdom_restriction_trigger = { + trigger_if = { + limit = { + government_is_japanese_trigger = yes + OR = { + is_independent_ruler = no + AND = { + NOT = { highest_held_title_tier = tier_kingdom } + has_title = title:e_japan + } + } + } + custom_tooltip = { + text = japan_government_japan_kingdom_restriction_tt + always = no + } + } +} + +japan_government_japan_duchy_restriction_trigger = { + trigger_if = { + limit = { + OR = { + government_has_flag = government_is_japan_administrative + AND = { # Soryo can create duchies if they're already a duke + government_has_flag = government_is_japan_feudal + primary_title.tier = tier_county + } + } + NAND = { + is_independent_ruler = yes + government_has_flag = government_is_japan_feudal + } + } + custom_tooltip = { + text = japan_government_japan_duchy_restriction_tt + always = no + } + } +} + +can_upgrade_house_aspiration_trigger = { + is_house_head = yes + trigger_if = { + limit = { + exists = house.house_confederation.leading_house + house.house_confederation.leading_house != house + } + custom_tooltip = { + text = cannot_upgrade_mismatched_bloc_aspiration_tt + house.house_confederation.leading_house = { has_same_house_power_as = root.house } + } + } +} + +japan_castle_construction_trigger = { + trigger_if = { + limit = { + county.holder ?= { + government_has_flag = government_is_japan_administrative + realm_law_use_imperial_policy_trigger = yes + } + } + custom_tooltip = { + text = japan_castle_construction_trigger_tt + county.holder.top_liege ?= { has_realm_law_flag = disarmament_law } + } + } +} + +tgp_bloc_war_transfer_trigger = { + $BLOC_LEADER$ = { save_temporary_scope_as = leader_temp } + save_temporary_scope_as = member_head_temp + NOR = { + # Not leading house + scope:leader_temp.house.house_confederation.leading_house ?= house + # Not sub vassal + trigger_if = { + limit = { + scope:leader_temp = { is_independent_ruler = no } + } + is_vassal_or_below_of = scope:leader_temp + } + # Not friend + has_relation_friend = scope:leader_temp + # Not ally + is_allied_to = scope:leader_temp + # Not hooked + scope:leader_temp = { has_hook = scope:member_head_temp } + # Not terrified + has_dread_level_towards = { + target = scope:leader_temp + level >= 2 + } + # Not loyal + has_trait = loyal + } +} + +has_japanese_house_aspiration_trigger = { + house ?= { + OR = { + has_house_power_parameter = aspiration_ceremony + has_house_power_parameter = aspiration_determination + has_house_power_parameter = aspiration_humility + has_house_power_parameter = aspiration_prosperity + has_house_power_parameter = aspiration_service + has_house_power_parameter = aspiration_strength + } + } +} diff --git a/N3OW/common/scripted_triggers/10_tgp_korea_triggers.txt b/N3OW/common/scripted_triggers/10_tgp_korea_triggers.txt new file mode 100644 index 00000000..08cc2a99 --- /dev/null +++ b/N3OW/common/scripted_triggers/10_tgp_korea_triggers.txt @@ -0,0 +1,4 @@ +tgp_korea_single_heir_succession_override_trigger = { + save_temporary_scope_as = holder_temp + title:k_yongson_throne.holder ?= scope:holder_temp +} diff --git a/N3OW/common/scripted_triggers/10_tgp_natural_disaster_triggers.txt b/N3OW/common/scripted_triggers/10_tgp_natural_disaster_triggers.txt new file mode 100644 index 00000000..8c457e71 --- /dev/null +++ b/N3OW/common/scripted_triggers/10_tgp_natural_disaster_triggers.txt @@ -0,0 +1,112 @@ +tgp_natural_disaster_great_project_trigger = { + is_independent_ruler = yes + any_character_situation = { + situation_type = natural_disaster_$TYPE$ + any_participant_group = { + participant_group_type = affected_ruler + participant_group_has_character = root + } + NOT = { + any_in_list = { + variable = great_projects + great_project_owner = root + } + } + } +} + +natural_disaster_next_impact_event_trigger = { + NOT = { + is_target_in_variable_list = { name = impact_events target = flag:$EVENT_ID$ } + } +} + +# ROOT: Situation +tgp_natural_disaster_situation_is_disaster_trigger = { + OR = { + situation_type = natural_disaster_earthquake + situation_type = natural_disaster_flood + } +} + +tgp_natural_disaster_is_valid_contributor_trigger = { + is_landless_adventurer = no +} + +tgp_natural_disaster_councillor_available_for_task_trigger = { + custom_tooltip = { + text = "councillor_busy_managing_disaster" + NOT = { + any_great_project = { + exists = var:managing_councillor + var:managing_councillor = scope:councillor + } + } + } +} + +tgp_natural_disaster_councillor_available_to_manage_trigger = { + custom_tooltip = { + text = "councillor_is_available_for_disaster_recovery" + OR = { + AND = { + government_has_flag = government_is_nomadic + any_councillor = { + is_kurultai_trigger = yes + save_temporary_scope_as = councillor + tgp_natural_disaster_councillor_available_for_task_trigger = yes + } + } + AND = { + government_has_flag = government_is_landless_adventurer + any_entourage_character = { + save_temporary_scope_as = councillor + tgp_natural_disaster_councillor_available_for_task_trigger = yes + } + } + AND = { + government_has_flag = government_is_celestial + cp:minister_works ?= { + save_temporary_scope_as = councillor + tgp_natural_disaster_councillor_available_for_task_trigger = yes + } + } + AND = { + NOR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_celestial + } + cp:councillor_steward ?= { + save_temporary_scope_as = councillor + tgp_natural_disaster_councillor_available_for_task_trigger = yes + } + } + } + } +} + +tpg_great_project_disaster_in_recovery_phase_trigger = { + scope:great_project.var:situation ?= { + custom_tooltip = { + text = situation_in_recovery + situation_current_phase = recovery + } + } +} + +tpg_character_in_any_situation_sub_region_trigger = { + any_situation_sub_region = { + any_situation_sub_region_county = { + root.capital_province.county = this + } + } +} + +tgp_natural_disaster_character_is_affected_by_any_imminent_disaster_trigger = { + any_character_situation = { + tgp_natural_disaster_situation_is_disaster_trigger = yes + tpg_character_in_any_situation_sub_region_trigger = yes + NOT = { situation_current_phase = recovery } + } +} diff --git a/N3OW/common/scripted_triggers/10_tgp_triggers.txt b/N3OW/common/scripted_triggers/10_tgp_triggers.txt new file mode 100644 index 00000000..b7008be2 --- /dev/null +++ b/N3OW/common/scripted_triggers/10_tgp_triggers.txt @@ -0,0 +1,869 @@ + +tgp_distant_realm_marriage_trigger = { + $RECIPIENT_SPOUSE$ = { + culture = { has_cultural_parameter = reduced_marriage_acceptance_distant_realms } + top_liege != $ACTOR_SPOUSE$.top_liege + trigger_if = { + limit = { exists = capital_province } + capital_province = { save_temporary_scope_as = from } + } + trigger_else = { + location = { save_temporary_scope_as = from } + } + trigger_if = { + limit = { exists = $ACTOR_SPOUSE$.capital_province } + $ACTOR_SPOUSE$.capital_province = { save_temporary_scope_as = to } + } + trigger_else = { + $ACTOR_SPOUSE$.location = { save_temporary_scope_as = to } + } + "scope:from.squared_distance(scope:to)" > squared_distance_medium + } +} + +tgp_dynastic_realm_name_trigger = { + NOT = { + any_ruler = { + any_held_title = { + has_custom_title_name = yes + custom_title_name = $DYNASTY_REALM_NAME$ + } + } + } + domicile.domicile_location = { + geographical_region = $DOMICILE_REGION$ + } +} + +administrative_tier_allows_independence = { + trigger_if = { + limit = { + administrative_counts_can_be_independent = yes + } + highest_held_title_tier >= tier_county + } + trigger_else = { # Administrative/default + highest_held_title_tier >= tier_kingdom + } +} + +administrative_counts_can_be_independent = { + OR = { + government_has_flag = government_is_celestial + government_has_flag = government_is_japan_administrative + } +} + +tgp_examination_should_spend_treasury_trigger = { + has_treasury = yes + government_allows = replace_gold_cost_by_treasury +} + +# Trigger to enable ministry features in script - Made into a scripted trigger for ease of changing it if needed +tgp_has_access_to_ministry_trigger = { + has_title = title:h_china + government_has_flag = government_is_celestial +} + +tgp_is_any_minister = { + liege ?= { tgp_has_access_to_ministry_trigger = yes } + OR = { + has_title = title:e_minister_chancellor + has_title = title:e_minister_censor + has_title = title:e_minister_grand_marshal + has_title = title:e_minister_of_personnel + has_title = title:e_minister_of_revenue + has_title = title:e_minister_of_rites + has_title = title:e_minister_of_war + has_title = title:e_minister_of_justice + has_title = title:e_minister_of_works + } +} + +tgp_can_be_a_minister_trigger = { + can_be_councillor_basics_trigger = yes + # Has to be celestial or a non-ruler + OR = { + is_ruler = no + government_has_flag = government_is_celestial + } + # Gender is based on laws of the liege + OR = { + AND = { + is_female = yes + $COURT_OWNER$ = { + NOR = { + has_realm_law = male_only_law + has_realm_law = male_preference_law + } + } + } + AND = { + is_male = yes + $COURT_OWNER$ = { + NOR = { + has_realm_law = female_only_law + has_realm_law = female_preference_law + } + } + } + } + # Players are only allowed if they have enough merit or is a councillor already, unless they are friends or disciples/elders + # We do this to prevent the AI from "randomly" requesting the player to be on their council + trigger_if = { + limit = { + is_ai = no + $COURT_OWNER$ = { is_ai = yes } + NOT = { is_councillor_of = $COURT_OWNER$ } + } + OR = { + merit_level >= merit_level_expected_empire_value + has_relation_friend = $COURT_OWNER$ + has_relation_disciple = $COURT_OWNER$ + has_relation_elder = $COURT_OWNER$ + } + } +} + +tgp_can_be_grand_marshal_trigger = { + can_be_councillor_basics_trigger = yes + $COURT_OWNER$ ?= { + NOT = { government_has_flag = government_is_nomadic } + } + NAND = { + has_council_position = councillor_court_chaplain + faith = { has_doctrine_parameter = clerical_appointment_fixed } + } + NOR = { + has_council_position = councillor_spouse + AND = { + this = liege.diarch + liege = { has_diarchy_active_parameter = diarchy_is_vizierate } + } + has_trait = devoted + } + # Has to be celestial or a non-ruler + OR = { + is_ruler = no + government_has_flag = government_is_celestial + } + # Has to be able to lead armies + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = $COURT_OWNER$ } +} + +tgp_is_above_retirement_age_trigger = { + trigger_if = { + limit = { + $REALM_OWNER$.top_liege ?= { has_realm_law_flag = celestial_retirement_age_4 } + } + custom_tooltip = { + text = tgp_is_above_retirement_age_4 + age >= retirement_age_4_value + } + } + trigger_else_if = { + limit = { + $REALM_OWNER$.top_liege ?= { has_realm_law_flag = celestial_retirement_age_3 } + } + custom_tooltip = { + text = tgp_is_above_retirement_age_3 + age >= retirement_age_3_value + } + } + trigger_else_if = { + limit = { + $REALM_OWNER$.top_liege ?= { has_realm_law_flag = celestial_retirement_age_2 } + } + custom_tooltip = { + text = tgp_is_above_retirement_age_2 + age >= retirement_age_2_value + } + } + trigger_else_if = { + limit = { + $REALM_OWNER$.top_liege ?= { has_realm_law_flag = celestial_retirement_age_1 } + } + custom_tooltip = { + text = tgp_is_above_retirement_age_1 + age >= retirement_age_1_value + } + } + trigger_else_if = { + limit = { + $REALM_OWNER$.top_liege ?= { has_realm_law_flag = celestial_retirement_age_0 } + } + custom_tooltip = { + text = tgp_is_above_retirement_age_0 + age >= retirement_age_0_value + } + } + trigger_else_if = { + limit = { + $REALM_OWNER$.top_liege ?= { has_realm_law_flag = celestial_retirement_age_5 } + } + custom_tooltip = { + text = tgp_is_above_retirement_age_5 + always = no + } + } + trigger_else = { + custom_tooltip = { + text = tgp_is_above_retirement_age_law_not_set + always = yes + } + } +} + +# Civilian/military triggers +is_civilian_candidate_trigger = { + trigger_if = { + limit = { + has_variable = appointment_trait_override + } + var:appointment_trait_override = trait:education_stewardship_1 + } + trigger_else = { + has_trait_with_flag = civilian_province + } +} +is_military_candidate_trigger = { + trigger_if = { + limit = { + has_variable = appointment_trait_override + } + var:appointment_trait_override = trait:education_martial_1 + } + trigger_else = { + has_trait_with_flag = military_province + } +} + +# Trigger if scoped character is able to join the war(s) of the target character +# $TARGET_GOVERNOR$ - Target governor in need of troops +# $MINISTER_OF_WAR$ - The Minister of War +tgp_celestial_military_governor_can_join_war_trigger = { + save_temporary_scope_as = joining_governor + OR = { + vassal_contract_has_flag = celestial_military_appointment + vassal_contract_has_flag = meritocratic_military_appointment + has_title = title:e_minister_grand_marshal + } + NOR = { + scope:joining_governor = $TARGET_GOVERNOR$ + scope:joining_governor = $MINISTER_OF_WAR$ + any_war_ally = { this = $TARGET_GOVERNOR$ } + is_at_war_with = $TARGET_GOVERNOR$ + is_at_war_with = $MINISTER_OF_WAR$ + $TARGET_GOVERNOR$ = { + any_war_enemy = { + OR = { + is_vassal_of = scope:joining_governor + is_liege_or_above_of = scope:joining_governor + is_allied_to = scope:joining_governor + is_tributary_of = scope:joining_governor + is_at_war_with = scope:joining_governor + } + } + } + } +} + +should_be_mandala_tributary_trigger = { + OR = { + AND = { + $SUZERAIN$ = { has_government = mandala_government } + $TRIBUTARY$ = { has_government = mandala_government } + } + AND = { + $SUZERAIN$ = { has_government = mandala_government } + $TRIBUTARY$ = { + OR = { + has_government = tribal_government + has_government = wanua_government + } + } + } + } +} + +should_be_wanua_tributary_trigger = { + AND = { + $SUZERAIN$ = { has_government = wanua_government } + $TRIBUTARY$ = { has_government = wanua_government } + } +} + +is_valid_for_japan_events_trigger = { + OR = { + religion = religion:shintoism_religion + faith = { has_doctrine = special_doctrine_immaterial_harmony } + } + culture = { has_cultural_pillar = heritage_japonic } +} + +# Check if a top liege primary title has a ceremonial liege title +tgp_realm_has_ceremonial_liege_trigger = { + custom_tooltip = { + text = tgp_realm_has_ceremonial_liege_tt + exists = top_liege.primary_title.var:administrative_ui_special_title.holder + } +} + +# Check if a character is a ceremonial liege, since they have the title but are a vassal +tgp_is_ceremonial_liege_trigger = { + custom_tooltip = { + text = tgp_is_ceremonial_liege_tt + tgp_has_ceremonial_liege_title_trigger = yes + is_independent_ruler = no + } +} + +tgp_portrait_liege_or_ceremonial_liege_emperor_trigger = { + # Ceremonial Liege + trigger_if = { + limit = { tgp_realm_has_ceremonial_liege_trigger = yes } + tgp_has_ceremonial_liege_title_trigger = yes + primary_title.holder.top_liege.highest_held_title_tier >= tier_empire + } + # Standard Liege + trigger_else = { + scope:highest_held_title_tier >= tier_empire + is_independent_ruler = yes + } +} + +tgp_portrait_liege_or_ceremonial_liege_king_trigger = { + # Ceremonial Liege + trigger_if = { + limit = { tgp_realm_has_ceremonial_liege_trigger = yes } + tgp_has_ceremonial_liege_title_trigger = yes + primary_title.holder.top_liege.highest_held_title_tier = tier_kingdom + } + # Standard Liege + trigger_else = { highest_held_title_tier = tier_kingdom } +} + +# Check if a character has a ceremonial liege title (but not if they are actually a ceremonial liege) +tgp_has_ceremonial_liege_title_trigger = { + trigger_if = { + limit = { tgp_realm_has_ceremonial_liege_trigger = yes } + custom_tooltip = { + text = tgp_has_ceremonial_liege_title_tt + has_title = top_liege.primary_title.var:administrative_ui_special_title + } + } + trigger_else = { + custom_tooltip = { + text = tgp_has_ceremonial_liege_title_no_title_tt + always = no + } + } +} + +# Used to save temp scope of the ceremonial liege for other triggers +tgp_ceremonial_liege_scope_trigger = { + top_liege = { + save_temporary_scope_as = ruler_temp + primary_title.var:administrative_ui_special_title.holder ?= { + top_liege ?= scope:ruler_temp.top_liege + this = scope:ruler_temp + save_temporary_scope_as = ceremonial_liege_temp + } + } + is_independent_ruler = no +} + +# Check if character is part of their realm's ceremonial liege's house +tgp_is_in_ceremonial_house_trigger = { + custom_tooltip = { + text = tgp_is_in_ceremonial_house_tt + exists = house + top_liege.primary_title.var:administrative_ui_special_title.holder.house ?= house + } +} + + # Check if two characters are from the same ceremonial house +tgp_shared_ceremonial_house_trigger = { + exists = $COMPARE_1$.house + $COMPARE_2$.house ?= $COMPARE_1$.house + OR = { + $COMPARE_1$ = { tgp_is_in_ceremonial_house_trigger = yes } + $COMPARE_2$ = { tgp_is_in_ceremonial_house_trigger = yes } + } +} + + # Check if a character is a ruler over a ceremonial liege +tgp_is_ceremonial_regent_trigger = { + is_independent_ruler = yes + is_landed = yes + tgp_realm_has_ceremonial_liege_trigger = yes + tgp_has_ceremonial_liege_title_trigger = no +} + +tgp_should_become_meritocratic_trigger = { + has_tgp_dlc_trigger = yes + OR = { + top_liege = { + any_neighboring_and_across_water_top_liege_realm_owner = { government_allows = merit } + } + AND = { + OR = { + is_independent_ruler = yes + liege = { + NOT = { + government_has_flag = government_is_special_administrative + } + } + } + capital_province = { + OR = { + geographical_region = world_asia + geographical_region = world_tibet + geographical_region = world_burma + geographical_region = world_steppe_east + } + } + } + #Becoming admin with creation of meritocratic great yuan + exists = scope:great_yuan_ruler + } +} + +tgp_mongol_vassal_will_become_admin = { + highest_held_title_tier > tier_barony + primary_title = { + OR = { + target_is_de_jure_liege_or_above = scope:administrative_liege.primary_title #We only auto convert de jure vassals + target_is_de_jure_liege_or_above = title:h_china + } + } + OR = { + government_has_flag = government_is_feudal + government_has_flag = government_is_clan + government_has_flag = government_is_japan_feudal + government_has_flag = government_is_nomadic + } + OR = { + #An admin type + has_trait = governor + faith.religion = religion:confucianism_religion + culture = { + has_cultural_pillar = heritage_chinese + } + culture = { + has_cultural_pillar = heritage_korean + } + #Nomad type + government_has_flag = government_is_nomadic + has_trait = nomadic_philosophy + } +} + +tgp_japanese_high_nobility_clothing_trigger = { + tgp_is_ceremonial_liege_trigger = no + trigger_if = { + limit = { has_character_flag = murasaki } + always = yes + } + trigger_else_if = { + limit = { government_has_flag = government_is_japan_feudal } + OR = { + is_independent_ruler = yes + trigger_if = { + limit = { exists = top_liege } + OR = { + is_councillor_of = top_liege + is_spouse_of = top_liege + } + AND = { + is_house_head = yes + has_same_government = top_liege + } + } + } + } + trigger_else_if = { + limit = { government_has_flag = government_is_japan_administrative } + OR = { + highest_held_title_tier >= tier_county + tgp_is_in_ceremonial_house_trigger = yes + } + } + trigger_else = { highest_held_title_tier >= tier_kingdom } +} + +tgp_japanese_high_nobility_clothing_family_trigger = { + AND = { + government_has_flag = government_is_japan_administrative + is_lowborn = no + OR = { + highest_held_title_tier >= tier_county + court_owner = { highest_held_title_tier >= tier_county } + } + } +} + +tgp_is_chinese_style_emperor_trigger = { + highest_held_title_tier >= tier_empire + is_independent_ruler = yes + government_allows = merit +} + +is_valid_for_east_asian_events_trigger = { + culture = { + OR = { + has_cultural_pillar = heritage_japonic + has_cultural_pillar = heritage_chinese + has_cultural_pillar = heritage_korean + } + } +} + +is_valid_for_east_asian_events_geo_trigger = { + capital_province = { + OR = { + geographical_region = world_asia_china + geographical_region = world_asia_japan + geographical_region = world_asia_korea + geographical_region = world_asia_southeast + } + } +} + +shared_raid_estate_participant_valid_trigger = { + is_adult = yes + is_house_head = yes + is_independent_ruler = no + custom_tooltip = { + text = is_house_head_of_noble_family_tt + any_held_title = { is_noble_family_title = yes } + house.house_head ?= this + } + OR = { + government_allows = administrative + government_is_japanese_trigger = yes + } + tgp_is_ceremonial_liege_trigger = no +} + +should_use_asian_maa_graphics = { + OR = { + has_unit_gfx = chinese_unit_gfx + has_unit_gfx = japanese_unit_gfx + has_unit_gfx = indian_unit_gfx + has_unit_gfx = southeast_asian_unit_gfx + has_unit_gfx = mongol_unit_gfx + } +} + +eligible_for_elder_trigger = { + merit_level > $DISCIPLE$.merit_level + num_of_relation_disciple < disciples_limit_value + NOT = { has_relation_disciple = $DISCIPLE$ } + $DISCIPLE$ = { + is_adult = yes + } +} + +# Treasury budget triggers +prefers_salary_favored_budget_trigger = { + $CHARACTER$ = { + OR = { + top_participant_group:dynastic_cycle ?= { participant_group_type = conservative_movement } + has_title = title:e_minister_of_personnel + AND = { + this = top_liege + OR = { + ai_compassion > 75 + ai_honor > 75 + } + } + } + trigger_if = { + limit = { this != top_liege } + NOT = { has_trait = loyal } + } + } +} + +prefers_ministry_favored_budget_trigger = { + $CHARACTER$ = { + OR = { + top_participant_group:dynastic_cycle ?= { participant_group_type = advancement_movement } + AND = { + this = top_liege + OR = { + ai_greed < 0 + ai_rationality > 75 + situation:dynastic_cycle ?= { situation_current_phase = situation_dynastic_cycle_phase_stability_advancement } + } + } + } + trigger_if = { + limit = { this != top_liege } + NOT = { has_trait = loyal } + } + } +} + +prefers_military_favored_budget_trigger = { + $CHARACTER$ = { + OR = { + top_participant_group:dynastic_cycle ?= { participant_group_type = expansion_movement } + has_title = title:e_minister_grand_marshal + has_title = title:e_minister_of_war + AND = { + this = top_liege + OR = { + ai_boldness > 90 + situation:dynastic_cycle ?= { + OR = { + situation_current_phase = situation_dynastic_cycle_phase_stability_expansion + situation_current_phase = situation_dynastic_cycle_phase_instability_conquest + } + } + } + } + } + trigger_if = { + limit = { this != top_liege } + NOT = { has_trait = loyal } + } + } +} + +prefers_hegemon_favored_budget_trigger = { + $CHARACTER$ = { + OR = { + top_participant_group:dynastic_cycle ?= { participant_group_type = pro_hegemon_movement } + has_trait = loyal + AND = { + this = top_liege + ai_greed > 90 + } + } + } +} + +can_suggest_budget_salary_template_trigger = { + NOT = { + liege = { + has_realm_law = budget_allocation_salary_40 + has_realm_law = budget_allocation_ministry_25 + has_realm_law = budget_allocation_military_15 + } + } +} + +can_suggest_budget_ministry_template_trigger = { + NOT = { + liege = { + has_realm_law = budget_allocation_salary_25 + has_realm_law = budget_allocation_ministry_40 + has_realm_law = budget_allocation_military_15 + } + } +} + +can_suggest_budget_military_template_trigger = { + NOT = { + liege = { + has_realm_law = budget_allocation_salary_30 + has_realm_law = budget_allocation_ministry_20 + has_realm_law = budget_allocation_military_30 + } + } +} + +can_suggest_budget_hegemon_template_trigger = { + NOT = { + liege = { + has_realm_law = budget_allocation_salary_25 + has_realm_law = budget_allocation_ministry_25 + has_realm_law = budget_allocation_military_20 + } + } +} + +can_suggest_budget_balanced_template_trigger = { + NOT = { + liege = { + has_realm_law = budget_allocation_salary_35 + has_realm_law = budget_allocation_ministry_25 + has_realm_law = budget_allocation_military_20 + } + } +} +### + +peasant_war_should_escalated_trigger = { + has_variable = peasant_war_escalates +} + +tgp_gender_can_be_exam_entrant_trigger = { + trigger_if = { + limit = { + scope:host ?= { + OR = { + has_realm_law = female_only_law + has_realm_law = female_preference_law + } + } + } + OR = { + is_female = yes + AND = { + is_ai = no + is_male = yes + } + } + } + trigger_else_if = { + limit = { + scope:host ?= { + OR = { + has_realm_law = male_only_law + has_realm_law = male_preference_law + } + } + } + OR = { + is_male = yes + AND = { + is_ai = no + is_female = yes + } + } + } + trigger_else = { + always = yes + } +} + +tgp_root_gender_can_be_exam_entrant_trigger = { + trigger_if = { + limit = { + root ?= { + OR = { + has_realm_law = female_only_law + has_realm_law = female_preference_law + } + } + } + is_female = yes + } + trigger_else_if = { + limit = { + root ?= { + OR = { + has_realm_law = male_only_law + has_realm_law = male_preference_law + } + } + } + is_female = no + } + trigger_else = { + always = yes + } +} + +is_merit_based_official = { + government_has_flag = government_has_merit + OR = { + is_governor_or_admin_count = yes + AND = { + is_councillor = yes + NOT = { has_council_position = councillor_spouse } + liege = { + OR = { + is_landed = yes # to exclude councilors of landless noble family heads + highest_held_title_tier >= tier_empire # for councilors of ministers + } + } + } + } +} + +has_highest_merit_rank = { + trigger_if = { + limit = { government_has_flag = government_is_celestial } + merit_level = 9 + } + trigger_else = { merit_level = 5 } +} + +tgp_is_ceremonial_petition_shown_trigger = { + is_playable_character = yes + has_dlc_feature = royal_court + has_tgp_dlc_trigger = yes + tgp_realm_has_ceremonial_liege_trigger = yes + tgp_has_ceremonial_liege_title_trigger = no + top_liege = { tgp_is_ceremonial_regent_trigger = yes } # Not 'actual' ruler + top_liege.primary_title.var:administrative_ui_special_title.holder ?= { has_royal_court = yes } +} + +tgp_is_ceremonial_petition_valid_trigger = { + has_dlc_feature = royal_court + has_tgp_dlc_trigger = yes + is_at_war = no + tgp_realm_has_ceremonial_liege_trigger = yes + top_liege.primary_title.var:administrative_ui_special_title.holder ?= { + is_available_adult = yes + has_royal_court = yes + NOT = { is_at_war = yes } + } +} + +take_vows_available_trigger = { + OR = { + faith = { has_doctrine_parameter = take_vows_active } + AND = { + religion:buddhism_religion ?= religion + faith = { has_doctrine = special_doctrine_immaterial_harmony } + } + } +} + +tgp_capital_not_in_chinese_naming_region = { + capital_county.title_province ?= { + NOR = { + geographical_region = tgp_ba_region + geographical_region = tgp_cai_region + geographical_region = tgp_cao_region + geographical_region = tgp_chen_region + geographical_region = tgp_chu_region + geographical_region = tgp_dai_region + geographical_region = tgp_dian_region + geographical_region = tgp_gan_region + geographical_region = tgp_gui_region + geographical_region = tgp_han_region + geographical_region = tgp_huai_region + geographical_region = tgp_jin_region + geographical_region = tgp_jing_region + geographical_region = tgp_lai_region + geographical_region = tgp_liang_region + geographical_region = tgp_lu_region + geographical_region = tgp_min_region + geographical_region = tgp_qi_region + geographical_region = tgp_qian_region + geographical_region = tgp_shu_region + geographical_region = tgp_song_region + geographical_region = tgp_sui_region + geographical_region = tgp_tang_region + geographical_region = tgp_wei_region + geographical_region = tgp_wu_region + geographical_region = tgp_xia_region + geographical_region = tgp_xiang_region + geographical_region = tgp_xing_region + geographical_region = tgp_xu_region + geographical_region = tgp_yang_region + geographical_region = tgp_yin_region + geographical_region = tgp_yong_region + geographical_region = tgp_yue_region + geographical_region = tgp_zhao_region + geographical_region = tgp_zheng_region + geographical_region = tgp_zhou_region + } + } +} diff --git a/N3OW/common/scripted_triggers/20_health_balancing_triggers.txt b/N3OW/common/scripted_triggers/20_health_balancing_triggers.txt index 90f82ac2..9f96e42e 100644 --- a/N3OW/common/scripted_triggers/20_health_balancing_triggers.txt +++ b/N3OW/common/scripted_triggers/20_health_balancing_triggers.txt @@ -16,42 +16,48 @@ debug_activate_contagious_disease_outbreak_data_trigger = { } is_very_young_character = { - OR = { - age <= 20 - AND = { + trigger_if = { + limit = { OR = { has_trait = whole_of_body has_trait = fecund - } - age <= 25 + } } + age <= 25 + } + trigger_else = { + age <= 20 } } is_young_character = { - OR = { - age <= 30 - AND = { + trigger_if = { + limit = { OR = { has_trait = whole_of_body has_trait = fecund } - age <= 35 } - } + age <= 35 + } + trigger_else = { + age <= 30 + } } is_aging_character = { - OR = { - age >= 40 - AND = { + trigger_if = { + limit = { OR = { has_trait = whole_of_body has_trait = fecund } - age >= 45 } - } + age >= 45 + } + trigger_else = { + age >= 40 + } } is_old_character = { diff --git a/N3OW/common/scripted_triggers/20_health_triggers.txt b/N3OW/common/scripted_triggers/20_health_triggers.txt index 01c8bc4e..2ea2bd09 100644 --- a/N3OW/common/scripted_triggers/20_health_triggers.txt +++ b/N3OW/common/scripted_triggers/20_health_triggers.txt @@ -139,6 +139,105 @@ has_easily_mocked_physical_attribute_trigger = { } } +has_disfiguring_physical_attribute_trigger = { + # Done this stupid way to prevent it blocking option text + trigger_if = { + limit = { has_trait = measles } + has_trait = measles + } + trigger_else_if = { + limit = { has_trait = smallpox } + has_trait = smallpox + } + trigger_else_if = { + limit = { has_trait = pneumonic } + has_trait = pneumonic + } + trigger_else_if = { + limit = { has_trait = typhus } + has_trait = typhus + } + trigger_else_if = { + limit = { has_trait = ergotism } + has_trait = ergotism + } + trigger_else_if = { + limit = { has_trait = consumption } + has_trait = consumption + } + trigger_else_if = { + limit = { has_trait = bubonic_plague } + has_trait = bubonic_plague + } + trigger_else_if = { + limit = { has_trait = scaly } + has_trait = scaly + } + trigger_else_if = { + limit = { has_trait = albino } + has_trait = albino + } + trigger_else_if = { + limit = { has_trait = disfigured } + has_trait = disfigured + } + trigger_else_if = { + limit = { has_trait = great_pox } + has_trait = great_pox + } + trigger_else_if = { + limit = { has_trait = leper } + has_trait = leper + } + trigger_else_if = { + limit = { has_trait = maimed } + has_trait = maimed + } + trigger_else_if = { + limit = { has_trait = clubfooted } + has_trait = clubfooted + } + trigger_else_if = { + limit = { has_trait = hunchbacked } + has_trait = hunchbacked + } + trigger_else_if = { + limit = { has_trait = dwarf } + has_trait = dwarf + } + trigger_else_if = { + limit = { has_trait = spindly } + has_trait = spindly + } + trigger_else_if = { + limit = { has_trait = one_legged } + has_trait = one_legged + } + trigger_else_if = { + limit = { has_trait = blind } + has_trait = blind + } + trigger_else_if = { + limit = { has_trait = dysentery } + has_trait = dysentery + } + trigger_else_if = { + limit = { has_trait = beauty_bad_3 } + has_trait = beauty_bad_3 + } + trigger_else_if = { + limit = { has_trait = wounded_3 } + has_trait = wounded_3 + } + trigger_else_if = { + limit = { has_character_modifier = obese_modifier } + has_character_modifier = obese_modifier + } + trigger_else = { + has_trait = ill + } +} + ############################ # VARIOUS DISEASE TRIGGERS # ############################ @@ -323,23 +422,7 @@ can_contract_disease_trigger = { } has_any_disease_trigger = { - OR = { - has_trait = ill - has_trait = lovers_pox - has_trait = great_pox - has_trait = early_great_pox - has_trait = bubonic_plague - has_trait = smallpox - has_trait = measles - has_trait = ergotism - has_trait = dysentery - has_trait = consumption - has_trait = typhus - has_trait = cancer - has_trait = pneumonic - has_trait = leper - has_trait = gout_ridden - } + has_trait_with_flag = illness } has_std_trigger = { @@ -351,15 +434,7 @@ has_std_trigger = { } has_epidemic_disease_trigger = { - OR = { - has_trait = bubonic_plague - has_trait = smallpox - has_trait = measles - has_trait = ergotism - has_trait = dysentery - has_trait = consumption - has_trait = typhus - } + has_trait_with_flag = epidemic_disease } has_contagious_disease_trigger = { #Only diseases handled by the disease_outbreak_pulse and the disease_recovery_pulse @@ -407,19 +482,7 @@ has_short_disease_trigger = { } has_serious_disease_trigger = { - OR = { - has_trait = bubonic_plague - has_trait = great_pox - has_trait = leper - has_trait = typhus - has_trait = smallpox - has_trait = cancer - has_trait = pneumonic - has_trait = consumption - has_trait = measles - has_trait = dysentery - has_trait = ergotism - } + has_trait_with_flag = debilitating_illness } has_insect_carried_disease_trigger = { OR = { @@ -433,8 +496,7 @@ has_insect_carried_disease_trigger = { ############################ court_physician_available_trigger = { - exists = court_owner - court_owner = { + court_owner ?= { employs_court_position = court_physician_court_position any_court_position_holder = { type = court_physician_court_position @@ -798,7 +860,7 @@ court_physician_can_fail_on_purpose_trigger = { has_relation_rival = scope:physician has_relation_potential_rival = scope:physician } - NOT = { scope:physician = scope:sick_character } + scope:physician != scope:sick_character } has_traits_that_negate_athletic_trigger = { #Are we already athletic or does any of our traits contradict athletic? diff --git a/N3OW/common/scripted_triggers/great_project_triggers.txt b/N3OW/common/scripted_triggers/great_project_triggers.txt new file mode 100644 index 00000000..779b4b0b --- /dev/null +++ b/N3OW/common/scripted_triggers/great_project_triggers.txt @@ -0,0 +1,20 @@ + +is_owner_only_contribution_trigger = { + OR = { + contribution_id = rite_of_worthiness + contribution_id = creation_aspect + contribution_id = serenity_aspect + contribution_id = destruction_aspect + contribution_id = trickery_aspect + contribution_id = family_shrine + contribution_id = family_statues + contribution_id = family_temple_compound + contribution_id = family_temple_complex + contribution_id = dynastic_temple_complex + } +} + +is_unfunded_required_contribution_trigger = { + contribution_is_funded = no + contribution_is_required = yes +} diff --git a/N3OW/common/scripted_triggers/mpo_scripted_triggers.txt b/N3OW/common/scripted_triggers/mpo_scripted_triggers.txt index 8d771f2c..ec851386 100644 --- a/N3OW/common/scripted_triggers/mpo_scripted_triggers.txt +++ b/N3OW/common/scripted_triggers/mpo_scripted_triggers.txt @@ -644,7 +644,7 @@ can_gift_anything_trigger = { short_term_gold >= miniscule_gold_value AND = { domicile ?= { herd >= twenty_percent_herd_value } - involved_activity.var:host_var = { + involved_activity.activity_host = { domicile ?= { herd < max_herd } } } @@ -920,14 +920,20 @@ can_have_tributaries_trigger = { can_get_tributaries_peacefully_trigger = { can_have_tributaries_trigger = yes - has_government = nomad_government + OR = { + government_allows = obedience # nomads and steppe admins + AND = { + government_has_flag = government_is_celestial + highest_held_title_tier = tier_hegemony + } + government_has_flag = government_is_mandala + } } mpo_valid_for_blood_brotherhood_trigger = { OR = { government_has_flag = government_is_nomadic has_trait = nomadic_philosophy - #TODO_MPO_CD blood brother tradition tie-in } } @@ -1132,10 +1138,10 @@ mpo_blood_brother_common_enemy_sub_trigger = { house = scope:recipient.house scope:actor.house = scope:recipient.house } - house.house_head = { - any_owned_story = { - story_type = story_cycle_house_feud - var:house_feud_house = scope:recipient.house + house = { + any_house_relation = { + has_house_relation_level = feud + any_relation_house = { this = scope:recipient.house } } } } @@ -1202,11 +1208,11 @@ mpo_blood_brother_common_enemy_trigger = { NOT = { house = scope:recipient.house } - house.house_head = { - any_owned_story = { - story_type = story_cycle_house_feud - var:house_feud_house.house_head ?= { - mpo_blood_brother_common_enemy_sub_trigger = yes + house = { + any_house_relation = { + has_house_relation_level = feud + any_relation_house = { + house_head = { mpo_blood_brother_common_enemy_sub_trigger = yes } } } } diff --git a/N3OW/common/scripted_triggers/music_triggers.txt b/N3OW/common/scripted_triggers/music_triggers.txt new file mode 100644 index 00000000..62e6d324 --- /dev/null +++ b/N3OW/common/scripted_triggers/music_triggers.txt @@ -0,0 +1,159 @@ +# Various music triggers + +should_use_asian_music_trigger = { + OR = { + AND = { + culture = { + has_building_gfx = steppe_building_gfx + } + OR = { + culture = { has_cultural_pillar = heritage_mongolic } + culture = { any_parent_culture_or_above = { has_cultural_pillar = heritage_mongolic } } + culture = { has_cultural_pillar = heritage_tungusic } + culture = { any_parent_culture_or_above = { has_cultural_pillar = heritage_tungusic } } + } + capital_province ?= { + OR = { + geographical_region = world_asia_north_east + geographical_region = world_steppe_east + } + } + } + culture = { + OR = { + has_building_gfx = chinese_building_gfx + has_building_gfx = indian_building_gfx + has_building_gfx = southeast_asian_building_gfx + has_building_gfx = japanese_building_gfx + } + } + religion = { is_in_family = rf_sinitic } + religion = religion:buddhism_religion + religion = religion:hinduism_religion + religion = religion:shintoism_religion + any_character_situation = { situation_type = dynastic_cycle } + } +} + +should_use_chinese_music_trigger = { + OR = { + culture = { has_cultural_pillar = heritage_chinese } + culture = { any_parent_culture_or_above = { has_cultural_pillar = heritage_chinese } } + any_character_situation = { situation_type = dynastic_cycle } + religion = { is_in_family = rf_sinitic } + } +} + +should_use_byzantine_music_trigger = { + OR = { + culture = { has_cultural_pillar = heritage_byzantine } + culture = { any_parent_culture_or_above = { has_cultural_pillar = heritage_byzantine } } + top_liege = { has_title = title:e_byzantium } + top_liege = { has_title = title:h_roman_empire } + religion = religion:christianity_religion + } +} + +should_use_nomadic_music_trigger = { + OR = { + culture = { + has_cultural_pillar = heritage_mongolic + } + culture = { + has_cultural_pillar = heritage_turkic + } + faith.religion = faith:tengri_pagan.religion + AND = { + exists = root.capital_county + government_has_flag = government_is_nomadic + situation:the_great_steppe = { + any_situation_sub_region = { + situation_sub_region_has_county = root.capital_county + } + } + } + } +} + +should_use_sami_music_trigger = { + OR = { + culture = { + OR = { + has_cultural_pillar = heritage_ugro_permian + has_cultural_pillar = heritage_balto_finnic + has_cultural_pillar = heritage_nivkh + } + } + culture = { + OR = { + any_parent_culture_or_above = { has_cultural_pillar = heritage_ugro_permian } + any_parent_culture_or_above = { has_cultural_pillar = heritage_balto_finnic } + any_parent_culture_or_above = { has_cultural_pillar = heritage_nivkh } + } + } + AND = { + exists = capital_province + capital_province = { geographical_region = cp4_music_area } + } + } +} + +should_use_norse_music_trigger = { + OR = { + culture = { has_cultural_pillar = heritage_north_germanic } + religion = religion:germanic_religion + } +} + +should_use_iberian_music_trigger = { + OR = { + culture = { + has_cultural_pillar = heritage_iberian + } + culture = { + any_parent_culture_or_above = { has_cultural_pillar = heritage_iberian } + } + AND = { + exists = capital_province + capital_province = { geographical_region = world_europe_west_iberia } + } + } +} + +should_use_iranian_music_trigger = { + OR = { + culture = { + has_cultural_pillar = heritage_iranian + } + culture = { + any_parent_culture_or_above = { has_cultural_pillar = heritage_iranian } + } + AND = { + religion = religion:islam_religion + NAND = { + government_has_flag = government_is_nomadic + situation:the_great_steppe ?= { + any_situation_sub_region = { + situation_sub_region_has_county = root.capital_county + } + } + } + } + religion = religion:zoroastrianism_religion + } +} + +should_use_specifically_persian_music_trigger = { + OR = { + culture = { + has_cultural_pillar = heritage_iranian + } + culture = { + any_parent_culture_or_above = { has_cultural_pillar = heritage_iranian } + } + AND = { + exists = capital_province + capital_province = { geographical_region = world_persian_empire } + } + } +} \ No newline at end of file diff --git a/N3OW/common/scripted_triggers/tgp_imperial_examination_triggers.txt b/N3OW/common/scripted_triggers/tgp_imperial_examination_triggers.txt new file mode 100644 index 00000000..a5269d97 --- /dev/null +++ b/N3OW/common/scripted_triggers/tgp_imperial_examination_triggers.txt @@ -0,0 +1,247 @@ + +activity_has_met_failee_quota_trigger = { + any_guest_subset = { + name = failees + count >= imperial_examination_failee_quota_value + } +} + +activity_has_ai_entrants_trigger = { + any_guest_subset = { + name = entrants + count >= 1 + is_ai = yes + } +} + +#Activity Option: Exam focus +activity_is_learning_focus_trigger = { + has_activity_option = { + category = special_type + option = imperial_examination_focus_learning + } +} + +activity_is_martial_focus_trigger = { + has_activity_option = { + category = special_type + option = imperial_examination_focus_martial + } +} + +activity_is_stewardship_focus_trigger = { + has_activity_option = { + category = special_type + option = imperial_examination_focus_stewardship + } +} + +#Activity Option: Passing grade +activity_has_extreme_grade_trigger = { + has_activity_option = { + category = imperial_examination_passing_grade + option = imperial_examination_passing_grade_extreme + } +} + +activity_has_high_grade_trigger = { + has_activity_option = { + category = imperial_examination_passing_grade + option = imperial_examination_passing_grade_high + } +} + +activity_has_mediocre_grade_trigger = { + has_activity_option = { + category = imperial_examination_passing_grade + option = imperial_examination_passing_grade_mediocre + } +} + +activity_has_low_grade_trigger = { + has_activity_option = { + category = imperial_examination_passing_grade + option = imperial_examination_passing_grade_low + } +} + +#Activity Option: Number of exams +activity_has_imperial_exams_trigger = { + has_activity_option = { + category = imperial_examination_breadth + option = imperial_examination_breadth_open + } +} + +activity_has_grand_exams_trigger = { + has_activity_option = { + category = imperial_examination_breadth + option = imperial_examination_breadth_restricted + } +} + +activity_has_palace_exams_trigger = { + has_activity_option = { + category = imperial_examination_breadth + option = imperial_examination_breadth_exclusive + } +} + +#What's a good examiner +is_available_imperial_examiner_trigger = { + is_available_healthy_ai_adult = yes + is_lowborn = no + is_landed = no + OR = { + AND = { + exists = involved_activity + involved_activity = $ATTENDING_CHAR$.involved_activity + } + can_join_activity = $ATTENDING_CHAR$.involved_activity + } + location = $ATTENDING_CHAR$.location + age > 35 + trigger_if = { + limit = { + $ATTENDING_CHAR$ = { + involved_activity = { has_activity_type = activity_imperial_examination } + } + } + OR = { + trigger_if = { + limit = { + $ATTENDING_CHAR$ = { + involved_activity = { activity_is_martial_focus_trigger = yes } + } + } + OR = { + has_trait = education_martial_3 + has_trait = education_martial_4 + has_trait = education_martial_5 + } + martial >= decent_skill_rating + } + trigger_else_if = { + limit = { + $ATTENDING_CHAR$ = { + involved_activity = { activity_is_stewardship_focus_trigger = yes } + } + } + OR = { + has_trait = education_stewardship_3 + has_trait = education_stewardship_4 + has_trait = education_stewardship_5 + } + stewardship >= decent_skill_rating + } + trigger_else = { + OR = { + has_trait = education_learning_3 + has_trait = education_learning_4 + has_trait = education_learning_5 + } + learning >= decent_skill_rating + } + } + } + trigger_else = { + OR = { + has_trait = education_learning_3 + has_trait = education_learning_4 + has_trait = education_learning_5 + } + learning >= decent_skill_rating + } + trigger_if = { + limit = { + $ATTENDING_CHAR$.involved_activity.activity_host.faith = { has_doctrine = doctrine_gender_female_dominated } + } + is_female = yes + } + trigger_else_if = { + limit = { + $ATTENDING_CHAR$.involved_activity.activity_host.faith = { has_doctrine = doctrine_gender_male_dominated } + } + is_female = no + } + trigger_else = { + always = yes + } +} + +has_perfect_score_trigger = { + has_variable = $SCORE_VAR$ + var:$SCORE_VAR$ >= imperial_examination_perfect_score_value +} + +has_good_score_trigger = { + has_variable = $SCORE_VAR$ + var:$SCORE_VAR$ < imperial_examination_perfect_score_value + var:$SCORE_VAR$ >= imperial_examination_great_score_value +} + +has_decent_score_trigger = { + has_variable = $SCORE_VAR$ + var:$SCORE_VAR$ < imperial_examination_great_score_value + var:$SCORE_VAR$ >= imperial_examination_decent_score_value +} + +has_questionable_score_trigger = { + has_variable = $SCORE_VAR$ + var:$SCORE_VAR$ < imperial_examination_decent_score_value +} + +#Do you have any cheats? +has_any_exam_cheats_trigger = { + OR = { + has_variable = has_bribed_examiner + has_variable = has_exam_taker + has_variable = has_blackmailed_examiner + has_variable = has_planted_answers + has_variable = parent_has_bribed_examiner + } +} + +is_bribed_examiner_trigger = { + OR = { + AND = { + $EXAMINEE$ = { has_variable = has_bribed_examiner } + $EXAMINER$ = $EXAMINEE$.var:has_bribed_examiner + } + AND = { + $EXAMINEE$ = { has_variable = has_blackmailed_examiner } + $EXAMINER$ = $EXAMINEE$.var:has_blackmailed_examiner + } + AND = { + $EXAMINEE$ = { has_variable = has_planted_answers } + $EXAMINER$ = $EXAMINEE$.var:has_planted_answers + } + AND = { + $EXAMINEE$ = { has_variable = parent_has_bribed_examiner } + $EXAMINER$ = $EXAMINEE$.var:parent_has_bribed_examiner + } + } +} + +is_wrong_examination_gender = { + OR = { + AND = { + scope:host = { + OR = { + has_realm_law = male_only_law + has_realm_law = male_preference_law + } + } + is_female = yes + } + AND = { + scope:host = { + OR = { + has_realm_law = female_only_law + has_realm_law = female_preference_law + } + } + is_male = yes + } + } +} \ No newline at end of file diff --git a/N3OW/common/scripted_triggers/tgp_mandala_task_contract_triggers.txt b/N3OW/common/scripted_triggers/tgp_mandala_task_contract_triggers.txt new file mode 100644 index 00000000..55a3d407 --- /dev/null +++ b/N3OW/common/scripted_triggers/tgp_mandala_task_contract_triggers.txt @@ -0,0 +1,129 @@ + + +has_an_active_mandala_contract_trigger = { + any_character_active_contract = { + OR = { + has_task_contract_type = mandala_realm_contract_0001 + has_task_contract_type = mandala_realm_contract_0002 + has_task_contract_type = mandala_realm_contract_0003 + has_task_contract_type = mandala_realm_contract_0004 + has_task_contract_type = mandala_realm_contract_0005 + has_task_contract_type = mandala_realm_contract_0006 + has_task_contract_type = mandala_realm_contract_0007 + has_task_contract_type = mandala_realm_contract_0008 + has_task_contract_type = mandala_realm_contract_0009 + has_task_contract_type = mandala_realm_contract_0010 + has_task_contract_type = mandala_realm_contract_0011 + has_task_contract_type = mandala_realm_contract_0012 + has_task_contract_type = mandala_realm_contract_0013 + has_task_contract_type = mandala_realm_contract_0014 + has_task_contract_type = mandala_realm_contract_0015 + has_task_contract_type = mandala_realm_contract_0016 + has_task_contract_type = mandala_realm_contract_0017 + has_task_contract_type = mandala_realm_contract_0018 + has_task_contract_type = mandala_realm_contract_0019 + has_task_contract_type = mandala_realm_contract_0020 + has_task_contract_type = mandala_realm_contract_0021 + has_task_contract_type = mandala_realm_contract_0022 + has_task_contract_type = mandala_realm_contract_0023 + has_task_contract_type = mandala_realm_contract_0024 + has_task_contract_type = mandala_realm_contract_0025 + has_task_contract_type = mandala_realm_contract_0026 + has_task_contract_type = mandala_realm_contract_0027 + has_task_contract_type = mandala_realm_contract_0028 + has_task_contract_type = mandala_realm_contract_0029 + has_task_contract_type = mandala_realm_contract_0030 + has_task_contract_type = mandala_realm_contract_0031 + has_task_contract_type = mandala_realm_contract_0032 + has_task_contract_type = mandala_realm_contract_0033 + has_task_contract_type = mandala_realm_contract_0034 + has_task_contract_type = mandala_realm_contract_0035 + has_task_contract_type = mandala_realm_contract_0036 + has_task_contract_type = mandala_realm_contract_0037 + has_task_contract_type = mandala_realm_contract_0038 + has_task_contract_type = mandala_realm_contract_0039 + has_task_contract_type = mandala_realm_contract_0040 + has_task_contract_type = mandala_realm_contract_0041 + } + } +} + +is_a_mandala_contract_trigger = { + OR = { + has_task_contract_type = mandala_realm_contract_0001 + has_task_contract_type = mandala_realm_contract_0002 + has_task_contract_type = mandala_realm_contract_0003 + has_task_contract_type = mandala_realm_contract_0004 + has_task_contract_type = mandala_realm_contract_0005 + has_task_contract_type = mandala_realm_contract_0006 + has_task_contract_type = mandala_realm_contract_0007 + has_task_contract_type = mandala_realm_contract_0008 + has_task_contract_type = mandala_realm_contract_0009 + has_task_contract_type = mandala_realm_contract_0010 + has_task_contract_type = mandala_realm_contract_0011 + has_task_contract_type = mandala_realm_contract_0012 + has_task_contract_type = mandala_realm_contract_0013 + has_task_contract_type = mandala_realm_contract_0014 + has_task_contract_type = mandala_realm_contract_0015 + has_task_contract_type = mandala_realm_contract_0016 + has_task_contract_type = mandala_realm_contract_0017 + has_task_contract_type = mandala_realm_contract_0018 + has_task_contract_type = mandala_realm_contract_0019 + has_task_contract_type = mandala_realm_contract_0020 + has_task_contract_type = mandala_realm_contract_0021 + has_task_contract_type = mandala_realm_contract_0022 + has_task_contract_type = mandala_realm_contract_0023 + has_task_contract_type = mandala_realm_contract_0024 + has_task_contract_type = mandala_realm_contract_0025 + has_task_contract_type = mandala_realm_contract_0026 + has_task_contract_type = mandala_realm_contract_0027 + has_task_contract_type = mandala_realm_contract_0028 + has_task_contract_type = mandala_realm_contract_0029 + has_task_contract_type = mandala_realm_contract_0030 + has_task_contract_type = mandala_realm_contract_0031 + has_task_contract_type = mandala_realm_contract_0032 + has_task_contract_type = mandala_realm_contract_0033 + has_task_contract_type = mandala_realm_contract_0034 + has_task_contract_type = mandala_realm_contract_0035 + has_task_contract_type = mandala_realm_contract_0036 + has_task_contract_type = mandala_realm_contract_0037 + has_task_contract_type = mandala_realm_contract_0038 + has_task_contract_type = mandala_realm_contract_0039 + has_task_contract_type = mandala_realm_contract_0040 + has_task_contract_type = mandala_realm_contract_0041 + } +} + +mandala_task_contract_valid_to_create_trigger = { + government_has_flag = government_is_mandala +} + +mandala_task_contract_valid_to_keep_trigger = { + government_has_flag = government_is_mandala + is_alive = yes + root.task_contract_location = { + county.holder.top_liege = { + OR = { + this = root.task_contract_taker.top_liege + this = { + is_tributary_of = root.task_contract_taker + } + } + } + } +} + +mandala_task_contract_valid_to_continue_trigger = { + government_has_flag = government_is_mandala + is_alive = yes + root.task_contract_location = { + county.holder.top_liege = { + OR = { + this = root.task_contract_taker.top_liege + this = { + is_tributary_of = root.task_contract_taker + } + } + } + } +} diff --git a/N3OW/common/scripted_triggers/tgp_mandala_triggers.txt b/N3OW/common/scripted_triggers/tgp_mandala_triggers.txt new file mode 100644 index 00000000..0b71baa4 --- /dev/null +++ b/N3OW/common/scripted_triggers/tgp_mandala_triggers.txt @@ -0,0 +1,1242 @@ + +terrible_devaraja_quality_trigger = { + has_mandala_capital_trigger = no +} + +poor_devaraja_quality_trigger = { + capital_province = { has_building_or_higher = mandala_capital_01 } + mandala_radiance_value >= 1 +} + +middling_devaraja_quality_trigger = { + capital_province = { has_building_or_higher = mandala_capital_02 } + mandala_radiance_value >= 10 +} + +good_devaraja_quality_trigger = { + capital_province = { has_building_or_higher = mandala_capital_03 } + mandala_radiance_value >= 30 +} + +great_devaraja_quality_trigger = { + capital_province = { has_building_or_higher = mandala_capital_04 } + mandala_radiance_value >= 50 +} + +exalted_devaraja_quality_trigger = { + capital_province = { has_building_or_higher = mandala_capital_05 } + mandala_radiance_value >= 80 +} + + +house_has_peaceful_rule_3_year_trigger = { + OR = { + has_house_head_parameter = peaceful_rule_3_year_modifier + has_house_head_parameter = peaceful_rule_3_year_interim_modifier + } +} + +house_has_creator_20_years_trigger = { + OR = { + has_house_head_parameter = creator_20_year_modifier + has_house_head_parameter = creator_20_year_interim_modifier + } +} + +house_has_creator_10_years_trigger = { + OR = { + has_house_head_parameter = creator_10_year_modifier + has_house_head_parameter = creator_10_year_interim_modifier + } +} + +house_has_unlock_agent_piety_bribe_trigger = { + OR = { + has_house_head_parameter = unlock_agent_piety_bribe + has_house_power_parameter = aspect_of_trickery_03 + has_house_power_parameter = aspect_of_trickery_04 + has_house_power_parameter = aspect_of_trickery_05 + } +} + + +same_mandala_aspect_trigger = { + OR = { + AND = { + $FIRST_CHAR$ = { + house = { has_house_power_parameter = aspect_of_creation } + } + $SECOND_CHAR$ = { + house = { has_house_power_parameter = aspect_of_creation } + } + } + AND = { + $FIRST_CHAR$ = { + house = { has_house_power_parameter = aspect_of_serenity } + } + $SECOND_CHAR$ = { + house = { has_house_power_parameter = aspect_of_serenity } + } + } + AND = { + $FIRST_CHAR$ = { + house = { has_house_power_parameter = aspect_of_destruction } + } + $SECOND_CHAR$ = { + house = { has_house_power_parameter = aspect_of_destruction } + } + } + AND = { + $FIRST_CHAR$ = { + house = { has_house_power_parameter = aspect_of_trickery } + } + $SECOND_CHAR$ = { + house = { has_house_power_parameter = aspect_of_trickery } + } + } + } +} + +has_mandala_aspect_trigger = { + house ?= { + OR = { + has_house_power_parameter = aspect_of_creation + has_house_power_parameter = aspect_of_serenity + has_house_power_parameter = aspect_of_destruction + has_house_power_parameter = aspect_of_trickery + } + } +} + +has_no_mandala_aspect_trigger = { + house ?= { + NOR = { + has_house_power_parameter = aspect_of_creation + has_house_power_parameter = aspect_of_serenity + has_house_power_parameter = aspect_of_destruction + has_house_power_parameter = aspect_of_trickery + } + } +} + + +has_mandala_aspect_level_1_trigger = { + house ?= { + OR = { + has_house_power_parameter = aspect_of_creation_01 + has_house_power_parameter = aspect_of_serenity_01 + has_house_power_parameter = aspect_of_destruction_01 + has_house_power_parameter = aspect_of_trickery_01 + } + } +} + +has_mandala_aspect_level_2_trigger = { + house ?= { + OR = { + has_house_power_parameter = aspect_of_creation_02 + has_house_power_parameter = aspect_of_serenity_02 + has_house_power_parameter = aspect_of_destruction_02 + has_house_power_parameter = aspect_of_trickery_02 + } + } +} + +has_mandala_aspect_level_3_trigger = { + house ?= { + OR = { + has_house_power_parameter = aspect_of_creation_03 + has_house_power_parameter = aspect_of_serenity_03 + has_house_power_parameter = aspect_of_destruction_03 + has_house_power_parameter = aspect_of_trickery_03 + } + } +} + +has_mandala_aspect_level_4_trigger = { + house ?= { + OR = { + has_house_power_parameter = aspect_of_creation_04 + has_house_power_parameter = aspect_of_serenity_04 + has_house_power_parameter = aspect_of_destruction_04 + has_house_power_parameter = aspect_of_trickery_04 + } + } +} + +has_mandala_aspect_level_5_trigger = { + house ?= { + OR = { + has_house_power_parameter = aspect_of_creation_05 + has_house_power_parameter = aspect_of_serenity_05 + has_house_power_parameter = aspect_of_destruction_05 + has_house_power_parameter = aspect_of_trickery_05 + } + } +} + +has_mandala_aspect_2_or_higher_trigger = { + OR = { + has_mandala_aspect_level_2_trigger = yes + has_mandala_aspect_level_3_trigger = yes + has_mandala_aspect_level_4_trigger = yes + has_mandala_aspect_level_5_trigger = yes + } +} + +has_mandala_capital_trigger = { + capital_province ?= { has_building_with_flag = mandala_capital_building } +} + +has_unruined_mandala_capital_trigger = { + capital_province ?= { + has_building_with_flag = mandala_capital_building + has_ruined_great_building = no + } +} + +has_ruined_mandala_capital_trigger = { + capital_province = { + has_building_with_flag = mandala_capital_building + has_ruined_great_building = yes + } +} + + +can_afford_mandala_aspect_change_trigger = { piety >= mandala_aspect_piety_cost_first_level } + +can_afford_mandala_aspect_level_2_trigger = { + prestige >= mandala_aspect_prestige_cost_second_level + piety >= mandala_aspect_piety_cost_second_level +} + +can_afford_mandala_aspect_level_3_trigger = { + prestige >= mandala_aspect_prestige_cost_third_level + piety >= mandala_aspect_piety_cost_third_level +} + +can_afford_mandala_aspect_level_4_trigger = { + prestige >= mandala_aspect_prestige_cost_fourth_level + piety >= mandala_aspect_piety_cost_fourth_level +} + +can_afford_mandala_aspect_level_5_trigger = { + prestige >= mandala_aspect_prestige_cost_fifth_level + piety >= mandala_aspect_piety_cost_fifth_level +} + + +#Only 2 Mandala Capitals per De Jure Kingdom +less_than_max_amount_of_mandala_capitals_trigger = { + save_temporary_scope_as = root_scope + capital_county.kingdom = { + any_in_de_jure_hierarchy = { + count < mandala_capitals_per_dejure_kingdom + tier = tier_barony + title_province = { + NOT = { this.county = scope:root_scope.capital_county } #We don't count our own great project since it needs to be upgradeable. + OR = { + AND = { + has_building_with_flag = mandala_capital_building + has_ruined_great_building = no + is_ruined_building_being_reconstructed = no + } + any_great_project_in_province = { + OR = { + great_project_type = mandala_capital_01 + great_project_type = mandala_capital_02 + great_project_type = mandala_capital_03 + great_project_type = mandala_capital_04 + great_project_type = mandala_capital_05 + } + OR = { + great_project_construction_phase_is = in_progress + great_project_construction_phase_is = completed + } + } + } + } + } + } +} + +has_unfunded_contribution_in_planned_mandala_capital_trigger = { + save_temporary_scope_as = owner_check + any_great_project = { + great_project_owner = scope:owner_check + OR = { + great_project_type = mandala_capital_01 + great_project_type = mandala_capital_02 + great_project_type = mandala_capital_03 + great_project_type = mandala_capital_04 + great_project_type = mandala_capital_05 + } + great_project_construction_phase_is = planned + any_contribution = { + is_owner_only_contribution_trigger = no + contribution_is_funded = no + } + } +} + + +#Mandala Worthiness Triggers — applied from second tier Aspect and first tier Capital Temple Complex + +has_pilgrimage_trait_level_trigger = { + trigger_if = { + limit = { $TIER$ = 05 } + custom_tooltip = { + text = rite_of_worthiness_tier_5_pilgrim + has_trait_xp = { + trait = pilgrim + value >= mandala_pilgrim_xp_last_tier_value + } + } + } + trigger_else_if = { + limit = { $TIER$ = 04 } + custom_tooltip = { + text = rite_of_worthiness_tier_4_pilgrim + has_trait_xp = { + trait = pilgrim + value >= mandala_pilgrim_xp_third_tier_value + } + } + } + trigger_else_if = { + limit = { $TIER$ = 03 } + custom_tooltip = { + text = rite_of_worthiness_tier_3_pilgrim + has_trait_xp = { + trait = pilgrim + value >= mandala_pilgrim_xp_second_tier_value + } + } + } + trigger_else_if = { + limit = { $TIER$ = 02 } + custom_tooltip = { + text = rite_of_worthiness_tier_2_pilgrim + has_trait_xp = { + trait = pilgrim + value >= mandala_pilgrim_xp_first_tier_value + } + } + } + trigger_else = { + custom_tooltip = { + text = rite_of_worthiness_tier_1_pilgrim + has_trait = pilgrim + } + } +} + +#CREATION +creation_children_trigger = { + trigger_if = { + limit = { is_female = yes } + custom_tooltip = { + text = rite_of_worthiness_creation_female + mandala_creation_child_counter >= num_female_creation_mandala_children_born + } + } + trigger_if = { + limit = { is_male = yes } + custom_tooltip = { + text = rite_of_worthiness_creation_male + mandala_creation_child_counter >= num_male_creation_mandala_children_born + } + } +} + +creation_first_tier_trigger = { + has_pilgrimage_trait_level_trigger = { TIER = 01 } + creation_children_trigger = yes +} + +creation_second_tier_trigger = { + has_pilgrimage_trait_level_trigger = { TIER = 02 } + creation_children_trigger = yes + custom_tooltip = { + text = rite_of_worthiness_creation_buildings_t2 + house = { + has_variable = num_buildings_built + var:num_buildings_built >= num_creation_mandala_buildings_built_t2 + } + } + trigger_if = { + limit = { is_ai = no } + gold >= creation_mandala_stashed_gold_t2 + } +} + +creation_third_tier_trigger = { + has_pilgrimage_trait_level_trigger = { TIER = 03 } + creation_children_trigger = yes + custom_tooltip = { + text = rite_of_worthiness_creation_buildings_t3 + house = { + has_variable = num_buildings_built + var:num_buildings_built >= num_creation_mandala_buildings_built_t3 + } + } + custom_tooltip = { + text = rite_of_worthiness_creation_artifacts_t3 + has_variable = num_commissioned_artifacts + var:num_commissioned_artifacts >= num_creation_mandala_commissioned_artifacts_t3 + } + trigger_if = { + limit = { is_ai = no } + gold >= creation_mandala_stashed_gold_t3 + } + trigger_if = { + limit = { is_ai = no } + custom_tooltip = { + text = rite_of_worthiness_creation_house_size_t3 + house = { + any_house_member = { count >= num_creation_mandala_house_size_t3 } + } + } + } +} + +creation_fourth_tier_trigger = { + has_pilgrimage_trait_level_trigger = { TIER = 04 } + creation_children_trigger = yes + custom_tooltip = { + text = rite_of_worthiness_creation_buildings_t4 + house = { + has_variable = num_buildings_built + var:num_buildings_built >= num_creation_mandala_buildings_built_t4 + } + } + custom_tooltip = { + text = rite_of_worthiness_creation_artifacts_t4 + has_variable = num_commissioned_artifacts + var:num_commissioned_artifacts >= num_creation_mandala_commissioned_artifacts_t4 + } + trigger_if = { + limit = { is_ai = no } + gold >= creation_mandala_stashed_gold_t4 + } + trigger_if = { + limit = { is_ai = no } + custom_tooltip = { + text = rite_of_worthiness_creation_house_size_t4 + house = { + any_house_member = { count >= num_creation_mandala_house_size_t4 } + } + } + } +} + +creation_fifth_tier_trigger = { + has_pilgrimage_trait_level_trigger = { TIER = 05 } + creation_children_trigger = yes + custom_tooltip = { + text = rite_of_worthiness_creation_buildings_t5 + house = { + has_variable = num_buildings_built + var:num_buildings_built >= num_creation_mandala_buildings_built_t5 + } + } + custom_tooltip = { + text = rite_of_worthiness_creation_artifacts_t5 + has_variable = num_commissioned_artifacts + var:num_commissioned_artifacts >= num_creation_mandala_commissioned_artifacts_t5 + } + trigger_if = { + limit = { is_ai = no } + gold >= creation_mandala_stashed_gold_t5 + } + trigger_if = { + limit = { is_ai = no } + custom_tooltip = { + text = rite_of_worthiness_creation_house_size_t5 + house = { + any_house_member = { count >= num_creation_mandala_house_size_t5 } + } + } + } +} + + +#SERENITY +serenity_high_end_alliances_trigger = { + custom_tooltip = { + text = rite_of_worthiness_serenity + any_ally = { + primary_title.tier >= $MANDALA$.primary_title.tier + NOR = { + is_tributary_of = $MANDALA$ + is_vassal_of = $MANDALA$ + } + count >= num_serenity_mandala_highend_alliances_had + } + } +} + +serenity_first_tier_trigger = { + has_pilgrimage_trait_level_trigger = { TIER = 01 } + trigger_if = { + limit = { is_ai = no } + serenity_high_end_alliances_trigger = { MANDALA = $MANDALA$ } + } + custom_tooltip = { + text = rite_of_worthiness_serenity_years_of_peace_t1 + has_variable = serenity_mandala_years_of_non_aggression_war + var:serenity_mandala_years_of_non_aggression_war >= num_serenity_mandala_years_of_peace_t1 + } + custom_tooltip = { + text = rite_of_worthiness_serenity_friends_t1 + num_of_relation_friend >= num_serenity_mandala_friends_t1 + } +} + +serenity_second_tier_trigger = { + has_pilgrimage_trait_level_trigger = { TIER = 02 } + trigger_if = { + limit = { is_ai = no } + serenity_high_end_alliances_trigger = { MANDALA = $MANDALA$ } + } + custom_tooltip = { + text = rite_of_worthiness_serenity_years_of_peace_t2 + has_variable = serenity_mandala_years_of_non_aggression_war + var:serenity_mandala_years_of_non_aggression_war >= num_serenity_mandala_years_of_peace_t2 + } + custom_tooltip = { + text = rite_of_worthiness_serenity_friends_t2 + num_of_relation_friend >= num_serenity_mandala_friends_t2 + } + trigger_if = { + limit = { is_ai = no } + custom_tooltip = { + text = rite_of_worthiness_serenity_feasts_hosted_t2 + has_variable = num_exorbitant_feasts_hosted + var:num_exorbitant_feasts_hosted >= num_serenity_mandala_feasts_hosted_t2 + } + } +} + +serenity_third_tier_trigger = { + has_pilgrimage_trait_level_trigger = { TIER = 03 } + trigger_if = { + limit = { is_ai = no } + serenity_high_end_alliances_trigger = { MANDALA = $MANDALA$ } + } + custom_tooltip = { + text = rite_of_worthiness_serenity_years_of_peace_t3 + has_variable = serenity_mandala_years_of_non_aggression_war + var:serenity_mandala_years_of_non_aggression_war >= num_serenity_mandala_years_of_peace_t3 + } + custom_tooltip = { + text = rite_of_worthiness_serenity_friends_t3 + num_of_relation_friend >= num_serenity_mandala_friends_t3 + } + trigger_if = { + limit = { is_ai = no } + custom_tooltip = { + text = rite_of_worthiness_serenity_feasts_hosted_t3 + has_variable = num_exorbitant_feasts_hosted + var:num_exorbitant_feasts_hosted >= num_serenity_mandala_feasts_hosted_t3 + } + } + custom_tooltip = { + text = rite_of_worthiness_serenity_capital_development_t3 + capital_province = { + OR = { + has_building_or_higher = castle_02 + has_building_or_higher = temple_02 + has_building_or_higher = city_02 + has_building_or_higher = temple_citadel_02 + } + } + } +} + +serenity_fourth_tier_trigger = { + has_pilgrimage_trait_level_trigger = { TIER = 04 } + trigger_if = { + limit = { is_ai = no } + serenity_high_end_alliances_trigger = { MANDALA = $MANDALA$ } + } + custom_tooltip = { + text = rite_of_worthiness_serenity_years_of_peace_t4 + has_variable = serenity_mandala_years_of_non_aggression_war + var:serenity_mandala_years_of_non_aggression_war >= num_serenity_mandala_years_of_peace_t4 + } + custom_tooltip = { + text = rite_of_worthiness_serenity_friends_t4 + num_of_relation_friend >= num_serenity_mandala_friends_t4 + } + trigger_if = { + limit = { is_ai = no } + custom_tooltip = { + text = rite_of_worthiness_serenity_feasts_hosted_t4 + has_variable = num_exorbitant_feasts_hosted + var:num_exorbitant_feasts_hosted >= num_serenity_mandala_feasts_hosted_t4 + } + } + custom_tooltip = { + text = rite_of_worthiness_serenity_capital_development_t4 + capital_province = { + OR = { + has_building_or_higher = castle_03 + has_building_or_higher = temple_03 + has_building_or_higher = city_03 + has_building_or_higher = temple_citadel_03 + } + } + } +} + +serenity_fifth_tier_trigger = { + has_pilgrimage_trait_level_trigger = { TIER = 05 } + trigger_if = { + limit = { is_ai = no } + serenity_high_end_alliances_trigger = { MANDALA = $MANDALA$ } + } + custom_tooltip = { + text = rite_of_worthiness_serenity_years_of_peace_t5 + has_variable = serenity_mandala_years_of_non_aggression_war + var:serenity_mandala_years_of_non_aggression_war >= num_serenity_mandala_years_of_peace_t5 + } + custom_tooltip = { + text = rite_of_worthiness_serenity_friends_t5 + num_of_relation_friend >= num_serenity_mandala_friends_t5 + } + trigger_if = { + limit = { is_ai = no } + custom_tooltip = { + text = rite_of_worthiness_serenity_feasts_hosted_t5 + has_variable = num_exorbitant_feasts_hosted + var:num_exorbitant_feasts_hosted >= num_serenity_mandala_feasts_hosted_t5 + } + } + custom_tooltip = { + text = rite_of_worthiness_serenity_capital_development_t5 + capital_province = { + OR = { + has_building_or_higher = castle_04 + has_building_or_higher = temple_04 + has_building_or_higher = city_04 + has_building_or_higher = temple_citadel_04 + } + } + } + trigger_if = { + limit = { is_ai = no } + custom_tooltip = { + text = rite_of_worthiness_serenity_soulmate + num_of_relation_soulmate = 1 + } + } +} + + +#DESTRUCTION +destruction_won_more_than_lost_trigger = { + custom_tooltip = { + text = rite_of_worthiness_destruction_won_more_than_lost + num_wars_won > num_wars_lost + } +} + +destruction_first_tier_trigger = { + has_pilgrimage_trait_level_trigger = { TIER = 01 } + trigger_if = { + limit = { is_ai = no } + destruction_won_more_than_lost_trigger = yes + } + custom_tooltip = { + text = rite_of_worthiness_destruction_wars_t1 + any_memory = { + memory_type = war_won + count >= num_destruction_mandala_wars_won_t1 + } + } + trigger_if = { + limit = { is_ai = no } + custom_tooltip = { + text = rite_of_worthiness_destruction_battles_t1 + any_memory = { + memory_type = battle_won_memory + count >= num_destruction_mandala_battles_won_t1 + } + } + } + martial >= num_destruction_martial_skill_t1 + prowess >= num_destruction_prowess_skill_t1 +} + +destruction_second_tier_trigger = { + has_pilgrimage_trait_level_trigger = { TIER = 02 } + trigger_if = { + limit = { is_ai = no } + destruction_won_more_than_lost_trigger = yes + } + custom_tooltip = { + text = rite_of_worthiness_destruction_wars_t2 + any_memory = { + memory_type = war_won + count >= num_destruction_mandala_wars_won_t2 + } + } + trigger_if = { + limit = { is_ai = no } + custom_tooltip = { + text = rite_of_worthiness_destruction_battles_t2 + any_memory = { + memory_type = battle_won_memory + count >= num_destruction_mandala_battles_won_t2 + } + } + } + martial >= num_destruction_martial_skill_t2 + prowess >= num_destruction_prowess_skill_t2 + trigger_if = { + limit = { is_ai = no } + custom_tooltip = { + text = rite_of_worthiness_destruction_prowess_knights_t2 + any_knight = { + count >= num_prowess_knights_t2 + prowess >= num_prowess_knights_t5 + } + } + } +} + +destruction_third_tier_trigger = { + has_pilgrimage_trait_level_trigger = { TIER = 03 } + trigger_if = { + limit = { is_ai = no } + destruction_won_more_than_lost_trigger = yes + } + custom_tooltip = { + text = rite_of_worthiness_destruction_wars_t3 + any_memory = { + memory_type = war_won + count >= num_destruction_mandala_wars_won_t3 + } + } + trigger_if = { + limit = { is_ai = no } + custom_tooltip = { + text = rite_of_worthiness_destruction_battles_t3 + any_memory = { + memory_type = battle_won_memory + count >= num_destruction_mandala_battles_won_t3 + } + } + } + martial >= num_destruction_martial_skill_t3 + prowess >= num_destruction_prowess_skill_t3 + trigger_if = { + limit = { is_ai = no } + custom_tooltip = { + text = rite_of_worthiness_destruction_prowess_knights_t3 + any_knight = { + count >= num_prowess_knights_t3 + prowess >= num_prowess_knights_t5 + } + } + } +} + +destruction_fourth_tier_trigger = { + has_pilgrimage_trait_level_trigger = { TIER = 04 } + trigger_if = { + limit = { is_ai = no } + destruction_won_more_than_lost_trigger = yes + } + custom_tooltip = { + text = rite_of_worthiness_destruction_wars_t4 + any_memory = { + memory_type = war_won + count >= num_destruction_mandala_wars_won_t4 + } + } + trigger_if = { + limit = { is_ai = no } + custom_tooltip = { + text = rite_of_worthiness_destruction_battles_t4 + any_memory = { + memory_type = battle_won_memory + count >= num_destruction_mandala_battles_won_t4 + } + } + } + martial >= num_destruction_martial_skill_t4 + prowess >= num_destruction_prowess_skill_t4 + trigger_if = { + limit = { is_ai = no } + custom_tooltip = { + text = rite_of_worthiness_destruction_prowess_knights_t4 + any_knight = { + count >= num_prowess_knights_t4 + prowess >= num_prowess_knights_t5 + } + } + } +} + +destruction_fifth_tier_trigger = { + has_pilgrimage_trait_level_trigger = { TIER = 05 } + trigger_if = { + limit = { is_ai = no } + destruction_won_more_than_lost_trigger = yes + } + custom_tooltip = { + text = rite_of_worthiness_destruction_wars_t5 + any_memory = { + memory_type = war_won + count >= num_destruction_mandala_wars_won_t5 + } + } + trigger_if = { + limit = { is_ai = no } + custom_tooltip = { + text = rite_of_worthiness_destruction_battles_t5 + any_memory = { + memory_type = battle_won_memory + count >= num_destruction_mandala_battles_won_t5 + } + } + } + martial >= num_destruction_martial_skill_t5 + prowess >= num_destruction_prowess_skill_t5 + trigger_if = { + limit = { is_ai = no } + custom_tooltip = { + text = rite_of_worthiness_destruction_prowess_knights_t5 + any_knight = { + count >= num_prowess_knights_t5 + prowess >= num_prowess_knights_t5 + } + } + } +} + + +#TRICKERY +trickery_first_tier_trigger = { + has_pilgrimage_trait_level_trigger = { TIER = 01 } + NOT = { has_character_modifier = disbelieved_mandala_modifier } + trigger_if = { + limit = { is_ai = no } + custom_tooltip = { + text = rite_of_worthiness_trickery_schemes_t1 + exists = var:num_successful_schemes + var:num_successful_schemes >= num_trickster_mandala_successful_schemes_t1 + } + custom_tooltip = { + text = rite_of_worthiness_trickery_secrets_t1 + any_known_secret = { + count >= num_trickster_mandala_secrets_known_t1 + trigger_if = { + limit = { exists = secret_target } + NOT = { secret_target = scope:owner } + } + NOT = { secret_owner = scope:owner } + } + } + custom_tooltip = { + text = rite_of_worthiness_trickery_house_married_to_rulers_t1 + house = { + any_house_member = { + count >= num_trickster_mandala_house_married_to_rulers_t1 + any_spouse = { + is_landed = yes + top_overlord != scope:owner + this != scope:owner + primary_title.tier >= tier_duchy + } + } + } + } + } +} + +trickery_second_tier_trigger = { + has_pilgrimage_trait_level_trigger = { TIER = 02 } + trigger_if = { + limit = { is_ai = no } + custom_tooltip = { + text = rite_of_worthiness_trickery_schemes_t2 + exists = var:num_successful_schemes + var:num_successful_schemes >= num_trickster_mandala_successful_schemes_t2 + } + custom_tooltip = { + text = rite_of_worthiness_trickery_secrets_t2 + any_known_secret = { + count >= num_trickster_mandala_secrets_known_t2 + trigger_if = { + limit = { exists = secret_target } + NOT = { secret_target = scope:owner } + } + NOT = { secret_owner = scope:owner } + } + } + custom_tooltip = { + text = rite_of_worthiness_trickery_house_married_to_rulers_t2 + house = { + any_house_member = { + count >= num_trickster_mandala_house_married_to_rulers_t2 + any_spouse = { + is_landed = yes + top_overlord != scope:owner + this != scope:owner + primary_title.tier >= tier_duchy + } + } + } + } + custom_tooltip = { + text = rite_of_worthiness_trickery_strong_hooks_t2 + any_hooked_character = { + count >= num_trickster_mandala_strong_hooks_t2 + scope:owner = { has_strong_hook = prev } + } + } + custom_tooltip = { + text = rite_of_worthiness_trickery_gold_ransomed_t2 + exists = var:amount_of_gold_ransomed + var:amount_of_gold_ransomed >= trickster_mandala_gold_ransomed_t2 + } + } +} + +trickery_third_tier_trigger = { + has_pilgrimage_trait_level_trigger = { TIER = 03 } + trigger_if = { + limit = { is_ai = no } + custom_tooltip = { + text = rite_of_worthiness_trickery_schemes_t3 + exists = var:num_successful_schemes + var:num_successful_schemes >= num_trickster_mandala_successful_schemes_t3 + } + custom_tooltip = { + text = rite_of_worthiness_trickery_secrets_t3 + any_known_secret = { + count >= num_trickster_mandala_secrets_known_t3 + trigger_if = { + limit = { exists = secret_target } + NOT = { secret_target = scope:owner } + } + NOT = { secret_owner = scope:owner } + } + } + custom_tooltip = { + text = rite_of_worthiness_trickery_house_married_to_rulers_t3 + house = { + any_house_member = { + count >= num_trickster_mandala_house_married_to_rulers_t3 + any_spouse = { + is_landed = yes + top_overlord != scope:owner + this != scope:owner + primary_title.tier >= tier_duchy + } + } + } + } + custom_tooltip = { + text = rite_of_worthiness_trickery_strong_hooks_t3 + any_hooked_character = { + count >= num_trickster_mandala_strong_hooks_t3 + scope:owner = { has_strong_hook = prev } + } + } + custom_tooltip = { + text = rite_of_worthiness_trickery_gold_ransomed_t3 + exists = var:amount_of_gold_ransomed + var:amount_of_gold_ransomed >= trickster_mandala_gold_ransomed_t3 + } + } +} + +trickery_fourth_tier_trigger = { + has_pilgrimage_trait_level_trigger = { TIER = 04 } + NOT = { has_character_modifier = disbelieved_mandala_modifier } + trigger_if = { + limit = { is_ai = no } + custom_tooltip = { + text = rite_of_worthiness_trickery_schemes_t4 + exists = var:num_successful_schemes + var:num_successful_schemes >= num_trickster_mandala_successful_schemes_t4 + } + custom_tooltip = { + text = rite_of_worthiness_trickery_secrets_t4 + any_known_secret = { + count >= num_trickster_mandala_secrets_known_t4 + trigger_if = { + limit = { exists = secret_target } + NOT = { secret_target = scope:owner } + } + NOT = { secret_owner = scope:owner } + } + } + custom_tooltip = { + text = rite_of_worthiness_trickery_house_married_to_rulers_t4 + house = { + any_house_member = { + count >= num_trickster_mandala_house_married_to_rulers_t4 + any_spouse = { + is_landed = yes + top_overlord != scope:owner + this != scope:owner + primary_title.tier >= tier_duchy + } + } + } + } + custom_tooltip = { + text = rite_of_worthiness_trickery_strong_hooks_t4 + any_hooked_character = { + count >= num_trickster_mandala_strong_hooks_t4 + scope:owner = { has_strong_hook = prev } + } + } + custom_tooltip = { + text = rite_of_worthiness_trickery_gold_ransomed_t4 + exists = var:amount_of_gold_ransomed + var:amount_of_gold_ransomed >= trickster_mandala_gold_ransomed_t4 + } + custom_tooltip = { + text = rite_of_worthiness_trickery_house_rulers_t4 + house = { + any_house_member = { + count >= num_trickster_mandala_house_rulers_t4 + primary_title.tier >= tier_duchy + is_landed = yes + is_independent_ruler = yes + top_overlord != scope:owner + } + } + } + } +} + +trickery_fifth_tier_trigger = { + has_pilgrimage_trait_level_trigger = { TIER = 05 } + NOT = { has_character_modifier = disbelieved_mandala_modifier } + trigger_if = { + limit = { is_ai = no } + custom_tooltip = { + text = rite_of_worthiness_trickery_schemes_t5 + exists = var:num_successful_schemes + var:num_successful_schemes >= num_trickster_mandala_successful_schemes_t5 + } + custom_tooltip = { + text = rite_of_worthiness_trickery_secrets_t5 + any_known_secret = { + count >= num_trickster_mandala_secrets_known_t5 + trigger_if = { + limit = { exists = secret_target } + NOT = { secret_target = scope:owner } + } + NOT = { secret_owner = scope:owner } + } + } + custom_tooltip = { + text = rite_of_worthiness_trickery_house_married_to_rulers_t5 + house = { + any_house_member = { + count >= num_trickster_mandala_house_married_to_rulers_t5 + any_spouse = { + is_landed = yes + top_overlord != scope:owner + this != scope:owner + primary_title.tier >= tier_duchy + } + } + } + } + custom_tooltip = { + text = rite_of_worthiness_trickery_strong_hooks_t5 + any_hooked_character = { + count >= num_trickster_mandala_strong_hooks_t5 + scope:owner = { has_strong_hook = prev } + } + } + custom_tooltip = { + text = rite_of_worthiness_trickery_gold_ransomed_t5 + exists = var:amount_of_gold_ransomed + var:amount_of_gold_ransomed >= trickster_mandala_gold_ransomed_t5 + } + custom_tooltip = { + text = rite_of_worthiness_trickery_house_rulers_t5 + house = { + any_house_member = { + count >= num_trickster_mandala_house_rulers_t5 + primary_title.tier >= tier_duchy + is_landed = yes + is_independent_ruler = yes + top_overlord != scope:owner + } + } + } + custom_tooltip = { + text = rite_of_worthiness_trickery_only_one + NOT = { + any_ruler = { + is_landed = yes + government_has_flag = government_is_mandala + has_mandala_capital_trigger = yes + mandala_radiance_value >= define:NMandala|MAX_RADIANCE + this != scope:owner + } + } + } + } +} + +there_is_any_valid_mandala_contract_spot_trigger = { + OR = { + any_sub_realm_county = { + any_county_province = { + has_holding = yes + is_occupied = no + NOR = { + this = scope:mandala_ruler.capital_province + has_variable = requested_mandala_ritual + has_variable = mandala_ritual_cooldown + } + } + } + any_tributary = { + any_sub_realm_county = { + any_county_province = { + has_holding = yes + is_occupied = no + NOR = { + this = scope:mandala_ruler.capital_province + has_variable = requested_mandala_ritual + has_variable = mandala_ritual_cooldown + } + } + } + } + } +} + +there_is_any_valid_mandala_contract_spot_with_crocodiles_trigger = { + OR = { + any_sub_realm_county = { + any_county_province = { + has_holding = yes + is_occupied = no + hunt_animal_crocodile_trigger = yes + NOR = { + this = scope:mandala_ruler.capital_province + has_variable = requested_mandala_ritual + has_variable = mandala_ritual_cooldown + } + } + } + any_tributary = { + any_sub_realm_county = { + any_county_province = { + has_holding = yes + is_occupied = no + hunt_animal_crocodile_trigger = yes + NOR = { + this = scope:mandala_ruler.capital_province + has_variable = requested_mandala_ritual + has_variable = mandala_ritual_cooldown + } + } + } + } + } +} + +there_is_any_valid_mandala_contract_spot_with_neighbor_trigger = { + OR = { + any_sub_realm_county = { + any_neighboring_county = { + holder = { + is_ai = yes + } + title_province = { + has_holding = yes + } + } + any_county_province = { + has_holding = yes + is_occupied = no + NOR = { + this = scope:mandala_ruler.capital_province + has_variable = requested_mandala_ritual + has_variable = mandala_ritual_cooldown + } + } + } + any_tributary = { + any_sub_realm_county = { + any_neighboring_county = { + holder = { + is_ai = yes + } + title_province = { + has_holding = yes + } + } + any_county_province = { + has_holding = yes + is_occupied = no + NOR = { + this = scope:mandala_ruler.capital_province + has_variable = requested_mandala_ritual + has_variable = mandala_ritual_cooldown + } + } + } + } + } +} + +there_is_any_valid_mandala_contract_spot_no_holding_trigger = { + OR = { + any_sub_realm_county = { + any_county_province = { + has_holding = no + is_occupied = no + NOR = { + this = scope:mandala_ruler.capital_province + has_variable = requested_mandala_ritual + has_variable = mandala_ritual_cooldown + } + } + } + any_tributary = { + any_sub_realm_county = { + any_county_province = { + has_holding = no + is_occupied = no + NOR = { + this = scope:mandala_ruler.capital_province + has_variable = requested_mandala_ritual + has_variable = mandala_ritual_cooldown + } + } + } + } + } +} + + + +#MANDALA STORY TRIGGERS +would_contribute_to_mandala_capital_trigger = { + NOR = { + has_relation_rival = scope:root_scope + has_variable = recently_contributed_via_request + } + has_mandala_capital_trigger = no +} + +is_story_godking_trigger = { + has_variable = mandala_godking + is_ai = yes +} diff --git a/N3OW/common/scripted_triggers/tgp_silk_road_triggers.txt b/N3OW/common/scripted_triggers/tgp_silk_road_triggers.txt new file mode 100644 index 00000000..d9490ab5 --- /dev/null +++ b/N3OW/common/scripted_triggers/tgp_silk_road_triggers.txt @@ -0,0 +1,43 @@ +#situation:silk_road_situation.situation_sub_region:region_silk_road_proper_central_asia.var:innovation + +silk_road_valid_market_to_visit_trigger = { + save_temporary_scope_as = visitor_temp + situation:silk_road_situation.situation_sub_region:region_silk_road_proper_$SUB_REGION$ = { save_temporary_scope_as = sub_region_temp } + exists = scope:sub_region_temp.var:innovation + NOT = { + scope:visitor_temp.culture = { + any_in_list = { + variable = silk_road_unlocked_innovations + this = scope:sub_region_temp.var:innovation + } + } + } +} + +silk_road_sub_region_conflict_trigger = { + any_situation_sub_region_participant_group = { + OR = { + participant_group_type = silk_road_domain + participant_group_type = silk_road_realm + } + any_situation_group_participant = { is_at_war = yes } + } +} + +silk_road_innovation_trigger = { + OR = { + # Chinese + has_cultural_pillar = heritage_chinese + # Discovered via Silk Road + any_in_list = { + variable = silk_road_unlocked_innovations + this = culture_innovation:innovation_$INNOVATION$ + } + # Sinophilic + AND = { + title:c_jingzhao.culture ?= { has_innovation = innovation_$INNOVATION$ } + has_cultural_parameter = may_adopt_silk_road_innovations + } + } + has_tgp_dlc_trigger = yes +} diff --git a/N3OW/common/scripted_triggers/tgp_tribute_mission_triggers.txt b/N3OW/common/scripted_triggers/tgp_tribute_mission_triggers.txt new file mode 100644 index 00000000..d6af154f --- /dev/null +++ b/N3OW/common/scripted_triggers/tgp_tribute_mission_triggers.txt @@ -0,0 +1,101 @@ +is_tributary_or_independent_neighbor_of_china_trigger = { + NOT = { has_title = title:h_china } + OR = { + custom_tooltip = { + text = suzerain_is_china + is_tributary_of = title:h_china.holder + } + custom_tooltip = { + text = neighbor_is_china + is_tributary = no + is_independent_ruler = yes + OR = { + has_variable = wants_to_become_tributary_of_china + any_neighboring_top_liege_realm_owner = { + primary_title = title:h_china + } + } + } + } +} + +is_already_tribute_missioning_trigger = { + # set once we start travelling, if it becomes invalid we should no longer be treated as being on the mission + exists = var:tribute_mission_target_scope + # assure we are currently going to our overlord's capital, or else we're no longer on the mission + current_travel_plan ?= { + final_destination_province = prev.var:tribute_mission_target_scope.capital_province + } +} + +has_gold_tribute_trigger = { + short_term_gold >= small_gold_tribute_value +} + +has_herd_tribute_trigger = { + trigger_if = { + limit = { government_has_flag = government_is_nomadic } + domicile ?= { herd >= minor_herd_value } + } + trigger_else = { + government_has_flag = government_is_nomadic + } +} + +is_suitable_artifact_tribute_trigger = { + NOR = { + has_variable = 1025_treasure_map + has_variable = ungiftable + has_variable = cursed_artifact + has_variable = gifted_artifact + } + is_equipped = no +} + +has_artifact_tribute_trigger = { + custom_tooltip = { + text = tribute_mission_concubine_interaction.no_valid_artifacts + any_character_artifact = { is_suitable_artifact_tribute_trigger = yes } + } +} + +has_concubine_tribute_trigger = { + overlord = { + is_adult = yes + save_temporary_scope_as = overlord_check + } + custom_tooltip = { + text = tribute_mission_concubine_interaction.no_valid_concubines + any_courtier_or_guest = { + can_become_concubine_of_character_valid_trigger = { CHARACTER = scope:overlord_check } + } + } +} + +tribute_mission_is_available_eunuch_trigger = { + is_available = yes + is_ruler = no + is_playable_character = no + OR = { + is_eunuch_trigger = yes + AND = { + is_female = no + is_adult = yes + } + } + NOT = { + faith = { has_doctrine = doctrine_theocracy_temporal } + } + trigger_if = { + limit = { exists = root.cp:councillor_court_chaplain } + NOT = { this = root.cp:councillor_court_chaplain } + } + has_any_disease_trigger = no +} + +has_eunuch_tribute_trigger = { + custom_tooltip = { + text = tribute_mission_eunuch_interaction.no_valid_eunuchs + any_courtier = { tribute_mission_is_available_eunuch_trigger = yes } + } +} diff --git a/N3OW/history/titles/k_italy.txt b/N3OW/history/titles/k_italy.txt index ca205d3b..43e71405 100644 --- a/N3OW/history/titles/k_italy.txt +++ b/N3OW/history/titles/k_italy.txt @@ -65,6 +65,11 @@ c_pavia = { } } +d_genoa = { + 2527.12.19 = { + holder = italy0021 + } +} c_genoa = { 2527.12.19 = { holder = italy0021 @@ -72,7 +77,8 @@ c_genoa = { } c_luni = { - 2522.8.21 = { + 2540.8.21 = { holder = italy0022 + liege = d_genoa } } \ No newline at end of file