Wiki

effect · activate_decision

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Activates specified decision for scope country

实战 · 配合 · 坑

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

实战用法

activate_decision 常用于在国家焦点、事件或任务完成后,自动为玩家或 AI 解锁某个决议,使其出现在决议界面供点击执行。例如在一条专属科技路线 mod 中,完成特定国策后立即激活一个限时外交决议:

focus = {
    id = GER_rearm_industry
    ...
    completion_reward = {
        activate_decision = GER_demand_rhineland
    }
}

配合关系

  • [has_decision](/wiki/trigger/has_decision) — 在触发器中检查某决议是否已被激活,避免重复激活或用于条件判断。
  • [activate_targeted_decision](/wiki/effect/activate_targeted_decision) — 当决议需要指定目标国家时改用此命令,两者互为补充覆盖有目标与无目标两类决议。
  • [add_days_remove](/wiki/effect/add_days_remove) — 激活决议后配合设置移除倒计时,实现限时决议的自动过期逻辑。
  • [add_political_power](/wiki/effect/add_political_power) — 激活决议往往伴随给予政治点数,确保玩家有足够资源立即执行该决议。

常见坑

  1. Scope 错误:此 effect 只能在 COUNTRY scope 下使用,若写在 STATE 或 CHARACTER scope 内将报错或静默失效,务必确认执行块的作用域是国家。
  2. 决议未定义或条件未满足:被激活的决议本身若存在 allowedvisible 限制块,activate_decision 并不会绕过这些检查——决议激活后依然可能因条件不满足而不显示,需提前确保相关条件成立。

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

activate_decision is commonly used to automatically unlock a decision for the player or AI after a national focus, event, or task is completed, allowing it to appear in the decision interface for execution. For example, in a custom tech tree mod, activating a time-limited diplomatic decision immediately upon completing a specific national focus:

focus = {
    id = GER_rearm_industry
    ...
    completion_reward = {
        activate_decision = GER_demand_rhineland
    }
}

Synergy

  • [has_decision](/wiki/trigger/has_decision) — Check in a trigger whether a decision has already been activated, preventing duplicate activations or for conditional logic.
  • [activate_targeted_decision](/wiki/effect/activate_targeted_decision) — Use this command instead when a decision requires specifying a target country; the two complement each other covering both targeted and non-targeted decision types.
  • [add_days_remove](/wiki/effect/add_days_remove) — After activating a decision, combine with removal countdown configuration to implement automatic expiration logic for time-limited decisions.
  • [add_political_power](/wiki/effect/add_political_power) — Activating a decision is typically paired with granting political power to ensure the player has sufficient resources to execute the decision immediately.

Common Pitfalls

  1. Scope Error: This effect can only be used within a COUNTRY scope. If written inside a STATE or CHARACTER scope, it will error or silently fail. Always verify that the executing block's scope is national.
  2. Decision Undefined or Conditions Unmet: If the decision being activated has its own allowed or visible restriction blocks, activate_decision will not bypass these checks — the decision may still fail to display after activation if conditions are not satisfied. Ensure related conditions are met beforehand.