fixes big evebts abd on actions plus mroe

This commit is contained in:
Greekman 2026-11-21 19:27:08 +00:00
parent c9d520e5a1
commit bce2aa31a1
207 changed files with 100377 additions and 9296 deletions

View file

@ -1,4 +1,13 @@
@crown_authority_cooldown_years = 20
@company_size_prestige_cost = 300
@company_size_cooldown_years = 5
@company_purpose_prestige_cost = 500
@company_purpose_cooldown_years = 5
@company_purpose_ai_will_do_malus_t3 = -30
@company_purpose_ai_will_do_malus_t2 = -20
@company_purpose_ai_will_do_bonus_t3 = 30
@company_purpose_ai_will_do_bonus_t2 = 20
@company_purpose_ai_will_do_bonus_t1 = 10
@crown_authority_cooldown_years = 20
@tribal_authority_cooldown_years = 10
@nomadic_authority_cooldown_years = 5
@church_authority_cooldown_years = 20
@ -3559,3 +3568,699 @@ crowned_emperor = {
}
}
}
company_purpose_artisan = {
law_group_type = company_purpose
index = 1
pass_phrase = company_purpose_pass_phrase
confirmation_title = company_purpose_pass_phrase
confirmation_button_text = company_purpose_confirmation_button_text
flag = uses_company_purpose
flag = can_change_succession_laws
flag = learning_company_purpose
can_keep = { realm_law_use_company_purpose = yes }
can_pass = {
custom_description = {
subject = root
text = has_company_purpose_cooldown
NOT = { has_variable = company_purpose_cooldown }
}
custom_tooltip = {
text = company_purpose_child_blocker_tt
is_adult = yes
}
}
pass_cost = {
prestige = {
if = {
limit = {
NOR = {
has_realm_law_flag = can_change_purpose_for_free
has_character_flag = free_starting_merchant_purpose_change
}
}
value = @company_purpose_prestige_cost
}
}
}
modifier = {
trait_track_artisan_xp_gain_mult = 0.15
trade_category_luxury_items_xp_gain_mult = 0.2
trade_category_books_xp_gain_mult = 0.2
trade_category_fabrics_xp_gain_mult = 0.2
trade_category_clothes_xp_gain_mult = 0.2
trade_category_dyes_xp_gain_mult = 0.2
trade_category_alum_xp_gain_mult = 0.2
trade_category_stone_xp_gain_mult = 0.2
domicile_build_gold_cost = -0.2
}
on_pass = {
set_variable = {
name = company_purpose_cooldown
years = @company_purpose_cooldown_years
}
remove_character_flag = free_starting_merchant_purpose_change
# Remove modifiers.
remove_law_related_modifiers_effect = yes
merchant_company_law_purpose_effect = yes
}
requires_approve = {
always = no
}
ai_will_do = {
# If we've picked a purpose, don't change it.
if = {
limit = {
NOT = { has_realm_law = company_purpose_artisan }
}
value = 0
}
else = {
# Traits.
## Education
if = {
limit = { has_trait = education_learning }
add = @company_purpose_ai_will_do_bonus_t3
}
## Culture
if = {
limit = {
culture = { has_cultural_tradition = tradition_artisans }
}
add = @company_purpose_ai_will_do_bonus_t3
}
## Personality
### Calm
if = {
limit = { has_trait = calm }
add = @company_purpose_ai_will_do_bonus_t3
}
### Diligent
if = {
limit = { has_trait = diligent }
add = @company_purpose_ai_will_do_bonus_t3
}
### Eccentric
if = {
limit = { has_trait = eccentric }
add = @company_purpose_ai_will_do_bonus_t3
}
### Patient
if = {
limit = { has_trait = patient }
add = @company_purpose_ai_will_do_bonus_t3
}
### Impatient
if = {
limit = { has_trait = impatient }
add = @company_purpose_ai_will_do_malus_t3
}
### Shy
if = {
limit = { has_trait = shy }
add = @company_purpose_ai_will_do_bonus_t1
}
}
}
}
company_purpose_caravaneer = {
law_group_type = company_purpose
index = 3
pass_phrase = company_purpose_pass_phrase
confirmation_title = company_purpose_pass_phrase
confirmation_button_text = company_purpose_confirmation_button_text
flag = uses_company_purpose
flag = can_change_succession_laws
flag = diplomacy_company_purpose
can_keep = { realm_law_use_company_purpose = yes }
can_pass = {
custom_description = {
subject = root
text = has_company_purpose_cooldown
NOT = { has_variable = company_purpose_cooldown }
}
custom_tooltip = {
text = company_purpose_child_blocker_tt
is_adult = yes
}
}
pass_cost = {
prestige = {
if = {
limit = {
NOR = {
has_realm_law_flag = can_change_purpose_for_free
has_character_flag = free_starting_merchant_purpose_change
}
}
value = @company_purpose_prestige_cost
}
}
}
on_pass = {
set_variable = {
name = company_purpose_cooldown
years = @company_purpose_cooldown_years
}
remove_character_flag = free_starting_merchant_purpose_change
# Remove modifiers.
remove_law_related_modifiers_effect = yes
merchant_company_law_purpose_effect = yes
}
modifier = {
trade_category_luxury_consumption_xp_gain_mult = 0.2
trade_category_incense_xp_gain_mult = 0.2
trade_category_medicaments_xp_gain_mult = 0.2
trade_category_comforts_xp_gain_mult = 0.2
trade_category_alcohol_xp_gain_mult = 0.2
trade_category_salt_xp_gain_mult = 0.2
trade_category_beasts_of_burden_xp_gain_mult = 0.2
trait_track_caravaneer_xp_gain_mult = 0.15
ignore_negative_culture_opinion = yes
ignore_negative_opinion_of_culture = yes
}
requires_approve = {
always = no
}
ai_will_do = {
# If we've picked a purpose, don't change it.
if = {
limit = {
NOT = { has_realm_law = company_purpose_caravaneer }
}
value = 0
}
else = {
# Traits.
## Education
if = {
limit = { has_trait = education_diplomacy }
add = @company_purpose_ai_will_do_bonus_t3
}
if = {
limit = { has_trait = education_stewardship }
add = @company_purpose_ai_will_do_bonus_t2
}
## Cultures
if = {
limit = {
culture = { has_cultural_tradition = tradition_caravaneers }
}
add = @company_purpose_ai_will_do_bonus_t3
}
## Personality
### Lazy
if = {
limit = { has_trait = lazy }
add = @company_purpose_ai_will_do_malus_t2
}
### Athletic
if = {
limit = { has_trait = athletic }
add = @company_purpose_ai_will_do_bonus_t3
}
### Brave
if = {
limit = { has_trait = brave }
add = @company_purpose_ai_will_do_bonus_t2
}
### Craven
if = {
limit = { has_trait = craven }
add = @company_purpose_ai_will_do_malus_t2
}
### Stubborn
if = {
limit = { has_trait = stubborn }
add = @company_purpose_ai_will_do_bonus_t1
}
### Fickle
if = {
limit = { has_trait = fickle }
add = @company_purpose_ai_will_do_bonus_t2
}
### Humble
if = {
limit = { has_trait = humble }
add = @company_purpose_ai_will_do_bonus_t2
}
### Arrogant
if = {
limit = { has_trait = arrogant }
add = @company_purpose_ai_will_do_malus_t2
}
}
}
}
company_purpose_creditor = {
law_group_type = company_purpose
index = 2
pass_phrase = company_purpose_pass_phrase
confirmation_title = company_purpose_pass_phrase
confirmation_button_text = company_purpose_confirmation_button_text
flag = uses_company_purpose
flag = can_change_succession_laws
flag = intrigue_company_purpose
flag = unlock_military_merchant_patron_requests
# Seize Land CB
flag = unlock_seize_realm_county_cb
can_keep = { realm_law_use_company_purpose = yes }
can_pass = {
custom_description = {
subject = root
text = has_company_purpose_cooldown
NOT = { has_variable = company_purpose_cooldown }
}
custom_tooltip = {
text = company_purpose_child_blocker_tt
is_adult = yes
}
}
pass_cost = {
prestige = {
if = {
limit = {
NOR = {
has_realm_law_flag = can_change_purpose_for_free
has_character_flag = free_starting_merchant_purpose_change
}
}
value = @company_purpose_prestige_cost
}
}
}
modifier = {
trade_category_precious_metals_xp_gain_mult = 0.2
trade_category_jewelry_materials_xp_gain_mult = 0.2
trade_category_base_metals_xp_gain_mult = 0.2
trade_category_cereals_xp_gain_mult = 0.2
trade_category_meat_xp_gain_mult = 0.2
trade_category_carpentry_supplies_xp_gain_mult = 0.2
trait_track_creditor_xp_gain_mult = 0.15
}
on_pass = {
set_variable = {
name = company_purpose_cooldown
years = @company_purpose_cooldown_years
}
remove_character_flag = free_starting_merchant_purpose_change
# Remove modifiers.
remove_law_related_modifiers_effect = yes
merchant_company_law_purpose_effect = yes
}
requires_approve = {
always = no
}
ai_will_do = {
# If we've picked a purpose, don't change it.
if = {
limit = {
NOT = { has_realm_law = company_purpose_creditor }
}
value = 0
}
else = {
# Traits.
## Education
if = {
limit = { has_trait = education_intrigue }
add = @company_purpose_ai_will_do_bonus_t3
}
## Personality.
### Deceitful.
if = {
limit = { has_trait = deceitful }
add = @company_purpose_ai_will_do_bonus_t3
}
### Honest.
if = {
limit = { has_trait = honest }
add = @company_purpose_ai_will_do_malus_t3
}
### Arbitrary.
if = {
limit = { has_trait = arbitrary }
add = @company_purpose_ai_will_do_bonus_t3
}
### Just,
if = {
limit = { has_trait = just }
add = @company_purpose_ai_will_do_malus_t3
}
### Generous.
if = {
limit = { has_trait = generous }
add = @company_purpose_ai_will_do_malus_t2
}
### Arrogant.
if = {
limit = { has_trait = arrogant }
add = @company_purpose_ai_will_do_bonus_t2
}
### Wrathful.
if = {
limit = { has_trait = wrathful }
add = @company_purpose_ai_will_do_bonus_t1
}
### Callous.
if = {
limit = { has_trait = callous }
add = @company_purpose_ai_will_do_bonus_t2
}
### Compassionate.
if = {
limit = { has_trait = compassionate }
add = @company_purpose_ai_will_do_malus_t2
}
}
}
}
company_purpose_family = {
law_group_type = company_purpose
index = 0
pass_phrase = company_purpose_pass_phrase
confirmation_title = company_purpose_pass_phrase
confirmation_button_text = company_purpose_confirmation_button_text
flag = uses_company_purpose
flag = can_change_succession_laws
flag = can_change_purpose_for_free
can_keep = { realm_law_use_company_purpose = yes }
can_pass = {
custom_description = {
subject = root
text = has_company_purpose_cooldown
NOT = { has_variable = company_purpose_cooldown }
}
custom_tooltip = {
text = company_purpose_child_blocker_tt
is_adult = yes
}
}
pass_cost = {
prestige = {
if = {
limit = {
NOR = {
has_realm_law_flag = can_change_purpose_for_free
has_character_flag = free_starting_merchant_purpose_change
}
}
value = @company_purpose_prestige_cost
}
}
}
modifier = {
close_relative_opinion = 10
suzerain_opinion = 30
trade_expertise_growth_mult = 0.1
}
on_pass = {
set_variable = {
name = company_purpose_cooldown
years = @company_purpose_cooldown_years
}
remove_character_flag = free_starting_merchant_purpose_change
# Remove modifiers.
remove_law_related_modifiers_effect = yes
merchant_company_law_purpose_effect = yes
}
requires_approve = {
always = no
}
ai_will_do = { value = 0 }
}
company_size_huge = {
law_group_type = company_size
index = 3
pass_phrase = company_size_pass_phrase
confirmation_title = company_size_confirmation_title
confirmation_button_text = company_size_confirmation_button_text
can_pass = {
has_realm_law = company_size_large
custom_description = {
subject = root
text = "has_company_size_cooldown"
NAND = {
has_variable = company_size_cooldown
NOT = {
culture = { has_innovation = innovation_all_things }
}
}
}
domicile ?= {
domicile_uses_acumen = yes
acumen >= define:NDomicile|MERCHANT_ACUMEN_LEVEL_4_THRESHOLD
}
}
can_keep = { realm_law_use_company_purpose = yes }
pass_cost = {
prestige = {
if = {
limit = {
is_ai = no
has_realm_law = company_size_large
}
add = @company_size_prestige_cost
}
}
}
modifier = {
trade_competitiveness_add = 40
trade_route_length_add = 10
monthly_dynasty_prestige = 0.75
}
on_pass = {
set_variable = {
name = company_size_cooldown
years = @company_size_cooldown_years
}
# Remove modifiers.
remove_law_related_modifiers_effect = yes
play_sound_effect = "event:/DLC/EP5/SFX/Stingers/ep5_mx_sting_company_size_increase"
}
requires_approve = { always = no }
ai_will_do = {
if = {
limit = { has_realm_law = company_size_large }
value = 1
}
}
}
company_size_large = {
law_group_type = company_size
index = 2
pass_phrase = company_size_pass_phrase
confirmation_title = company_size_confirmation_title
confirmation_button_text = company_size_confirmation_button_text
can_pass = {
has_realm_law = company_size_medium
custom_description = {
subject = root
text = "has_company_size_cooldown"
NAND = {
has_variable = company_size_cooldown
NOT = {
culture = { has_innovation = innovation_all_things }
}
}
}
domicile ?= {
domicile_uses_acumen = yes
acumen >= define:NDomicile|MERCHANT_ACUMEN_LEVEL_3_THRESHOLD
}
}
can_keep = { realm_law_use_company_purpose = yes }
pass_cost = {
prestige = {
if = {
limit = {
is_ai = no
has_realm_law = company_size_medium
}
add = @company_size_prestige_cost
}
}
}
modifier = {
trade_competitiveness_add = 30
trade_route_length_add = 8
monthly_dynasty_prestige = 0.5
}
on_pass = {
set_variable = {
name = company_size_cooldown
years = @company_size_cooldown_years
}
# Remove modifiers.
remove_law_related_modifiers_effect = yes
play_sound_effect = "event:/DLC/EP5/SFX/Stingers/ep5_mx_sting_company_size_increase"
}
requires_approve = { always = no }
ai_will_do = {
if = {
limit = { has_realm_law = company_size_medium }
value = 1
}
}
}
company_size_medium = {
law_group_type = company_size
index = 1
pass_phrase = company_size_pass_phrase
confirmation_title = company_size_confirmation_title
confirmation_button_text = company_size_confirmation_button_text
can_pass = {
has_realm_law = company_size_small
custom_description = {
subject = root
text = "has_company_size_cooldown"
NAND = {
has_variable = company_size_cooldown
NOT = {
culture = { has_innovation = innovation_all_things }
}
}
}
domicile ?= {
domicile_uses_acumen = yes
acumen >= define:NDomicile|MERCHANT_ACUMEN_LEVEL_2_THRESHOLD
}
}
can_keep = { realm_law_use_company_purpose = yes }
pass_cost = {
prestige = {
if = {
limit = {
is_ai = no
has_realm_law = company_size_small
}
add = @company_size_prestige_cost
}
}
}
modifier = {
trade_competitiveness_add = 20
trade_route_length_add = 4
monthly_dynasty_prestige = 0.25
}
on_pass = {
set_variable = {
name = company_size_cooldown
years = @company_size_cooldown_years
}
# Remove modifiers.
remove_law_related_modifiers_effect = yes
play_sound_effect = "event:/DLC/EP5/SFX/Stingers/ep5_mx_sting_company_size_increase"
}
requires_approve = { always = no }
ai_will_do = {
if = {
limit = { has_realm_law = company_size_small }
value = 1
}
}
}
company_size_small = {
law_group_type = company_size
index = 0
pass_phrase = company_size_pass_phrase
confirmation_title = company_size_confirmation_title
confirmation_button_text = company_size_confirmation_button_text
can_pass = {
NOR = {
has_realm_law = company_size_medium
has_realm_law = company_size_large
has_realm_law = company_size_huge
}
}
can_keep = { realm_law_use_company_purpose = yes }
modifier = {
}
on_pass = {
# Remove modifiers.
remove_law_related_modifiers_effect = yes
}
requires_approve = { always = no }
}

View file

@ -2491,3 +2491,290 @@ same_faith_succession_law = {
faith = same_faith
}
}
# CK3 1.21 Silk & Silver: required succession law retained from vanilla.
republican_despot_succession_law = {
law_group_type = succession_order_laws
index = 20
modifier = {
character_capital_popular_opinion_add = -25
}
can_have = {
government_has_flag = government_is_republic
highest_held_title_tier >= tier_county
liege = {
OR = {
this = root
NOT = { government_has_flag = government_is_republic }
}
}
}
can_pass = {
government_has_flag = government_is_republic
capital_county = {
county_control >= county_control_baseline
}
has_realm_law = republic_assembly_authority_legislative
has_realm_law = republic_assembly_term_length_indefinite
has_realm_law = republic_end_term_law_1
has_realm_law = republic_vassal_refusal_2_treason
has_realm_law = republic_title_revocation_2_allowed
has_realm_law = republic_retract_vassal_2_allowed
has_realm_law = republic_banishment_3_unrestricted
has_realm_law = republic_execution_3_unrestricted
}
succession = {
order_of_succession = inheritance
traversal_order = children
rank = oldest
title_division = single_heir
}
flag = advanced_succession_law
flag = can_designate_heirs
modifier = {
player_heir_opinion = 20
close_relative_opinion = 10
republic_government_opinion = -20
}
revoke_cost = {
prestige = change_hre_title_succession_law_prestige_cost
}
pass_cost = {
prestige = gdp_republican_despot_law_prestige_cost
}
requires_approve = { government_has_flag = government_is_republic }
voting_session = { government_has_flag = government_is_republic }
on_pass = {
capital_county = { add_popular_opinion = -25 }
}
ai_approval = {
value = {
value = -100
desc = LAW_BASE_RELUCTANCE_DESC
}
}
ai_will_do = {
value = 0
if = {
limit = {
house ?= {
has_house_aspiration_parameter = republic_signorial
}
}
add = 2
}
if = {
limit = {
OR = {
has_trait = ambitious
has_trait = arrogant
}
}
add = 1
}
# Grace period
multiply = ai_law_grace_period_value
}
potential = {
government_has_flag = government_is_republic
gdp_is_assembly_head_trigger = yes
}
}
# CK3 1.21 Silk & Silver: required succession law retained from vanilla.
merchant_succession_law = {
law_group_type = succession_order_laws
index = 36
can_keep = {
government_has_flag = government_is_merchant
}
can_have = {
government_has_flag = government_is_merchant
}
can_pass = {
government_has_flag = government_is_merchant
}
should_start_with = {
government_has_flag = government_is_merchant
}
should_show_for_title = { # Never show this in the UI, just apply it through script
always = no
}
can_remove_from_title = {
always = no
}
succession = {
order_of_succession = inheritance
traversal_order = children
rank = oldest
title_division = single_heir
exclude_rulers = yes
limit_to_courtiers = yes
}
flag = can_designate_heirs
potential = {
government_has_flag = government_is_merchant
}
}
# CK3 1.21 Silk & Silver: required succession law retained from vanilla.
republican_elective_succession_law = {
law_group_type = succession_order_laws
index = 37
can_keep = {
government_has_flag = government_is_republic
highest_held_title_tier >= tier_county
liege = {
OR = {
this = root
NOT = { government_has_flag = government_is_republic }
}
}
}
can_have = {
government_has_flag = government_is_republic
highest_held_title_tier >= tier_county
}
can_pass = {
government_has_flag = government_is_republic
}
should_start_with = {
government_has_flag = government_is_republic
highest_held_title_tier >= tier_county
}
succession = {
allow_same_successor = yes
order_of_succession = election
election_type = republican_elective
use_term_length = yes
}
modifier = {
short_reign_duration_mult = -2
}
flag = elective_succession_law
flag = succession_uses_term_length
revoke_cost = {
prestige = {
value = change_title_succession_law_prestige_cost
multiply = gdp_republic_revoke_title_law_cost_scale_value
}
gold = {
add = {
value = 1000
desc = BASE
}
value = gdp_republic_revoke_title_law_monetary_cost_value
multiply = gdp_republic_revoke_title_law_cost_scale_value
}
}
pass_cost = {
prestige = change_title_succession_law_prestige_cost
treasury_or_gold = gdp_republic_pass_title_law_monetary_cost_value
}
requires_approve = { government_has_flag = government_is_republic }
voting_session = { government_has_flag = government_is_republic }
ai_approval = {
value = {
value = 100
desc = LAW_BASE_WILLINGNESS_DESC
}
}
ai_will_do = {
value = 10 # TODO_GDP - Add proper AI values and weights
}
potential = {
government_has_flag = government_is_republic
gdp_is_assembly_head_trigger = yes
}
}
# CK3 1.21 Silk & Silver: required succession law retained from vanilla.
republican_appointment_succession_law = {
law_group_type = succession_order_laws
index = 38
can_keep = {
government_has_flag = government_is_republic
highest_held_title_tier >= tier_county
liege = {
this != root
government_has_flag = government_is_republic
}
}
can_have = {
government_has_flag = government_is_republic
highest_held_title_tier >= tier_county
liege = {
this != root
government_has_flag = government_is_republic
}
}
can_pass = {
}
should_start_with = {
government_has_flag = government_is_republic
highest_held_title_tier >= tier_county
liege = {
this != root
government_has_flag = government_is_republic
}
}
succession = {
order_of_succession = appointment
appointment_type = republic_governor
}
flag = advanced_succession_law
flag = appointment_type_succession
modifier = {
}
pass_cost = {
prestige = change_succession_law_prestige_cost
}
revoke_cost = {
prestige = change_succession_law_prestige_cost
}
ai_will_do = {
if = {
limit = {
OR = {
has_realm_law = confederate_partition_succession_law
has_realm_law = partition_succession_law
has_realm_law = high_partition_succession_law
}
}
value = 3
}
}
potential = {
government_has_flag = government_is_republic
gdp_is_assembly_head_trigger = no
}
}