updated many files

This commit is contained in:
Magpie490 2025-12-01 22:17:44 +00:00
parent 4cc6037fcb
commit 655c28dc22
10 changed files with 29180 additions and 0 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,440 @@
### MINISTER OF PERSONNEL
task_manage_talent = {
default_task = yes
position = minister_personnel
task_type = task_type_general
task_progress = task_progress_infinite
asset = {
icon = "gfx/interface/icons/council_task_types/task_manage_talent.dds"
background = "gfx/interface/buttons/button_round_bg.dds"
frame = "gfx/interface/buttons/button_round_frame.dds"
glow = "gfx/particles/halo.dds"
}
effect_desc = {
### Find characters tooltip
desc = task_manage_talent_character_effect_desc
# Disciples tooltip
triggered_desc = {
trigger = {
num_of_relation_disciple > 0
}
desc = task_manage_talent_effect_desc_disciple_bonus
}
# Bureaucrats tooltip
triggered_desc = {
trigger = {
councillor_liege_has_erudition_legacy_5_perk = yes
}
desc = task_manage_talent_effect_desc_bureaucrats_bonus
}
# Family Business tooltip
triggered_desc = {
trigger = {
councillor_liege_has_family_business_bonus = yes
}
desc = task_manage_talent_effect_desc_family_business_bonus
}
### Opinion
desc = task_manage_talent_opinion_effect_desc
# Disciples tooltip
triggered_desc = {
trigger = {
num_of_relation_disciple > 0
}
desc = task_manage_talent_opinion_effect_desc_disciple_bonus
}
# Bureaucrats tooltip
triggered_desc = {
trigger = {
councillor_liege_has_erudition_legacy_5_perk = yes
}
desc = task_manage_talent_opinion_effect_desc_bureaucrats_bonus
}
# Family Business tooltip
triggered_desc = {
trigger = {
councillor_liege_has_family_business_bonus = yes
}
desc = task_manage_talent_opinion_effect_desc_family_business_bonus
}
}
on_start_task = {
}
on_cancel_task = {
}
# Prestige Gain + Modifiers
council_owner_modifier = {
name = task_manage_talent
courtier_and_guest_opinion = 1
scale = task_manage_talent_opinion_total_scale_value
}
monthly_on_action = tgp_minister_manage_talent_on_action
ai_will_do = {
value = 1 # Always a good backup
if = {
limit = { court_positions_currently_filled < 10 }
add = 500
}
}
}
task_bestow_royal_favor_minister_of_personnel = {
position = minister_personnel
clone = task_bestow_royal_favor
}
### MINISTER OF RITES
task_culture_minister = {
position = councillor_court_chaplain
clone = task_kurultai_culture_1
}
### MINISTER OF JUSTICE
task_justify_rule = {
default_task = yes
position = minister_justice
task_type = task_type_general
task_progress = task_progress_infinite
asset = {
icon = "gfx/interface/icons/council_task_types/task_justify_rule.dds"
background = "gfx/interface/buttons/button_round_bg.dds"
frame = "gfx/interface/buttons/button_round_frame.dds"
glow = "gfx/particles/halo.dds"
}
effect_desc = {
### Legitimacy gain
desc = task_justify_rule_effect_desc
# Disciples tooltip
triggered_desc = {
trigger = {
num_of_relation_disciple > 0
}
desc = task_justify_rule_effect_desc_disciple_bonus
}
# Bureaucrats tooltip
triggered_desc = {
trigger = {
councillor_liege_has_erudition_legacy_5_perk = yes
}
desc = task_justify_rule_effect_desc_bureaucrats_bonus
}
# Family Business tooltip
triggered_desc = {
trigger = {
councillor_liege_has_family_business_bonus = yes
}
desc = task_justify_rule_effect_desc_family_business_bonus
}
### Tyranny reduction
desc = task_justify_rule_tyranny_effect_desc
# Disciples tooltip
triggered_desc = {
trigger = {
num_of_relation_disciple > 0
}
desc = task_justify_rule_tyranny_effect_desc_disciple_bonus
}
# Bureaucrats tooltip
triggered_desc = {
trigger = {
councillor_liege_has_erudition_legacy_5_perk = yes
}
desc = task_justify_rule_tyranny_effect_desc_bureaucrats_bonus
}
# Family Business tooltip
triggered_desc = {
trigger = {
councillor_liege_has_family_business_bonus = yes
}
desc = task_justify_rule_tyranny_effect_desc_family_business_bonus
}
}
council_owner_modifier = {
name = task_justify_rule
legitimacy_gain_mult = 0.01
scale = task_justify_rule_total_scale_value
}
council_owner_modifier = {
name = task_justify_rule
tyranny_loss_mult = 0.01
scale = task_justify_rule_tyranny_total_scale_value
}
monthly_on_action = task_domestic_affairs_side_effects
on_monthly = {
if = {
limit = {
current_month = 1
liege = { tyranny > 0 }
}
liege = {
add_tyranny = task_justify_rule_tyranny_total_scale_value
}
}
}
ai_will_do = {
value = 1 # Always a good backup
if = { # Get rid of tyranny
limit = {
scope:councillor_liege = {
OR = {
AND = { # Somewhat rational characters prefer this
ai_rationality > -25
NOT = { has_trait = arrogant }
tyranny >= 5
}
AND = { # If you're arrogant or deeply irrational, it'll take a long time for you to realize
OR = {
ai_rationality <= -25
has_trait = arrogant
}
tyranny >= 15
}
}
}
}
add = 500
}
}
}
task_fabricate_claim_minister_of_rites = {
position = minister_justice
clone = task_fabricate_claim
}
### MINISTER OF WORKS
task_great_projects = {
default_task = yes
position = minister_works
task_type = task_type_general
task_progress = task_progress_infinite
asset = {
icon = "gfx/interface/icons/council_task_types/task_great_project.dds"
background = "gfx/interface/buttons/button_round_bg.dds"
frame = "gfx/interface/buttons/button_round_frame.dds"
glow = "gfx/particles/halo.dds"
}
effect_desc = {
desc = task_great_projects_effect_desc
# Disciples tooltip
triggered_desc = {
trigger = {
num_of_relation_disciple > 0
}
desc = task_great_projects_effect_desc_disciple_bonus
}
# Bureaucrats tooltip
triggered_desc = {
trigger = {
councillor_liege_has_erudition_legacy_5_perk = yes
}
desc = task_great_projects_erudition_bonus_desc
}
# Family Business tooltip
triggered_desc = {
trigger = {
councillor_liege_has_family_business_bonus = yes
}
desc = task_great_projects_family_business_bonus_desc
}
desc = {
desc = council_task_possible_side_effects
triggered_desc = {
trigger = {
stewardship > mediocre_skill_rating
}
desc = task_collect_taxes_extra_taxes
}
triggered_desc = {
trigger = {
stewardship < high_skill_rating
liege = {
any_sub_realm_county = {
steward_task_county_corruption_county_trigger = yes
}
}
}
desc = task_collect_taxes_county_corruption
}
}
}
council_owner_modifier = {
name = task_collect_taxes_modifier
great_project_build_speed = -0.05
scale = task_great_projects_total_scale_value
}
monthly_on_action = task_collect_taxes_side_effects
ai_will_do = {
value = 1 # Always a good backup
if = { # Very greedy rulers prefer this over increasing Acceptance, in most cases
limit = {
scope:councillor_liege.ai_greed > 0
}
add = {
value = scope:councillor_liege.ai_greed
divide = 5
}
}
if = {
# Wealth Focused characters like this
limit = {
scope:councillor_liege = {
has_focus = stewardship_wealth_focus
}
}
add = 15
}
if = {
# And those with the Tax Man perk
limit = {
scope:councillor_liege = {
has_perk = tax_man_perk
}
}
add = 15
}
if = {
limit = {
scope:councillor_liege.primary_title.tier >= tier_duchy
scope:councillor_liege.gold < 100
}
add = 500
}
else_if = {
limit = {
scope:councillor_liege.gold < 10
}
add = 500
}
if = { # Conquerors want more money
limit = {
scope:councillor_liege = {
has_variable = conqueror
}
}
add = 500
}
}
}
task_develop_county_minister_of_works = {
position = minister_works
clone = task_develop_county
}
### GRAND MARSHAL
task_lead_troops = {
default_task = yes
position = minister_grand_marshal
task_type = task_type_general
task_progress = task_progress_infinite
asset = {
icon = "gfx/interface/icons/council_task_types/task_lead_troops.dds"
background = "gfx/interface/buttons/button_round_bg.dds"
frame = "gfx/interface/buttons/button_round_frame.dds"
glow = "gfx/particles/halo.dds"
}
is_shown = {
scope:councillor_liege = { tgp_has_access_to_ministry_trigger = yes }
}
effect_desc = {
### Additive command modifiers
desc = task_lead_troops_effect_desc
desc = task_lead_troops_effect_martial_bonus
# Disciples tooltip
triggered_desc = {
trigger = {
num_of_relation_disciple > 0
}
desc = task_lead_troops_effect_disciple_bonus
}
# Bureaucrats tooltip
triggered_desc = {
trigger = {
councillor_liege_has_erudition_legacy_5_perk = yes
}
desc = task_lead_troops_effect_erudition_bonus_desc
}
# Family Business tooltip
triggered_desc = {
trigger = {
councillor_liege_has_family_business_bonus = yes
}
desc = task_lead_troops_effect_family_business_bonus_desc
}
### Multiplicative command modifiers
desc = task_lead_troops_mult_effect_desc
desc = task_lead_troops_mult_effect_martial_bonus
# Disciples tooltip
triggered_desc = {
trigger = {
num_of_relation_disciple > 0
}
desc = task_lead_troops_mult_effect_disciple_bonus
}
# Bureaucrats tooltip
triggered_desc = {
trigger = {
councillor_liege_has_erudition_legacy_5_perk = yes
}
desc = task_lead_troops_mult_effect_erudition_bonus_desc
}
# Family Business tooltip
triggered_desc = {
trigger = {
councillor_liege_has_family_business_bonus = yes
}
desc = task_lead_troops_mult_effect_family_business_bonus_desc
}
}
# Percentaged based modifiers
councillor_modifier = {
name = minister_grand_marshal_modifier
hard_casualty_modifier = -0.01
enemy_hard_casualty_modifier = 0.01
#maa_damage_mult = 0.01
#maa_pursuit_add = 1
advantage = 1
scale = task_lead_troops_total_scale_value
}
monthly_on_action = organize_the_levies_marshal_task_side_effects
ai_will_do = {
value = 1 # Always a good backup
}
}
task_train_commanders_grand_marshal = {
position = minister_grand_marshal
clone = task_train_commanders
}

