This commit is contained in:
Magpie490 2025-02-19 22:51:48 +00:00
parent f1a979f473
commit ffc7462322
12 changed files with 14362 additions and 0 deletions

View file

@ -0,0 +1,77 @@
# Vassal obligations - how much does the vassal give to their liege. The vassal's government type determines which contract type is used.
# Note that the values can be changed with the vassal_tax_contribution_add and vassal_levy_contribution_add modifiers.
vassal_contract = {
uses_opinion_of_liege = yes/no # if set to yes, scope:opinion_of_liege can be used in the levies and tax script math (it's a value that's updated daily for player contracts, for AI it uses NVassalContract::OPINION_OF_LIEGE_UPDATE_INTERVAL. No by default for performance reasons.
display_mode = tree/list/radiobutton # How are the obligations displayed in the negotiate contract UI, defualt is radiobutton
# Or: Modifiable contract with multiple levels:
obligation_levels = {
# Scopes available:
# scope:liege the liege in the contract
# scope:vassal the vassal in the contract
# scope:opinion_of_liege set if uses_opinion_of_liege = yes
# scope:tax_slot the slot they are in/are being considered to be placed in
# scope:tax_collector the collector for the above/the potential new collector
vassal_obligation_low = { # choose a key for the level, it will be used for localization
levies = 0.5 # % of levies (0..1), default 0; can also use script math
tax = 0.2 # % of gold income (0..1), default 0; can also use script math
min_levies = 0.1 # optional min cap on tax, can alsu use script math as levies and tax
min_tax = 0.0 # optional min cap on levies, can alsu use script math as levies and tax
contribution_desc = { ... } # optional dynamic description used for the breakdown of the tax & levies contribution
tax_contribution_postfix = "..." # Optional postfix added to the tax contribution breakdown
levies_contribution_postfix = "..." # Optional postfix added to the levies contribution breakdown
unclamped_contribution_label = "..." # Breakdown label for the unclamped tax/levies contribution
min_contribution_label = "..." # Breakdown label for the minimum tax/levies contribution the value is clamped to
vassal_opinion = 0 # value for opinion of liege that's added to vassal's opinion of the liege if they have this contract
flag = token # Arbitrary flag, can be checked in script to see if any obligation level in the current vassal contract has a flag
score = int # Positive means it is better for the vassal to have, 0 means neutral, negative is better for liege
# When changing obligations the current score and new score are compared to see if it is in favour of the vassal or liege
# and by how much.
# Defaults to order the contracts are defined
ai_liege_desire = <script value int> # How much does the liege in the contract want this option
ai_vassal_desire = <script value int> # How much does the vassal in the contract want this option
liege_modifier = { <character modifiers> } # Modifiers applied to the liege in the contract
vassal_modifier = { <character modifiers> } # Modifiers applied to the vassal in the contract
is_valid = { <trigger> } # Is this obligation level valid for a vassal
# Multiplier against the total tax/levies in a contract, be careful you do not get weird stacking beavhour if multiple are on at once
tax_factor = <script value fixed point>
levies_factor = <script value fixed point>
}
vassal_obligation_normal = {
default = yes # mark a level as default (otherwise the first will be the default)
parent = vassal_obligation_low # What level can lead into this and that this can lead back to
position = { x y } # Where should this obligation icon appear when modifying contracts, multiplied with the NVassalContract::OBLIGATION_OFFSET define
icon = "path/to/image.dds" # Icon used in UI
...
}
}
}
### AI Note
The liege and vassal desire are used as follows:
When finding the most desired level to change we check if any ajdacent obligation level to the currently active ones are desired by them more. Desires less than or equal to zero are not considered and if the score is less then or equal to the desire of the current level it is also not considered.
The does_ai_liege_in_vassal_contract_desire_obligation_change and does_ai_vassal_in_vassal_contract_desire_obligation_change triggers check that we have any obligation level change desired at all.
The apply_ai_vassal_obligation_vassal_most_desired and apply_ai_vassal_obligation_liege_most_desired effects apply the desired option via a weighted random of the desire score of all valid desired levels.
# Text
The following should be localised
<contract_level>
<obligation_level>
<obligation_level>_short
<obligation_level>_desc

View file

