Wiki

trigger · is_decrypting

Definition

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

Description

checks if is currently decrypting a cipher. Example is_decrypting = GER

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

is_decrypting is commonly used in intelligence-focused mods to check whether the current nation or a target nation is actively decrypting another nation's codes, triggering specific decisions, events, or unlocking special options. For example, you can restrict a decision's available block so it only activates when the player has initiated decryption against Germany:

available = {
    is_decrypting = GER
}

You can also check in event trigger conditions whether an allied nation is conducting decryption against a common enemy, enabling diplomatic interaction options.

Synergy

  • [decryption_progress](/wiki/trigger/decryption_progress): Decryption progress is often checked alongside "whether decryption is active"—use is_decrypting first to confirm decryption exists, then use decryption_progress to judge if the progress reaches a threshold before triggering rewards or events.
  • [add_decryption](/wiki/effect/add_decryption): As the effect counterpart, when is_decrypting returns false, you can actively increase decryption value via this effect, creating a closed logic loop of "supply resources if not decrypting."
  • [compare_intel_with](/wiki/trigger/compare_intel_with): Frequently paired in the intelligence system—while decryption is ongoing, further compare relative intelligence advantages between nations to decide whether to trigger additional intelligence gain events.
  • [has_country_flag](/wiki/trigger/has_country_flag): Used to prevent event repetition—check if a flag is already set first, then combine with is_decrypting to confirm decryption status, avoiding duplicate event popups within the same decryption cycle.

Common Pitfalls

  1. Incorrect scope target: is_decrypting must be used within a COUNTRY scope. Beginners sometimes mistakenly place it in STATE scope (such as inside owned_by blocks), causing silent script failures or errors. Always verify the outer scope is a nation, not a province or state.
  2. Target written in forms other than country tag strings: This trigger's value should be filled with a country tag (such as GER) or supported scope keywords (THIS/ROOT etc.). Some beginners mistakenly use variable references or leave it empty, causing the condition to never be satisfied.