scripted triggers

This commit is contained in:
Fishedotjpg 2026-11-18 14:45:30 +00:00
parent 134dc3348b
commit 648b12fbf0
29 changed files with 1559 additions and 1060 deletions

View file

@ -141,6 +141,10 @@ is_available = {
text = busy_in_mandala_succession
NOT = { has_variable = busy_in_mandala_succession }
}
custom_tooltip = {
text = busy_managing_trade_opportunity
NOT = { has_variable = partner_contract }
}
}
# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are.
@ -268,6 +272,15 @@ is_available_ai = {
text = ALREADY_PLANNING_ACTIVITY
NOT = { has_character_flag = planning_an_activity }
}
# Variable set on Mandala succession
custom_tooltip = {
text = busy_in_mandala_succession
NOT = { has_variable = busy_in_mandala_succession }
}
custom_tooltip = {
text = busy_managing_trade_opportunity
NOT = { has_variable = partner_contract }
}
}
# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are.
@ -888,6 +901,11 @@ is_landless_nomad = {
has_domicile = yes
}
# Checks if a character is a herder
is_herder = {
government_has_flag = government_is_herder
}
# This trigger checks if a character is a landless adventurer
is_landless_adventurer = {
OR = {
@ -896,33 +914,30 @@ is_landless_adventurer = {
}
}
# This trigger checks if a character is a governor in an admin realm (implying they are landed)
is_governor = {
# This trigger checks if a character is a landless merchant
is_landless_merchant = {
custom_description = {
text = is_governor
text = is_merchant
subject = this
government_has_mechanic = administrative
is_landed = yes
top_liege != this
OR = {
highest_held_title_tier >= main_administrative_tier
highest_held_title_tier >= min_title_maa_tier
}
tgp_is_ceremonial_liege_trigger = no
}
NOT = {
government_has_flag = government_is_feudal
government_has_flag = government_is_merchant
is_landed = no
has_domicile = yes
}
}
# This trigger checks if a character is a landless republican
is_landless_republican = {
government_has_flag = government_is_republic
is_landed = no
has_domicile = yes
}
is_governor_or_admin_count = {
government_has_mechanic = administrative
is_landed = yes
top_liege != this
highest_held_title_tier >= tier_county
tgp_is_ceremonial_liege_trigger = no
NOT = {
government_has_flag = government_is_feudal
}
is_ceremonial_liege = no
}
is_governor_or_landless_admin = {
@ -937,10 +952,26 @@ is_governor_or_landless_admin = {
is_landless_administrative = {
government_has_mechanic = administrative
is_landed = no
has_domicile = yes
is_house_head = yes
}
# Checks if a character is a landless house_head within a republic realm
is_landless_republic = {
government_has_flag = government_is_republic
is_landed = no
is_house_head = yes
has_domicile = yes
}
is_republic_ruler_or_landless_republic = {
government_has_flag = government_is_republic
OR = {
is_landed = yes
is_landless_republic = yes
}
}
# Checks if a character is a landless house_head within a feudal realm
is_landless_soryo = {
government_has_flag = government_is_japan_feudal
@ -960,8 +991,6 @@ is_landed_or_landless_administrative = {
is_landed_or_landless_administrative_or_theocratic = {
OR = {
is_landed = yes
is_landless_administrative = yes
tgp_is_any_minister = yes # ministers should receive admin events and activity even if they are not house head
AND = {
is_ruler = yes
OR = {
@ -969,6 +998,9 @@ is_landed_or_landless_administrative_or_theocratic = {
government_has_flag = government_is_feudal
}
}
is_landless_administrative = yes
is_landless_republic = yes
tgp_is_any_minister = yes # ministers should receive admin events and activity even if they are not house head
}
}
@ -991,7 +1023,6 @@ is_playable_character = {
highest_held_title_tier > tier_barony
}
tgp_is_any_minister = yes # To keep ministers playable, regardless of having a noble family title or not
has_variable = laamp_transition
}
}