@ -0,0 +1,377 @@
administrative_obligations = {
obligation_levels = {
default = {
levies = {
value = 0.3
#multiply = governor_efficiency
}
tax = {
value = 0.1
#multiply = governor_efficiency
}
}
}
}
### brief: administrative_themes
# This is referenced in code.
#
administrative_themes = {
display_mode = radiobutton
is_shown = {
scope:vassal.primary_title.tier >= tier_duchy
}
obligation_levels = {
admin_theme_balanced = {
default = yes
position = { 0 0 }
icon = "gfx/interface/icons/theme_administration_types/icon_balanced_administration.dds"
ai_liege_desire = {
value = 0
if = {
limit = {
scope:vassal = {
is_ai = yes
}
}
add = 1
}
}
ai_vassal_desire = 0
score = 0
color = { 0.7 0.7 0.7 1.0 }
vassal_modifier = {
governor_xp_gain_mult = 0.2
}
flag = admin_theme_balanced
}
admin_theme_civilian = {
position = { 2 0 }
icon = "gfx/interface/icons/theme_administration_types/icon_civilian_administration.dds"
ai_liege_desire = {
value = 0
if = {
limit = {
scope:vassal = {
is_ai = yes
OR = {
has_trait = education_stewardship
stewardship >= very_high_skill_rating
AND = { # Large semi-coastal themes are good for an economic focus
any_sub_realm_county = { count >= 2 is_coastal_county = yes }
any_sub_realm_county = { count >= 2 is_coastal_county = no }
}
}
}
}
add = 2
}
if = {
limit = {
scope:liege = {
ai_has_economical_boom_personality = yes
}
}
add = 1
}
}
ai_vassal_desire = 0
score = 0
color = { 0.2 0.2 0.7 1.0 }
tax_factor = 0.5
vassal_modifier = {
development_growth_factor = 0.2
build_gold_cost = -0.1
build_speed = -0.1
men_at_arms_title_limit = -2
men_at_arms_title_cap = -2
}
flag = admin_stewardship_obligation_bonus
flag = admin_influence_construction_bonus
flag = admin_ai_is_builder
flag = admin_theme_civilian
flag = obligation_high_taxes
}
admin_theme_military = {
position = { 1 0 }
icon = "gfx/interface/icons/theme_administration_types/icon_military_administration.dds"
ai_liege_desire = {
value = 0
if = {
limit = {
scope:vassal = {
is_ai = yes
OR = {
has_trait = education_martial
martial >= very_high_skill_rating
primary_title = { any_owned_title_maa_regiment = { count > 4 } }
AND = { # Large inland themes are good for military
any_sub_realm_county = { count >= 5 }
any_sub_realm_county = { percent >= 0.95 is_coastal_county = no }
}
}
}
}
add = 2
}
if = {
limit = {
scope:liege = {
ai_has_warlike_personality = yes
}
}
add = 1
}
}
ai_vassal_desire = 0
score = 0
color = { 0.7 0.2 0.2 1.0 }
tax_factor = -0.75
levies_factor = 0.75
vassal_modifier = {
development_growth_factor = -0.25
monthly_county_control_growth_factor = 0.1
maa_damage_mult = 0.1
men_at_arms_title_cap = 2
men_at_arms_maintenance = -0.2
}
flag = admin_martial_obligation_bonus
flag = admin_theme_military
flag = obligation_high_levies
}
admin_theme_frontier = {
position = { 0 1 }
icon = "gfx/interface/icons/theme_administration_types/icon_frontier_administration.dds"
ai_liege_desire = {
value = 0
if = {
limit = {
scope:vassal = {
is_ai = yes
}
}
add = 5
}
}
ai_vassal_desire = 0
score = 0
color = { 0.2 0.7 0.2 1.0 }
is_valid = {
custom_tooltip = {
text = admin_theme_frontier_valid_desc
scope:vassal = {
any_sub_realm_county = {
any_neighboring_county = {
holder = {
NOT = { top_liege = scope:vassal.top_liege }
}
}
}
}
}
}
tax_factor = -0.4
vassal_modifier = {
fort_level = 2
defender_advantage = 6
hostile_county_attrition = -0.3
hostile_raid_time = 0.75
# Values to tweak the AI slightly in order to make them more likely to declare war
ai_boldness = 20
ai_rationality = -15
}
flag = admin_prowess_obligation_bonus
flag = admin_duchy_expansion_unlocked
flag = admin_ai_is_warlike
flag = admin_theme_frontier
flag = admin_theme_can_raid
}
admin_theme_imperial = {
position = { 1 1 }
icon = "gfx/interface/icons/theme_administration_types/icon_imperial_administration.dds"
ai_liege_desire = {
value = 0
if = {
limit = {
scope:liege = {
NOT = {
any_vassal = { vassal_contract_has_flag = admin_theme_imperial }
}
}
scope:vassal = {
is_ai = yes
culture = scope:liege.culture
faith = top_liege.primary_title.state_faith
}
}
add = 5
}
if = {
limit = {
exists = scope:liege.house
exists = scope:vassal.house
scope:liege.house = scope:vassal.house
}
add = 1
}
}
ai_vassal_desire = 0
score = 0
color = { 0.7 0.0 0.7 1.0 }
is_valid = {
scope:liege = {
highest_held_title_tier = tier_empire
}
custom_tooltip = {
text = admin_theme_imperial_valid_desc
OR = {
scope:liege = {
NOT = {
any_vassal = { vassal_contract_has_flag = admin_theme_imperial }
}
}
AND = {
scope:vassal = { vassal_contract_has_flag = admin_theme_imperial }
scope:liege = {
any_vassal = {
count = 1
vassal_contract_has_flag = admin_theme_imperial
}
}
}
}
}
}
tax_factor = 0.1
liege_modifier = {
monthly_prestige_gain_per_legitimacy_level_add = 0.5
legitimacy_gain_mult = 0.2
}
vassal_modifier = {
monthly_prestige = 0.5
monthly_influence = 0.25
}
flag = admin_theme_imperial
flag = admin_prestige_obligation_bonus
flag = admin_cannot_revoke_titles_without_cause
flag = obligation_high_taxes
}
admin_theme_naval = {
position = { 2 1 }
icon = "gfx/interface/icons/theme_administration_types/icon_naval_administration.dds"
ai_liege_desire = {
value = 0
if = {
limit = {
scope:vassal = { is_ai = yes }
}
if = {
limit = { # Large coastal areas qualify as good naval themes
scope:vassal = {
any_sub_realm_county = {
count >= 3
is_coastal_county = yes
}
}
scope:liege = { # But don't go overboard with naval themes
any_vassal = {
percent < 0.15
vassal_contract_has_flag = admin_theme_naval
}
}
}
add = 3
}
if = {
limit = { # Islands are good naval candidates
scope:vassal = {
any_sub_realm_county = {
percent >= 0.95
is_coastal_county = yes
OR = {
any_neighboring_county = {
percent >= 0.95
holder = {
OR = {
this = scope:vassal
any_liege_or_above = { this = scope:vassal }
}
}
}
any_neighboring_county = { count < 1 }
}
}
}
}
add = 8
}
}
}
ai_vassal_desire = 0
score = 0
color = { 0.0 0.4 0.7 1.0 }
is_valid = {
custom_tooltip = {
text = admin_theme_naval_valid_desc
scope:vassal = {
any_sub_realm_county = {
is_coastal_county = yes
}
}
}
}
tax_factor = -0.2
liege_modifier = {
embarkation_cost_mult = -0.1
naval_movement_speed_mult = 0.1
}
vassal_modifier = {
embarkation_cost_mult = -0.5
naval_movement_speed_mult = 0.25
no_disembark_penalty = yes
coastal_advantage = 10
development_growth_factor = 0.1
}
flag = admin_naval_duchy_expansion_unlocked
flag = admin_tradeport_obligation_bonus
flag = admin_theme_naval
}
}
}

