unfucking the mod

This commit is contained in:
trashmasteruni 2026-01-06 14:25:21 +01:00
parent cbe3fbcda2
commit d887392b56
1167 changed files with 26982 additions and 13 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

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,325 @@
task_spouse_default = {
default_task = yes
position = councillor_spouse
effect_desc = task_spouse_default_effect_desc
task_type = task_type_general
task_progress = task_progress_infinite
council_owner_modifier = {
name = task_spouse_default_diplomacy_modifier
diplomacy = 1
scale = spouse_default_task_diplomacy_scale
}
council_owner_modifier = {
name = task_spouse_default_martial_modifier
martial = 1
scale = spouse_default_task_martial_scale
}
council_owner_modifier = {
name = task_spouse_default_stewardship_modifier
stewardship = 1
scale = spouse_default_task_stewardship_scale
}
council_owner_modifier = {
name = task_spouse_default_intrigue_modifier
intrigue = 1
scale = spouse_default_task_intrigue_scale
}
council_owner_modifier = {
name = task_spouse_default_learning_modifier
learning = 1
scale = spouse_default_task_learning_scale
}
monthly_on_action = spouse_councillor_default_on_action
ai_will_do = {
value = 1 # Always a good backup
}
}
task_court_politics = {
position = councillor_spouse
skill = diplomacy
task_type = task_type_general
task_progress = task_progress_infinite
effect_desc = task_court_politics_effect_desc
council_owner_modifier = {
name = task_court_politics_modifier
diplomacy = 1
scale = spouse_task_court_politics_scale
}
monthly_on_action = court_politics_setup
ai_will_do = {
value = 0
if = {
limit = {
diplomacy > very_high_skill_rating
}
add = 1
}
else_if = {
limit = {
diplomacy > high_skill_rating
}
add = 0.5
}
if = { # Keep doing it once it is started
limit = {
is_performing_council_task = task_court_politics
}
add = 1000
}
scope:councillor_liege = {
if = {
limit = {
diplomacy < decent_skill_rating
}
multiply = 3
}
else_if = {
limit = {
diplomacy < medium_skill_rating
}
multiply = 2
}
}
}
}
task_chivalry = {
position = councillor_spouse
skill = martial
task_type = task_type_general
task_progress = task_progress_infinite
effect_desc = task_chivalry_effect_desc
council_owner_modifier = {
name = task_chivalry_modifier
martial = 1
scale = spouse_task_chivalry_scale
}
monthly_on_action = chivalry_setup
ai_will_do = {
value = 0
if = {
limit = {
martial > very_high_skill_rating
}
add = 1
}
else_if = {
limit = {
martial > high_skill_rating
}
add = 0.5
}
if = { # Keep doing it once it is started
limit = {
is_performing_council_task = task_chivalry
}
add = 1000
}
scope:councillor_liege = {
if = {
limit = {
martial < decent_skill_rating
}
multiply = 3
}
else_if = {
limit = {
martial < medium_skill_rating
}
multiply = 2
}
}
}
}
task_manage_domain = {
position = councillor_spouse
skill = stewardship
task_type = task_type_general
task_progress = task_progress_infinite
effect_desc = task_manage_domain_effect_desc
council_owner_modifier = {
name = task_manage_domain_modifier
stewardship = 1
scale = spouse_task_manage_domain_scale
}
monthly_on_action = manage_domain_setup
ai_will_do = {
value = 0
if = {
limit = {
stewardship > very_high_skill_rating
}
add = 1
}
else_if = {
limit = {
stewardship > high_skill_rating
}
add = 0.5
}
if = { # Keep doing it once it is started
limit = {
is_performing_council_task = task_manage_domain
}
add = 1000
}
scope:councillor_liege = {
if = {
limit = {
stewardship < decent_skill_rating
}
multiply = 3
}
else_if = {
limit = {
stewardship < medium_skill_rating
}
multiply = 2
}
}
}
}
task_court_intrigue = {
position = councillor_spouse
skill = intrigue
task_type = task_type_general
task_progress = task_progress_infinite
effect_desc = task_court_intrigue_effect_desc
council_owner_modifier = {
name = task_court_intrigue_modifier
intrigue = 1
scale = spouse_task_court_intrigue_scale
}
monthly_on_action = court_intrigue_setup
ai_will_do = {
value = 0
if = {
limit = {
intrigue > very_high_skill_rating
}
add = 1
}
else_if = {
limit = {
intrigue > high_skill_rating
}
add = 0.5
}
if = { # Keep doing it once it is started
limit = {
is_performing_council_task = task_court_intrigue
}
add = 1000
}
scope:councillor_liege = {
if = {
limit = {
intrigue < decent_skill_rating
}
multiply = 3
}
else_if = {
limit = {
intrigue < medium_skill_rating
}
multiply = 2
}
}
}
}
task_patronage = {
position = councillor_spouse
skill = learning
task_type = task_type_general
task_progress = task_progress_infinite
effect_desc = task_patronage_effect_desc
council_owner_modifier = {
name = task_patronage_modifier
learning = 1
scale = spouse_task_patronage_scale
}
monthly_on_action = patronage_setup
ai_will_do = {
value = 0
if = {
limit = {
learning > very_high_skill_rating
}
add = 1
}
else_if = {
limit = {
learning > high_skill_rating
}
add = 0.5
}
if = { # Keep doing it once it is started
limit = {
is_performing_council_task = task_patronage
}
add = 1000
}
scope:councillor_liege = {
if = {
limit = {
learning < decent_skill_rating
}
multiply = 3
}
else_if = {
limit = {
learning < medium_skill_rating
}
multiply = 2
}
}
}
}

