From bfd4431869875ad2b9c2a8c96d4a2afbe7d99798 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Sat, 7 Feb 2026 22:09:11 +0100 Subject: [PATCH] fix(decisions): unify Lord Ruler attention on variable-based system Removed the generic lord_ruler_attention_modifier and unified both decision checks onto the variable system (var:lord_ruler_attention). The on_action yearly pulse now applies/removes tiered modifiers (lord_ruler_attention_1/2/3) based on variable thresholds, giving players visible feedback that matches the underlying variable state. Fixes WARNING-05 from the mod review. Co-Authored-By: Claude Opus 4.6 --- .../decisions/00_mistborn_decisions.txt | 9 ++---- .../modifiers/00_mistborn_modifiers.txt | 6 ---- .../common/on_action/mistborn_on_actions.txt | 32 ++++++++++++++++--- .../english/mistborn_modifiers_l_english.yml | 3 -- 4 files changed, 31 insertions(+), 19 deletions(-) diff --git a/lords_of_ash/common/decisions/00_mistborn_decisions.txt b/lords_of_ash/common/decisions/00_mistborn_decisions.txt index 8d29c99..28719bf 100644 --- a/lords_of_ash/common/decisions/00_mistborn_decisions.txt +++ b/lords_of_ash/common/decisions/00_mistborn_decisions.txt @@ -367,7 +367,7 @@ smuggle_atium_decision = { # Risk: increase Lord Ruler's attention if = { limit = { - has_character_modifier = lord_ruler_attention_modifier + var:lord_ruler_attention >= 25 } # Already being watched - higher risk random_list = { @@ -403,7 +403,7 @@ smuggle_atium_decision = { } modifier = { factor = 0 - has_character_modifier = lord_ruler_attention_modifier + var:lord_ruler_attention >= 25 } } } @@ -521,10 +521,7 @@ improve_skaa_conditions_decision = { change_development_level = 1 } # Risks: Lord Ruler may notice - add_character_modifier = { - modifier = lord_ruler_attention_modifier - years = 5 - } + increase_lord_ruler_attention_effect = yes # Other nobles disapprove every_vassal = { add_opinion = { diff --git a/lords_of_ash/common/modifiers/00_mistborn_modifiers.txt b/lords_of_ash/common/modifiers/00_mistborn_modifiers.txt index b701e27..93a2a2f 100644 --- a/lords_of_ash/common/modifiers/00_mistborn_modifiers.txt +++ b/lords_of_ash/common/modifiers/00_mistborn_modifiers.txt @@ -18,12 +18,6 @@ compounder_modifier = { fertility = 0.5 } -# Tracks the Lord Ruler's attention on a character -# Applied/removed by events; intensity tracked by a character variable -lord_ruler_attention_modifier = { - icon = "gfx/interface/icons/modifiers/modifier_lord_ruler_attention.dds" -} - # Favor from the Steel Ministry - rewards for loyal service steel_ministry_favor = { icon = "gfx/interface/icons/modifiers/modifier_steel_ministry_favor.dds" diff --git a/lords_of_ash/common/on_action/mistborn_on_actions.txt b/lords_of_ash/common/on_action/mistborn_on_actions.txt index 9b92e64..308cab3 100644 --- a/lords_of_ash/common/on_action/mistborn_on_actions.txt +++ b/lords_of_ash/common/on_action/mistborn_on_actions.txt @@ -24,42 +24,66 @@ on_yearly_pulse = { mistborn_misc.0040 # Atium discovery } effect = { - # Check Lord Ruler attention thresholds and fire appropriate events + # Check Lord Ruler attention thresholds and apply tiered modifiers if = { limit = { is_ruler = yes has_variable = lord_ruler_attention } - # Tier 3 - The Lord Ruler's Wrath + # Tier 3 - The Lord Ruler's Wrath (attention >= 90) if = { limit = { var:lord_ruler_attention >= 90 } + if = { + limit = { NOT = { has_character_modifier = lord_ruler_attention_3 } } + add_character_modifier = lord_ruler_attention_3 + } + remove_character_modifier = lord_ruler_attention_1 + remove_character_modifier = lord_ruler_attention_2 trigger_event = { id = mistborn_lord_ruler.0020 days = { 30 90 } } } - # Tier 2 - Inquisition Visit + # Tier 2 - Inquisition Visit (attention >= 60) else_if = { limit = { var:lord_ruler_attention >= 60 } + if = { + limit = { NOT = { has_character_modifier = lord_ruler_attention_2 } } + add_character_modifier = lord_ruler_attention_2 + } + remove_character_modifier = lord_ruler_attention_1 + remove_character_modifier = lord_ruler_attention_3 trigger_event = { id = mistborn_lord_ruler.0010 days = { 30 120 } } } - # Tier 1 - Obligator Warning + # Tier 1 - Obligator Warning (attention >= 25) else_if = { limit = { var:lord_ruler_attention >= 25 } + if = { + limit = { NOT = { has_character_modifier = lord_ruler_attention_1 } } + add_character_modifier = lord_ruler_attention_1 + } + remove_character_modifier = lord_ruler_attention_2 + remove_character_modifier = lord_ruler_attention_3 trigger_event = { id = mistborn_lord_ruler.0001 days = { 30 180 } } } + # Below threshold - remove all tiered modifiers + else = { + remove_character_modifier = lord_ruler_attention_1 + remove_character_modifier = lord_ruler_attention_2 + remove_character_modifier = lord_ruler_attention_3 + } } # Compounding check - if character has both Allomancy and Feruchemy diff --git a/lords_of_ash/localization/english/mistborn_modifiers_l_english.yml b/lords_of_ash/localization/english/mistborn_modifiers_l_english.yml index e6ff5e0..ee13099 100644 --- a/lords_of_ash/localization/english/mistborn_modifiers_l_english.yml +++ b/lords_of_ash/localization/english/mistborn_modifiers_l_english.yml @@ -5,9 +5,6 @@ compounder_modifier:0 "Compounder" compounder_modifier_desc:0 "This individual can both burn and tap the same metal, creating an infinite loop of power. The Lord Ruler himself was the first Compounder — combining Allomancy and Feruchemy to achieve functional immortality. There is a reason he has ruled for a thousand years, and there is a reason he hunts anyone who discovers this secret." - lord_ruler_attention_modifier:0 "The Lord Ruler's Attention" - lord_ruler_attention_modifier_desc:0 "The Lord Ruler has taken notice of this individual. His Obligators watch. His Inquisitors listen. In the Final Empire, there is no greater danger than being interesting to the man who has ruled for a millennium." - lord_ruler_attention_1:0 "Ministry Scrutiny" lord_ruler_attention_1_desc:0 "The Steel Ministry has taken an interest in your affairs. Obligators visit more frequently, asking pointed questions and reviewing your contracts with unusual care."