IT FINALLY WORKS

This commit is contained in:
Fishedotjpg 2026-11-03 15:07:35 +00:00
parent ddfb576dde
commit 5ca82fedfe
8 changed files with 769 additions and 79 deletions

View file

@ -23,6 +23,7 @@ grant_titles_interaction = {
target_filter = domain_titles
interface_priority = 60
ai_frequency = 6
# actor character giving the titles
# recipient character receiving the titles
@ -1389,6 +1390,60 @@ grant_titles_interaction = {
}
}
}
if = {
limit = {
scope:government_type = {
OR = { government_has_flag = government_is_feudal government_has_flag = government_is_clan government_has_flag = government_is_theocracy }
}
scope:previous_holder ?= {
government_has_flag = government_is_administrative
}
}
scope:recipient = {
set_variable = {
name = granted_title_government_cooldown
years = 15
}
}
if = {
limit = {
scope:title.tier = tier_empire
}
scope:previous_holder = {
change_influence = monumental_influence_gain
add_gold = monumental_gold_max_value
}
}
else_if = {
limit = {
scope:title.tier = tier_kingdom
}
scope:previous_holder = {
change_influence = massive_influence_gain
add_gold = massive_gold_max_value
}
}
else_if = {
limit = {
scope:title.tier = tier_duchy
}
scope:previous_holder = {
change_influence = major_influence_gain
add_gold = major_gold_max_value
}
}
else_if = {
limit = {
scope:title.tier = tier_county
}
scope:previous_holder = {
change_influence = medium_influence_gain
add_gold = medium_gold_max_value
}
}
else = {
}
}
#Opinion loss with underlings who think they should get the title you're granting
if = {
limit = {
@ -1458,6 +1513,7 @@ grant_title_to_new_random_character_interaction = {
special_interaction = grant_titles_interaction
use_diplomatic_range = no
ai_frequency = 6
is_valid_showing_failures_only = {
scope:puppet_or_actor = {
this != scope:recipient
@ -1466,6 +1522,14 @@ grant_title_to_new_random_character_interaction = {
}
}
}
on_accept = {
scope:recipient = {
set_variable = {
name = granted_title_government_cooldown
years = 15
}
}
}
}
# Be aware that the actual granting of the title happens in code!
@ -1484,6 +1548,7 @@ grant_governorship_interaction = {
target_filter = domain_titles
interface_priority = 60
ai_frequency = 6
# actor character giving the titles
# recipient character receiving the titles
@ -1841,6 +1906,12 @@ grant_governorship_interaction = {
}
on_accept = {
scope:recipient = {
set_variable = {
name = granted_title_government_cooldown
years = 15
}
}
if = {
limit = {
scope:recipient = {
@ -2526,6 +2597,60 @@ grant_governorship_interaction = {
claimant_rivalry_mercy_effect = yes
}
}
if = {
limit = {
scope:government_type = {
OR = { government_has_flag = government_is_feudal government_has_flag = government_is_clan government_has_flag = government_is_theocracy }
}
scope:previous_holder ?= {
government_has_flag = government_is_administrative
}
}
scope:recipient = {
set_variable = {
name = granted_title_government_cooldown
years = 15
}
}
if = {
limit = {
scope:title.tier = tier_empire
}
scope:previous_holder = {
change_influence = monumental_influence_gain
add_gold = monumental_gold_max_value
}
}
else_if = {
limit = {
scope:title.tier = tier_kingdom
}
scope:previous_holder = {
change_influence = massive_influence_gain
add_gold = massive_gold_max_value
}
}
else_if = {
limit = {
scope:title.tier = tier_duchy
}
scope:previous_holder = {
change_influence = major_influence_gain
add_gold = major_gold_max_value
}
}
else_if = {
limit = {
scope:title.tier = tier_county
}
scope:previous_holder = {
change_influence = medium_influence_gain
add_gold = medium_gold_max_value
}
}
else = {
}
}
custom_tooltip = influence_award_notification
}
}

View file

@ -2514,8 +2514,8 @@ demand_admin_interaction = {
}
ai_frequency_by_tier = {
barony = 0
county = 12000
duchy = 12000
county = 0
duchy = 0
kingdom = 12000
empire = 12000
hegemony = 12000
@ -2539,6 +2539,30 @@ demand_admin_interaction = {
limit = { is_ai = yes }
is_adult = yes
}
scope:actor = {
NOR = {
has_relation_friend = scope:recipient
has_relation_lover = scope:recipient
has_relation_best_friend = scope:recipient
has_relation_soulmate = scope:recipient
}
}
scope:recipient = {
NOT = {
has_variable = granted_title_government_cooldown
}
OR = {
prestige_level < 2
piety_level < 2
dynasty ?= {
dynasty_prestige_level < 2
}
is_powerful_vassal = no
scope:recipient.house = { is_powerful_family = no }
scope:recipient.house = { is_dominant_family = no }
}
}
}
is_shown = {
@ -2569,7 +2593,7 @@ demand_admin_interaction = {
dynasty_prestige_level < 2
}
is_powerful_vassal = no
is_powerful_agent = no
scope:recipient.house = { is_powerful_family = no }
scope:recipient.house = { is_dominant_family = no }
}