View file

@ -0,0 +1,85 @@
name_of_the_task = {
default_task = yes #Is the defualt task for the specified position (no by default, only applicable on task_type_general with task_progress_infinite)
position = councillor_chancellor #Position that can perform this task (positions can be found in common/council_positions)
task_type = task_type_general #Type of the task [task_type_general|task_type_county|task_type_court]
county_target = all|realm|etc #What can a county task target? Not relevant for other task-types. Valid: all, realm, domain, neighbor_land, neighbor_land_or_water. neighbor_land_or_water only works for the AI
ai_county_target = as above #What can a county task target for the AI? Not relevant for other task-types. If not set, defaults to what you set for the county_target. You might want this more restrictive for performance reasons
ai_target_score = { ... } # Script value for county target scores. Defaults to completely random if not set. Scopes are the same as all other council task script. Score of 0 or below means "don't do this". AI picks weighted random from all targets with a score above 0
task_progress = task_progress_infinite #Type of the progress task [task_progress_infinite|task_progress_percentage|task_progress_value]
task_current_value = script_value #When using task_progress_value, this defines the current progress
task_max_value = script_value #When using task_progress_value, this defines the max progress; the point at which the task is considered complete
restart_on_finish = no #Should the task restart once is finished automatically?
highlight_own_realm = yes #Own realm counties will have a slightly different color from other-realm counties
# Which visual assets should this Council Task use? Multiple assets may be scripted. First valid asset will be chosen.
asset = {
# Trigger for when to pick this asset over another, remove trigger to make this the default asset
# root = liege owning the council
trigger = { ... }
# Path to the central icon texture
icon = "path/to/image.dds"
# Path to background texture shown behind the icon
background = "path/to/image.dds"
# Path to frame texture shown around the icon
frame = "path/to/image.dds"
# Path to the glow emitted when this task is selected
glow = "path/to/image.dds"
}
councillor_modifier = { } #Modifier applied to the councillor while performing this task. Can take a "scale" parameter to scale by (a script value; see _script_values.info). Scopes are the same as for valid_character. You can define more than one of these if you need multiple scaling factors
council_owner_modifier = { }#Modifier applied to the council owner when the councillor is performing this task. Can take a "scale" parameter to scale by (a script value; see _script_values.info). Scopes are the same as for valid_character. You can define more than one of these if you need multiple scaling factors
county_modifier = { } #Modifier applied to the county where this task is being performed. Can take a "scale" parameter to scale by (a script value; see _script_values.info). Scopes are the same as for valid_county. You can define more than one of these if you need multiple scaling factors
# In the below, root is the councillor. Also saved as scope:councillor, and scope:councillor_liege is the councillor's liege
is_shown = { } #Check if the task is shown for the COUNCILLOR character. Task will stop if this is at any time false. This task will not be visible at all.
is_valid_showing_failures_only = { } #Check if the task is valid for the COUNCILLOR character. Otherwise the task will be grayed out showing the reason(s).
on_start_task = { } #Effect when the task starts
on_finish_task = { } #effect when the task finishes
on_cancel_task = { } #effect when the task is cancelled
on_monthly = { } #effect once a month while task is active
monthly_on_action = key #This on-action will be fired once a month. It is delayed 1 to 30 days to ensure it doesn't keep falling on the same day. Using this is more performant than firing an on-action from on_monthly. For province and court tasks, it'll provide those scopes too (as outlined below). It will not fire in the first 30 days after a task starts or its councillor is switched out
# In the below, scopes are the same as for valid_targets, except with the addition of scope:province, representing the capital province of the county, and scope:county representing the county title
potential_county = { } #check if the county scope is valid. Task will stop if this is at any time false
valid_county = { } #check if the county scope is valid
on_start_task_county = { } #effect when the task is starts
on_finish_task_county = { } #effect when the task finishes
on_cancel_task_county = { } #effect when the task is cancelled
on_monthly_county = { } #effect once a month while task is active
# In the below, scopes are the same as for valid_targets, except with the addition of scope:target_character, representing the character being targeted
potential_target_court = { }#check if the court scope is valid. Task will stop if this is at any time false
valid_target_court = { } #check if the court scope is valid
on_start_task_court = { } #effect when the task is starts
on_finish_task_court = { } #effect when the task finishes
on_cancel_task_court = { } #effect when the task is cancelled
on_monthly_court = { } #effect once a month while task is active
progress = { # For task_progress_percentage, how fast it progresses. Scope is councillor for global tasks. Same scopes as the count effects for county tasks. Rate is applied daily, scaled down by a factor of 30. It is presented in the UI as monthly despite days per month deviating slightly from 30
# For task_progress_value, this can be used to communicate to the player. The value can also be obtained in script using council_task_monthly_progress on the councillor
base = 1
modifier = {
add = 1
always = yes
desc = some_loc_key
}
}
full_progres = some_script_value/math # Some tasks just affect an existing process, such as development. Use this to obtain/calculate the full progress rate of that task. For tooltips and ETAs, that value will be used as the overall progress. In the progress rate breakdown for the task, that value minus the value provided by the task itself will be listed under the entry COUNCIL_TASK_OTHER_SOURCES. If you use this MAKE SURE that you actually apply everything that affects progress to the underlying value. E.G., for county control, make sure to have county_modifier that applies the county control gain
custom_other_loc = some_loc_key # This loc key replaces the COUNCIL_TASK_OTHER_SOURCES line in the progress breakdown
effect_desc = { # Dynamic description for effect description. Scopes based on task type. To add the modifier effects, you can do stuff like this [councillor.GetModifierDescForTask('task_foreign_affairs')]
}
# you can define a task that completely clones another one. They will share loc, triggers, effects but can be defined for different court positions.
# If you define a task as clone of another one:
# * the cloned task must be filled out (you cannot build clone chains where A clones B and B clones C)
# * you cannot redefine anything else than the court position, and that field MUST be redefined.
clone = other_task
}
== Related loc ==
The key of the task will be used as its name.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,664 @@
tribute_mission_clean_up_variables_effect = {
remove_variable = tribute_mission_target_scope
remove_variable = offered_gold_value
remove_variable = tribute_mission_type
remove_variable = offered_herd_value
remove_variable = offered_concubine
remove_variable = offered_eunuch
remove_variable = offered_artifact
remove_variable = tribute_reward_fascination_progress
if = {
limit = {
has_character_flag = tribute_mission_character_flag # Under select circumstances it's possible this will be rerun, so this avoids an error
}
remove_character_flag = tribute_mission_character_flag
}
if = {
limit = { exists = scope:receiving_character }
scope:receiving_character = {
if = {
limit = { has_character_flag = created_attendant }
silent_disappearance_effect = yes
}
}
}
}
tribute_mission_clean_up_request_variables_effect = {
remove_variable = requested_tribute_mission
remove_variable = requested_tribute_mission_type_gold
remove_variable = requested_tribute_mission_type_herd
remove_variable = requested_tribute_mission_type_artifact
remove_variable = requested_tribute_mission_type_concubine
remove_variable = requested_tribute_mission_type_eunuch
remove_variable = declined_requested_tribute_recently
remove_variable = predetermined_concubine_tribute
remove_variable = predetermined_eunuch_tribute
remove_variable = predetermined_artifact_tribute
}
requested_tribute_mission_clean_up_variables_effect = {
remove_variable = requested_tribute_mission
remove_variable = invalidation_should_fail_ongoing_requested_tribute_mission
}
tribute_mission_decision_effect = {
if = {
#Are you a tributary of a Hegemon?
limit = { subject_standing >= 0 }
if = {
limit = { is_tributary = yes }
#If it's China, flavorize Imperial Grace
if = {
limit = { suzerain = { primary_title = title:h_china } }
custom_tooltip = tribute_mission_interaction_anticipated_rewards_tt_imperial_grace
}
#Else standard stuff
else = {
custom_tooltip = tribute_mission_interaction_anticipated_rewards_tt_generic_hegemon
}
}
}
else = {
if = {
limit = { $TARGET$ = { primary_title = title:h_china } }
custom_tooltip = tribute_mission_interaction_anticipated_rewards_tt_china
}
else_if = {
limit = { $TARGET$ = { primary_title = title:h_roman_empire } }
custom_tooltip = tribute_mission_interaction_anticipated_rewards_tt_roman_empire
}
else_if = {
limit = { $TARGET$ = { primary_title = title:h_eastern_roman_empire } }
custom_tooltip = tribute_mission_interaction_anticipated_rewards_tt_eastern_roman_empire
}
else_if = {
limit = { $TARGET$ = { primary_title = title:h_dar_al_islam } }
custom_tooltip = tribute_mission_interaction_anticipated_rewards_tt_dar_al_islam
}
else_if = {
limit = { $TARGET$ = { primary_title = title:h_india } }
custom_tooltip = tribute_mission_interaction_anticipated_rewards_tt_india
}
else = { custom_tooltip = tribute_mission_interaction_anticipated_rewards_tt }
}
hidden_effect = {
tribute_mission_clean_up_variables_effect = yes
if = {
limit = { is_tributary = yes }
suzerain = {
save_scope_as = tribute_mission_target
add_character_flag = {
flag = pay_tribute_cooldown
years = 3
}
}
}
else = {
$TARGET$ = {
save_scope_as = tribute_mission_target
}
}
set_variable = { # persist for later interactions
name = tribute_mission_target_scope
value = scope:tribute_mission_target
}
}
#Your Suzerain requested this specifically
if = {
limit = {
has_variable = requested_tribute_mission
is_ai = yes
}
switch = {
trigger = has_variable
requested_tribute_mission_type_gold = { # Gold
run_interaction = {
interaction = tribute_mission_gold_interaction
actor = root
recipient = scope:tribute_mission_target
execute_threshold = accept
}
}
requested_tribute_mission_type_herd = { # Herd
run_interaction = {
interaction = tribute_mission_herd_interaction
actor = root
recipient = scope:tribute_mission_target
execute_threshold = accept
}
}
requested_tribute_mission_type_artifact = { # Artifact
var:predetermined_artifact_tribute ?= { save_scope_as = predetermined_artifact_tribute_scope }
#Do the things from the interaction
scope:predetermined_artifact_tribute_scope = {
set_variable = is_tribute_mission_artifact
}
#Save the Artifact
set_variable = {
name = tribute_mission_type
value = flag:artifact_tribute
}
set_variable = {
name = offered_artifact
value = scope:predetermined_artifact_tribute_scope
}
#Travel
tribute_mission_set_up_tribute_travel_effect = yes
}
requested_tribute_mission_type_concubine = { # Concubine
var:predetermined_concubine_tribute ?= {
save_scope_as = predetermined_concubine_tribute_scope
}
scope:predetermined_concubine_tribute_scope = {
add_character_flag = {
flag = cannot_be_diarch # just enough to make sure they don't succeed to the diarchy while en route
years = 2
}
}
run_interaction = {
interaction = tribute_mission_concubine_interaction
actor = root
recipient = scope:tribute_mission_target
secondary_recipient = scope:predetermined_concubine_tribute_scope
execute_threshold = accept
}
}
requested_tribute_mission_type_eunuch = { # Eunuch
var:predetermined_eunuch_tribute ?= { save_scope_as = predetermined_eunuch_tribute_scope }
run_interaction = {
interaction = tribute_mission_eunuch_interaction
actor = root
recipient = scope:tribute_mission_target
secondary_recipient = scope:predetermined_eunuch_tribute_scope
execute_threshold = accept
}
}
}
}
else_if = {
limit = { is_ai = yes }
switch = {
trigger = yes
scope:tribute_mission_gold = { # Gold
run_interaction = {
interaction = tribute_mission_gold_interaction
actor = root
recipient = scope:tribute_mission_target
execute_threshold = accept
}
}
scope:tribute_mission_herd = { # Herd
run_interaction = {
interaction = tribute_mission_herd_interaction
actor = root
recipient = scope:tribute_mission_target
execute_threshold = accept
}
}
scope:tribute_mission_artifact = { # Artifact
random_character_artifact = {
limit = { is_suitable_artifact_tribute_trigger = yes }
save_scope_as = decision_predetermined_artifact_tribute
}
#Do the things from the interaction
scope:decision_predetermined_artifact_tribute = {
set_variable = is_tribute_mission_artifact
}
#Save the Artifact
set_variable = {
name = tribute_mission_type
value = flag:artifact_tribute
}
set_variable = {
name = offered_artifact
value = scope:decision_predetermined_artifact_tribute
}
#Travel
tribute_mission_set_up_tribute_travel_effect = yes
}
scope:tribute_mission_concubine = { # Concubine
every_courtier_or_guest = {
limit = {
can_be_offered_as_concubine_to_character_trigger = {
GIVER = root
CHARACTER = scope:tribute_mission_target
}
has_any_disease_trigger = no
has_easily_mocked_physical_attribute_trigger = no
NOT = { is_heir_of = root }
}
add_to_list = potential_concubine_tribute_list
random_in_list = {
list = potential_concubine_tribute_list
weight = {
#Let's try to make a sane choice here
base = 0
#No marginally relevant court people
modifier = {
add = 10
NOR = {
is_councillor = yes
has_any_court_position = yes
}
}
#No knights
modifier = {
add = 5
is_knight = no
}
#No inspired people?
modifier = {
add = 20
NOT = { exists = inspiration }
}
#No close family
modifier = {
add = 15
NOT = { is_close_or_extended_family_of = root }
}
#No friends?
modifier = {
add = 20
NOT = { has_relation_friend = root }
}
#No children
modifier = {
add = 25
NOT = { is_child_of = root }
}
}
save_scope_as = decision_predetermined_concubine_tribute
}
}
scope:decision_predetermined_concubine_tribute = {
add_character_flag = {
flag = cannot_be_diarch # just enough to make sure they don't succeed to the diarchy while en route
years = 2
}
}
run_interaction = {
interaction = tribute_mission_concubine_interaction
actor = root
recipient = scope:tribute_mission_target
secondary_recipient = scope:decision_predetermined_concubine_tribute
execute_threshold = accept
}
}
scope:tribute_mission_eunuch = { # Eunuch
every_courtier = {
limit = {
tribute_mission_is_available_eunuch_trigger = yes
NOT = { is_heir_of = root }
}
add_to_list = potential_eunuch_tribute_list
random_in_list = {
list = potential_eunuch_tribute_list
weight = {
#Let's try to make a sane choice here
base = 0
#No marginally relevant court people
modifier = {
add = 10
NOR = {
is_councillor = yes
has_any_court_position = yes
}
}
#No knights
modifier = {
add = 5
is_knight = no
}
#No inspired people?
modifier = {
add = 20
NOT = { exists = inspiration }
}
#No close family
modifier = {
add = 15
NOT = { is_close_or_extended_family_of = scope:tribute_mission_target }
}
#No friends?
modifier = {
add = 20
NOT = { has_relation_friend = scope:tribute_mission_target }
}
#No children
modifier = {
add = 25
NOT = { is_child_of = scope:tribute_mission_target }
}
}
save_scope_as = decision_predetermined_eunuch_tribute
}
}
run_interaction = {
interaction = tribute_mission_eunuch_interaction
actor = root
recipient = scope:tribute_mission_target
secondary_recipient = scope:decision_predetermined_eunuch_tribute
execute_threshold = accept
}
}
scope:tribute_mission_bunga_mas = { # Bunga Mas
random_character_artifact = {
limit = { var:bunga_mas_created_by ?= root }
save_scope_as = decision_predetermined_bunga_mas_tribute
}
#Do the things from the interaction
scope:decision_predetermined_bunga_mas_tribute = {
set_variable = is_tribute_mission_artifact
}
#Save the Artifact
set_variable = {
name = tribute_mission_type
value = flag:bunga_mas_tribute
}
set_variable = {
name = offered_bunga_mas
value = scope:decision_predetermined_bunga_mas_tribute
}
#Travel
tribute_mission_set_up_tribute_travel_effect = yes
}
}
}
#Natural flow of the decision
else_if = {
limit = { is_ai = no }
switch = {
trigger = yes
scope:tribute_mission_gold = { # Gold
open_interaction_window = {
interaction = tribute_mission_gold_interaction
actor = root
recipient = scope:tribute_mission_target
}
}
scope:tribute_mission_herd = { # Herd
open_interaction_window = {
interaction = tribute_mission_herd_interaction
actor = root
recipient = scope:tribute_mission_target
}
}
scope:tribute_mission_artifact = { # Artifact
open_interaction_window = {
interaction = tribute_mission_artifact_interaction
actor = root
recipient = scope:tribute_mission_target
}
}
scope:tribute_mission_concubine = { # Concubine
open_interaction_window = {
interaction = tribute_mission_concubine_interaction
actor = root
recipient = scope:tribute_mission_target
}
}
scope:tribute_mission_eunuch = { # Eunuch
open_interaction_window = {
interaction = tribute_mission_eunuch_interaction
actor = root
recipient = scope:tribute_mission_target
}
}
scope:tribute_mission_bunga_mas = { # Bunga Mas
open_interaction_window = {
interaction = tribute_mission_bunga_mas_interaction
actor = root
recipient = scope:tribute_mission_target
}
}
}
}
if = {
limit = {
is_ai = yes
scope:tribute_mission_target = { highest_held_title_tier = tier_hegemony }
}
scope:tribute_mission_target = {
set_variable = {
name = ai_tribute_mission_cooldown
years = 1
}
}
}
}
set_or_change_offered_tribute_value_effect = {
if = {
limit = { has_variable = offered_$TYPE$_value }
change_variable = {
name = offered_$TYPE$_value
add = $VALUE$
}
}
else = {
set_variable = {
name = offered_$TYPE$_value
value = $VALUE$
}
}
}
tribute_mission_set_up_tribute_travel_effect = {
#Recover the tribute_mission_target scope from saved var if it doesn't already exist
if = {
limit = { exists = var:tribute_mission_target_scope }
var:tribute_mission_target_scope = {
save_scope_as = tribute_mission_target
}
}
else = {
error_log = "Tribute mission target scope variable not set on character intending to travel!"
}
#Travel posted first should look neater in tooltip
hidden_effect = { # ensure we subtract everything we've offered
if = {
limit = { has_variable = offered_gold_value }
remove_short_term_gold = var:offered_gold_value
}
if = {
limit = { has_variable = offered_herd_value }
domicile ?= {
change_herd = { subtract = prev.var:offered_herd_value }
}
}
}
trigger_event = { on_action = tribute_mission_start }
if = {
limit = { location = scope:tribute_mission_target.capital_province }
trigger_event = tribute_mission.0002
}
#Add the concubine
else_if = {
limit = { has_variable = offered_concubine }
start_travel_plan = {
destination = scope:tribute_mission_target.capital_province
companion = var:offered_concubine
on_travel_planner_cancel_on_action = tribute_mission_travel_planner_exit
on_arrival_event = tribute_mission.0002
}
}
#Add the eunuch
else_if = {
limit = { has_variable = offered_eunuch }
start_travel_plan = {
destination = scope:tribute_mission_target.capital_province
companion = var:offered_eunuch
on_travel_planner_cancel_on_action = tribute_mission_travel_planner_exit
on_arrival_event = tribute_mission.0002
}
}
else = {
custom_tooltip = tribute_mission.travel_to.tt
start_travel_plan = {
destination = scope:tribute_mission_target.capital_province
on_travel_planner_cancel_on_action = tribute_mission_travel_planner_exit
on_arrival_event = tribute_mission.0002
}
}
}
tribute_mission_invalidation_effect = {
if = {
limit = { has_variable = tribute_mission_type }
if = {
limit = { # sanity check to ensure we're still a valid tribute provider
OR = {
is_independent_ruler = no # if we have a liege we cannot also pay tribute to someone else
AND = { # if we're not a tributary we are only valid if we're paying tribute to a hegemony
is_tributary = no
OR = {
NOT = { exists = var:tribute_mission_target_scope }
var:tribute_mission_target_scope = { NOT = { highest_held_title_tier = tier_hegemony } }
}
}
}
}
#Return home and refund
trigger_event = tribute_mission.9800
}
else_if = { #If our offerings have perished or been imprisoned along the way, maybe swap to gold
limit = {
has_variable = tribute_mission_type
OR = {
AND = {
has_variable = offered_concubine
OR = {
var:offered_concubine = { is_alive = no }
var:offered_concubine = { is_imprisoned = yes }
}
}
AND = {
has_variable = offered_eunuch
OR = {
var:offered_eunuch = { is_alive = no }
var:offered_eunuch = { is_imprisoned = yes }
}
}
}
}
trigger_event = tribute_mission.9750
}
else_if = {
#We're still a tributary on our way to pay tribute, but our suzerain is not the person we were going to pay tribute to
limit = {
has_variable = tribute_mission_target_scope
OR = {
AND = {
is_tributary = yes
var:tribute_mission_target_scope != suzerain
}
AND = {
is_tributary = no
OR = {
NOT = { exists = var:tribute_mission_target_scope }
var:tribute_mission_target_scope = { NOT = { highest_held_title_tier = tier_hegemony } }
}
}
}
}
var:tribute_mission_target_scope = { save_scope_as = old_overlord }
suzerain = { save_scope_as = new_overlord }
#Clean up Requested Tribute Mission variables
requested_tribute_mission_clean_up_variables_effect = yes
#The new Overlord is in the same place and can accept the tribute
if = {
limit = {
#Make sure they can still accept our offerings; if so, just set the new target
current_travel_plan.next_destination_province = scope:new_overlord.capital_province
has_variable = tribute_mission_type
trigger_if = {
limit = {
OR = {
has_variable = offered_concubine
has_variable = offered_eunuch
}
}
OR = {
AND = {
has_variable = offered_concubine
var:offered_concubine = {
can_become_concubine_of_character_valid_trigger = { CHARACTER = scope:new_overlord }
}
}
AND = {
has_variable = offered_eunuch
scope:new_overlord = {
culture = { has_cultural_parameter = can_appoint_chief_eunuch }
}
}
}
}
}
send_interface_message = {
type = msg_mandala_neutral_text
title = tribute_mission_notification.new_overlord.title
left_icon = scope:new_overlord
desc = tribute_mission_notification.new_overlord.desc
}
set_variable = {
name = tribute_mission_target_scope
value = scope:new_overlord
}
}
#The Overlord is somewhere else; please try again
else_if = {
limit = {
current_travel_plan.next_destination_province != scope:new_overlord.capital_province
}
set_variable = new_overlord_somewhere_else
#Return home and refund
trigger_event = tribute_mission.9800
}
else = {
set_variable = new_overlord_unable_to_accept_tribute
#Return home and refund
trigger_event = tribute_mission.9800
}
}
}
}
tribute_mission_mandala_piety_effect = {
if = {
limit = { government_has_flag = government_is_mandala }
overlord = { add_piety = minor_piety_gain }
}
}
requested_tribute_mission_penalty_effect = {
if = {
limit = {
has_variable = invalidation_should_fail_ongoing_requested_tribute_mission
}
trigger_event = {
id = tribute_mission.9500
delayed = yes
}
}
}

