Wiki

trigger · threat

Definition

  • Supported scope:any
  • Supported target:none

Description

check the global threat value (world tension). 0-1 value

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

threat is commonly used to check whether the current global tension reaches a certain threshold, thereby triggering events, unlocking decisions, or altering AI behavior. For example, it can allow minor nations to join defensive alliances when tension exceeds a specific level, or restrict certain aggressive decisions when tension is below a threshold.

# Decision: only available when global tension exceeds 50%
available = {
    threat > 0.5
}

Synergy

  • [or](/wiki/trigger/or) — Often combined with threat to allow logic to trigger when any of multiple tension ranges or other conditions are met, for example "high tension OR already at war".
  • [date](/wiki/trigger/date) — Used together with date conditions to limit tension checks to specific historical periods, preventing unexpected triggers in early or late game.
  • [any_country](/wiki/trigger/any_country) — Paired with threat when iterating through countries for global filtering, executing specific checks only on countries when "world tension is high".
  • [if](/wiki/effect/if) — Within effect blocks, implement conditional execution via if = { limit = { threat > 0.x } }, which is the standard way to embed this trigger within an effect context.

Common Pitfalls

  1. Writing the value as a percentage integer: threat ranges from 0 to 1 (a float), and beginners often mistakenly write threat > 50 causing the condition to always be false. The correct syntax is threat > 0.5.
  2. Assuming you can specify a target within scope: threat is a global value and accepts no targets. Writing something like threat = { target = GER value > 0.3 } will throw an error. It should be used directly and flatly in any scope.