View file

@ -0,0 +1,785 @@
task_disrupt_schemes = {
position = councillor_spymaster
default_task = yes
task_type = task_type_general
task_progress = task_progress_infinite
asset = {
icon = "gfx/interface/icons/council_task_types/task_disrupt_schemes.dds"
background = "gfx/interface/buttons/button_round_bg.dds"
frame = "gfx/interface/buttons/button_round_frame.dds"
glow = "gfx/particles/halo.dds"
}
effect_desc = {
#Hostile Scheme Resistance Descs
desc = task_disrupt_schemes_hostile_scheme_resistance_base
triggered_desc = {
trigger = { scope:councillor_liege = { has_perk = court_of_shadows_perk } }
desc = task_disrupt_schemes_hostile_scheme_resistance_perk_bonus
}
triggered_desc = {
trigger = {
councillor_liege_has_erudition_legacy_5_perk = yes
}
desc = task_disrupt_schemes_hostile_scheme_resistance_legacy_bonus
}
triggered_desc = {
trigger = {
councillor_liege_has_family_business_bonus = yes
}
desc = task_disrupt_schemes_hostile_scheme_resistance_family_business_bonus
}
triggered_desc = {
trigger = {
councillor_liege_has_consulted_house_bonus = yes
}
desc = task_disrupt_schemes_hostile_scheme_resistance_consulted_house_bonus
}
triggered_desc = {
trigger = {
scope:councillor_liege.house = { has_house_power_parameter = determination_spymaster_task_disrupt_schemes_efficiency }
}
desc = determination_spymaster_hostile_scheme_resistance_task_disrupt_schemes
}
#Discovery Chance Descs
desc = task_disrupt_schemes_discovery_chance_base
triggered_desc = {
trigger = { scope:councillor_liege = { has_perk = court_of_shadows_perk } }
desc = task_disrupt_schemes_discovery_chance_perk_bonus
}
triggered_desc = {
trigger = {
councillor_liege_has_erudition_legacy_5_perk = yes
}
desc = task_disrupt_schemes_discovery_chance_legacy_bonus
}
triggered_desc = {
trigger = {
councillor_liege_has_family_business_bonus = yes
}
desc = task_disrupt_schemes_discovery_chance_family_business_bonus
}
triggered_desc = {
trigger = {
councillor_liege_has_consulted_house_bonus = yes
}
desc = task_disrupt_schemes_discovery_chance_consulted_house_bonus
}
triggered_desc = {
trigger = {
scope:councillor_liege.house = { has_house_power_parameter = determination_spymaster_task_disrupt_schemes_efficiency }
}
desc = determination_spymaster_discovery_task_disrupt_schemes
}
#Possible Side Effects Descs
desc = {
desc = council_task_possible_side_effects
triggered_desc = {
trigger = {
intrigue > mediocre_skill_rating
}
desc = task_disrupt_schemes_hostile_scheme_disrupted
}
triggered_desc = {
trigger = {
intrigue < high_skill_rating
scope:councillor_liege = {
has_any_secrets = yes
}
}
desc = task_disrupt_schemes_secret_revealed
}
triggered_desc = {
trigger = {
intrigue < high_skill_rating
}
desc = task_disrupt_schemes_courtier_secret_revealed
}
}
}
council_owner_modifier = {
name = task_disrupt_schemes_modifier
enemy_hostile_scheme_phase_duration_add = 1
scale = scope:councillor.spymaster_disrupt_schemes_modifier_base_scale
}
council_owner_modifier = {
name = task_disrupt_schemes_court_of_shadows_modifier #NOT USED?
enemy_hostile_scheme_phase_duration_add = 1
scale = scope:councillor.spymaster_disrupt_schemes_court_of_shadows_modifier_scale
}
council_owner_modifier = {
name = task_disrupt_schemes_erudition_legacy_5_modifier
enemy_hostile_scheme_phase_duration_add = 1
scale = scope:councillor.spymaster_disrupt_schemes_erudition_legacy_5_modifier_scale
}
council_owner_modifier = {
name = task_disrupt_schemes_erudition_legacy_5_modifier #TO EDIT?
enemy_hostile_scheme_phase_duration_add = 1
scale = scope:councillor.spymaster_disrupt_schemes_family_business_modifier_scale
}
council_owner_modifier = {
name = task_disrupt_schemes_modifier
scheme_discovery_chance_mult = 1.0
scale = { value = scope:councillor.spymaster_disrupt_schemes_scheme_discovery_modifier divide = 200 }
}
council_owner_modifier = {
name = task_disrupt_schemes_court_of_shadows_modifier
scheme_discovery_chance_mult = 1.0
scale = { value = scope:councillor.spymaster_disrupt_schemes_court_of_shadows_scheme_discovery_modifier_scale divide = 200 }
}
council_owner_modifier = {
name = task_disrupt_schemes_erudition_legacy_5_modifier #NOT USED?
scheme_discovery_chance_mult = 1.0
scale = { value = scope:councillor.spymaster_disrupt_schemes_erudition_legacy_5_discovery_modifier_scale divide = 200 }
}
council_owner_modifier = {
name = task_disrupt_schemes_erudition_legacy_5_modifier #TO EDIT
scheme_discovery_chance_mult = 1.0
scale = { value = scope:councillor.spymaster_disrupt_schemes_family_business_discovery_modifier_scale divide = 200 }
}
council_owner_modifier = {
name = determination_spymaster_task_disrupt_schemes_modifier
scheme_discovery_chance_mult = 1.0
scale = { value = scope:councillor.spymaster_disrupt_schemes_determination_discovery_modifier_scale divide = 200 }
}
monthly_on_action = task_disrupt_schemes_side_effects
ai_will_do = {
value = 1 # Always a good backup
if = {
limit = {
has_trait = paranoid
}
add = 1000
}
if = {
limit = {
any_targeting_scheme = {
hostile_scheme_trigger = yes
is_scheme_exposed = yes
}
}
add = 1000
}
if = { # Somewhat rational AI's want to protect themselves from people who might murder them
limit = {
ai_rationality > 0
OR = {
any_relation = {
type = rival
intrigue >= 12
ai_honor <= 0
}
any_sibling = {
ai_honor <= -50
ai_greed >= 50
save_temporary_scope_as = sibling
root = {
any_held_title = {
place_in_line_of_succession = {
target = scope:sibling
value <= 3
}
}
}
}
}
}
add = ai_rationality
}
}
}
task_support_schemes = {
position = councillor_spymaster
task_type = task_type_general
task_progress = task_progress_infinite
asset = {
icon = "gfx/interface/icons/council_task_types/task_support_schemes.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_support_schemes_base_desc
triggered_desc = {
trigger = {
councillor_liege_has_erudition_legacy_5_perk = yes
}
desc = task_support_schemes_legacy_bonus_desc
}
triggered_desc = {
trigger = {
councillor_liege_has_family_business_bonus = yes
}
desc = task_support_schemes_family_business_bonus_desc
}
triggered_desc = {
trigger = {
councillor_liege_has_consulted_house_bonus = yes
}
desc = task_support_schemes_consulted_house_bonus_desc
}
triggered_desc = {
trigger = {
exists = scope:councillor_liege
scope:councillor_liege = {
has_royal_court = yes
has_dlc_feature = royal_court
has_court_type = court_intrigue
court_grandeur_current_level >= 4
}
}
desc = spymaster_espionage_court_type_bonus_desc
}
# Determination House Aspiration - Hostile Scheme Phase Length
triggered_desc = {
trigger = {
scope:councillor_liege.house = { has_house_power_parameter = determination_spymaster_task_support_schemes_efficiency }
}
desc = determination_spymaster_task_support_schemes_bonus
}
desc = task_support_schemes_success_chance_base_desc
triggered_desc = {
trigger = {
councillor_liege_has_erudition_legacy_5_perk = yes
}
desc = task_support_schemes_success_chance_legacy_bonus_desc
}
triggered_desc = {
trigger = {
councillor_liege_has_family_business_bonus = yes
}
desc = task_support_schemes_success_chance_family_business_bonus_desc
}
triggered_desc = {
trigger = {
exists = scope:councillor_liege
scope:councillor_liege = {
has_royal_court = yes
has_dlc_feature = royal_court
has_court_type = court_intrigue
court_grandeur_current_level >= 4
}
}
desc = spymaster_espionage_success_chance_court_type_bonus_desc
}
# Determination House Aspiration - Hostile Scheme Success Chance
triggered_desc = {
trigger = {
scope:councillor_liege.house = { has_house_power_parameter = determination_spymaster_task_support_schemes_efficiency }
}
desc = determination_spymaster_task_support_schemes_success_chance_bonus
}
desc = {
desc = council_task_possible_side_effects
triggered_desc = {
trigger = {
intrigue > mediocre_skill_rating
}
desc = task_support_schemes_learn_secret
}
triggered_desc = {
trigger = {
intrigue < high_skill_rating
}
desc = task_support_schemes_lose_piety
}
triggered_desc = {
trigger = {
intrigue < high_skill_rating
}
desc = task_support_schemes_lose_prestige
}
triggered_desc = {
trigger = {
intrigue < high_skill_rating
}
desc = task_support_schemes_fail_scheme
}
}
}
council_owner_modifier = {
name = task_support_schemes_modifier
hostile_scheme_phase_duration_add = 1
scale = spymaster_espionage_modifier_final_scale
}
council_owner_modifier = {
name = task_support_schemes_modifier
owned_hostile_scheme_success_chance_add = 1.0
scale = spymaster_espionage_success_chance_total
}
monthly_on_action = task_support_schemes_side_effects
ai_will_do = {
value = 0
scope:councillor_liege = {
every_scheme = {
limit = {
OR = {
scheme_type = murder
scheme_type = abduct
}
}
add = 300
}
}
}
}
task_find_secrets = {
position = councillor_spymaster
task_type = task_type_court
task_progress = task_progress_percentage
restart_on_finish = yes
asset = {
icon = "gfx/interface/icons/council_task_types/task_find_secrets.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_find_secrets_effect_desc
desc = {
desc = council_task_possible_side_effects
desc = task_find_secrets_opinion_loss
triggered_desc = {
trigger = {
exists = scope:target_character
scope:target_character = {
is_vassal_of = scope:councillor_liege
}
}
desc = task_find_secrets_vassal_intimidation
}
}
}
progress = {
value = 0
add = {
value = spymaster_find_secrets_base
desc = SPYMASTER_PROGRESS_BASE
}
add = {
value = scope:councillor.spymaster_find_secrets_monthly_increase
desc = SCALED_COUNCILLOR_INTRIGUE_VALUE
}
# Relation Bonuses/Penalties
if = {
limit = {
exists = scope:councillor_liege
}
if = { # Friend
limit = {
scope:councillor_liege = {
has_relation_friend = scope:councillor
NOT = { has_relation_best_friend = scope:councillor }
}
}
add = {
value = scope:councillor.spymaster_find_secrets_monthly_increase_friend_bonus
desc = COUNCILLOR_IS_YOUR_FRIEND
}
}
if = { # Best Friend
limit = {
scope:councillor_liege = {
has_relation_best_friend = scope:councillor
}
}
add = {
value = scope:councillor.spymaster_find_secrets_monthly_increase_best_friend_bonus
desc = COUNCILLOR_IS_YOUR_BEST_FRIEND
}
}
if = { # Rival
limit = {
scope:councillor_liege = {
has_relation_rival = scope:councillor
NOT = { has_relation_nemesis = scope:councillor }
}
}
add = {
value = scope:councillor.spymaster_find_secrets_monthly_increase_rival_bonus
desc = COUNCILLOR_IS_YOUR_RIVAL
}
}
if = { # Nemesis
limit = {
scope:councillor_liege = {
has_relation_nemesis = scope:councillor
}
}
add = {
value = scope:councillor.spymaster_find_secrets_monthly_increase_nemesis_bonus
desc = COUNCILLOR_IS_YOUR_NEMESIS
}
}
if = {
limit = {
scope:councillor_liege = { has_perk = digging_for_dirt_perk }
}
add = {
value = scope:councillor.spymaster_find_secrets_perk_monthly_increase
desc = ESPIONAGE_PERK_BONUS_VALUE
}
}
}
if = {
limit = {
councillor_liege_has_erudition_legacy_5_perk = yes
}
add = {
value = scope:councillor_liege.spymaster_find_secrets_erudition_monthly_increase
desc = ERUDITION_DYNASTY_PERK_BONUS_VALUE
}
}
if = {
limit = {
councillor_liege_has_family_business_bonus = yes
}
add = {
value = scope:councillor_liege.spymaster_find_secrets_family_business_monthly_increase
desc = FAMILY_BUSINESS_BONUS_VALUE
}
}
if = {
limit = {
councillor_liege_has_consulted_house_bonus = yes
}
add = {
value = scope:councillor_liege.spymaster_find_secrets_consulted_house_monthly_increase
desc = CONSULTED_HOUSE_BONUS_VALUE
}
}
#Events
if = {
limit = {
scope:councillor_liege = { has_character_flag = court_of_no_secrets }
}
add = {
value = spymaster_court_of_no_secrets_event_increase
desc = COURT_OF_NO_SECRETS_VALUE
}
}
if = {
limit = {
scope:councillor_liege = { has_character_modifier = court_without_secrets_modifier }
}
add = {
value = spymaster_court_of_no_secrets_event_increase
desc = court_without_secrets_modifier
}
}
if = {
limit = {
exists = scope:target_character.cp:councillor_spymaster
scope:target_character.cp:councillor_spymaster != scope:councillor_liege
scope:target_character.cp:councillor_spymaster = {
is_performing_council_task = task_disrupt_schemes
}
}
multiply = {
value = scope:target_character.cp:councillor_spymaster.spymaster_find_secrets_disrupt_schemes_modifier_factor
desc = TARGET_SPYMASTER_disrupt_schemes
}
}
if = {
limit = {
exists = scope:target_character
target_is_liege_or_above = scope:target_character
}
multiply = {
value = 0.5
desc = TARGET_IS_LIEGE_penalty
}
}
if = {
limit = {
exists = scope:target_character
target_is_vassal_or_below = scope:target_character
has_character_modifier = servant_informants_modifier
}
multiply = {
value = 2
desc = SPYMASTER_FIND_SECRETS_CHARACTER_MODIFIERS
}
}
# Lady in Waiting
if = {
limit = {
scope:councillor_liege = { has_character_modifier = employer_booner_lady_in_waiting_2_modifier }
OR = {
target_is_vassal_or_below = scope:target_character
this = scope:target_character
}
}
add = {
value = 10
desc = employer_booner_lady_in_waiting_2_modifier
}
}
else_if = {
limit = {
scope:councillor_liege = { has_character_modifier = employer_booner_lady_in_waiting_3_modifier }
OR = {
target_is_vassal_or_below = scope:target_character
this = scope:target_character
}
}
add = {
value = 10
desc = employer_booner_lady_in_waiting_3_modifier
}
}
# Determination House Aspiration
if = {
limit = {
scope:councillor_liege.house ?= { has_house_power_parameter = determination_spymaster_task_find_secrets_efficiency }
}
add = {
value = spymaster_determination_house_aspiration_find_secrets_total
desc = determination_house_aspiration_find_secrets_modifier
}
}
}
is_shown = {
scope:councillor_liege = {
trigger_if = {
limit = {
is_ai = yes
}
ai_honor <= 0
scope:councillor.intrigue >= 15
static_group_filter = {
group = spy_block
match = 0.75
}
}
}
}
valid_target_court = {
scope:councillor_liege = {
trigger_if = {
limit = {
is_ai = yes
}
NOR = {
has_relation_friend = scope:target_character
has_relation_lover = scope:target_character
is_allied_to = scope:target_character
has_hook = scope:target_character
}
scope:target_character = {
OR = {
is_vassal_of = scope:councillor_liege
has_relation_rival = scope:councillor_liege
}
in_diplomatic_range = scope:councillor_liege
highest_held_title_tier >= tier_county
}
}
trigger_else = {
scope:target_character = {
in_diplomatic_range = scope:councillor_liege
highest_held_title_tier >= tier_county
}
}
}
}
potential_target_court = {
scope:target_character = {
is_alive = yes
is_landed = yes
custom_description = {
text = spymaster_will_not_find_secrets_at_own_court
this != scope:councillor
}
}
}
on_start_task_court = {
#spawn a task contract to help finding secrets
if = {
limit = {
any_task_contract = {
task_contract_type = laamp_help_find_secrets_contract
NOT = { task_contract_target = scope:councillor_liege }
}
any_player = {
has_government = landless_adventurer_government
is_within_diplo_range = { CHARACTER = scope:councillor }
any_character_task_contract = {
task_contract_type = laamp_help_find_secrets_contract
count <= council_task_contracts_limit_value
}
can_create_task_contract = {
type_name = laamp_help_find_secrets_contract
employer = scope:councillor
}
save_temporary_scope_as = player_laamp
}
}
scope:player_laamp = {
create_task_contract = {
task_contract_type = laamp_help_find_secrets_contract
task_contract_tier = scope:councillor.task_contract_tier_value
location = scope:councillor.location
task_contract_employer = scope:councillor
target = scope:councillor_liege
}
}
}
}
on_finish_task_court = {
scope:councillor_liege = {
if = {
limit = {
scope:target_character = {
OR = {
spymaster_task_find_secrets_court_has_minor_secrets_trigger = yes
spymaster_task_find_secrets_court_has_major_secrets_trigger = yes
}
}
}
random = {
chance = scope:councillor.spymaster_find_secrets_secret_discovery_chance
save_scope_value_as = {
name = having_find_secrets_event
value = yes
}
trigger_event = {
on_action = task_find_secrets_outcome
}
}
}
if = {
limit = {
has_perk = truth_is_relative_perk
NOT = { exists = scope:having_find_secrets_event }
}
random = {
chance = scope:councillor.spymaster_find_secrets_secret_discovery_chance
save_scope_value_as = {
name = having_find_secrets_event
value = yes
}
trigger_event = spymaster_task.0381 # Fabricate a Hook (if you have Truth is Relative)
}
}
if = {
limit = {
NOT = { exists = scope:having_find_secrets_event }
}
trigger_event = spymaster_task.0399
}
random = {
chance = 10
add_character_flag = {
flag = no_ai_find_secrets
years = 3
}
}
}
}
monthly_on_action = task_find_secrets_side_effects
ai_will_do = {
value = 2
if = { # Greedy AI's like spying on their subjects
limit = {
scope:councillor_liege.ai_greed > 0
}
add = {
value = scope:councillor_liege.ai_greed
divide = 2
}
}
if = { # AI's with Golden Obligations really like this
limit = {
scope:councillor_liege = {
has_perk = golden_obligations_perk
}
}
add = 25
}
if = { # AI's with certain focuses enjoy this
limit = {
scope:councillor_liege = {
OR = {
has_focus = intrigue_skulduggery_focus
has_focus = intrigue_intimidation_focus
has_focus = martial_authority_focus
}
}
}
add = 50
}
if = { # Honorable AI's dislike spying on their subjects
limit = {
scope:councillor_liege.ai_honor > 0
}
add = {
value = scope:councillor_liege.ai_honor
multiply = -1
}
}
if = { # Compassionate AI's dislike spying on their subjects
limit = {
scope:councillor_liege.ai_compassion > 0
}
add = {
value = scope:councillor_liege.ai_compassion
multiply = -0.5
}
}
if = {
# Honest or trusting AI's just don't do this at all
limit = {
scope:councillor_liege = {
OR = {
has_trait = honest
has_trait = trusting
}
}
}
multiply = 0
}
if = {
# Don't do this too often
limit = {
scope:councillor_liege = { has_character_flag = no_ai_find_secrets }
}
multiply = 0
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,325 @@
task_vizier_default = {
default_task = yes
position = councillor_vizier
effect_desc = task_vizier_default_effect_desc
task_type = task_type_general
task_progress = task_progress_infinite
council_owner_modifier = {
name = task_vizier_default_diplomacy_modifier
diplomacy = 1
scale = vizier_default_task_diplomacy_scale
}
council_owner_modifier = {
name = task_vizier_default_martial_modifier
martial = 1
scale = vizier_default_task_martial_scale
}
council_owner_modifier = {
name = task_vizier_default_stewardship_modifier
stewardship = 1
scale = vizier_default_task_stewardship_scale
}
council_owner_modifier = {
name = task_vizier_default_intrigue_modifier
intrigue = 1
scale = vizier_default_task_intrigue_scale
}
council_owner_modifier = {
name = task_vizier_default_learning_modifier
learning = 1
scale = vizier_default_task_learning_scale
}
monthly_on_action = spouse_councillor_default_on_action
ai_will_do = {
value = 1 # Always a good backup
}
}
task_vizier_court_politics = {
position = councillor_vizier
skill = diplomacy
task_type = task_type_general
task_progress = task_progress_infinite
effect_desc = task_court_politics_effect_desc
council_owner_modifier = {
name = task_vizier_court_politics_modifier
diplomacy = 1
scale = vizier_task_court_politics_scale
}
monthly_on_action = court_politics_setup
ai_will_do = {
value = 0
if = {
limit = {
diplomacy > very_high_skill_rating
}
add = 1
}
else_if = {
limit = {
diplomacy > high_skill_rating
}
add = 0.5
}
if = { # Keep doing it once it is started
limit = {
is_performing_council_task = task_court_politics
}
add = 1000
}
scope:councillor_liege = {
if = {
limit = {
diplomacy < decent_skill_rating
}
multiply = 3
}
else_if = {
limit = {
diplomacy < medium_skill_rating
}
multiply = 2
}
}
}
}
task_vizier_chivalry = {
position = councillor_vizier
skill = martial
task_type = task_type_general
task_progress = task_progress_infinite
effect_desc = task_chivalry_effect_desc
council_owner_modifier = {
name = task_vizier_chivalry_modifier
martial = 1
scale = vizier_task_chivalry_scale
}
monthly_on_action = chivalry_setup
ai_will_do = {
value = 0
if = {
limit = {
martial > very_high_skill_rating
}
add = 1
}
else_if = {
limit = {
martial > high_skill_rating
}
add = 0.5
}
if = { # Keep doing it once it is started
limit = {
is_performing_council_task = task_chivalry
}
add = 1000
}
scope:councillor_liege = {
if = {
limit = {
martial < decent_skill_rating
}
multiply = 3
}
else_if = {
limit = {
martial < medium_skill_rating
}
multiply = 2
}
}
}
}
task_vizier_manage_domain = {
position = councillor_vizier
skill = stewardship
task_type = task_type_general
task_progress = task_progress_infinite
effect_desc = task_manage_domain_effect_desc
council_owner_modifier = {
name = task_vizier_manage_domain_modifier
stewardship = 1
scale = vizier_task_manage_domain_scale
}
monthly_on_action = manage_domain_setup
ai_will_do = {
value = 0
if = {
limit = {
stewardship > very_high_skill_rating
}
add = 1
}
else_if = {
limit = {
stewardship > high_skill_rating
}
add = 0.5
}
if = { # Keep doing it once it is started
limit = {
is_performing_council_task = task_manage_domain
}
add = 1000
}
scope:councillor_liege = {
if = {
limit = {
stewardship < decent_skill_rating
}
multiply = 3
}
else_if = {
limit = {
stewardship < medium_skill_rating
}
multiply = 2
}
}
}
}
task_vizier_court_intrigue = {
position = councillor_vizier
skill = intrigue
task_type = task_type_general
task_progress = task_progress_infinite
effect_desc = task_court_intrigue_effect_desc
council_owner_modifier = {
name = task_vizier_court_intrigue_modifier
intrigue = 1
scale = vizier_task_court_intrigue_scale
}
monthly_on_action = court_intrigue_setup
ai_will_do = {
value = 0
if = {
limit = {
intrigue > very_high_skill_rating
}
add = 1
}
else_if = {
limit = {
intrigue > high_skill_rating
}
add = 0.5
}
if = { # Keep doing it once it is started
limit = {
is_performing_council_task = task_court_intrigue
}
add = 1000
}
scope:councillor_liege = {
if = {
limit = {
intrigue < decent_skill_rating
}
multiply = 3
}
else_if = {
limit = {
intrigue < medium_skill_rating
}
multiply = 2
}
}
}
}
task_vizier_patronage = {
position = councillor_vizier
skill = learning
task_type = task_type_general
task_progress = task_progress_infinite
effect_desc = task_patronage_effect_desc
council_owner_modifier = {
name = task_vizier_patronage_modifier
learning = 1
scale = vizier_task_patronage_scale
}
monthly_on_action = patronage_setup
ai_will_do = {
value = 0
if = {
limit = {
learning > very_high_skill_rating
}
add = 1
}
else_if = {
limit = {
learning > high_skill_rating
}
add = 0.5
}
if = { # Keep doing it once it is started
limit = {
is_performing_council_task = task_patronage
}
add = 1000
}
scope:councillor_liege = {
if = {
limit = {
learning < decent_skill_rating
}
multiply = 3
}
else_if = {
limit = {
learning < medium_skill_rating
}
multiply = 2
}
}
}
}

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.