script values

This commit is contained in:
Fishedotjpg 2026-11-18 13:42:11 +00:00
parent 9cfa9c0403
commit eaf472631b
12 changed files with 2553 additions and 2097 deletions

View file

@ -158,7 +158,7 @@ common_cb_cost_multiplier_core = {
scope:attacker = {
house ?= {
OR = {
has_house_modifier = fp3_house_modifier_frontier_ambitions
has_house_modifier = fp3_house_modifier_frontier_ambitions
has_house_modifier = fp3_house_modifier_rebuilding_efforts
}
}
@ -171,7 +171,7 @@ common_cb_cost_multiplier_core = {
scope:defender = {
house ?= {
OR = {
has_house_modifier = fp3_house_modifier_frontier_ambitions
has_house_modifier = fp3_house_modifier_frontier_ambitions
has_house_modifier = fp3_house_modifier_rebuilding_efforts
}
}
@ -291,6 +291,19 @@ common_cb_cost_multiplier_core = {
desc = disarmament_law_increased_cb_cost_desc
}
}
# Attacking a Republic
if = {
limit = {
scope:defender = {
government_has_flag = government_is_republic
}
}
multiply = {
value = 1
add = gdp_attacking_republic_cb_cost_value
desc = gdp_attacking_republic_cb_cost_desc
}
}
}
common_cb_cost_multiplier = {
@ -438,7 +451,34 @@ common_cb_piety_cost_multiplier = {
desc = CB_STRUGGLE_PHASE_DISCOUNT
}
}
#Guelphs & Ghibellines
if = {
limit = {
OR = {
#Dictatus Papae, Ad Interim and Agitation phases
AND = {
gg_phase_has_cheaper_opposite_party_wars_trigger = yes
gg_first_and_second_are_opposite_sides_trigger = { FIRST = scope:attacker SECOND = scope:defender }
}
#Guelph Advantage phase
AND = {
situation:guelph_ghibelline ?= { situation_current_phase = guelph_advantage }
scope:attacker = { is_ghibelline_trigger = yes }
scope:defender = { is_guelph_trigger = yes }
}
#Ghibelline Advantage phase
AND = {
situation:guelph_ghibelline ?= { situation_current_phase = ghibelline_advantage }
scope:attacker = { is_guelph_trigger = yes }
scope:defender = { is_ghibelline_trigger = yes }
}
}
}
multiply = {
value = 0.5
desc = CB_SITUATION_PHASE_DISCOUNT
}
}
# Common multiplier
multiply = common_cb_cost_multiplier_core
}
@ -471,6 +511,46 @@ holy_war_cb_piety_cost_multiplier = {
desc = "CB_ATTACKER_VASSAL_CONTRACT"
}
}
if = {
limit = {
scope:attacker = {
any_active_accolade = {
accolade_parameter = acclaimed_knight_piety_from_battle_high
}
}
}
multiply = {
value = accolade_piety_reduction_value_high
desc = "fanatic_attribute"
}
}
else_if = {
limit = {
scope:attacker = {
any_active_accolade = {
accolade_parameter = acclaimed_knight_piety_from_battle
}
}
}
multiply = {
value = accolade_piety_reduction_value
desc = "fanatic_attribute"
}
}
if = {
limit = {
scope:attacker = {
top_participant_group:the_christian_church ?= {
has_participant_group_parameter = the_christian_church_cheaper_religious_wars
}
}
}
multiply = {
value = 0.75
desc = pam_the_christian_church_cheaper_religious_wars_desc
}
}
}
# Base Costs
@ -697,6 +777,35 @@ common_cb_prestige_cost_multiplier = {
}
}
#Guelphs & Ghibellines
if = {
limit = {
OR = {
#Dictatus Papae, Ad Interim and Agitation phases
AND = {
gg_phase_has_cheaper_opposite_party_wars_trigger = yes
gg_first_and_second_are_opposite_sides_trigger = { FIRST = scope:attacker SECOND = scope:defender }
}
#Guelph Advantage phase
AND = {
situation:guelph_ghibelline ?= { situation_current_phase = guelph_advantage }
scope:attacker = { is_ghibelline_trigger = yes }
scope:defender = { is_guelph_trigger = yes }
}
#Ghibelline Advantage phase
AND = {
situation:guelph_ghibelline ?= { situation_current_phase = ghibelline_advantage }
scope:attacker = { is_guelph_trigger = yes }
scope:defender = { is_ghibelline_trigger = yes }
}
}
}
multiply = {
value = 0.5
desc = CB_SITUATION_PHASE_DISCOUNT
}
}
# Common modifier
multiply = common_cb_cost_multiplier
}
@ -705,7 +814,7 @@ vassalization_cb_prestige_cost_mulitiplier = {
value = 1
if = {
limit = {
scope:defender.primary_title.tier = tier_kingdom
scope:defender.highest_held_title_tier = tier_kingdom
}
multiply = {
value = 2
@ -714,7 +823,7 @@ vassalization_cb_prestige_cost_mulitiplier = {
}
else_if = {
limit = {
scope:defender.primary_title.tier = tier_empire
scope:defender.highest_held_title_tier = tier_empire
}
multiply = {
value = 4
@ -723,6 +832,56 @@ vassalization_cb_prestige_cost_mulitiplier = {
}
}
claim_cb_cost_multiplier_legitimacy = {
scope:attacker = {
if = {
limit = { has_legitimacy_flag = reduced_claim_cb_cost }
add = {
value = 0.5
desc = legitimacy_high_modifier_tt
}
}
else_if = {
limit = { has_legitimacy_flag = very_reduced_claim_cb_cost }
add = {
value = 0.25
desc = legitimacy_high_modifier_tt
}
}
else_if = {
limit = { has_legitimacy_flag = extra_reduced_claim_cb_cost }
add = {
value = 0.15
desc = legitimacy_high_modifier_tt
}
}
else_if = {
limit = { has_legitimacy_flag = increased_claim_cb_cost }
add = {
value = 1.5
desc = legitimacy_low_modifier_tt
}
}
else_if = {
limit = { has_legitimacy_flag = very_increased_claim_cb_cost }
add = {
value = 2
desc = legitimacy_low_modifier_tt
}
}
else_if = {
limit = { has_legitimacy_flag = massively_increased_claim_cb_cost }
add = {
value = 2.5
desc = legitimacy_low_modifier_tt
}
}
else = {
add = 1
}
}
}
# Base Costs
claim_cb_prestige_cost = {
if = {
@ -1033,6 +1192,184 @@ tribal_subjugation_cb_prestige_cost = {
multiply = common_cb_prestige_cost_multiplier
}
county_cb_influence_base_cost = {
if = {
limit = {
scope:attacker = { government_has_flag = government_has_influence }
}
add = {
value = 25
desc = CB_BASE_COST
}
add = {
value = 0.5
multiply = scope:attacker.sub_realm_size
desc = CB_REALM_SIZE_COST
max = 75
}
}
}
duchy_cb_influence_base_cost = {
if = {
limit = {
scope:attacker = { government_has_flag = government_has_influence }
}
add = {
value = 50
desc = CB_BASE_COST
}
add = {
value = 1
multiply = scope:attacker.sub_realm_size
desc = CB_REALM_SIZE_COST
max = 250
}
}
}
county_cb_prestige_base_cost = {
if = {
limit = {
scope:defender.faith != scope:attacker.faith
}
add = {
value = 50
desc = CB_COST_DIFFERENT_FAITH
}
add = {
value = 5
multiply = scope:attacker.sub_realm_size
desc = CB_REALM_SIZE_COST
max = 100
}
}
}
duchy_cb_prestige_base_cost = {
if = {
limit = {
scope:defender.faith != scope:attacker.faith
}
add = {
value = 150
desc = CB_COST_DIFFERENT_FAITH
}
add = {
value = 10
multiply = scope:attacker.sub_realm_size
desc = CB_REALM_SIZE_COST
max = 800
}
}
}
# admin cbs, cheaper since they pay influence at the same time
county_cb_prestige_base_cost_with_influence = {
add = {
value = 50
desc = CB_BASE_COST
}
add = {
value = 2.5
multiply = scope:attacker.sub_realm_size
desc = CB_REALM_SIZE_COST
max = 150
}
}
duchy_cb_prestige_base_cost_with_influence = {
add = {
value = 100
desc = CB_BASE_COST
}
add = {
value = 5
multiply = scope:attacker.sub_realm_size
desc = CB_REALM_SIZE_COST
max = 500
}
}
county_cb_piety_base_cost = {
if = {
limit = {
scope:defender.faith = scope:attacker.faith
}
add = {
value = 25
desc = CB_SAME_FAITH_COST
}
add = {
value = 5
multiply = scope:attacker.sub_realm_size
desc = CB_REALM_SIZE_COST
max = 75
}
}
}
duchy_cb_piety_base_cost = {
if = {
limit = {
scope:defender.faith = scope:attacker.faith
}
add = {
value = 100
desc = CB_SAME_FAITH_COST
}
add = {
value = 10
multiply = scope:attacker.sub_realm_size
desc = CB_REALM_SIZE_COST
max = 800
}
}
}
conquest_cb_prestige_cost_multiplier = {
value = 1
# fp2 iberian struggle ending
if = {
limit = {
scope:attacker.house = {
OR = {
has_house_modifier = fp2_struggle_hostility_house_culture_modifier
has_house_modifier = fp2_struggle_hostility_house_combined_modifier
}
}
any_in_global_list = {
variable = fp2_struggle_ending_culture_list
this = scope:attacker.culture
}
any_in_global_list = {
variable = fp2_struggle_ending_culture_list
this = scope:defender.culture
}
}
divide = {
value = 2
desc = CB_COST_FP2_STRUGGLE_HOSTILITY_CULTURE_DISCOUNT
}
}
if = {
limit = {
has_global_variable = fp2_struggle_compromise_ending
any_in_global_list = {
variable = fp2_struggle_ending_culture_list
this = scope:attacker.culture
}
any_in_global_list = {
variable = fp2_struggle_ending_culture_list
this = scope:defender.culture
}
}
multiply = {
value = 2
desc = CB_COST_FP2_STRUGGLE_COMPROMISE_MULTIPLIER
}
}
}
# Ancestor war base cost
ancestor_cb_prestige_cost = {
add = {
@ -1192,7 +1529,179 @@ ancestor_cb_prestige_cost = {
struggle_cb_phase_modifier_cost = {
# Phase modifiers.
## Note that these aren't hooked up to the actual _parameters_ for tooltip reasons: we'd have to check what the phase is anyway, so we just check off of the phase to begin with and save ourselves a worthless parameter check.
add = {
value = 0
# Cheap.
if = {
limit = {
scope:attacker = {
any_character_struggle = {
involvement = involved
is_struggle_type = iberian_struggle
is_struggle_phase = struggle_iberia_phase_hostility
is_secondary_character_involvement_either_trigger = { CHAR = scope:defender }
}
}
}
add = {
every_in_list = {
list = target_titles
limit = { tier = tier_county }
add = {
value = minor_prestige_value
}
}
multiply = {
value = 0.9
every_in_list = {
list = target_titles
limit = { tier = tier_county }
add = {
value = 0.1
}
}
max = 2
}
desc = CB_COST_STRUGGLE_PHASE_HOSTILITY
}
}
# Standard.
if = {
limit = {
scope:attacker = {
any_character_struggle = {
involvement = involved
is_struggle_type = iberian_struggle
is_struggle_phase = struggle_iberia_phase_opportunity
is_secondary_character_involvement_either_trigger = { CHAR = scope:defender }
}
}
}
add = {
every_in_list = {
list = target_titles
limit = { tier = tier_county }
add = {
value = medium_prestige_value
}
}
multiply = {
value = 0.9
every_in_list = {
list = target_titles
limit = { tier = tier_county }
add = {
value = 0.1
}
}
max = 2
}
desc = CB_COST_STRUGGLE_PHASE_OPPORTUNITY
}
}
# Expensive.
if = {
limit = {
scope:attacker = {
any_character_struggle = {
involvement = involved
is_struggle_type = iberian_struggle
is_struggle_phase = struggle_iberia_phase_compromise
is_secondary_character_involvement_either_trigger = { CHAR = scope:defender }
}
}
}
add = {
every_in_list = {
list = target_titles
limit = { tier = tier_county }
add = {
value = major_prestige_value
}
}
multiply = {
value = 0.9
every_in_list = {
list = target_titles
limit = { tier = tier_county }
add = {
value = 0.1
}
}
max = 2
}
desc = CB_COST_STRUGGLE_PHASE_COMPROMISE
}
}
if = {
limit = {
scope:attacker = {
any_character_struggle = {
involvement = involved
is_struggle_type = iberian_struggle
is_struggle_phase = struggle_iberia_phase_conciliation
is_secondary_character_involvement_either_trigger = { CHAR = scope:defender }
}
}
}
add = {
every_in_list = {
list = target_titles
limit = { tier = tier_county }
add = {
value = major_prestige_value
}
}
multiply = {
value = 0.9
every_in_list = {
list = target_titles
limit = { tier = tier_county }
add = {
value = 0.1
}
}
max = 2
}
desc = CB_COST_STRUGGLE_PHASE_CONCILIATION
}
}
if = { # Post Struggle cost
limit = {
scope:attacker = {
exists = scope:attacker.house
scope:attacker.house = {
OR ={
has_house_modifier = fp2_struggle_hostility_house_combined_modifier
has_house_modifier = fp2_struggle_hostility_house_faith_modifier
has_house_modifier = fp2_struggle_hostility_house_culture_modifier
}
}
}
}
add = {
every_in_list = {
list = target_titles
limit = { tier = tier_county }
add = {
value = major_prestige_value
}
}
multiply = {
value = 0.9
every_in_list = {
list = target_titles
limit = { tier = tier_county }
add = {
value = 0.1
}
}
max = 2
}
desc = CB_BASE_COST
}
}
}
}
common_claim_reduction_cost_multiplier_core = {