A lot of updating, making republics work

This commit is contained in:
Thakia 2026-11-24 16:18:56 -03:00
parent 09fb57c091
commit 4d6f569e96
99 changed files with 9792 additions and 9342 deletions

View file

@ -35,13 +35,30 @@ on_army_monthly = {
# scope:war is the war causing the previous controller and the occupant to be hostile
on_county_occupied = {
effect = {
# #Guelphs & Ghibellines
# if = {
# limit = {
# scope:county = title:c_roma
# exists = scope:county.holder
# is_ghibelline_trigger = yes
# scope:war ?= {
# NOT = { has_variable = gg_rome_occupied }
# }
# }
# scope:war = { set_variable = gg_rome_occupied }
# gg_triggered_catalyst_effect = {
# ACTOR = root
# RECIPIENT = scope:county.holder
# CATALYST = catalyst_gg_rome_occupied
# }
# }
random = { # chance of granting a knight eligibility for marauder / besieger accolade
chance = 2
modifier = {
factor = accolade_progress
}
modifier = {
NOT = {
if = {
limit = {
any_knight = {
OR = {
can_be_acclaimed = yes
@ -50,7 +67,7 @@ on_county_occupied = {
}
}
knight_army ?= {
location.county = scope:county
location.county ?= scope:county
}
OR = {
AND = { # needed for besieger
@ -70,159 +87,158 @@ on_county_occupied = {
}
}
}
factor = 0
}
set_variable = {
name = accolade_progress
value = 0
}
random_list = {
10 = { # marauder
trigger = {
any_knight = {
OR = {
can_be_acclaimed = yes
accolade ?= {
accolade_can_have_more_attributes = yes
set_variable = {
name = accolade_progress
value = 0
}
random_list = {
10 = { # marauder
trigger = {
any_knight = {
OR = {
can_be_acclaimed = yes
accolade ?= {
accolade_can_have_more_attributes = yes
}
}
knight_army ?= {
location.county ?= scope:county
}
NOT = {
has_trait = compassionate
}
marauder_attribute_trigger = no
}
}
random_knight = {
limit = {
OR = {
can_be_acclaimed = yes
accolade ?= {
accolade_can_have_more_attributes = yes
}
}
knight_army ?= {
location.county ?= scope:county
}
NOT = {
has_trait = compassionate
}
marauder_attribute_trigger = no
}
weight = {
base = 1
modifier = {
add = 60
is_acclaimed = yes
}
modifier = {
add = 30
has_trait = sadistic
}
modifier = {
add = 30
has_trait = callous
}
modifier = {
add = 30
has_trait = wrathful
}
modifier = {
add = 30
has_trait = greedy
}
}
knight_army ?= {
location.county = scope:county
}
NOT = {
has_trait = compassionate
}
marauder_attribute_trigger = no
save_scope_as = marauder
}
send_interface_message = {
type = msg_accolade_eligibility
title = accolade_marauder_unlock.t
left_icon = scope:marauder
right_icon = scope:recipient
custom_tooltip = accolade_marauder_unlock.tt
scope:marauder = {
set_variable = {
name = marauder_attribute_unlock
value = yes
}
}
}
}
random_knight = {
limit = {
OR = {
can_be_acclaimed = yes
accolade ?= {
accolade_can_have_more_attributes = yes
10 = { # besieger
trigger = {
any_knight = {
OR = {
can_be_acclaimed = yes
accolade ?= {
accolade_can_have_more_attributes = yes
}
}
knight_army ?= {
location.county ?= scope:county
any_army_maa_regiment = {
is_unit_type = siege_weapon
}
}
besieger_attribute_trigger = no
}
}
random_knight = {
limit = {
OR = {
can_be_acclaimed = yes
accolade ?= {
accolade_can_have_more_attributes = yes
}
}
knight_army ?= {
location.county ?= scope:county
any_army_maa_regiment = {
is_unit_type = siege_weapon
}
}
besieger_attribute_trigger = no
}
weight = {
base = 1
modifier = {
add = 60
is_acclaimed = yes
}
modifier = {
add = 30
has_trait = calm
}
modifier = {
add = 30
has_trait = patient
}
}
knight_army ?= {
location.county = scope:county
}
NOT = {
has_trait = compassionate
}
marauder_attribute_trigger = no
save_scope_as = besieger
}
weight = {
base = 1
modifier = {
add = 60
is_acclaimed = yes
}
modifier = {
add = 30
has_trait = sadistic
}
modifier = {
add = 30
has_trait = callous
}
modifier = {
add = 30
has_trait = wrathful
}
modifier = {
add = 30
has_trait = greedy
}
send_interface_message = {
type = msg_accolade_eligibility
title = accolade_besieger_unlock.t
left_icon = scope:besieger
right_icon = scope:recipient
custom_tooltip = accolade_besieger_unlock.tt
scope:besieger = {
set_variable = {
name = besieger_attribute_unlock
value = yes
}
}
}
save_scope_as = marauder
}
send_interface_message = {
type = msg_accolade_eligibility
title = accolade_marauder_unlock.t
left_icon = scope:marauder
right_icon = scope:recipient
custom_tooltip = accolade_marauder_unlock.tt
scope:marauder = {
set_variable = {
name = marauder_attribute_unlock
value = yes
}
}
}
}
10 = { # besieger
trigger = {
any_knight = {
OR = {
can_be_acclaimed = yes
accolade ?= {
accolade_can_have_more_attributes = yes
}
}
knight_army ?= {
location.county = scope:county
any_army_maa_regiment = {
is_unit_type = siege_weapon
}
}
besieger_attribute_trigger = no
}
}
random_knight = {
limit = {
OR = {
can_be_acclaimed = yes
accolade ?= {
accolade_can_have_more_attributes = yes
}
}
knight_army ?= {
location.county = scope:county
any_army_maa_regiment = {
is_unit_type = siege_weapon
}
}
besieger_attribute_trigger = no
}
weight = {
base = 1
modifier = {
add = 60
is_acclaimed = yes
}
modifier = {
add = 30
has_trait = calm
}
modifier = {
add = 30
has_trait = patient
}
}
save_scope_as = besieger
}
send_interface_message = {
type = msg_accolade_eligibility
title = accolade_besieger_unlock.t
left_icon = scope:besieger
right_icon = scope:recipient
custom_tooltip = accolade_besieger_unlock.tt
scope:besieger = {
set_variable = {
name = besieger_attribute_unlock
value = yes
}
}
}
}
}
}
}
scope:county = {
if = {
limit = {
holder = {
NOT = { has_perk = enduring_hardships_perk }
NOT = { has_perk = a_mans_home_perk }
}
}
change_county_control = county_control_loss_value
@ -413,7 +429,7 @@ on_siege_completion = {
}
}
}
# If you have the Sacred Destruction tenet get piety/destroy development
# If you have the Sacred Destruction tenet get piety/destroy prosperity
if = {
limit = {
rite = { rite_has_parameter = successful_sieges_give_piety }
@ -509,60 +525,88 @@ on_siege_completion = {
army_commander ?= {
if = {
limit = {
has_trait = military_engineer
is_commanding_army = yes
location.barony = scope:barony
}
add_trait_xp = {
trait = military_engineer
value = {
value = location.fort_level
divide = 2
min = 1
add = {
value = martial
divide = 20
if = {
limit = { has_trait = military_engineer }
add_trait_xp = {
trait = military_engineer
value = {
value = location.fort_level
divide = 2
min = 1
add = {
value = martial
divide = 20
}
}
}
}
if = {
limit = { has_trait = reaver }
add_trait_xp = {
trait = reaver
value = {
value = 0.2
add = {
value = martial
divide = 20
}
}
}
}
if = {
limit = { has_trait = peasant_leader }
add_trait_xp = {
trait = peasant_leader
value = {
value = 0.1
add = {
value = martial
divide = 20
}
}
}
}
}
}
army_commander ?= {
if = {
limit = {
has_trait = reaver
is_commanding_army = yes
location.barony = scope:barony
}
add_trait_xp = {
trait = reaver
value = {
value = 0.2
add = {
value = martial
divide = 20
if = {
limit = {
army_owner = {
government_has_flag = government_has_merit
OR = {
this = root
AND = {
exists = scope:war
is_participant_in_war = scope:war
NOT = { is_at_war_with = root }
}
}
}
}
}
army_commander ?= {
if = {
limit = {
has_trait = peasant_leader
is_commanding_army = yes
}
add_trait_xp = {
trait = peasant_leader
value = {
value = 0.1
add = {
value = martial
divide = 20
}
save_temporary_scope_as = siege_army
army_commander ?= {
if = {
limit = { can_gain_military_career_merit_trigger = yes }
send_interface_message = {
type = msg_siege_effect
title = msg_military_merit_siege_won
left_icon = this
right_icon = scope:barony
change_merit = minor_merit_gain
}
}
}
army_owner = {
every_knight = {
limit = {
knight_army ?= scope:siege_army
can_gain_military_career_merit_trigger = yes
}
change_merit = miniscule_merit_gain
}
}
}
}
}
@ -642,50 +686,60 @@ on_siege_looting = {
}
effect = {
scope:barony.title_province ?= {
# Adventurer Siege replenish
every_army_in_location = {
limit = {
OR = {
AND = {
root = { is_landless_adventurer = yes }
army_owner = root
}
army_owner = {
is_landless_adventurer = yes
is_at_war = yes
any_war_ally = { this = root }
}
}
}
every_army_maa_regiment = {
save_scope_as = sieger
scope:barony = {
title_province ?= {
save_scope_as = siege_province
# Adventurer Siege replenish
every_army_in_location = {
limit = {
maa_current_troops_count < maa_max_troops_count
OR = {
AND = {
root = { is_landless_adventurer = yes }
army_owner = root
}
army_owner = {
is_landless_adventurer = yes
is_at_war = yes
any_war_ally = { this = root }
}
}
}
every_army_maa_regiment = {
limit = { maa_current_troops_count < maa_max_troops_count }
change_maa_troops_count = adventurer_siege_replenish_amount
}
change_maa_troops_count = adventurer_siege_replenish_amount
}
}
# Strict Organization
every_army_in_location = {
limit = {
OR = {
AND = {
root = {
# Strict Organization
every_army_in_location = {
limit = {
OR = {
AND = {
root = {
is_landless_adventurer = yes
has_perk = strict_organization_perk
}
army_owner = root
}
army_owner = {
is_landless_adventurer = yes
has_perk = strict_organization_perk
is_at_war = yes
any_war_ally = { this = root }
}
army_owner = root
}
army_owner = {
is_landless_adventurer = yes
has_perk = strict_organization_perk
is_at_war = yes
any_war_ally = { this = root }
}
}
army_owner.domicile ?= { change_provisions = adventurer_siege_provisions_amount }
}
army_owner = {
domicile ?= { change_provisions = adventurer_siege_provisions_amount }
add_province_modifier = {
modifier = recently_looted_modifier
years = 5
}
}
trade_market = {
add_trade_market_modifier = {
modifier = gdp_market_recently_sieged_capacity_modifier
years = 5
}
}
trade_market = {
@ -705,12 +759,9 @@ on_siege_looting = {
}
}
}
#Gain some gold on top of the siege loot from the Master of Spoils Camp Officer
if = {
limit = {
employs_court_position = master_of_spoils_camp_officer
}
limit = { employs_court_position = master_of_spoils_camp_officer }
add_gold = {
value = court_position:master_of_spoils_camp_officer.aptitude:master_of_spoils_camp_officer
add = 1
@ -762,12 +813,11 @@ on_army_enter_province = {
1 = epidemic_events.1120 # Corpse catapult event
}
effect = {
save_scope_as = army_owner
# Commander trait leveling
scope:army.army_commander ?= {
if = {
limit = {
has_trait = logistician
}
limit = { has_trait = logistician }
add_trait_xp = {
trait = logistician
value = {
@ -780,9 +830,7 @@ on_army_enter_province = {
}
}
if = {
limit = {
has_trait = organizer
}
limit = { has_trait = organizer }
add_trait_xp = {
trait = organizer
value = {
@ -1067,7 +1115,7 @@ on_raid_action_completion = {
if = {
limit = {
holder = {
NOT = { has_perk = enduring_hardships_perk }
NOT = { has_perk = a_mans_home_perk }
}
}
change_county_control = raid_county_control_loss_value
@ -1096,6 +1144,9 @@ on_raid_action_completion = {
}
every_in_list = {
list = raid_targets
limit = {
NOT = { this = scope:raider }
}
send_interface_message = {
type = msg_raid_lost
left_icon = scope:raider