Wiki

trigger · days_since_last_strategic_bombing

Definition

  • Supported scope:STATE
  • Supported target:THIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITAL

Description

Checks the days since last strategic bombing.
days_since_last_strategic_bombing < 10

实战 · 配合 · 坑

实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。

实战用法

此 trigger 常用于战争破坏恢复类 mod 场景,例如当某州被战略轰炸后冷却一段时间才允许触发重建事件或决策,防止奖励/惩罚在轰炸高峰期反复叠加。也可用于占领政策逻辑中,判断当前州是否处于"近期被轰炸"的不稳定状态,从而动态调整抵抗值变化。

# 示例:仅当某州距上次战略轰炸超过 30 天时,才允许触发重建决策
available = {
    days_since_last_strategic_bombing > 30
    is_controlled_by = ROOT
}

配合关系

  • [has_active_resistance](/wiki/trigger/has_active_resistance):战略轰炸往往伴随抵抗上升,两者组合可精确筛选出"刚被轰炸且抵抗活跃"的州,用于触发镇压或安抚逻辑。
  • [compliance](/wiki/trigger/compliance):轰炸会压低服从度,与本 trigger 联用可判断"最近遭受轰炸且服从度低"的双重条件,更精准地控制占领政策切换时机。
  • [add_resistance](/wiki/effect/add_resistance):在确认近期发生轰炸后,可通过此 effect 模拟平民因轰炸产生的抵抗情绪增长,与 trigger 形成判断-执行闭环。
  • [set_occupation_law_where_available](/wiki/effect/set_occupation_law_where_available):当距上次轰炸已超过足够天数、局势趋于稳定时,联动此 effect 自动升级占领法,实现动态占领管理。

常见坑

  1. scope 混用错误:此 trigger 必须在 STATE scope 下使用,若写在 COUNTRY scope 的 limit 块中会静默失效或报错,需确保外层 scope 已切换至目标州(例如通过 every_neighbor_statecapital_scope 进入 STATE scope 后再调用)。
  2. 比较方向理解反days_since_last_strategic_bombing < 10 表示"距上次轰炸不足 10 天"(即最近刚被轰炸),新手容易将大小关系写反,导致条件逻辑与预期完全相反;若该州从未遭受战略轰炸,此 trigger 的返回值行为也需通过测试确认,不可想当然假设为真或假。

Hands-On Notes

Hands-on notes are AI-generated and checked against the vanilla command vocabulary — treat them as a starting point, not authoritative reference. The definition above is the game's own documentation.

Hands-On Usage

This trigger is commonly used in war damage recovery mod scenarios, such as allowing a rebuilding event or decision to fire only after a state has cooled down for a period of time following strategic bombing, preventing rewards/penalties from stacking repeatedly during bombing peaks. It can also be used in occupation policy logic to determine whether a state is currently in an unstable "recently bombed" state, thereby dynamically adjusting resistance value changes.

# Example: Allow rebuilding decision to trigger only when a state has not been strategically bombed for more than 30 days
available = {
    days_since_last_strategic_bombing > 30
    is_controlled_by = ROOT
}

Synergy

  • [has_active_resistance](/wiki/trigger/has_active_resistance): Strategic bombing typically accompanies a rise in resistance. Combining these two triggers allows you to precisely filter states that are "recently bombed and actively resistant," useful for triggering suppression or appeasement logic.
  • [compliance](/wiki/trigger/compliance): Bombing lowers compliance. Using this trigger in conjunction allows you to identify the dual condition of "recently bombed and low compliance," enabling more precise control over occupation policy switching timing.
  • [add_resistance](/wiki/effect/add_resistance): After confirming recent bombing has occurred, you can use this effect to simulate the growth of civilian resistance sentiment caused by bombing, forming a judgment-execution feedback loop with the trigger.
  • [set_occupation_law_where_available](/wiki/effect/set_occupation_law_where_available): When enough days have passed since the last bombing and the situation stabilizes, linking this effect automatically upgrades occupation laws, achieving dynamic occupation management.

Common Pitfalls

  1. Scope confusion errors: This trigger must be used within STATE scope. Writing it in a limit block under COUNTRY scope will silently fail or throw an error. Ensure the outer scope has already switched to the target state (for example, by entering STATE scope through every_neighbor_state or capital_scope before calling it).
  2. Reversed comparison logic: days_since_last_strategic_bombing < 10 means "bombed within the last 10 days" (i.e., recently bombed). Newcomers often reverse the inequality, causing the condition logic to be completely opposite to expectations. Additionally, if a state has never experienced strategic bombing, the return value behavior of this trigger must be verified through testing—don't assume it will be true or false without evidence.