View file

@ -0,0 +1,25 @@
clan_tax_collector_obligations = {
obligation_levels = {
default = {
levies = {
value = 0
if = {
limit = { exists = scope:tax_collector }
add = clan_government_levies_default
multiply = clan_government_tax_collector_aptitude_multiplier
}
}
tax = {
value = 0
if = {
limit = { exists = scope:tax_collector }
add = {
value = clan_government_tax_default
multiply = clan_government_tax_collector_aptitude_multiplier
}
}
}
}
}
}

View file

@ -0,0 +1,189 @@
feudal_government_taxes = {
display_mode = tree
icon = gold_icon
obligation_levels = {
feudal_tax_exempt = {
position = { 0 0 }
tax = exempt_feudal_tax
vassal_opinion = 10
ai_liege_desire = 1
ai_vassal_desire = 5
score = 2
}
feudal_tax_low = {
parent = feudal_tax_exempt
position = { 1 0 }
tax = low_feudal_tax
vassal_opinion = 5
ai_liege_desire = {
value = 2
if = {
limit = {
scope:liege = {
ai_should_focus_on_building_in_their_capital = yes
}
scope:vassal = {
AND = {
government_has_flag = government_is_feudal
vassal_contract_obligation_level:feudal_government_taxes <= feudal_tax_exempt_level
}
}
}
add = 8
}
}
ai_vassal_desire = 4
score = 1
}
feudal_tax_normal = {
default = yes
parent = feudal_tax_low
position = { 2 0 }
tax = normal_feudal_tax
ai_liege_desire = {
value = 3
if = {
limit = {
scope:liege = {
ai_should_focus_on_building_in_their_capital = yes
}
scope:vassal = {
AND = {
government_has_flag = government_is_feudal
vassal_contract_obligation_level:feudal_government_taxes <= feudal_tax_low_level
}
}
}
add = 7
}
}
ai_vassal_desire = 3
score = 0
}
feudal_tax_high = {
parent = feudal_tax_normal
position = { 3 0 }
tax = high_feudal_tax
vassal_opinion = -15
ai_liege_desire = {
value = 4
if = {
limit = {
scope:liege = {
ai_should_focus_on_building_in_their_capital = yes
}
scope:vassal = {
AND = {
government_has_flag = government_is_feudal
vassal_contract_obligation_level:feudal_government_taxes <= feudal_tax_normal_level
}
}
}
add = 6
}
}
ai_vassal_desire = 2
score = -1
flag = obligation_high_taxes
}
feudal_tax_extortionate = {
parent = feudal_tax_high
position = { 4 0 }
tax = extortionate_feudal_tax
vassal_opinion = -25
ai_liege_desire = {
value = 5
if = {
limit = {
scope:liege = {
ai_should_focus_on_building_in_their_capital = yes
}
scope:vassal = {
AND = {
government_has_flag = government_is_feudal
vassal_contract_obligation_level:feudal_government_taxes <= feudal_tax_high_level
}
}
}
add = 5
}
}
ai_vassal_desire = 1
score = -2
flag = obligation_high_taxes
}
}
}
feudal_government_levies = {
display_mode = tree
icon = soldier_icon
obligation_levels = {
feudal_levies_exempt = {
position = { 0 0 }
levies = 0
vassal_opinion = 10
ai_liege_desire = 1
ai_vassal_desire = 5
score = 2
}
feudal_levies_low = {
parent = feudal_levies_exempt
position = { 1 0 }
levies = 0.1
vassal_opinion = 5
ai_liege_desire = 2
ai_vassal_desire = 4
score = 1
}
feudal_levies_normal = {
default = yes
parent = feudal_levies_low
position = { 2 0 }
levies = 0.25
ai_liege_desire = 3
ai_vassal_desire = 3
score = 0
}
feudal_levies_high = {
parent = feudal_levies_normal
position = { 3 0 }
levies = 0.35
vassal_opinion = -15
ai_liege_desire = 4
ai_vassal_desire = 2
score = -1
flag = obligation_high_levies
}
feudal_levies_extortionate = {
parent = feudal_levies_high
position = { 4 0 }
levies = 0.5
vassal_opinion = -25
ai_liege_desire = 5
ai_vassal_desire = 1
score = -2
flag = obligation_high_levies
}
}
}

View file

@ -0,0 +1,124 @@
republic_government_obligations = {
obligation_levels = {
default = {
levies = {
if = {
limit = {
primary_title.tier >= tier_county
scope:liege.culture = {
has_cultural_parameter = republican_vassals_pay_more
}
}
value = {
add = 0.15
# Add an extra with the right perk
if = {
limit = {
exists = scope:liege.dynasty
scope:liege.dynasty = {
has_dynasty_perk = fp2_urbanism_legacy_3
}
}
add = 0.15
}
}
}
else = {
value = {
add = 0.1
# Add an extra with the right perk
if = {
limit = {
exists = scope:liege.dynasty
scope:liege.dynasty = {
has_dynasty_perk = fp2_urbanism_legacy_3
}
}
add = 0.15
}
}
}
}
tax = {
if = {
limit = { scope:liege = { government_has_flag = government_is_tribal } }
value = {
add = 0.05
# Add an extra with the right perk
if = {
limit = {
exists = scope:liege.dynasty
scope:liege.dynasty = {
has_dynasty_perk = fp2_urbanism_legacy_3
}
}
add = 0.15
}
}
}
else_if = {
limit = {
scope:vassal = {
primary_title.tier >= tier_county
}
scope:liege.culture = {
has_cultural_parameter = republican_vassals_pay_more
}
}
value = {
add = 0.3
# Add an extra with the right perk
if = {
limit = {
exists = scope:liege.dynasty
scope:liege.dynasty = {
has_dynasty_perk = fp2_urbanism_legacy_3
}
}
add = 0.15
}
}
}
else = {
value = {
add = 0.2
# Add an extra with the right perk
if = {
limit = {
exists = scope:liege.dynasty
scope:liege.dynasty = {
has_dynasty_perk = fp2_urbanism_legacy_3
}
}
add = 0.15
}
}
}
}
contribution_desc = {
first_valid = {
triggered_desc = {
trigger = { scope:liege = { government_has_flag = government_is_tribal } }
desc = "tribal_liege_inefficiency"
}
triggered_desc = {
trigger = {
scope:vassal = {
primary_title.tier >= tier_county
}
scope:liege.culture = {
has_cultural_parameter = republican_vassals_pay_more
}
}
desc = "republican_vassals_pay_more_parameter"
}
}
}
}
}
}

