Orthodox bulgarian uprising plus buffs to bulgaria at start
This commit is contained in:
parent
1416a8fffb
commit
fec6e462e2
12 changed files with 755 additions and 4 deletions
|
|
@ -3500,3 +3500,66 @@ remove_regent_cb = {
|
|||
max_defender_score_from_occupation = 150
|
||||
max_attacker_score_from_occupation = 150
|
||||
}
|
||||
|
||||
# Scripted Bulgarian Orthodox uprising. Not available from Declare War.
|
||||
neow_bulgarian_orthodox_uprising_cb = {
|
||||
icon = major_religious_war
|
||||
group = event
|
||||
combine_into_one = yes
|
||||
should_show_war_goal_subview = yes
|
||||
allow_hostages = no
|
||||
allowed_for_character = {}
|
||||
allowed_against_character = {}
|
||||
target_titles = all
|
||||
target_title_tier = kingdom
|
||||
target_top_liege_if_outside_realm = no
|
||||
target_de_jure_regions_above = yes
|
||||
valid_to_start = { always = no }
|
||||
cost = {}
|
||||
should_invalidate = {
|
||||
OR = {
|
||||
scope:defender = {
|
||||
OR = {
|
||||
NEOW_is_broadly_orthodox_trigger = yes
|
||||
NOT = { has_title = title:k_bulgaria }
|
||||
}
|
||||
}
|
||||
war_should_invalidate_defender_lost_target_lands_trigger = yes
|
||||
}
|
||||
}
|
||||
on_declaration = { on_declared_war = yes }
|
||||
on_victory_desc = neow_bulgarian_uprising_victory_desc
|
||||
on_victory = {
|
||||
on_victory_aggressive_war_effect = yes
|
||||
neow_bulgarian_uprising_victory_effect = yes
|
||||
}
|
||||
on_defeat_desc = neow_bulgarian_uprising_defeat_desc
|
||||
on_defeat = {
|
||||
on_defeat_aggressive_war_effect = yes
|
||||
neow_bulgarian_uprising_defeat_effect = yes
|
||||
}
|
||||
on_white_peace_desc = neow_bulgarian_uprising_white_peace_desc
|
||||
on_white_peace = {
|
||||
on_white_peace_effect = yes
|
||||
scope:attacker = { neow_cleanup_bulgarian_uprising_title_effect = yes }
|
||||
set_global_variable = { name = neow_bulgarian_uprising_has_occurred value = yes }
|
||||
remove_global_variable = neow_bulgarian_uprising_active
|
||||
}
|
||||
on_invalidated_desc = neow_bulgarian_uprising_white_peace_desc
|
||||
on_invalidated = {
|
||||
scope:attacker = { neow_cleanup_bulgarian_uprising_title_effect = yes }
|
||||
set_global_variable = { name = neow_bulgarian_uprising_has_occurred value = yes }
|
||||
remove_global_variable = neow_bulgarian_uprising_active
|
||||
}
|
||||
transfer_behavior = transfer
|
||||
on_primary_attacker_death = invalidate
|
||||
on_primary_defender_death = inherit
|
||||
attacker_allies_inherit = yes
|
||||
defender_allies_inherit = yes
|
||||
war_name = "neow_bulgarian_uprising_war_name"
|
||||
war_name_base = "neow_bulgarian_uprising_war_name"
|
||||
cb_name = "neow_bulgarian_orthodox_uprising_cb"
|
||||
interface_priority = 100
|
||||
use_de_jure_wargoal_only = yes
|
||||
attacker_wargoal_percentage = 0.8
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4711,3 +4711,59 @@ NEOW_debug_annex_world_decision = {
|
|||
ai_potential = { always = no }
|
||||
ai_will_do = { base = 0 }
|
||||
}
|
||||
|
||||
NEOW_support_bulgarian_uprising_decision = {
|
||||
picture = { reference = "gfx/interface/illustrations/decisions/decision_destiny_goal.dds" }
|
||||
desc = NEOW_support_bulgarian_uprising_decision_desc
|
||||
selection_tooltip = NEOW_support_bulgarian_uprising_decision_tooltip
|
||||
decision_group_type = major
|
||||
ai_check_interval_by_tier = { barony = 0 county = 0 duchy = 0 kingdom = 0 empire = 120 hegemony = 120 }
|
||||
is_shown = {
|
||||
has_title = title:e_nistrenia
|
||||
NEOW_is_broadly_orthodox_trigger = yes
|
||||
title:k_bulgaria = { is_title_created = yes }
|
||||
NOT = { has_global_variable = neow_bulgarian_uprising_active }
|
||||
NOT = { has_global_variable = neow_bulgarian_uprising_has_occurred }
|
||||
}
|
||||
is_valid = {
|
||||
custom_tooltip = {
|
||||
text = NEOW_support_bulgarian_uprising_eligible_tt
|
||||
title:k_bulgaria.holder ?= {
|
||||
neow_bulgarian_uprising_eligible_trigger = yes
|
||||
}
|
||||
}
|
||||
custom_tooltip = {
|
||||
text = NEOW_support_bulgarian_uprising_range_tt
|
||||
title:k_bulgaria.holder ?= { in_diplomatic_range = root }
|
||||
}
|
||||
}
|
||||
is_valid_showing_failures_only = {
|
||||
is_capable_adult = yes
|
||||
is_imprisoned = no
|
||||
is_at_war = no
|
||||
}
|
||||
cost = { gold = 500 piety = 1000 prestige = 1000 }
|
||||
effect = {
|
||||
custom_tooltip = NEOW_support_bulgarian_uprising_decision_effect_tooltip
|
||||
hidden_effect = {
|
||||
save_scope_as = neow_uprising_emperor
|
||||
title:k_bulgaria.holder = { neow_start_bulgarian_uprising_effect = yes }
|
||||
}
|
||||
}
|
||||
ai_potential = { always = yes }
|
||||
ai_will_do = {
|
||||
base = 20
|
||||
modifier = { factor = 3 has_trait = zealous }
|
||||
modifier = { factor = 2 has_trait = brave }
|
||||
modifier = { factor = 1.5 has_trait = ambitious }
|
||||
modifier = { factor = 1.5 has_trait = just }
|
||||
modifier = { factor = 1.25 has_trait = compassionate }
|
||||
modifier = { factor = 1.25 has_trait = generous }
|
||||
modifier = { factor = 0.15 has_trait = cynical }
|
||||
modifier = { factor = 0.1 has_trait = craven }
|
||||
modifier = { factor = 0.5 has_trait = greedy }
|
||||
modifier = { factor = 0.4 has_trait = lazy }
|
||||
modifier = { factor = 0.6 has_trait = content }
|
||||
modifier = { factor = 0.8 has_trait = calm }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,4 +7,13 @@
|
|||
#Yearly Events
|
||||
10 = NEOW_yearly_flavor_events.0021 # 0021 - Cherrymas (Cherry Blossoms)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Independent yearly roll, not weighted against unrelated flavour events.
|
||||
NEOW_bulgarian_uprising_pulse = {
|
||||
trigger = { neow_bulgarian_uprising_eligible_trigger = yes }
|
||||
random_events = {
|
||||
chance_to_happen = 5
|
||||
100 = NEOW_yearly_flavor_events.0100
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2869,6 +2869,7 @@ random_yearly_playable_pulse = {
|
|||
delay = { days = { 45 75 } }
|
||||
on_yearly_common_events
|
||||
NEOW_restoration_flavour_pulse
|
||||
NEOW_bulgarian_uprising_pulse
|
||||
delay = { days = { 50 80 } }
|
||||
on_yearly_invisible_events
|
||||
delay = { days = { 85 165 } }
|
||||
|
|
|
|||
|
|
@ -1798,3 +1798,268 @@ neow_great_schism_invite_catholics_effect = {
|
|||
trigger_event = NEOW_religious_decision.0292
|
||||
}
|
||||
}
|
||||
|
||||
# Called in the Bulgarian ruler's scope. Early intervention optionally supplies an emperor scope.
|
||||
neow_start_bulgarian_uprising_effect = {
|
||||
save_scope_as = neow_uprising_defender
|
||||
random_sub_realm_county = {
|
||||
limit = { neow_bulgarian_unhappy_orthodox_county_trigger = yes }
|
||||
save_scope_as = neow_uprising_county
|
||||
}
|
||||
if = {
|
||||
limit = {
|
||||
exists = scope:neow_uprising_county
|
||||
neow_bulgarian_uprising_eligible_trigger = yes
|
||||
}
|
||||
# The uprising always claims the Kingdom of Bulgaria, never the local lord's title.
|
||||
create_character = {
|
||||
location = scope:neow_uprising_county.title_province
|
||||
template = peasant_faction_leader_template
|
||||
dynasty = generate
|
||||
culture = culture:NEOW_bulgarian
|
||||
faith = scope:neow_uprising_county.faith
|
||||
rite = scope:neow_uprising_county.rite
|
||||
gender_female_chance = 0
|
||||
save_scope_as = neow_uprising_leader
|
||||
}
|
||||
scope:neow_uprising_leader = {
|
||||
set_character_rite = scope:neow_uprising_county.rite
|
||||
add_gold = 100
|
||||
# Use the native playable landless camp title, not an ordinary titular duchy.
|
||||
save_scope_as = new_landless_adventurer
|
||||
create_adventurer_title = {
|
||||
name = neow_bulgarian_uprising_title
|
||||
holder = scope:neow_uprising_leader
|
||||
save_scope_as = neow_uprising_temporary_title
|
||||
}
|
||||
set_landless_adventurer_government_type_effect = yes
|
||||
}
|
||||
scope:neow_uprising_temporary_title = {
|
||||
set_no_automatic_claims = yes
|
||||
set_can_be_named_after_dynasty = no
|
||||
}
|
||||
scope:neow_uprising_leader = {
|
||||
set_variable = { name = neow_uprising_temporary_title value = scope:neow_uprising_temporary_title }
|
||||
start_war = {
|
||||
casus_belli = neow_bulgarian_orthodox_uprising_cb
|
||||
target = scope:neow_uprising_defender
|
||||
target_title = title:k_bulgaria
|
||||
}
|
||||
random_character_war = {
|
||||
limit = {
|
||||
using_cb = neow_bulgarian_orthodox_uprising_cb
|
||||
primary_attacker = scope:neow_uprising_leader
|
||||
primary_defender = scope:neow_uprising_defender
|
||||
}
|
||||
save_scope_as = neow_uprising_war
|
||||
}
|
||||
}
|
||||
if = {
|
||||
limit = { exists = scope:neow_uprising_war }
|
||||
set_global_variable = { name = neow_bulgarian_uprising_active value = scope:neow_uprising_leader }
|
||||
# Permanent campaign lock, even if the war later ends inconclusively.
|
||||
set_global_variable = { name = neow_bulgarian_uprising_has_occurred value = yes }
|
||||
scope:neow_uprising_leader = {
|
||||
spawn_army = {
|
||||
name = neow_bulgarian_uprising_army
|
||||
levies = 333
|
||||
location = scope:neow_uprising_county.title_province
|
||||
war = scope:neow_uprising_war
|
||||
inheritable = no
|
||||
}
|
||||
}
|
||||
every_sub_realm_county = {
|
||||
limit = { neow_bulgarian_unhappy_orthodox_county_trigger = yes }
|
||||
save_temporary_scope_as = neow_uprising_recruitment_county
|
||||
scope:neow_uprising_leader = {
|
||||
spawn_army = {
|
||||
name = neow_bulgarian_uprising_army
|
||||
levies = { value = scope:neow_uprising_recruitment_county.county_levies_to_raise add = 500 }
|
||||
location = scope:neow_uprising_recruitment_county.title_province
|
||||
war = scope:neow_uprising_war
|
||||
inheritable = no
|
||||
}
|
||||
}
|
||||
}
|
||||
trigger_event = NEOW_yearly_flavor_events.0101
|
||||
if = {
|
||||
limit = { exists = scope:neow_uprising_emperor }
|
||||
scope:neow_uprising_war = { add_attacker = scope:neow_uprising_emperor }
|
||||
scope:neow_uprising_leader = { add_gold = 500 }
|
||||
scope:neow_uprising_emperor = { trigger_event = NEOW_yearly_flavor_events.0105 }
|
||||
}
|
||||
every_ruler = {
|
||||
limit = {
|
||||
is_landed = yes
|
||||
NEOW_is_broadly_orthodox_trigger = yes
|
||||
in_diplomatic_range = scope:neow_uprising_defender
|
||||
this != scope:neow_uprising_leader
|
||||
OR = {
|
||||
NOT = { exists = scope:neow_uprising_emperor }
|
||||
this != scope:neow_uprising_emperor
|
||||
}
|
||||
}
|
||||
trigger_event = NEOW_yearly_flavor_events.0102
|
||||
}
|
||||
}
|
||||
else = {
|
||||
# Do not leave a phantom uprising or a temporary title after failed declarations.
|
||||
scope:neow_uprising_leader = { neow_cleanup_bulgarian_uprising_title_effect = yes }
|
||||
if = {
|
||||
limit = { exists = scope:neow_uprising_emperor }
|
||||
scope:neow_uprising_emperor = { add_gold = 500 add_piety = 750 add_prestige = 750 }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
neow_cleanup_bulgarian_uprising_title_effect = {
|
||||
save_temporary_scope_as = neow_uprising_cleanup_holder
|
||||
if = {
|
||||
limit = { exists = var:neow_uprising_temporary_title }
|
||||
var:neow_uprising_temporary_title = { save_temporary_scope_as = neow_uprising_title_cleanup }
|
||||
remove_variable = neow_uprising_temporary_title
|
||||
if = {
|
||||
limit = { scope:neow_uprising_title_cleanup = { is_title_created = yes holder = scope:neow_uprising_cleanup_holder } }
|
||||
destroy_title = scope:neow_uprising_title_cleanup
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Broadcast after the war, with no expired war scope needed by the notifications.
|
||||
neow_bulgarian_uprising_victory_effect = {
|
||||
scope:attacker = { save_scope_as = neow_uprising_leader }
|
||||
scope:defender = { save_scope_as = neow_uprising_defender }
|
||||
# Remember the old capital and direct vassals before the old ruler loses their titles.
|
||||
scope:defender = {
|
||||
capital_county ?= { save_scope_as = neow_uprising_victory_capital }
|
||||
every_vassal = {
|
||||
limit = { highest_held_title_tier >= tier_county }
|
||||
add_to_list = neow_uprising_victory_vassals
|
||||
}
|
||||
}
|
||||
# First transfer actual land. A landless adventurer cannot receive vassals normally.
|
||||
create_title_and_vassal_change = {
|
||||
type = conquest
|
||||
save_scope_as = neow_uprising_victory_change
|
||||
add_claim_on_loss = yes
|
||||
}
|
||||
scope:defender = {
|
||||
every_held_title = {
|
||||
limit = { tier >= tier_county is_landless_type_title = no this != title:d_stratocratic_hof }
|
||||
change_title_holder = { holder = scope:attacker change = scope:neow_uprising_victory_change take_baronies = yes }
|
||||
}
|
||||
}
|
||||
resolve_title_and_vassal_change = scope:neow_uprising_victory_change
|
||||
# A ruler with only a titular higher title may have had no personal county.
|
||||
# Ensure the victor has a county before moving out of the camp government.
|
||||
if = {
|
||||
limit = {
|
||||
scope:attacker = { NOT = { any_held_title = { tier = tier_county } } }
|
||||
exists = scope:neow_uprising_victory_capital
|
||||
}
|
||||
create_title_and_vassal_change = {
|
||||
type = conquest
|
||||
save_scope_as = neow_uprising_capital_change
|
||||
add_claim_on_loss = yes
|
||||
}
|
||||
scope:neow_uprising_victory_capital = {
|
||||
change_title_holder = { holder = scope:attacker change = scope:neow_uprising_capital_change take_baronies = yes }
|
||||
}
|
||||
resolve_title_and_vassal_change = scope:neow_uprising_capital_change
|
||||
}
|
||||
scope:attacker = {
|
||||
if = {
|
||||
limit = { any_held_title = { tier = tier_county } }
|
||||
# Establish a normal landed government and a permanent primary title.
|
||||
if = {
|
||||
limit = { has_realm_law = landless_adventurer_succession_law }
|
||||
remove_realm_law = landless_adventurer_succession_law
|
||||
}
|
||||
assign_feudal_governments_effect = yes
|
||||
if = {
|
||||
limit = { has_title = title:k_bulgaria }
|
||||
set_primary_title_to = title:k_bulgaria
|
||||
}
|
||||
if = {
|
||||
limit = { scope:neow_uprising_victory_capital.holder ?= this }
|
||||
set_realm_capital = scope:neow_uprising_victory_capital
|
||||
}
|
||||
}
|
||||
}
|
||||
# Now transfer the former ruler's vassals to the landed victor.
|
||||
create_title_and_vassal_change = {
|
||||
type = conquest
|
||||
save_scope_as = neow_uprising_vassal_change
|
||||
add_claim_on_loss = yes
|
||||
}
|
||||
every_in_list = {
|
||||
list = neow_uprising_victory_vassals
|
||||
limit = {
|
||||
is_landed = yes
|
||||
this != scope:attacker
|
||||
highest_held_title_tier < scope:attacker.highest_held_title_tier
|
||||
NOT = { liege ?= scope:attacker }
|
||||
}
|
||||
change_liege = { liege = scope:attacker change = scope:neow_uprising_vassal_change }
|
||||
}
|
||||
resolve_title_and_vassal_change = scope:neow_uprising_vassal_change
|
||||
hidden_effect = {
|
||||
faith:stratocratic_faith = { remove_religious_head_title = yes }
|
||||
}
|
||||
if = {
|
||||
limit = { title:d_stratocratic_hof = { is_title_created = yes } }
|
||||
scope:attacker = { destroy_title = title:d_stratocratic_hof }
|
||||
}
|
||||
scope:attacker = {
|
||||
# Only remove the camp once the victor holds Bulgaria and a playable county.
|
||||
if = {
|
||||
limit = {
|
||||
has_title = title:k_bulgaria
|
||||
any_held_title = { tier = tier_county }
|
||||
}
|
||||
neow_cleanup_bulgarian_uprising_title_effect = yes
|
||||
}
|
||||
add_piety = 500
|
||||
add_prestige = 500
|
||||
trigger_event = NEOW_yearly_flavor_events.0103
|
||||
}
|
||||
every_ruler = {
|
||||
limit = {
|
||||
is_landed = yes
|
||||
NEOW_is_broadly_orthodox_trigger = yes
|
||||
in_diplomatic_range = scope:neow_uprising_leader
|
||||
this != scope:neow_uprising_leader
|
||||
}
|
||||
trigger_event = NEOW_yearly_flavor_events.0106
|
||||
}
|
||||
set_global_variable = { name = neow_bulgarian_uprising_has_occurred value = yes }
|
||||
remove_global_variable = neow_bulgarian_uprising_active
|
||||
}
|
||||
|
||||
neow_bulgarian_uprising_defeat_effect = {
|
||||
scope:attacker = { save_scope_as = neow_uprising_leader }
|
||||
scope:defender = {
|
||||
save_scope_as = neow_uprising_defender
|
||||
faith = { save_scope_as = neow_uprising_defender_faith }
|
||||
rite = { save_scope_as = neow_uprising_defender_rite }
|
||||
every_sub_realm_county = {
|
||||
limit = { neow_bulgarian_orthodox_county_trigger = yes }
|
||||
set_county_faith = scope:neow_uprising_defender_faith
|
||||
set_county_rite = scope:neow_uprising_defender_rite
|
||||
}
|
||||
trigger_event = NEOW_yearly_flavor_events.0107
|
||||
}
|
||||
every_ruler = {
|
||||
limit = {
|
||||
is_landed = yes
|
||||
NEOW_is_broadly_orthodox_trigger = yes
|
||||
in_diplomatic_range = scope:neow_uprising_defender
|
||||
this != scope:neow_uprising_leader
|
||||
}
|
||||
trigger_event = NEOW_yearly_flavor_events.0104
|
||||
}
|
||||
scope:attacker = { neow_cleanup_bulgarian_uprising_title_effect = yes }
|
||||
set_global_variable = { name = neow_bulgarian_uprising_has_occurred value = yes }
|
||||
remove_global_variable = neow_bulgarian_uprising_active
|
||||
}
|
||||
|
|
|
|||
|
|
@ -255,3 +255,34 @@ neow_western_clerical_region_merge_trigger = {
|
|||
this = title:d_et_neow_ljubljana
|
||||
}
|
||||
}
|
||||
|
||||
# Bulgarian Orthodox rising (county and ruler scopes respectively).
|
||||
neow_bulgarian_orthodox_county_trigger = {
|
||||
culture = culture:NEOW_bulgarian
|
||||
NEOW_is_broadly_orthodox_trigger = yes
|
||||
}
|
||||
neow_bulgarian_unhappy_orthodox_county_trigger = {
|
||||
neow_bulgarian_orthodox_county_trigger = yes
|
||||
popular_opinion < 0
|
||||
}
|
||||
neow_bulgarian_uprising_eligible_trigger = {
|
||||
# Only the actual King of Bulgaria receives the yearly uprising roll.
|
||||
has_title = title:k_bulgaria
|
||||
is_landed = yes
|
||||
is_ruler = yes
|
||||
culture = culture:NEOW_bulgarian
|
||||
NEOW_is_broadly_orthodox_trigger = no
|
||||
NOT = { has_global_variable = neow_bulgarian_uprising_active }
|
||||
NOT = { has_global_variable = neow_bulgarian_uprising_has_occurred }
|
||||
any_held_title = { tier >= tier_county is_landless_type_title = no }
|
||||
any_sub_realm_county = { neow_bulgarian_unhappy_orthodox_county_trigger = yes }
|
||||
}
|
||||
neow_bulgarian_uprising_join_trigger = {
|
||||
exists = scope:neow_uprising_war
|
||||
scope:neow_uprising_war = {
|
||||
NOR = { is_attacker = root is_defender = root }
|
||||
NOT = { any_war_participant = { is_at_war_with = root } }
|
||||
}
|
||||
NOT = { is_at_war_with = scope:neow_uprising_leader }
|
||||
is_landed = yes
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue