Skip to content

Commit

Permalink
defines
Browse files Browse the repository at this point in the history
  • Loading branch information
Grekopithikos committed Nov 16, 2023
1 parent de6fce9 commit 6cdcfb6
Show file tree
Hide file tree
Showing 17 changed files with 723 additions and 73 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ invite_a_linguist_liege = {
NOT = { has_same_court_language = liege } # Can use other decision in this case
}
NOR = {
AND = { liege = { has_royal_court = yes has_court_language_of_culture = root.culture } } # No need to learn your own culture's language
liege = { has_court_language_of_culture = root.culture } # No need to learn your own culture's language
AND = {
knows_language_of_culture = root.liege.culture
any_child = {
Expand Down
287 changes: 287 additions & 0 deletions common/decisions/dlc_decisions/fp3_decisions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,287 @@
#Warcraft
###################################
# Favour Skilled Outsiders
# By Ewan Cowhig Croft
###################################

# Bring in skilled characters that like you at the cost of offending your other vassals.
favour_skilled_outsiders_decision = {
desc = favour_skilled_outsiders_decision_desc
confirm_text = favour_skilled_outsiders_decision_confirm
selection_tooltip = favour_skilled_outsiders_decision_tooltip
picture = "gfx/interface/illustrations/decisions/fp3_decision_tax_collector.dds"
sort_order = 180

is_shown = {
has_fp3_dlc_trigger = yes
is_landed = yes
favour_skilled_outsiders_decision_valid_character_to_take_trigger = yes
}

is_valid = {
any_sub_realm_county = { favour_skilled_outsiders_decision_valid_county_to_generate_trigger = yes }
favour_skilled_outsiders_decision_valid_character_to_take_trigger = yes
realm_size >= medium_realm_size
}

is_valid_showing_failures_only = {
is_available_adult = yes
is_at_war = no
}

widget = {
gui = "decision_view_widget_option_list_generic"
controller = decision_option_list_controller
decision_to_second_step_button = "favour_skilled_outsiders_decision.second_step"

# Diplomacy-Martial: Eloquent Captains
item = {
value = outsider_diplomacy_martial
current_description = favour_skilled_outsiders_decision.tt.diplomacy_martial
localization = favour_skilled_outsiders_decision.tt.diplomacy_martial
icon = "gfx/interface/icons/message_feed/a_catch_all_councillor_icon.dds"
is_valid = {
custom_tooltip = {
text = COUNCILLOR_MISSING_CHANCELLOR
exists = cp:councillor_chancellor
}
trigger_if = {
limit = { exists = cp:councillor_chancellor }
cp:councillor_chancellor = { diplomacy < favour_skilled_outsiders_decision_skill_threshold_value }
# And an extra tooltip for narrative clarity.
custom_tooltip = {
text = favour_skilled_outsiders_decision.tt.skilled_councillor_keeps_clean_house
cp:councillor_chancellor = { diplomacy < favour_skilled_outsiders_decision_skill_threshold_value }
}
}
}
ai_chance = {
# The AI wants to recruit characters that compensate for their skills.
## So we set a high base.
value = 100
## Then we subtract root's relevant skills.
subtract = diplomacy
subtract = martial
}
}
# Martial-Prowess: Career Soldiers
item = {
value = outsider_martial_prowess
current_description = favour_skilled_outsiders_decision.tt.martial_prowess
localization = favour_skilled_outsiders_decision.tt.martial_prowess
icon = "gfx/interface/icons/message_feed/mercenary.dds"
is_valid = {
custom_tooltip = {
text = COUNCILLOR_MISSING_MARSHAL
exists = cp:councillor_marshal
}
trigger_if = {
limit = { exists = cp:councillor_marshal }
cp:councillor_marshal = { martial < favour_skilled_outsiders_decision_skill_threshold_value }
# And an extra tooltip for narrative clarity.
custom_tooltip = {
text = favour_skilled_outsiders_decision.tt.skilled_councillor_keeps_clean_house
cp:councillor_marshal = { martial < favour_skilled_outsiders_decision_skill_threshold_value }
}
}
}
ai_chance = {
# The AI wants to recruit characters that compensate for their skills.
## So we set a high base.
value = 100
## Then we subtract root's relevant skills.
subtract = martial
subtract = prowess
}
}
# Prowess-Learning: Fringe Nobility
item = {
value = outsider_prowess_learning
current_description = favour_skilled_outsiders_decision.tt.prowess_learning
localization = favour_skilled_outsiders_decision.tt.prowess_learning
icon = "gfx/interface/icons/message_feed/tier_down.dds"
# Always valid.
ai_chance = {
# The AI wants to recruit characters that compensate for their skills.
## So we set a high base.
value = 100
## Then we subtract root's relevant skills.
subtract = prowess
subtract = learning
}
}
# Learning-Intrigue: Dedicated Functionaries
item = {
value = outsider_learning_intrigue
current_description = favour_skilled_outsiders_decision.tt.learning_intrigue
localization = favour_skilled_outsiders_decision.tt.learning_intrigue
icon = "gfx/interface/icons/message_feed/secret.dds"
is_valid = {
custom_tooltip = {
text = COUNCILLOR_MISSING_COURT_CHAPLAIN
exists = cp:councillor_court_chaplain
}
trigger_if = {
limit = { exists = cp:councillor_court_chaplain }
cp:councillor_court_chaplain = { learning < favour_skilled_outsiders_decision_skill_threshold_value }
# And an extra tooltip for narrative clarity.
custom_tooltip = {
text = favour_skilled_outsiders_decision.tt.skilled_councillor_keeps_clean_house
cp:councillor_court_chaplain = { learning < favour_skilled_outsiders_decision_skill_threshold_value }
}
}
}
ai_chance = {
# The AI wants to recruit characters that compensate for their skills.
## So we set a high base.
value = 100
## Then we subtract root's relevant skills.
subtract = learning
subtract = intrigue
}
}
# Intrigue-Stewardship: Cunning Officials
item = {
value = outsider_intrigue_stewardship
current_description = favour_skilled_outsiders_decision.tt.intrigue_stewardship
localization = favour_skilled_outsiders_decision.tt.intrigue_stewardship
icon = "gfx/interface/icons/message_feed/spy_master.dds"
is_valid = {
custom_tooltip = {
text = COUNCILLOR_MISSING_SPYMASTER
exists = cp:councillor_spymaster
}
trigger_if = {
limit = { exists = cp:councillor_spymaster }
cp:councillor_spymaster = { intrigue < favour_skilled_outsiders_decision_skill_threshold_value }
# And an extra tooltip for narrative clarity.
custom_tooltip = {
text = favour_skilled_outsiders_decision.tt.skilled_councillor_keeps_clean_house
cp:councillor_spymaster = { intrigue < favour_skilled_outsiders_decision_skill_threshold_value }
}
}
}
ai_chance = {
# The AI wants to recruit characters that compensate for their skills.
## So we set a high base.
value = 100
## Then we subtract root's relevant skills.
subtract = intrigue
subtract = stewardship
}
}
# Stewardship-Diplomacy: Skilled Administrators
item = {
value = outsider_stewardship_diplomacy
current_description = favour_skilled_outsiders_decision.tt.stewardship_diplomacy
localization = favour_skilled_outsiders_decision.tt.stewardship_diplomacy
icon = "gfx/interface/icons/message_feed/money.dds"
is_valid = {
custom_tooltip = {
text = COUNCILLOR_MISSING_STEWARD
exists = cp:councillor_steward
}
trigger_if = {
limit = { exists = cp:councillor_steward }
cp:councillor_steward = { stewardship < favour_skilled_outsiders_decision_skill_threshold_value }
# And an extra tooltip for narrative clarity.
custom_tooltip = {
text = favour_skilled_outsiders_decision.tt.skilled_councillor_keeps_clean_house
cp:councillor_steward = { stewardship < favour_skilled_outsiders_decision_skill_threshold_value }
}
}
}
ai_chance = {
# The AI wants to recruit characters that compensate for their skills.
## So we set a high base.
value = 100
## Then we subtract root's relevant skills.
subtract = stewardship
subtract = diplomacy
}
}
}

effect = {
# So here's what'll happen.
custom_tooltip = favour_skilled_outsiders_decision.tt.promote_minorities_from_within_realm
custom_tooltip = favour_skilled_outsiders_decision.tt.two_batches_to_choose_from
# And how people will react.
show_as_tooltip = { favour_skilled_outsiders_decision_apply_opinions_effect = yes }
# Save how much prestige we paid in case we back out.
save_scope_value_as = {
name = prestige_cost
value = favour_skilled_outsiders_decision_prestige_cost_value
}
# Now fire the actual event.
trigger_event = fp3_misc_decisions.0032
}

cooldown = { years = 25 }

cost = { prestige = favour_skilled_outsiders_decision_prestige_cost_value }

ai_check_interval = 24

ai_potential = {
# Check this stuff early, else we'll go through a bunch of county checks unnecessarily.
favour_skilled_outsiders_decision_valid_character_to_take_trigger = yes
# Plus simple validity checks.
is_adult = yes
is_at_war = no
}

ai_will_do = {
# We don't want to use this too much - the AI is gonna have trouble utilising such characters correctly.
base = -50

# Missing councillors.
## Chancellor
modifier = {
add = 50
NOT = { exists = cp:councillor_chancellor }
}
## Steward
modifier = {
add = 50
NOT = { exists = cp:councillor_steward }
}
## Marshal
modifier = {
add = 50
NOT = { exists = cp:councillor_marshal }
}
## Spymaster
modifier = {
add = 50
NOT = { exists = cp:councillor_spymaster }
}
## Court_chaplain
modifier = {
add = 50
NOT = { exists = cp:councillor_court_chaplain }
}
# Government.
## Teensy upweight for clans, as the model for the decision.
modifier = {
add = 20
government_has_flag = government_is_clan
}
# Traits.
## Calm
modifier = {
add = 15
has_trait = calm
}
## Humble
modifier = {
add = 15
has_trait = humble
}
## Ambitious
modifier = {
add = 15
has_trait = ambitious
}
}
}
19 changes: 15 additions & 4 deletions common/defines/00_defines.txt
Original file line number Diff line number Diff line change
Expand Up @@ -676,14 +676,14 @@ NReligion = {
0
-10
-20
-60
-30
}

HOSTILITY_COUNTY_OPINION_EFFECTS = { # The opinion effects of each hostility level on counties. Modified by fervor of the county's faith divided by 100
0
-15
-30
-75
-45
}

HOSTILITY_COMBAT_MOD_MULT = { # Multiplier to how big of an effect tolerance_advantage_mod has. The higher it is, the greater the effect
Expand Down Expand Up @@ -1319,20 +1319,27 @@ NCourtPositions = {
}

NStruggle = {
PHASE_TRANSITION_THRESHOLD = 1000 # How much points need to be accumulated in order to trigger the transition to a new phase
# How much points need to be accumulated during point-based phase in order to trigger the transition to a new phase
POINT_BASED_PHASE_DEFAULT_DURATION = 1000
# Sound effect played when change animation for struggle button
PHASE_TRANSITION_SOUND_EFFECT_PATH = "event:/DLC/FP2/SFX/UI/fp2_struggle_button_state_change"
YEARLY_DEFAULT_PHASE_POINTS = 0 # How many points are given to the default phase every year
PHASE_TRANSITION_DURATION = 90 # How many days before the new phase starts once the threshold is reached
NUM_CATALYST_HISTORIES_DISPLAYED = 5 # How many catalyst histories that should be shown in the struggle tooltip
NOTIFICATION_MESSAGE_RELATIONS = { "friend", "rival", "nemesis" }

}

NHouseUnity = {
CHANGELOG_DURATION = 5 # After how many years do changelog entries get deleted?
}

NMemories = {
DEFAULT_MEMORY_DURATION_YEARS = 10 # Default nr of years until a memory expires
DEATH_MEMORY_RETENTION_YEARS_PER_TIER = { -1 -1 -1 -1 0 0 } # We can keep or extend memories of dead characters by tier. (-1 forgets characters' memories on death, 0 keeps, and X positive adds X years)
DEATH_MEMORY_RETENTION_YEARS_PLAYED_CHARACTER = 1000 # Any character that was played by a player retains their memories, adding X years
}

# Settings for character based travel (not army travel)
NTravel = {
TRAVEL_SPEED_BASE = 0 # Travel speed base score value
Expand Down Expand Up @@ -1376,7 +1383,7 @@ NTravel = {
NDiarchy = {
DIARCHY_SUCCESSION_SIZE = 5 # How many people are in diarchy line of succession. Active or designated diarch takes 1st spot there
DIARCHY_MONTHLY_POWER_CHANGE = 0.25 # How much scales of power level changes each months towards balance value
DIARCH_APTITUDE_LEVELS = { 20 40 60 80 100 } # diarchy aptitude value cutoff points
DIARCH_APTITUDE_LEVELS = { 20 40 60 80 } # diarchy aptitude value cutoff points
DESIGNATE_DIARCH_INTERVAL_DAYS = 3650 # Length of the cooldown after designating a diarch
}

Expand Down Expand Up @@ -1434,3 +1441,7 @@ NHostage = {
GAIN_REDUCTION_PER_HOSTAGE = 0.2 # Income from every subsequent hostage is relatively reduced by this value. More valuable hostages are evaluated first
MIN_GAIN_PER_HOSTAGE = 0.05 # Minimum possible fraction of income the hostage can give
}

NTaxSlot = {
TAX_DECREE_COOLDOWN = 5 # number of years you have to wait before changing a jurisdictions tax decree again
}
Loading

0 comments on commit 6cdcfb6

Please sign in to comment.