View file

@ -0,0 +1,731 @@
@ai_standard_liege_desire = 2
@ai_standard_vassal_desire = 1
# Everything below this line is 'Fine Print'
special_contract = {
display_mode = radiobutton
is_shown = {
scope:vassal.primary_title.tier >= tier_county
}
obligation_levels = {
special_contract_none = {
position = { 0 1 }
default = yes
score = 0
ai_vassal_desire = {
value = 0
if = {
limit = {
scope:vassal = {
vassal_contract_has_flag = has_scutage_contract
OR = {
government_has_flag = government_is_clan
AND = {
government_has_flag = government_is_feudal
vassal_contract_obligation_level:feudal_government_taxes >= feudal_tax_normal_level
}
}
}
}
add = @ai_standard_vassal_desire
}
}
ai_liege_desire = {
value = 0
if = {
limit = {
scope:vassal = {
vassal_contract_has_flag = has_scutage_contract
OR = {
government_has_flag = government_is_clan
AND = {
government_has_flag = government_is_feudal
vassal_contract_obligation_level:feudal_government_taxes < feudal_tax_normal_level
}
}
}
}
add = @ai_standard_liege_desire
}
if = {
limit = {
scope:vassal = {
vassal_contract_has_flag = has_march_contract
OR = {
government_has_flag = government_is_clan
AND = {
government_has_flag = government_is_feudal
vassal_contract_obligation_level:feudal_government_levies < feudal_levies_normal_level
}
}
}
}
add = @ai_standard_liege_desire
}
if = {
limit = {
scope:vassal = {
vassal_contract_has_flag = has_palatinate_contract
OR = {
government_has_flag = government_is_clan
AND = {
government_has_flag = government_is_feudal
OR = {
vassal_contract_obligation_level:feudal_government_taxes >= feudal_tax_normal_level
vassal_contract_obligation_level:feudal_government_levies >= feudal_levies_normal_level
}
}
}
}
}
add = @ai_standard_liege_desire
}
}
}
special_contract_scutage = {
is_shown = {
scope:vassal.primary_title.tier >= tier_duchy
scope:vassal = { government_has_flag = government_is_feudal }
}
is_valid = {
scope:liege.culture = {
has_innovation = innovation_scutage
}
}
parent = special_contract_none
position = { 1 1 }
score = 0
tax_factor = scutage_contract_tax
levies_factor = -0.75
vassal_modifier = {
men_at_arms_maintenance = -0.2
}
flag = has_scutage_contract
flag = obligation_high_taxes
ai_liege_desire = {
value = 0
if = {
limit = {
scope:vassal = {
OR = {
government_has_flag = government_is_clan
AND = {
government_has_flag = government_is_feudal
vassal_contract_obligation_level:feudal_government_taxes > feudal_tax_normal_level
vassal_contract_obligation_level:feudal_government_levies < feudal_levies_normal_level
}
}
}
}
add = @ai_standard_liege_desire
}
if = {
limit = {
scope:liege = {
ai_should_focus_on_building_in_their_capital = yes
}
}
add = 10
}
}
}
special_contract_march = {
is_shown = {
scope:vassal.primary_title.tier >= tier_duchy
}
is_valid = {
scope:liege.culture = {
has_innovation = innovation_bannus
}
custom_tooltip = {
text = special_contract_march_border_trigger
scope:vassal = {
OR = {
vassal_contract_has_flag = has_march_contract
primary_title = { has_variable = historical_margrave }
any_sub_realm_county = {
any_neighboring_county = {
NOT = { holder.top_liege = scope:vassal.top_liege }
}
}
}
}
}
}
parent = special_contract_none
position = { 1 0 }
score = 0
tax_factor = march_contract_taxes
vassal_modifier = {
levy_size = 0.2
army_maintenance_mult = -0.2
garrison_size = 0.2
levy_reinforcement_rate = 0.2
controlled_province_advantage = 5
}
flag = has_march_contract
ai_liege_desire = {
value = 0
if = {
limit = {
scope:vassal = {
OR = {
government_has_flag = government_is_clan
AND = {
government_has_flag = government_is_feudal
OR = {
vassal_contract_obligation_level:feudal_government_taxes < feudal_tax_normal_level
vassal_contract_obligation_level:feudal_government_levies > feudal_levies_normal_level
}
}
}
}
}
add = @ai_standard_liege_desire
}
}
}
special_contract_castellan = {
is_shown = {
scope:vassal.primary_title.tier = tier_county
}
is_valid = {
scope:liege.culture = {
has_innovation = innovation_bannus
}
}
parent = special_contract_none
position = { 1 0 }
score = 0
tax_factor = march_contract_taxes
levies_factor = 0.5
vassal_modifier = {
levy_size = 0.2
army_maintenance_mult = -0.2
garrison_size = 0.2
levy_reinforcement_rate = 0.2
controlled_province_advantage = 5
}
flag = has_castellan_contract
flag = obligation_high_levies
ai_liege_desire = {
value = 0
if = {
limit = {
scope:vassal = {
OR = {
government_has_flag = government_is_clan
AND = {
government_has_flag = government_is_feudal
OR = {
vassal_contract_obligation_level:feudal_government_taxes < feudal_tax_normal_level
vassal_contract_obligation_level:feudal_government_levies > feudal_levies_normal_level
}
}
}
}
}
add = @ai_standard_liege_desire
}
}
}
special_contract_palatinate = {
is_shown = { scope:vassal = { government_has_flag = government_is_feudal } }
is_valid = {
scope:liege.culture = {
has_innovation = innovation_divine_right
}
}
parent = special_contract_none
position = { 1 2 }
score = 0
tax_factor = palatinate_contract_taxes
levies_factor = palatinate_contract_levies
liege_modifier = {
monthly_prestige_gain_mult = 0.05
}
vassal_modifier = {
monthly_prestige_gain_mult = 0.2
fellow_vassal_opinion = 15
owned_personal_scheme_success_chance_add = 10
owned_hostile_scheme_success_chance_add = 10
}
flag = has_palatinate_contract
ai_liege_desire = {
value = 0
if = {
limit = {
scope:vassal = {
government_has_flag = government_is_feudal
vassal_contract_obligation_level:feudal_government_taxes < feudal_tax_low_level
vassal_contract_obligation_level:feudal_government_levies < feudal_levies_low_level
}
}
add = @ai_standard_liege_desire
}
}
}
}
}
religious_rights = {
display_mode = checkbox
is_shown = {
NOT = {
scope:vassal.faith = scope:liege.faith
}
OR = {
NOT = {
scope:liege.faith = {
OR = {
has_doctrine = tenet_tax_nonbelievers
has_doctrine = special_doctrine_jizya
}
}
}
AND = {
scope:liege.faith = {
OR = {
has_doctrine = tenet_tax_nonbelievers
has_doctrine = special_doctrine_jizya
}
}
scope:vassal = {
NOT = {
vassal_contract_has_flag = vassal_contract_cannot_revoke_titles
}
vassal_contract_has_flag = religiously_protected
}
}
}
}
obligation_levels = {
religious_rights_none = {
default = yes
position = { 0 0 }
ai_liege_desire = @ai_standard_liege_desire
ai_vassal_desire = 0
}
religious_rights_protected = {
is_valid = {
NOT = {
scope:vassal.faith = scope:liege.faith
}
}
parent = religious_rights_none
position = { 1 0 }
vassal_opinion = 5
vassal_modifier = {
county_opinion_add = 5
}
flag = religiously_protected
ai_liege_desire = 0
ai_vassal_desire = 10
}
}
}
fortification_rights = {
display_mode = checkbox
is_shown = {
scope:liege.culture = {
has_innovation = innovation_battlements
}
}
obligation_levels = {
fortification_rights_none = {
default = yes
position = { 0 0 }
ai_liege_desire = @ai_standard_liege_desire
ai_vassal_desire = 0
}
fortification_rights_granted = {
is_valid = {
scope:liege.culture = {
has_innovation = innovation_battlements
}
}
parent = fortification_rights_none
position = { 1 0 }
liege_modifier = {
castle_holding_build_gold_cost = 0.05
}
vassal_modifier = {
castle_holding_build_gold_cost = -0.15
castle_holding_holding_build_gold_cost = -0.5
additional_fort_level = 1
}
tax_factor = fortification_rights_contract_taxes
ai_liege_desire = 0
ai_vassal_desire = @ai_standard_vassal_desire
}
}
}
coinage_rights = {
display_mode = checkbox
is_shown = {
scope:liege.culture = {
has_innovation = innovation_currency_02
}
}
obligation_levels = {
coinage_rights_none = {
default = yes
position = { 0 0 }
ai_liege_desire = @ai_standard_liege_desire
ai_vassal_desire = 0
}
coinage_rights_granted = {
is_valid = {
scope:liege.culture = {
has_innovation = innovation_currency_02
}
}
parent = coinage_rights_none
position = { 1 0 }
liege_modifier = {
development_growth_factor = -0.02
}
vassal_modifier = {
character_capital_county_monthly_development_growth_add = 0.3
}
ai_liege_desire = 0
ai_vassal_desire = @ai_standard_vassal_desire
}
}
}
succession_rights = {
display_mode = checkbox
is_shown = {
scope:vassal = {
can_have_confederate_partition_succession_law_trigger = yes
}
}
obligation_levels = {
succession_rights_default = {
default = yes
position = { 0 0 }
ai_liege_desire = 0
ai_vassal_desire = @ai_standard_vassal_desire
}
succession_rights_forced_partition = {
is_valid = {
scope:vassal = {
can_have_confederate_partition_succession_law_trigger = yes
}
}
score = -1
parent = succession_rights_default
position = { 1 0 }
vassal_opinion = -5
flag = locked_to_partition
ai_liege_desire = @ai_standard_liege_desire
ai_vassal_desire = 0
}
}
}
war_declaration_rights = {
display_mode = checkbox
obligation_levels = {
war_declaration_rights_default = {
default = yes
position = { 0 0 }
ai_liege_desire = @ai_standard_liege_desire
ai_vassal_desire = 0
}
war_declaration_rights_allowed = {
parent = war_declaration_rights_default
position = { 1 0 }
vassal_opinion = 5
flag = vassal_contract_war_override
ai_liege_desire = 0
ai_vassal_desire = @ai_standard_vassal_desire
}
}
}
council_rights = {
display_mode = checkbox
obligation_levels = {
council_rights_none = {
default = yes
position = { 0 0 }
ai_liege_desire = @ai_standard_liege_desire
ai_vassal_desire = 0
}
council_rights_guaranteed = {
parent = council_rights_none
position = { 1 0 }
vassal_opinion = 5
flag = can_demand_council_seat
liege_modifier = {
powerful_vassal_opinion = -2
}
ai_liege_desire = 0
ai_vassal_desire = @ai_standard_vassal_desire
}
}
}
title_revocation_rights = {
display_mode = checkbox
is_shown = {
OR = {
scope:vassal.faith = scope:liege.faith
NOR = {
scope:vassal.faith = scope:liege.faith
scope:liege.faith = {
has_doctrine_parameter = unlock_jizya_contract
}
}
}
}
obligation_levels = {
title_revocation_rights_default = {
default = yes
position = { 0 0 }
ai_liege_desire = 1
ai_vassal_desire = 0
}
title_revocation_rights_protected = {
is_valid = {
OR = {
scope:vassal.faith = scope:liege.faith
NOR = {
scope:vassal.faith = scope:liege.faith
scope:liege.faith = {
has_doctrine_parameter = unlock_jizya_contract
}
}
}
}
parent = title_revocation_rights_default
position = { 1 0 }
vassal_opinion = 5
flag = vassal_contract_cannot_revoke_titles
ai_liege_desire = 0
ai_vassal_desire = @ai_standard_vassal_desire
}
}
}
jizya_special_rights = {
display_mode = checkbox
is_shown = {
scope:liege.faith = {
OR = {
has_doctrine = tenet_tax_nonbelievers
has_doctrine = special_doctrine_jizya
}
}
NOT = { scope:vassal.faith = scope:liege.faith }
scope:vassal = {
OR = {
NOT = {
vassal_contract_has_flag = religiously_protected
}
AND = {
vassal_contract_has_flag = religiously_protected
vassal_contract_has_flag = vassal_contract_cannot_revoke_titles
}
}
}
}
obligation_levels = {
jizya_special_rights_default = {
default = yes
position = { 0 0 }
ai_liege_desire = 1
ai_vassal_desire = 0
}
jizya_special_rights_granted = {
is_valid = {
scope:liege.faith = {
OR = {
has_doctrine = tenet_tax_nonbelievers
has_doctrine = special_doctrine_jizya
}
}
NOT = { scope:vassal.faith = scope:liege.faith }
}
parent = jizya_special_rights_default
position = { 1 0 }
vassal_opinion = 20
tax_factor = 0.4
levies_factor = -0.4
vassal_modifier = {
monthly_prestige = -0.25
}
flag = vassal_contract_cannot_revoke_titles
flag = religiously_protected
flag = obligation_high_taxes
ai_liege_desire = @ai_standard_liege_desire
ai_vassal_desire = 0
}
}
}
iqta_special_rights = {
display_mode = checkbox
obligation_levels = {
iqta_special_rights_default = {
default = yes
position = { 0 0 }
ai_liege_desire = 1
ai_vassal_desire = 0
}
iqta_special_rights_granted = {
parent = iqta_special_rights_default
position = { 1 0 }
vassal_opinion = 5
tax_factor = -0.5
levies_factor = -0.5
liege_modifier = {
men_at_arms_maintenance = -0.02
men_at_arms_recruitment_cost = -0.02
}
vassal_modifier = {
men_at_arms_maintenance = -0.1
men_at_arms_recruitment_cost = -0.1
}
ai_liege_desire = 0
ai_vassal_desire = @ai_standard_vassal_desire
}
}
}
ghazi_special_rights = {
display_mode = checkbox
is_shown = {
scope:vassal.faith = scope:liege.faith
}
obligation_levels = {
ghazi_special_rights_default = {
default = yes
position = { 0 0 }
ai_liege_desire = 1
ai_vassal_desire = 0
}
ghazi_special_rights_granted = {
is_valid = {
scope:vassal.faith = scope:liege.faith
}
parent = ghazi_special_rights_default
position = { 1 0 }
vassal_opinion = 10
levies_factor = -0.25
liege_modifier = {
monthly_piety_gain_mult = 0.1
}
vassal_modifier = {
monthly_piety_gain_mult = 0.1
}
flag = vassal_contract_cheaper_religious_war
flag = vassal_contract_increase_prestige_cb_cost
ai_liege_desire = @ai_standard_liege_desire
ai_vassal_desire = @ai_standard_vassal_desire
}
}
}
marriage_favor_rights = {
display_mode = checkbox
obligation_levels = {
marriage_favor_rights_default = {
default = yes
position = { 0 0 }
ai_liege_desire = 1
ai_vassal_desire = 0
}
marriage_favor_rights_granted = {
parent = marriage_favor_rights_default
position = { 1 0 }
vassal_opinion = 20
tax_factor = 0.1
levies_factor = 0.1
flag = vassal_contract_marriage_favor
flag = obligation_high_taxes
flag = obligation_high_levies
ai_liege_desire = 0
ai_vassal_desire = @ai_standard_vassal_desire
}
}
}