View file

@ -0,0 +1,900 @@

tgp_distant_realm_marriage_trigger = {
$RECIPIENT_SPOUSE$ = {
culture = { has_cultural_parameter = reduced_marriage_acceptance_distant_realms }
top_liege != $ACTOR_SPOUSE$.top_liege
trigger_if = {
limit = { exists = capital_province }
capital_province = { save_temporary_scope_as = from }
}
trigger_else = {
location = { save_temporary_scope_as = from }
}
trigger_if = {
limit = { exists = $ACTOR_SPOUSE$.capital_province }
$ACTOR_SPOUSE$.capital_province = { save_temporary_scope_as = to }
}
trigger_else = {
$ACTOR_SPOUSE$.location = { save_temporary_scope_as = to }
}
"scope:from.squared_distance(scope:to)" > squared_distance_medium
}
}
tgp_dynastic_realm_name_trigger = {
NOT = {
any_ruler = {
any_held_title = {
has_custom_title_name = yes
custom_title_name = $DYNASTY_REALM_NAME$
}
}
}
domicile.domicile_location = {
geographical_region = $DOMICILE_REGION$
}
}
administrative_tier_allows_independence = {
trigger_if = {
limit = {
administrative_counts_can_be_independent = yes
}
highest_held_title_tier >= tier_county
}
trigger_else = { # Administrative/default
highest_held_title_tier >= tier_kingdom
}
}
administrative_counts_can_be_independent = {
OR = {
government_has_flag = government_is_celestial
government_has_flag = government_is_japan_administrative
}
}
tgp_examination_should_spend_treasury_trigger = {
has_treasury = yes
government_allows = replace_gold_cost_by_treasury
}
# Trigger to enable ministry features in script - Made into a scripted trigger for ease of changing it if needed
tgp_has_access_to_ministry_trigger = {
has_title = title:h_china
government_has_flag = government_is_celestial
}
tgp_is_any_minister = {
liege ?= { tgp_has_access_to_ministry_trigger = yes }
OR = {
has_title = title:e_minister_chancellor
has_title = title:e_minister_censor
has_title = title:e_minister_grand_marshal
has_title = title:e_minister_of_personnel
has_title = title:e_minister_of_revenue
has_title = title:e_minister_of_rites
has_title = title:e_minister_of_war
has_title = title:e_minister_of_justice
has_title = title:e_minister_of_works
}
}
tgp_can_be_a_minister_trigger = {
can_be_councillor_basics_trigger = yes
# Has to be celestial or a non-ruler
OR = {
is_ruler = no
government_has_flag = government_is_celestial
}
# Gender is based on laws of the liege
OR = {
AND = {
is_female = yes
$COURT_OWNER$ = {
NOR = {
has_realm_law = male_only_law
has_realm_law = male_preference_law
}
}
}
AND = {
is_male = yes
$COURT_OWNER$ = {
NOR = {
has_realm_law = female_only_law
has_realm_law = female_preference_law
}
}
}
}
# Players are only allowed if they have enough merit or is a councillor already, unless they are friends or disciples/elders
# We do this to prevent the AI from "randomly" requesting the player to be on their council
trigger_if = {
limit = {
is_ai = no
$COURT_OWNER$ = { is_ai = yes }
NOT = { is_councillor_of = $COURT_OWNER$ }
}
OR = {
merit_level >= merit_level_expected_empire_value
has_relation_friend = $COURT_OWNER$
has_relation_disciple = $COURT_OWNER$
has_relation_elder = $COURT_OWNER$
}
}
}
tgp_can_be_grand_marshal_trigger = {
can_be_councillor_basics_trigger = yes
$COURT_OWNER$ ?= {
NOT = { government_has_flag = government_is_nomadic }
}
NAND = {
has_council_position = councillor_court_chaplain
faith = { has_doctrine_parameter = clerical_appointment_fixed }
}
NOR = {
has_council_position = councillor_spouse
AND = {
this = liege.diarch
liege = { has_diarchy_active_parameter = diarchy_is_vizierate }
}
has_trait = devoted
}
# Has to be celestial or a non-ruler
OR = {
is_ruler = no
government_has_flag = government_is_celestial
}
# Has to be able to lead armies
can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = $COURT_OWNER$ }
}
tgp_is_above_retirement_age_trigger = {
trigger_if = {
limit = {
$REALM_OWNER$.top_liege ?= { has_realm_law_flag = celestial_retirement_age_4 }
}
custom_tooltip = {
text = tgp_is_above_retirement_age_4
age >= retirement_age_4_value
}
}
trigger_else_if = {
limit = {
$REALM_OWNER$.top_liege ?= { has_realm_law_flag = celestial_retirement_age_3 }
}
custom_tooltip = {
text = tgp_is_above_retirement_age_3
age >= retirement_age_3_value
}
}
trigger_else_if = {
limit = {
$REALM_OWNER$.top_liege ?= { has_realm_law_flag = celestial_retirement_age_2 }
}
custom_tooltip = {
text = tgp_is_above_retirement_age_2
age >= retirement_age_2_value
}
}
trigger_else_if = {
limit = {
$REALM_OWNER$.top_liege ?= { has_realm_law_flag = celestial_retirement_age_1 }
}
custom_tooltip = {
text = tgp_is_above_retirement_age_1
age >= retirement_age_1_value
}
}
trigger_else_if = {
limit = {
$REALM_OWNER$.top_liege ?= { has_realm_law_flag = celestial_retirement_age_0 }
}
custom_tooltip = {
text = tgp_is_above_retirement_age_0
age >= retirement_age_0_value
}
}
trigger_else_if = {
limit = {
$REALM_OWNER$.top_liege ?= { has_realm_law_flag = celestial_retirement_age_5 }
}
custom_tooltip = {
text = tgp_is_above_retirement_age_5
always = no
}
}
trigger_else = {
custom_tooltip = {
text = tgp_is_above_retirement_age_law_not_set
always = yes
}
}
}
# Civilian/military triggers
is_civilian_candidate_trigger = {
trigger_if = {
limit = {
has_variable = appointment_trait_override
}
var:appointment_trait_override = trait:education_stewardship_1
}
trigger_else = {
has_trait_with_flag = civilian_province
}
}
is_military_candidate_trigger = {
trigger_if = {
limit = {
has_variable = appointment_trait_override
}
var:appointment_trait_override = trait:education_martial_1
}
trigger_else = {
has_trait_with_flag = military_province
}
}
# Trigger if scoped character is able to join the war(s) of the target character
# $TARGET_GOVERNOR$ - Target governor in need of troops
# $MINISTER_OF_WAR$ - The Minister of War
tgp_celestial_military_governor_can_join_war_trigger = {
save_temporary_scope_as = joining_governor
OR = {
vassal_contract_has_flag = celestial_military_appointment
vassal_contract_has_flag = meritocratic_military_appointment
has_title = title:e_minister_grand_marshal
}
NOR = {
scope:joining_governor = $TARGET_GOVERNOR$
scope:joining_governor = $MINISTER_OF_WAR$
any_war_ally = { this = $TARGET_GOVERNOR$ }
is_at_war_with = $TARGET_GOVERNOR$
is_at_war_with = $MINISTER_OF_WAR$
$TARGET_GOVERNOR$ = {
any_war_enemy = {
OR = {
is_vassal_of = scope:joining_governor
is_liege_or_above_of = scope:joining_governor
is_allied_to = scope:joining_governor
is_tributary_of = scope:joining_governor
is_at_war_with = scope:joining_governor
}
}
}
}
}
should_be_mandala_tributary_trigger = {
OR = {
AND = {
$SUZERAIN$ = { has_government = mandala_government }
$TRIBUTARY$ = { has_government = mandala_government }
}
AND = {
$SUZERAIN$ = { has_government = mandala_government }
$TRIBUTARY$ = {
OR = {
has_government = tribal_government
has_government = wanua_government
}
}
}
}
}
should_be_wanua_tributary_trigger = {
AND = {
$SUZERAIN$ = { has_government = wanua_government }
$TRIBUTARY$ = { has_government = wanua_government }
}
}
is_valid_for_japan_events_trigger = {
OR = {
religion = religion:shintoism_religion
faith = { has_doctrine = special_doctrine_immaterial_harmony }
}
culture = { has_cultural_pillar = heritage_japonic }
}
# Check if a top liege primary title has a ceremonial liege title
tgp_realm_has_ceremonial_liege_trigger = {
custom_tooltip = {
text = tgp_realm_has_ceremonial_liege_tt
exists = top_liege.primary_title.var:administrative_ui_special_title.holder
}
}
# Check if a character is a ceremonial liege, since they have the title but are a vassal
tgp_is_ceremonial_liege_trigger = {
custom_tooltip = {
text = tgp_is_ceremonial_liege_tt
tgp_has_ceremonial_liege_title_trigger = yes
is_independent_ruler = no
}
}
tgp_portrait_liege_or_ceremonial_liege_emperor_trigger = {
# Ceremonial Liege
trigger_if = {
limit = { tgp_realm_has_ceremonial_liege_trigger = yes }
tgp_has_ceremonial_liege_title_trigger = yes
primary_title.holder.top_liege.highest_held_title_tier >= tier_empire
}
# Standard Liege
trigger_else = {
scope:highest_held_title_tier >= tier_empire
is_independent_ruler = yes
}
}
tgp_portrait_liege_or_ceremonial_liege_king_trigger = {
# Ceremonial Liege
trigger_if = {
limit = { tgp_realm_has_ceremonial_liege_trigger = yes }
tgp_has_ceremonial_liege_title_trigger = yes
primary_title.holder.top_liege.highest_held_title_tier = tier_kingdom
}
# Standard Liege
trigger_else = { highest_held_title_tier = tier_kingdom }
}
# Check if a character has a ceremonial liege title (but not if they are actually a ceremonial liege)
tgp_has_ceremonial_liege_title_trigger = {
trigger_if = {
limit = { tgp_realm_has_ceremonial_liege_trigger = yes }
custom_tooltip = {
text = tgp_has_ceremonial_liege_title_tt
has_title = top_liege.primary_title.var:administrative_ui_special_title
}
}
trigger_else = {
custom_tooltip = {
text = tgp_has_ceremonial_liege_title_no_title_tt
always = no
}
}
}
# Used to save temp scope of the ceremonial liege for other triggers
tgp_ceremonial_liege_scope_trigger = {
top_liege = {
save_temporary_scope_as = ruler_temp
primary_title.var:administrative_ui_special_title.holder ?= {
top_liege ?= scope:ruler_temp.top_liege
this = scope:ruler_temp
save_temporary_scope_as = ceremonial_liege_temp
}
}
is_independent_ruler = no
}
# Check if character is part of their realm's ceremonial liege's house
tgp_is_in_ceremonial_house_trigger = {
custom_tooltip = {
text = tgp_is_in_ceremonial_house_tt
exists = house
top_liege.primary_title.var:administrative_ui_special_title.holder.house ?= house
}
}
# Check if two characters are from the same ceremonial house
tgp_shared_ceremonial_house_trigger = {
exists = $COMPARE_1$.house
$COMPARE_2$.house ?= $COMPARE_1$.house
OR = {
$COMPARE_1$ = { tgp_is_in_ceremonial_house_trigger = yes }
$COMPARE_2$ = { tgp_is_in_ceremonial_house_trigger = yes }
}
}
# Check if a character is a ruler over a ceremonial liege
tgp_is_ceremonial_regent_trigger = {
is_independent_ruler = yes
is_landed = yes
tgp_realm_has_ceremonial_liege_trigger = yes
tgp_has_ceremonial_liege_title_trigger = no
}
tgp_should_become_meritocratic_trigger = {
has_tgp_dlc_trigger = yes
OR = {
top_liege = {
OR = {
has_government = meritocratic_government
any_neighboring_and_across_water_top_liege_realm_owner = { government_allows = merit }
}
}
AND = {
OR = {
is_independent_ruler = yes
liege = {
NOT = {
government_has_flag = government_is_administrative
}
}
}
capital_province = {
OR = {
geographical_region = world_asia
geographical_region = world_tibet
geographical_region = world_burma
geographical_region = world_steppe_east
}
}
}
#Becoming admin with creation of meritocratic great yuan
exists = scope:great_yuan_ruler
}
}
tgp_can_become_japan_administrative_trigger = {
top_liege = {
OR = {
government_is_japanese_trigger = yes
has_character_flag = tgp_japan_restore_japanese_government_flag
culture = culture:japanese
culture = {
any_parent_culture_or_above = { this = culture:japanese }
}
}
}
}
tgp_can_become_celestial_trigger = {
top_liege = {
OR = {
has_government = celestial_government
has_title = title:h_china
culture = culture:han
culture = {
any_parent_culture_or_above = { this = culture:han }
}
}
}
}
tgp_mongol_vassal_will_become_admin = {
highest_held_title_tier > tier_barony
primary_title = {
OR = {
target_is_de_jure_liege_or_above = scope:administrative_liege.primary_title #We only auto convert de jure vassals
target_is_de_jure_liege_or_above = title:h_china
}
}
OR = {
government_has_flag = government_is_feudal
government_has_flag = government_is_clan
government_has_flag = government_is_japan_feudal
government_has_flag = government_is_nomadic
}
OR = {
#An admin type
has_trait = governor
faith.religion = religion:confucianism_religion
culture = {
has_cultural_pillar = heritage_chinese
}
culture = {
has_cultural_pillar = heritage_korean
}
#Nomad type
government_has_flag = government_is_nomadic
has_trait = nomadic_philosophy
}
}
tgp_japanese_high_nobility_clothing_trigger = {
tgp_is_ceremonial_liege_trigger = no
trigger_if = {
limit = { has_character_flag = murasaki }
always = yes
}
trigger_else_if = {
limit = { government_has_flag = government_is_japan_feudal }
OR = {
is_independent_ruler = yes
trigger_if = {
limit = { exists = top_liege }
OR = {
is_councillor_of = top_liege
is_spouse_of = top_liege
}
AND = {
is_house_head = yes
has_same_government = top_liege
}
}
}
}
trigger_else_if = {
limit = { government_has_flag = government_is_japan_administrative }
OR = {
highest_held_title_tier >= tier_county
tgp_is_in_ceremonial_house_trigger = yes
}
}
trigger_else = { highest_held_title_tier >= tier_kingdom }
}
tgp_japanese_high_nobility_clothing_family_trigger = {
AND = {
government_has_flag = government_is_japan_administrative
is_lowborn = no
OR = {
highest_held_title_tier >= tier_county
court_owner = { highest_held_title_tier >= tier_county }
}
}
}
tgp_is_chinese_style_emperor_trigger = {
highest_held_title_tier >= tier_empire
is_independent_ruler = yes
government_allows = merit
}
is_valid_for_east_asian_events_trigger = {
culture = {
OR = {
has_cultural_pillar = heritage_japonic
has_cultural_pillar = heritage_chinese
has_cultural_pillar = heritage_korean
}
}
}
is_valid_for_east_asian_events_geo_trigger = {
capital_province = {
OR = {
geographical_region = world_asia_china
geographical_region = world_asia_japan
geographical_region = world_asia_korea
geographical_region = world_asia_southeast
}
}
}
shared_raid_estate_participant_valid_trigger = {
is_adult = yes
is_house_head = yes
is_independent_ruler = no
custom_tooltip = {
text = is_house_head_of_noble_family_tt
any_held_title = { is_noble_family_title = yes }
house.house_head ?= this
}
OR = {
government_allows = administrative
government_is_japanese_trigger = yes
}
tgp_is_ceremonial_liege_trigger = no
}
should_use_asian_maa_graphics = {
OR = {
has_unit_gfx = chinese_unit_gfx
has_unit_gfx = japanese_unit_gfx
has_unit_gfx = indian_unit_gfx
has_unit_gfx = southeast_asian_unit_gfx
has_unit_gfx = mongol_unit_gfx
}
}
eligible_for_elder_trigger = {
merit_level > $DISCIPLE$.merit_level
num_of_relation_disciple < disciples_limit_value
NOT = { has_relation_disciple = $DISCIPLE$ }
$DISCIPLE$ = {
is_adult = yes
}
}
# Treasury budget triggers
prefers_salary_favored_budget_trigger = {
$CHARACTER$ = {
OR = {
top_participant_group:dynastic_cycle ?= { participant_group_type = conservative_movement }
has_title = title:e_minister_of_personnel
AND = {
this = top_liege
OR = {
ai_compassion > 75
ai_honor > 75
}
}
ai_greed >= 0
}
trigger_if = {
limit = { this != top_liege }
NOT = { has_trait = loyal }
}
}
}
prefers_ministry_favored_budget_trigger = {
$CHARACTER$ = {
OR = {
top_participant_group:dynastic_cycle ?= { participant_group_type = advancement_movement }
AND = {
this = top_liege
OR = {
ai_greed < 0
ai_rationality > 75
situation:dynastic_cycle ?= { situation_current_phase = situation_dynastic_cycle_phase_stability_advancement }
}
}
}
trigger_if = {
limit = { this != top_liege }
NOT = { has_trait = loyal }
}
}
}
prefers_military_favored_budget_trigger = {
$CHARACTER$ = {
OR = {
top_participant_group:dynastic_cycle ?= { participant_group_type = expansion_movement }
has_title = title:e_minister_grand_marshal
has_title = title:e_minister_of_war
AND = {
this = top_liege
OR = {
ai_boldness > 90
situation:dynastic_cycle ?= {
OR = {
situation_current_phase = situation_dynastic_cycle_phase_stability_expansion
situation_current_phase = situation_dynastic_cycle_phase_instability_conquest
}
}
}
}
ai_greed < 0
}
trigger_if = {
limit = { this != top_liege }
NOT = { has_trait = loyal }
}
}
}
prefers_hegemon_favored_budget_trigger = {
$CHARACTER$ = {
OR = {
top_participant_group:dynastic_cycle ?= { participant_group_type = pro_hegemon_movement }
has_trait = loyal
AND = {
this = top_liege
ai_greed > 90
}
}
}
}
can_suggest_budget_salary_template_trigger = {
NOT = {
liege = {
has_realm_law = budget_allocation_salary_45
has_realm_law = budget_allocation_ministry_25
has_realm_law = budget_allocation_military_20
}
}
}
can_suggest_budget_ministry_template_trigger = {
NOT = {
liege = {
has_realm_law = budget_allocation_salary_25
has_realm_law = budget_allocation_ministry_45
has_realm_law = budget_allocation_military_20
}
}
}
can_suggest_budget_military_template_trigger = {
NOT = {
liege = {
has_realm_law = budget_allocation_salary_30
has_realm_law = budget_allocation_ministry_20
has_realm_law = budget_allocation_military_40
}
}
}
can_suggest_budget_hegemon_template_trigger = {
NOT = {
liege = {
has_realm_law = budget_allocation_salary_30
has_realm_law = budget_allocation_ministry_25
has_realm_law = budget_allocation_military_25
}
}
}
can_suggest_budget_balanced_template_trigger = {
NOT = {
liege = {
has_realm_law = budget_allocation_salary_35
has_realm_law = budget_allocation_ministry_30
has_realm_law = budget_allocation_military_25
}
}
}
###
peasant_war_should_escalated_trigger = {
has_variable = peasant_war_escalates
}
tgp_gender_can_be_exam_entrant_trigger = {
trigger_if = {
limit = {
scope:host ?= {
OR = {
has_realm_law = female_only_law
has_realm_law = female_preference_law
}
}
}
OR = {
is_female = yes
AND = {
is_ai = no
is_male = yes
}
}
}
trigger_else_if = {
limit = {
scope:host ?= {
OR = {
has_realm_law = male_only_law
has_realm_law = male_preference_law
}
}
}
OR = {
is_male = yes
AND = {
is_ai = no
is_female = yes
}
}
}
trigger_else = {
always = yes
}
}
tgp_root_gender_can_be_exam_entrant_trigger = {
trigger_if = {
limit = {
root ?= {
OR = {
has_realm_law = female_only_law
has_realm_law = female_preference_law
}
}
}
is_female = yes
}
trigger_else_if = {
limit = {
root ?= {
OR = {
has_realm_law = male_only_law
has_realm_law = male_preference_law
}
}
}
is_female = no
}
trigger_else = {
always = yes
}
}
is_merit_based_official = {
government_has_flag = government_has_merit
OR = {
is_governor_or_admin_count = yes
AND = {
is_councillor = yes
NOT = { has_council_position = councillor_spouse }
liege = {
OR = {
is_landed = yes # to exclude councilors of landless noble family heads
highest_held_title_tier >= tier_empire # for councilors of ministers
}
}
}
}
}
has_highest_merit_rank = {
trigger_if = {
limit = { government_has_flag = government_is_celestial }
merit_level = 9
}
trigger_else = { merit_level = 5 }
}
tgp_is_ceremonial_petition_shown_trigger = {
is_playable_character = yes
has_dlc_feature = royal_court
has_tgp_dlc_trigger = yes
tgp_realm_has_ceremonial_liege_trigger = yes
tgp_has_ceremonial_liege_title_trigger = no
top_liege = { tgp_is_ceremonial_regent_trigger = yes } # Not 'actual' ruler
top_liege.primary_title.var:administrative_ui_special_title.holder ?= { has_royal_court = yes }
}
tgp_is_ceremonial_petition_valid_trigger = {
has_dlc_feature = royal_court
has_tgp_dlc_trigger = yes
is_at_war = no
tgp_realm_has_ceremonial_liege_trigger = yes
top_liege.primary_title.var:administrative_ui_special_title.holder ?= {
is_available_adult = yes
has_royal_court = yes
NOT = { is_at_war = yes }
}
}
take_vows_available_trigger = {
OR = {
faith = { has_doctrine_parameter = take_vows_active }
AND = {
religion:buddhism_religion ?= religion
faith = { has_doctrine = special_doctrine_immaterial_harmony }
}
}
}
tgp_capital_not_in_chinese_naming_region = {
capital_county.title_province ?= {
NOR = {
geographical_region = tgp_ba_region
geographical_region = tgp_cai_region
geographical_region = tgp_cao_region
geographical_region = tgp_chen_region
geographical_region = tgp_chu_region
geographical_region = tgp_dai_region
geographical_region = tgp_dian_region
geographical_region = tgp_gan_region
geographical_region = tgp_gui_region
geographical_region = tgp_han_region
geographical_region = tgp_huai_region
geographical_region = tgp_jin_region
geographical_region = tgp_jing_region
geographical_region = tgp_lai_region
geographical_region = tgp_liang_region
geographical_region = tgp_lu_region
geographical_region = tgp_min_region
geographical_region = tgp_qi_region
geographical_region = tgp_qian_region
geographical_region = tgp_shu_region
geographical_region = tgp_song_region
geographical_region = tgp_sui_region
geographical_region = tgp_tang_region
geographical_region = tgp_wei_region
geographical_region = tgp_wu_region
geographical_region = tgp_xia_region
geographical_region = tgp_xiang_region
geographical_region = tgp_xing_region
geographical_region = tgp_xu_region
geographical_region = tgp_yang_region
geographical_region = tgp_yin_region
geographical_region = tgp_yong_region
geographical_region = tgp_yue_region
geographical_region = tgp_zhao_region
geographical_region = tgp_zheng_region
geographical_region = tgp_zhou_region
}
}
}