#To use one of them, refer to them elsewhere in script via "value:" e.g. value:example_value #IMPORTANT NOTE: Be mindful of performance when using these in triggers that are checked often! # example_value = { # base = 10 #default: 0 # # List of valid mathematical operations: # # Numerical (modifying by a number): # # - set/weight (both do the same, replaces the current result with this value) # # - add # # - subtract # # - factor/mult/multiply ("multiply" fits the name scheme of the rest better, but the other two were kept for historical reasons) # # - divide # # - modulo # # - round_to (rounds to nearest of that value, e.g. 10.7 round_to 5 gives you 10) # # - max (sets to specified value if currently above it) # # - min (sets to specified value if currently below it) # # - pow (value is multiplied by itself to the power of x; be careful, you can get overflows if you are not careful) # # Simple (do not need a number, but just "yes", e.g. "round = yes") # # - round (sets to nearest full number) # # - ceiling (rounds up) # # - floor (rounds down) # # - abs (multiply by -1 if negative) # # - square (multiply by itself) # # - square_root # #All mathematical operations except weight and factor can be used inline e.g. # add = 100 # multiply = value:some_other_script_value # round = yes # #(Note: weight and factor will instead overwrite the base value - use set, mult or multiply instead) # #They can also be used in modifier = {} fields, which lets you only apply them if triggers are true # modifier = { # max = owner.max_example_variable #Variable set by set_variable # owner = { is_variable_set = max_example_variable } #Only applied if this trigger is true # } # # What works for right hand side values of mathematical operations? See events/00_how_to_use_variables for full list. # complex_trigger_modifier = { #This lets you get the value of a trigger that you can't use in one-liners because it uses {} # trigger = count_owned_planet # trigger_scope = owner #Lets you get the result of the trigger on a different scope. Default is "this" # parameters = { #Stick any further information necessary in here, like you'd do within the {} of the trigger normally # limit = { num_pops > 10 } # } # mode = add #Allows all numerical operations # mult = 5 #Multiplies the outcome by this. In this example, this means adding 5 for each planet with more than 10 pops # } # } # Final note: script_values use the same metascript system as scripted_triggers and scripted_effects # This means that you can input parameters into them, in a similar fashion as described in scripted_effects/99_advanced_documentation.txt # For format for doing so is value:my_value|PARAM1|value1|PARAM2|value2|. # Then you can use $PARAM1$ in the script value and it will replace it with value1 deficit_situation_progress_value = { # ( 1 - income / expenses ) * 10 base = 1 complex_trigger_modifier = { trigger = resource_income_to_expenditure_balance_ratio trigger_scope = owner parameters = { resource = $RESOURCE$ } mode = subtract } mult = 10 max = 5 } revolt_situation_low_stability_factor = { # 0.2 for each point below 25 base = @stabilitylevel2 subtract = trigger:planet_stability [[ALTERED_STABILITY] subtract = $ALTERED_STABILITY$ ] mult = 0.2 } revolt_situation_high_stability_factor = { # 0.1 for each point above 40 add = trigger:planet_stability subtract = @stabilitylevel3 mult = 0.5 } revolt_situation_garrison_factor = { #for every 200 above 200, add 1. It rounds to the closest 50 to not add 0.342. add = trigger:planet_garrison_strength subtract = 200 round_to = 50 divide = 200 max = 5 } revolt_situation_rebellion_joiners = { complex_trigger_modifier = { trigger = count_owned_planet trigger_scope = owner parameters = { limit = { has_modifier = instability_join_revolt planet_stability < @[ stabilitylevel2 + 10 ] exists = controller controller = { is_same_value = root.owner } } } potential = { owner = { any_owned_planet = { has_modifier = instability_join_revolt planet_stability < @[ stabilitylevel2 + 10 ] exists = controller controller = { is_same_value = root.owner } } } } desc = STRING_REBELLIOUS_JOINER_PLANETS_IN_OWNER mode = add mult = 1.5 } max = 3 #it would feel bad if this were too high } revolt_fleet_comparison_factor = { add = owner.trigger:fleet_power divide = event_target:rebel_empire.trigger:fleet_power pow = 3 } #Use this in planet scope when trying to see if a revolt will progress before it is created potential_revolt_situation_monthly_progress_estimation = { modifier = { #ALTERED_STABILITY: when the revolt starts, the planet will get -10 stability from the situation stage modifier add = value:revolt_situation_low_stability_factor|ALTERED_STABILITY|-10| #0.2 for every point below 25 (so max 5) desc = STRING_LOW_STABILITY } modifier = { add = 1 desc = STRING_UNEMPLOYMENT num_unemployed >= 2 } modifier = { add = 2 desc = STRING_PURGING has_current_purge = yes any_owned_pop = { is_being_purged = yes NOT = { has_purge_type = { type = purge_neutering } } } } modifier = { add = 1 desc = STRING_PURGING has_current_purge = yes count_owned_species = { limit = { OR = { has_citizenship_type = { type = citizenship_purge country = prev.owner } has_citizenship_type = { type = citizenship_purge_machine country = prev.owner } } NOT = { has_purge_type = { type = purge_neutering country = prev.owner } } } count = 0 } } modifier = { add = 1 desc = STRING_ASSIMILATION any_owned_species = { has_citizenship_type = { type = citizenship_assimilation country = prev.owner } } } modifier = { desc = STRING_STARBASE_CITADEL subtract = 1 exists = solar_system.starbase solar_system.starbase = { has_starbase_size >= starbase_citadel NOT = { is_starbase_type = sfortress } } } modifier = { desc = STRING_STARBASE_BASTION subtract = 1 exists = solar_system.starbase solar_system.starbase = { has_starbase_size > starbase_starport has_starbase_size < starbase_citadel is_starbase_type = sfortress } } modifier = { desc = STRING_STARBASE_BASTION subtract = 2 exists = solar_system.starbase solar_system.starbase = { has_starbase_size >= starbase_citadel is_starbase_type = sfortress } } complex_trigger_modifier = { trigger = count_system_colony trigger_scope = solar_system parameters = { limit = { NOT = { is_same_value = prevprev } planet_stability >= @stabilitylevel3 num_pops > 5 } } potential = { solar_system = { any_system_colony = { NOT = { is_same_value = prevprev } planet_stability >= @stabilitylevel3 num_pops > 5 } } } desc = STRING_LOYAL_PLANETS_IN_SYSTEM mode = subtract mult = 2 } complex_trigger_modifier = { trigger = count_system_colony trigger_scope = solar_system parameters = { limit = { NOT = { is_same_value = prevprev } planet_stability < @stabilitylevel2 num_pops > 5 } } potential = { solar_system = { any_system_colony = { NOT = { is_same_value = prevprev } planet_stability < @stabilitylevel2 num_pops > 5 } } } desc = STRING_REBELLIOUS_PLANETS_IN_SYSTEM mode = add mult = 2 } modifier = { subtract = value:revolt_situation_garrison_factor #1 for every 200 over 200, max 5 (at 1200) desc = STRING_PLANETARY_GARRISON planet_garrison_strength > 200 } modifier = { subtract = 1 desc = STRING_WEAK_PLANET num_pops < 30 } modifier = { add = 1 desc = STRING_STRONG_PLANET num_pops > 60 } } desired_colonizers = { set = value:desired_colonizers_base modifier = { set = 0 OR = { #they have replacements has_civic = civic_corporate_dominion has_civic = civic_private_prospectors has_origin = origin_lithoid } } } desired_colonizers_base = { modifier = { set = 1 OR = { is_country_type = default is_country_type = awakened_fallen_empire } ai_colonize_plans > 0 } } desired_constructors_min = { modifier = { set = 1 OR = { is_country_type = default is_country_type = awakened_fallen_empire } } modifier = { factor = 2 is_country_type = default controlled_systems > 3 years_passed < 100 } } desired_constructors_max = { modifier = { set = 5 is_country_type = default } modifier = { set = 3 is_country_type = awakened_fallen_empire } } desired_science_ships = { modifier = { set = 1 is_country_type = default } modifier = { add = 2 years_passed < 80 } modifier = { add = 2 years_passed < 30 } modifier = { #they shouldn't ever need it, but just in case set = 1 is_country_type = awakened_fallen_empire } } desired_science_ships_system_mult = { #this is mainly to allow for assisting research and the like. And also so they can scramble stuff if they have need and are a large empire. The early game rush is handled in desired_science_ships modifier = { set = 0.1 is_country_type = default } } job_weights_manual_corrections = { #What comes below fixes an annoying logical problem in the system: #check_economic_production_modifier_for_job checks the economic modifiers the current pop would get if it worked that job #But it checks based on the pop's current characteristics. Which means it evaluates triggered job output modifiers such as #planet_jobs_worker_produces_mult as if it were in its current pop category, which means "strong" pops would register as being #good at research so long as they are currently workers. modifier = { subtract = value:species_job_modifiers_worker NOR = { is_job_of_pop_category = { job = $JOB$ category = worker } is_job_of_pop_category = { job = $JOB$ category = simple_drone } } OR = { is_pop_category = worker is_pop_category = robot_servant is_pop_category = simple_drone } } modifier = { subtract = species.modifier:planet_jobs_slave_produces_mult NOT = { is_job_of_pop_category = { job = $JOB$ category = worker } } is_pop_category = slave has_job_category = worker } modifier = { subtract = value:species_job_modifiers_specialist NOR = { is_job_of_pop_category = { job = $JOB$ category = specialist } is_job_of_pop_category = { job = $JOB$ category = complex_drone } } OR = { is_pop_category = specialist is_pop_category = complex_drone } } modifier = { add = value:species_job_modifiers_specialist OR = { is_job_of_pop_category = { job = $JOB$ category = specialist } is_job_of_pop_category = { job = $JOB$ category = complex_drone } } NOR = { is_pop_category = specialist is_pop_category = complex_drone } } } species_job_modifiers_worker = { add = species.modifier:planet_jobs_worker_produces_mult add = species.modifier:planet_jobs_worker_only_produces_mult } species_job_modifiers_specialist = { add = species.modifier:planet_jobs_complex_drone_produces_mult add = species.modifier:planet_jobs_specialist_produces_mult add = species.modifier:planet_jobs_specialist_only_produces_mult } #This and job_weights_modifier account for all trait impacts (via trait modifier and trait triggered pop modifiers) on resource production. job_weights_research_modifier = { complex_trigger_modifier = { trigger = check_economic_production_modifier_for_job parameters = { job = $JOB$ resource = { physics_research = 0.33 society_research = 0.33 engineering_research = 0.34 } } mode = add } add = value:job_weights_manual_corrections|JOB|$JOB$| add = 1 min = 0 pow = 3 #we need it to have a bit more impact } job_weights_modifier = { complex_trigger_modifier = { trigger = check_economic_production_modifier_for_job parameters = { job = $JOB$ resource = $RESOURCE$ } mode = add [[FACTOR] mult = $FACTOR$ ] } add = value:job_weights_manual_corrections|JOB|$JOB$| add = 1 min = 0 pow = 3 #we need it to have a bit more impact modifier = { owner = { has_deficit = $RESOURCE$ } mult = @\[ 10 * $FACTOR|1$ ] } } job_weights_multiple_resources_modifier = { complex_trigger_modifier = { trigger = check_economic_production_modifier_for_job parameters = { job = $JOB$ resource = { $RESOURCE1$ = $WEIGHT1$ $RESOURCE2$ = $WEIGHT2$ } } mode = add } add = value:job_weights_manual_corrections|JOB|$JOB$| add = 1 min = 0 pow = 3 #we need it to have a bit more impact modifier = { owner = { has_deficit = $RESOURCE1$ } mult = @\[ 10 * $WEIGHT1$ ] } modifier = { owner = { has_deficit = $RESOURCE2$ } mult = @\[ 10 * $WEIGHT2$ ] } } job_total_output_modifier = { base = 1 complex_trigger_modifier = { trigger = check_economic_production_modifier_for_job parameters = { job = $JOB$ resource = $RESOURCE$ species_modifiers_only = no #Note this } mode = add } } job_total_research_output_modifier = { base = 1 complex_trigger_modifier = { trigger = check_economic_production_modifier_for_job parameters = { job = $JOB$ resource = { physics_research = 0.33 society_research = 0.33 engineering_research = 0.34 } species_modifiers_only = no #Note this } mode = add } } knights_unity_output_modifier = { base = 1 modifier = { add = 1 owner = { has_country_flag = toxoids_7011_a } } modifier = { add = 1 owner = { has_country_flag = toxoids_7040_a } } modifier = { add = 1 owner = { has_country_flag = toxoids_7130_c } } mult = value:job_total_output_modifier|JOB|bureaucrat|RESOURCE|unity| } knights_research_output_modifier = { base = 1 modifier = { add = 1 owner = { has_country_flag = toxoids_7011_b } } modifier = { add = 1 owner = { has_country_flag = toxoids_7040_b } } modifier = { add = 1 owner = { has_country_flag = toxoids_7130_b } } modifier = { add = 1 owner = { has_country_flag = toxoids_7220_a } #TODO_CD: apply to knight commanders } mult = value:job_total_research_output_modifier|JOB|researcher| } knight_commander_unity_output_modifier = { base = 1 modifier = { add = 1 owner = { has_country_flag = toxoids_7011_a } } modifier = { add = 1 owner = { has_country_flag = toxoids_7040_a } } modifier = { add = 1 owner = { has_country_flag = toxoids_7130_c } } mult = value:job_total_output_modifier|JOB|politician|RESOURCE|unity| } knight_commander_research_output_modifier = { base = 0 modifier = { add = 1 owner = { has_country_flag = toxoids_7011_b } } modifier = { add = 1 owner = { has_country_flag = toxoids_7040_b } } modifier = { add = 1 owner = { has_country_flag = toxoids_7130_b } } mult = value:job_total_research_output_modifier|JOB|head_researcher| } tech_weight_likelihood = { base = 1.25 modifier = { add = 1.25 has_valid_civic = civic_technocracy } } leader_cost = { base = 2 modifier = { subtract = 6 num_owned_leaders > 5 } modifier = { add = trigger:num_owned_leaders num_owned_leaders > 5 } mult = 50 } sacrifice_cost = { base = 0 complex_trigger_modifier = { trigger = resource_income_compare parameters = { resource = unity } mode = add } abs = yes mult = 3 } num_active_buildings = { complex_trigger_modifier = { trigger = num_buildings parameters = { type = $BUILDING$ disabled = no } mode = add } } farming_districts_value = { complex_trigger_modifier = { trigger = num_districts parameters = { type = district_farming } mode = add } complex_trigger_modifier = { trigger = num_districts parameters = { type = district_farming_uncapped } mode = add } complex_trigger_modifier = { trigger = num_districts parameters = { type = district_rw_farming } multiplier = 4 mode = add } } edict_size_effect = { base = 0.01 mult = trigger:empire_size add = 1 } gaiaseeder_upkeep = { base = 0 modifier = { add = 1 is_ideal_planet_class = { who = owner status = yes } } modifier = { add = 1.25 OR = { AND = { owner_species = { ideal_planet_is_wet = yes } planet = { is_wet = yes is_ideal_planet_class = { who = owner status = no } } } AND = { owner_species = { ideal_planet_is_dry = yes } planet = { is_dry = yes is_ideal_planet_class = { who = owner status = no } } } AND = { owner_species = { ideal_planet_is_cold = yes } planet = { is_cold = yes is_ideal_planet_class = { who = owner status = no } } } } } modifier = { add = 1.50 OR = { AND = { owner_species = { ideal_planet_is_wet = yes } planet = { OR = { is_dry = yes is_cold = yes } } } AND = { owner_species = { ideal_planet_is_dry = yes } planet = { OR = { is_wet = yes is_cold = yes } } } AND = { owner_species = { ideal_planet_is_cold = yes } planet = { OR = { is_wet = yes is_dry = yes } } } AND = { owner_species = { ideal_planet_is_special = yes } planet = { OR = { is_wet = yes is_dry = yes is_cold = yes } } } } } modifier = { add = 1.75 planet = { is_planet_class = pc_nuked } } } overlord_gaiaseeder_upkeep = { base = 0 modifier = { add = 1 is_ideal_planet_class = { who = owner.overlord status = yes } } modifier = { add = 1.25 OR = { AND = { owner.overlord.species = { ideal_planet_is_wet = yes } planet = { is_wet = yes is_ideal_planet_class = { who = owner.overlord status = no } } } AND = { owner.overlord.species = { ideal_planet_is_dry = yes } planet = { is_dry = yes is_ideal_planet_class = { who = owner.overlord status = no } } } AND = { owner.overlord.species = { ideal_planet_is_cold = yes } planet = { is_cold = yes is_ideal_planet_class = { who = owner.overlord status = no } } } } } modifier = { add = 1.50 OR = { AND = { owner.overlord.species = { ideal_planet_is_wet = yes } planet = { OR = { is_dry = yes is_cold = yes } } } AND = { owner.overlord.species = { ideal_planet_is_dry = yes } planet = { OR = { is_wet = yes is_cold = yes } } } AND = { owner.overlord.species = { ideal_planet_is_cold = yes } planet = { OR = { is_wet = yes is_dry = yes } } } AND = { owner.overlord.species = { ideal_planet_is_special = yes } planet = { OR = { is_wet = yes is_dry = yes is_cold = yes } } } } } modifier = { add = 1.75 planet = { is_planet_class = pc_nuked } } } num_non_sapient_robots_on_planet = { complex_trigger_modifier = { trigger = count_owned_pop parameters = { limit = { is_non_sapient_robot = yes } } mode = add } } # Used primarily for Machine Uprising. robot_pop_strength = { # if ai outlawed: SPECIALISTS * 0.5 + NONSPECIALIST * 0.5 # not outlawed: SPECIALISTS * 2 + NONSPECIALIST * 0.5 # Specialist Robots. complex_trigger_modifier = { trigger = count_owned_pop parameters = { limit = { is_robot_pop = yes has_job_category = specialist } } mode = add } # Multiply by 2 or 0.5 if outlawed. multiply = 2 modifier = { multiply = 0.25 has_policy_flag = ai_outlawed } # Non-specialist Robots, 0.5 each. complex_trigger_modifier = { trigger = count_owned_pop parameters = { limit = { is_robot_pop = yes NOT = { has_job_category = specialist } } } mode = add multiplier = 0.5 } } num_toxic_terraform_candidates = { complex_trigger_modifier = { trigger = count_planet_within_border parameters = { limit = { has_modifier = toxic_terraforming_candidate } } mode = add } } robot_pop_strength_headcount = { # Headcount Progress comes from Number of Robot Pops: ### Max 5 at: 1000 Robot Pops, OR 250 Robot Specialists with "AI allowed". add = value:robot_pop_strength divide = 100 max = 5 } robot_pop_strength_proportion = { # Proportion Progress comes from Number of Robot Pops divided by Total pops: ### Max 5 at: 100% of Pops are Robot workers, OR 25% of Pops are Specialist Robots with "AI allowed". add = value:robot_pop_strength divide = trigger:num_pops multiply = 10 max = 5 } situation_machine_uprising_pops_monthly_progress = { # Sum values, resulting in a value of 0-10. modifier = { add = owner.value:robot_pop_strength_headcount } modifier = { add = owner.value:robot_pop_strength_proportion } } capital_empire_ratio = { add = trigger:num_pops divide = capital_scope.trigger:num_pops } created_merc_number = { base = 1 complex_trigger_modifier = { trigger = count_country parameters ={ limit = { has_country_flag = created_by@root.owner } } mode = weight } } num_starbase_modules_of_type = { complex_trigger_modifier = { trigger = count_starbase_modules parameters = { type = $TYPE$ } mode = add } } num_orbital_ring_defensive_modules = { base = 0 complex_trigger_modifier = { trigger = count_starbase_modules parameters = { type = orbital_ring_gun_battery } mode = add } complex_trigger_modifier = { trigger = count_starbase_modules parameters = { type = orbital_ring_missile_battery } mode = add } complex_trigger_modifier = { trigger = count_starbase_modules parameters = { type = orbital_ring_hangar_bay } mode = add } } # Total number of drones on the planet : 100 = current category : X% percentage_protected_drones = { base = 1 # first we check how many pops are in that category # and multiply it by 100 complex_trigger_modifier = { trigger = count_owned_pop parameters = { limit = { is_robot_pop = yes is_pop_category = $CATEGORY$ } } mode = mult } # then divide by the total number of pops to get the percentage complex_trigger_modifier = { trigger = count_owned_pop parameters = { limit = { is_robot_pop = yes } } mode = divide } mult = 5 } scripted_modifier_mult = { base = 1 add = modifier:$MODIFIER$ min = 0 } scripted_modifier_ethics_weight_mult = { base = 0 modifier = { add = 1 owner = { has_ethic = ethic_$ETHIC$ } } modifier = { add = 2 owner = { has_ethic = ethic_fanatic_$ETHIC$ } } } scripted_modifier_job_weight_mult = { base = 1 add = modifier:$MODIFIER$ min = 0 pow = 3 #we need it to have a bit more impact } bailout_scaling_factor = { base = 0 add = trigger:years_passed divide = 10 floor = yes add = 1 max = 15 } zro_crystal_leaders = { add = trigger:num_owned_leaders } toxic_attendant_growth = { base = 1 complex_trigger_modifier = { trigger = num_districts parameters = { type = district_industrial } mode = add } complex_trigger_modifier = { trigger = num_districts parameters = { type = district_arcology_arms_industry } mode = add } complex_trigger_modifier = { trigger = num_districts parameters = { type = district_arcology_civilian_industry } mode = add } complex_trigger_modifier = { trigger = num_districts parameters = { type = district_hab_industrial } mode = add } complex_trigger_modifier = { trigger = num_districts parameters = { type = district_rw_industrial } mult = 4 mode = add } } incubator_growth = { base = 37 subtract = trigger:num_pops min = -10 max = 30 } counter_noxious = { complex_trigger_modifier = { trigger = count_owned_pop parameters = { limit = { NOT = { has_trait = trait_noxious } pop_has_happiness = yes } } mode = add } max = 20 } ships_of_size_in_fromscoped_debris = { complex_trigger_modifier = { trigger = num_ships_in_debris trigger_scope = from parameters = { ship_size = $SIZE$ } mode = add } } toxic_knight_job_number = { base = 0 complex_trigger_modifier = { trigger = count_owned_pop parameters = { limit = { has_job = knight } } mult = 0.05 mode = add } complex_trigger_modifier = { potential = { owner = { is_overlord = yes } } trigger = count_galaxy_planet parameters = { limit = { has_owner = yes has_holding = { holding = holding_knight_commandery owner = root } } } mult = 0.05 mode = add } complex_trigger_modifier = { potential = { owner = { has_corporate_government = yes } } trigger = count_galaxy_planet parameters = { limit = { has_owner = yes has_holding = { holding = building_knightly_theme_park owner = root } } } mult = 0.01 mode = add } } consquences_damn_you = { base = 0.01 complex_trigger_modifier = { trigger = count_owned_pop parameters = { limit = { is_overtuned = yes } } mode = add } } zarqlan_fervor_three = { base = 0 modifier = { add = zarqlan_fervor } mult = 3 } brood_usage_mult = { base = 0.05 modifier = { mult = brood_usage } } conclave_election_ascension_value = { add = trigger:num_planetary_ascension_tiers mult = 0.1 add = 1 } conclave_election_robots_value = { base = 1 complex_trigger_modifier = { trigger = pop_percentage parameters = { limit = { is_robot_pop = yes } } mode = subtract } } conclave_election_bribes_value = { base = 1 add = conclave_election_bribes } conclave_election_value = { complex_trigger_modifier = { trigger = pop_percentage parameters = { limit = { OR = { has_job = priest has_job = high_priest has_job = death_priest has_job = mortal_initiate has_job = preacher } } } mode = add mult = 200 #normalising percentage, then x2 } mult = value:conclave_election_robots_value mult = value:conclave_election_ascension_value modifier = { factor = 1.1 has_ethic = ethic_spiritualist } modifier = { factor = 1.25 has_ethic = ethic_fanatic_spiritualist } modifier = { factor = 1.25 has_tradition = tr_psionics_finish } modifier = { factor = 5 exists = ruler ruler = { has_trait = leader_trait_ruler_chosen } } modifier = { factor = 1.25 has_relic = r_severed_head } modifier = { factor = 1.25 any_owned_planet = { has_modifier = holy_planet } } modifier = { factor = 1.25 check_variable = { which = num_consecrated_worlds value > 2 } } modifier = { factor = conclave_election_random_factor is_variable_set = conclave_election_random_factor } modifier = { factor = value:conclave_election_bribes_value is_variable_set = conclave_election_bribes } modifier = { subtract = 100 is_gestalt = yes } modifier = { subtract = 1000 is_subject = yes } } num_toxic_workplace = { base = -1 complex_trigger_modifier = { trigger = count_country parameters = { limit = { is_galactic_community_member = yes } } mode = add } } consequences_cost = { base = 1 complex_trigger_modifier = { trigger = resource_income_compare parameters = { resource = unity } mode = add } abs = yes divide = 1.2 } negative_opinion_decay_rate = { base = 1 modifier = { add = 0.5 OR = { is_improving_relations_with = from from = { is_improving_relations_with = root } } } modifier = { subtract = 0.5 OR = { is_harming_relations_with = from from = { is_harming_relations_with = root } } } } positive_opinion_decay_rate = { base = 1 modifier = { subtract = 0.5 OR = { is_improving_relations_with = from from = { is_improving_relations_with = root } } } modifier = { add = 0.5 OR = { is_harming_relations_with = from from = { is_harming_relations_with = root } } } }