View file

@ -0,0 +1,42 @@
theocracy_government_obligations = {
obligation_levels = {
default = {
levies = {
if = {
limit = { NOT = { scope:liege.faith = scope:vassal.faith } }
value = 0.1
}
else = {
value = 0.1
multiply = scope:liege.piety_level
}
}
tax = {
if = {
limit = { NOT = { scope:liege.faith = scope:vassal.faith } }
value = 0.1
}
else_if = {
limit = { scope:liege.piety_level >= 1 }
add = 0.05
add = {
value = 0.1
multiply = scope:liege.piety_level
}
}
#else = {
# value = 0
#}
}
contribution_desc = {
first_valid = {
triggered_desc = {
trigger = { NOT = { scope:liege.faith = scope:vassal.faith } }
desc = "theocracy_government_vassal_contribution_wrong_faith"
}
desc = "theocracy_government_vassal_contribution_piety_level"
}
}
}
}
}

View file

@ -0,0 +1,26 @@
tribal_government_obligations = {
obligation_levels = {
default = {
levies = {
value = 0
max = 1
scope:liege = {
add = {
value = 0.15
multiply = prestige_level
}
}
}
tax = {
value = 0
max = 0.5
scope:liege = {
add = {
value = 0.08
multiply = prestige_level
}
}
}
}
}
}

