Skip to content

Commit

Permalink
1.13 - started scripted triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
edmund-h committed Sep 24, 2024
1 parent 1e51723 commit 0adc1c4
Show file tree
Hide file tree
Showing 12 changed files with 860 additions and 103 deletions.
1 change: 0 additions & 1 deletion common/culture/cultures/wc_geomantic.txt

This file was deleted.

118 changes: 78 additions & 40 deletions common/scripted_triggers/00_scripted_triggers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ is_cannibal_trigger = {
}
}

is_murderer_trigger = {
OR = {
has_trait = murderer
any_secret = {
secret_type = secret_murder
}
}
}


likes_target_trigger = {
opinion = {
Expand Down Expand Up @@ -159,30 +168,6 @@ tier_or_related_liege_tier_greater_or_equal_trigger = {
}
}

# Warcraft
tier_or_family_member_tier_equal_trigger = {
OR = {
highest_held_title_tier = $TIER$
any_spouse = {
highest_held_title_tier = $TIER$
}
any_close_family_member = {
highest_held_title_tier = $TIER$
}
}
}
tier_or_family_member_tier_greater_or_equal_trigger = {
OR = {
highest_held_title_tier >= $TIER$
any_spouse = {
highest_held_title_tier >= $TIER$
}
any_close_family_member = {
highest_held_title_tier >= $TIER$
}
}
}

torture_secret_trigger = {
NOT = { is_known_by = scope:actor }
OR = {
Expand All @@ -203,10 +188,7 @@ has_interesting_portrait_altering_trait_trigger = {
has_trait = beauty_good
has_trait = hunchbacked
has_trait = dwarf

# Warcraft
has_dire_or_giant_trigger = yes

has_dire_or_giant_trigger = yes # Warcraft
has_trait = spindly
has_trait = scaly
has_trait = albino
Expand All @@ -232,24 +214,20 @@ is_dangerous_faction_trigger = {
}
}

is_player_heir_of_trigger = {
$CHARACTER$ = { save_temporary_scope_as = potential_heir_haver }
custom_description = {
text = "is_player_heir_of_trigger_text"
subject = this
object = scope:potential_heir_haver

exists = $CHARACTER$.player_heir
this = $CHARACTER$.player_heir
}
}

basic_allowed_to_imprison_character_trigger = { #Only to be used in is_shown for imprison interaction and similar
save_temporary_scope_as = allowed_imprisoner
$CHARACTER$ = {
OR = {
target_is_liege_or_above = scope:allowed_imprisoner
is_foreign_court_or_pool_guest_of = scope:allowed_imprisoner
AND = {
# EP3 EVICTION
is_landless_adventurer = yes
reverse_has_opinion_modifier = {
target = scope:allowed_imprisoner
modifier = eviction_ignored_opinion
}
}
}
NOT = {
is_imprisoned_by = scope:allowed_imprisoner
Expand Down Expand Up @@ -278,6 +256,15 @@ advanced_allowed_to_imprison_character_trigger = {
text = hostage_travelling_tt
NOT = { exists = var:hostage_travelling_to_warden }
}
trigger_if = {
limit = { is_landless_adventurer = yes }
scope:allowed_imprisoner = { is_landed = yes }
reverse_has_opinion_modifier = {
target = scope:allowed_imprisoner
modifier = eviction_ignored_opinion
}
domicile.domicile_location.county ?= { target_is_de_facto_liege_or_above = scope:allowed_imprisoner.primary_title }
}
}
scope:allowed_imprisoner = {
custom_description = {
Expand Down Expand Up @@ -305,15 +292,49 @@ can_be_granted_titles_by = { #This is set up with trigger-ifs to allow for nice
limit = {
is_ruler = no #Rulers can always get additional titles
is_theocratic_lessee = no #Theocratic lessees use other gender checks
NOT = { $RULER$ = { government_allows = administrative } }
NOT = {
$RULER$.faith = {
has_dominant_ruling_gender = scope:title_grantee
}
}
}
trigger_if = {
limit = {
$RULER$ = { government_allows = state_faith }
}
$RULER$.primary_title.state_faith = {
has_dominant_ruling_gender = scope:title_grantee
}
}
trigger_else = {
$RULER$.faith = {
has_dominant_ruling_gender = scope:title_grantee
}
}
}
trigger_if = {
limit = {
is_ruler = no #Rulers can always get additional titles
is_theocratic_lessee = no #Theocratic lessees use other gender checks
$RULER$ = {
government_allows = administrative
NOT = { has_realm_law = equal_law }
}
}
trigger_if = {
limit = {
$RULER$ = { has_realm_law = male_only_law }
}
scope:title_grantee = { is_female = no }
}
trigger_if = {
limit = {
$RULER$ = { has_realm_law = female_only_law }
}
scope:title_grantee = { is_female = yes }
}
#trigger_else = { always = yes }
}
trigger_else_if = {
limit = {
Expand Down Expand Up @@ -470,3 +491,20 @@ has_purchased_truce_with_char = {
this = $TARGET$
}
}

has_highest_skill_including_prowess_trigger = {
trigger_if = {
limit = {
NOT = { $SKILL$ = prowess }
}
highest_skill = $SKILL$
$SKILL$ > prowess
}
trigger_else = {
$SKILL$ > diplomacy
$SKILL$ > martial
$SKILL$ > stewardship
$SKILL$ > intrigue
$SKILL$ > learning
}
}
31 changes: 31 additions & 0 deletions common/scripted_triggers/00_title_triggers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,34 @@ title_lost_from_realm_on_foreign_ruler_succession_trigger = {
}
}
}

# Would this character ever be travelling outside of their palace walls at random for the purposes of events?
## We don't care about personality, only whether it'd be immersion breaking in principle to run into this person at random/to have an event trigger where you are randomly wandering.
character_title_allows_off_screen_wandering_trigger = { # Warcraft - TODO: should we add other governments to this trigger?
NOR = {
# No administrative or clan emperors.
AND = {
highest_held_title_tier >= tier_empire
OR = {
government_has_flag = government_is_administrative
government_has_flag = government_is_clan
}
}
# No administrative kings.
AND = {
highest_held_title_tier = tier_kingdom
government_has_flag = government_is_administrative
}
# No religious heads.
faith.religious_head ?= this
}
}

county_held_or_vassal_to_target_trigger = {
holder ?= {
OR = {
this = $TARGET$
target_is_liege_or_above = $TARGET$
}
}
}
Loading

0 comments on commit 0adc1c4

Please sign in to comment.