6439
gui/hud.gui Normal file

File diff suppressed because it is too large Load diff

4723
gui/window_character.gui Normal file

File diff suppressed because it is too large Load diff

1110
gui/window_title.gui Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,499 @@
window = {
name = "title_appointment"
movable = no
allow_outside = yes
layer = windows_layer
using = Window_Size_Sidebar
using = Window_Background_Sidebar
state = {
name = _show
using = Animation_FadeIn_Standard
using = Sound_WindowShow_Standard
on_start = "[GetVariableSystem.Set( 'hide_bottom_left_HUD', 'true' )]"
}
state = {
name = _hide
using = Animation_FadeOut_Standard
using = Sound_WindowHide_Standard
on_start = "[GetVariableSystem.Clear( 'hide_bottom_left_HUD' )]"
}
vbox = {
layoutpolicy_horizontal = expanding
using = Window_Margins_Sidebar
datacontext = "[SuccessionAppointmentWindow.GetTitle]"
hbox = {
layoutpolicy_horizontal = expanding
background = {
using = Background_Header_Tall
}
coa_title_big_crown = {}
vbox = {
layoutpolicy_horizontal = expanding
layoutpolicy_vertical = expanding
hbox = {
layoutpolicy_horizontal = expanding
layoutpolicy_vertical = expanding
vbox = {
layoutpolicy_horizontal = expanding
layoutpolicy_vertical = expanding
margin_top = 20
text_single = {
layoutpolicy_horizontal = expanding
text = "[Title.GetHolder.GetTopLiege.GetPrimaryTitle.GetName]"
default_format = "#weak"
max_width = 350
}
text_single = {
layoutpolicy_horizontal = expanding
text = "TITLE_APPOINTMENT_HEADER"
max_width = 350
}
text_single = {
layoutpolicy_horizontal = expanding
text = "TITLE_APPOINTMENT_LAW"
max_width = 350
}
text_single = {
layoutpolicy_horizontal = expanding
text = "TITLE_APPOINTMENT_CURRENT_HOLDER"
max_width = 350
}
expand = {}
}
vbox = {
layoutpolicy_vertical = expanding
buttons_window_control = {
blockoverride "button_close"
{
onclick = "[SuccessionAppointmentWindow.Close]"
}
blockoverride "button_back"
{
visible = "[HasViewHistory]"
onclick = "[OpenFromViewHistory]"
tooltip = "[GetViewHistoryTooltip]"
}
blockoverride "button_me"
{
onclick = "[DefaultOnCharacterClick( GetPlayer.GetID )]"
}
}
expand = {}
}
}
}
}
scrollbox = {
layoutpolicy_horizontal = expanding
layoutpolicy_vertical = expanding
blockoverride "scrollbox_content" {
vbox_character_list = {
datacontext = "[SuccessionAppointmentWindow.GetCandidates]"
layoutpolicy_horizontal = expanding
layoutpolicy_vertical = expanding
blockoverride "skill_sort_buttons" {}
blockoverride "container_implementation" {
fixedgridbox = {
name = "characters_grid"
datamodel = "[CharacterSelectionList.GetList]"
layoutpolicy_horizontal = expanding
addcolumn = 522
addrow = 162
item = {
widget = {
size = { 522 140 }
datacontext = "[CharacterListItem.GetCharacter]"
vbox = {
layoutpolicy_horizontal = expanding
layoutpolicy_vertical = expanding
margin = { 8 4 }
background = {
using = Background_Area
}
background = {
visible = no # TODO: visible if character is part of your house
spriteType = Corneredstretched
spriteborder = { 15 15 }
using = Color_Blue
alpha = 0.6
texture = "gfx/interface/component_masks/mask_frame.dds"
margin = { 0 4 }
margin_left = 10
modify_texture = {
blend_mode = alphamultiply
alpha = 0.9
mirror = horizontal
texture = "gfx/interface/component_masks/mask_fade_horizontal.dds"
}
modify_texture = {
mirror = vertical
blend_mode = alphamultiply
texture = "gfx/interface/component_masks/mask_fade_vertical.dds"
}
}
background = {
visible = no # TODO: visible if character is part of your house
spriteType = Corneredtiled
using = Color_Blue
alpha = 0.6
texture = "gfx/interface/component_masks/patterns/mask_pattern_02.dds"
margin = { 0 4 }
margin_left = 10
margin_right = 50
modify_texture = {
blend_mode = alphamultiply
alpha = 0.9
mirror = horizontal
texture = "gfx/interface/component_masks/mask_fade_horizontal.dds"
}
modify_texture = {
spriteType = Corneredtiled
spriteborder = { 15 15 }
blend_mode = alphamultiply
texture = "gfx/interface/component_masks/mask_texture_01.dds"
}
modify_texture = {
mirror = vertical
blend_mode = alphamultiply
texture = "gfx/interface/component_masks/mask_fade_vertical.dds"
}
}
# Ranking and Name
hbox = {
spacing = 12
layoutpolicy_horizontal = expanding
margin = { 12 4 }
background = {
using = Background_Area_ExtraDark
margin_left = 8
modify_texture = {
blend_mode = alphaMultiply
texture = "gfx/interface/component_masks/mask_fade_horizontal_extended.dds"
}
}
text_single = {
text = TITLE_APPOINTMENT_RANK
tooltip = "TITLE_APPOINTMENT_RANK_TOOLTIP"
default_format = "#T"
align = nobaseline
}
text_single = {
layoutpolicy_horizontal = expanding
text = "[Character.GetUINameNoTooltip|U]"
max_width = 344
align = nobaseline
}
expand = {}
}
hbox = {
layoutpolicy_horizontal = expanding
spacing = 4
portrait_head = {}
hbox = {
layoutpolicy_horizontal = expanding
datacontext = "[Character.GetHouse]"
coa_house_medium = {
powerful_family_bonus = {
parentanchor = bottom|right
}
}
vbox = {
layoutpolicy_horizontal = expanding
margin_left = 12
text_single = {
layoutpolicy_horizontal = expanding
text = "[Character.GetRelationToString( GetPlayer )]"
tooltip = "[Character.GetRelationToString( GetPlayer )]"
max_width = 230
}
vbox_candidate_details = {
layoutpolicy_horizontal = expanding
}
}
}
button_support_candidacy = {}
spacer = {
size = { 8 0 }
}
}
}
}
}
}
}
}
}
}
widget = {
name = "player_candidate"
layoutpolicy_horizontal = expanding
datacontext = "[SuccessionAppointmentWindow.GetTopCandidate]"
visible = "[SuccessionAppointmentWindow.HasTopCandidate]"
size = { 280 170}
vbox = {
margin = { 8 12 }
margin_right = 24
datacontext = "[CharacterListItem.GetCharacter]"
vbox = {
margin = { 12 0 }
layoutpolicy_horizontal = expanding
background = {
using = Background_Area
margin_bottom = 30
margin_left = -8
margin_right = 8
}
hbox = {
spacing = 4
margin = { 12 4 }
layoutpolicy_horizontal = expanding
background = {
using = Background_Area_Dark
modify_texture = {
blend_mode = alphaMultiply
texture = "gfx/interface/component_masks/mask_fade_horizontal_extended.dds"
}
}
text_single = {
text = "TITLE_APPOINTMENT_SUCCESSION_TOP_CANDIDATE"
margin_right = 8
align = nobaseline
}
text_single = {
text = "TITLE_APPOINTMENT_RANK"
tooltip = "TITLE_APPOINTMENT_RANK_TOOLTIP"
default_format = "#T"
align = nobaseline
}
text_single = {
text = "[Character.GetShortUINameNoTooltip]"
align = nobaseline
}
expand = {}
}
hbox = {
layoutpolicy_horizontal = expanding
margin_left = 20
vbox = {
layoutpolicy_vertical = expanding
vbox_candidate_details = {
layoutpolicy_horizontal = expanding
}
expand = {}
}
vbox = {
layoutpolicy_vertical = expanding
datacontext = "[Character.GetHouse]"
margin_left = 12
coa_house_medium = {
powerful_family_bonus = {
parentanchor = bottom|right
}
}
}
expand = {}
button_support_candidacy = {
datacontext = "[CharacterListItem.GetCharacter]"
}
}
}
}
portrait_shoulders = {
datacontext = "[CharacterListItem.GetCharacter]"
parentanchor = center
blockoverride "coa" {}
position = { 112 -4 }
}
}
}
window_character_filter = {
datacontext = "[SuccessionAppointmentWindow.GetCandidates]"
position = { 600 50 }
blockoverride "addition_filter" {
filter_item = {
layoutpolicy_horizontal = expanding
datacontext = "[CharacterSelectionList.GetFilter('range_filter')]"
}
vbox_filter_group = {
layoutpolicy_horizontal = expanding
datacontext = "[CharacterSelectionList.GetCategory('personal_filter_category')]"
blockoverride "filters" {
filter_item = {
layoutpolicy_horizontal = expanding
datacontext = "[CharacterSelectionList.GetFilter('ruler_filter')]"
}
filter_item = {
layoutpolicy_horizontal = expanding
datacontext = "[CharacterSelectionList.GetFilter('adult_filter')]"
}
filter_item = {
layoutpolicy_horizontal = expanding
datacontext = "[CharacterSelectionList.GetFilter('gender_filter')]"
}
divider = {
layoutpolicy_horizontal = expanding
}
filter_item = {
layoutpolicy_horizontal = expanding
datacontext = "[CharacterSelectionList.GetFilter('married_filter')]"
}
filter_item = {
layoutpolicy_horizontal = expanding
datacontext = "[CharacterSelectionList.GetFilter('imprisoned_filter')]"
}
filter_item = {
layoutpolicy_horizontal = expanding
datacontext = "[CharacterSelectionList.GetFilter('hook_filter')]"
}
}
}
vbox_filter_group = {
layoutpolicy_horizontal = expanding
datacontext = "[CharacterSelectionList.GetCategory('membership_filter_category')]"
blockoverride "filters" {
filter_item = {
layoutpolicy_horizontal = expanding
datacontext = "[CharacterSelectionList.GetFilter('religion_filter')]"
}
filter_item = {
layoutpolicy_horizontal = expanding
datacontext = "[CharacterSelectionList.GetFilter('culture_filter')]"
}
filter_item = {
layoutpolicy_horizontal = expanding
datacontext = "[CharacterSelectionList.GetFilter('dynasty_house_filter')]"
}
}
}
}
}
}
types TitleAppointment
{
type vbox_candidate_details = vbox
{
maximumsize = { 260 -1 }
text_single = {
layoutpolicy_horizontal = expanding
max_width = 240
margin_bottom = 4
text = "TITLE_APPOINTMENT_SUCCESSION_SCORE"
tooltipwidget = {
widget_value_breakdown_tooltip = {
datacontext = "[SuccessionAppointmentWindow.GetSuccessionScoreBreakdown( Character.Self )]"
}
}
}
text_single = {
layoutpolicy_horizontal = expanding
text = "TITLE_APPOINTMENT_GOVERNOR_EFFICIENCY"
tooltip = "ADMIN_WINDOW_THEME_GOVERNOR_EFFICIENCY_VALID_TT"
max_width = 240
}
}
type button_support_candidacy = button_round {
name = "support_candidacy"
size = { 48 48 }
onclick = "[Character.OpenPlayerInteractionWithTargetTitle( 'influence_candidacy_interaction', Title.Self )]"
enabled = "[Character.IsPlayerInteractionValid( 'influence_candidacy_interaction' )]"
tooltip = "[Character.GetPlayerInteractionTooltip( 'influence_candidacy_interaction' )]"
button_promote_candidate = {
alwaystransparent = yes
parentanchor = center
position = { 1 -1 }
size = { 32 32 }
}
}
}