Wiki

trigger · has_mio_policy_active

Definition

  • Supported scope:INDUSTRIAL_ORG
  • Supported target:none

Description

Checks if the Military Industrial Organisation in scope has an allowed matching the input token, which is currently attached to the MIO.
ex:
mio:my_mio = {
	has_mio_policy_active = my_policy_token
}

实战 · 配合 · 坑

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

实战用法

has_mio_policy_active 常用于根据 MIO 当前激活的政策动态调整其行为或解锁特定特性,例如当某项生产政策启用时才允许完成某个科研加成特性。典型场景包括:在 MIO 的 available 条件块中限制某项特性仅在对应政策激活后才可解锁,或在事件/决议中根据政策状态做分支判断。

# 示例:某个 MIO 特性仅在激活了"大规模生产"政策时才可用
mio:my_tank_mio = {
    is_mio_trait_available = {
        token = my_advanced_armor_trait
        available = {
            has_mio_policy_active = mass_production_policy
        }
    }
}

配合关系

  • [has_mio_trait](/wiki/trigger/has_mio_trait):通常与 has_mio_policy_active 联合使用,在条件块中同时检查"已持有某特性"且"激活了某政策",以构成更严格的解锁前置条件。
  • [is_mio_trait_completed](/wiki/trigger/is_mio_trait_completed):配合使用可区分"特性是否已完成"与"政策是否激活"两个维度,避免重复奖励或逻辑冲突。
  • [complete_mio_trait](/wiki/effect/complete_mio_trait):在 effect 侧,当 has_mio_policy_active 条件满足后触发该 effect 自动完成某特性,实现政策驱动的自动化特性解锁。
  • [add_mio_research_bonus](/wiki/effect/add_mio_research_bonus):根据激活政策的不同给予差异化的研究加成,与 has_mio_policy_active 搭配可实现政策分支奖励逻辑。

常见坑

  1. 将该 trigger 写在国家 scope 而非 MIO scope 下has_mio_policy_active 只能在 INDUSTRIAL_ORG scope 内使用,若直接写在国家事件或决议的 trigger 块顶层而不先用 mio:xxx = { } 进入 MIO scope,游戏会报 scope 错误并导致条件永远不生效。
  2. token 填写的是政策名称字符串而非 token 标识符:该 trigger 接受的是政策的 token(即在政策定义中声明的标识符),不是本地化显示名称或文件名,填错会导致条件静默失败,始终返回假。

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

has_mio_policy_active is commonly used to dynamically adjust MIO behavior or unlock specific traits based on the currently active policy, such as allowing a research bonus trait to complete only when a certain production policy is enabled. Typical scenarios include restricting a trait to be unlocked only after its corresponding policy is activated in the MIO's available condition block, or branching logic in events/decisions based on policy status.

# Example: A certain MIO trait is only available when the "mass production" policy is activated
mio:my_tank_mio = {
    is_mio_trait_available = {
        token = my_advanced_armor_trait
        available = {
            has_mio_policy_active = mass_production_policy
        }
    }
}

Synergy

  • [has_mio_trait](/wiki/trigger/has_mio_trait): Often used in conjunction with has_mio_policy_active to simultaneously check "already owns a trait" and "has activated a policy" in condition blocks, forming stricter unlock prerequisites.
  • [is_mio_trait_completed](/wiki/trigger/is_mio_trait_completed): Combined usage can distinguish between the two dimensions of "whether a trait is completed" and "whether a policy is activated", avoiding duplicate rewards or logic conflicts.
  • [complete_mio_trait](/wiki/effect/complete_mio_trait): On the effect side, when the has_mio_policy_active condition is met, trigger this effect to automatically complete a trait, enabling policy-driven automated trait unlocking.
  • [add_mio_research_bonus](/wiki/effect/add_mio_research_bonus): Grant differentiated research bonuses based on different activated policies; pairing with has_mio_policy_active enables policy-branching reward logic.

Common Pitfalls

  1. Writing the trigger under national scope instead of MIO scope: has_mio_policy_active can only be used within INDUSTRIAL_ORG scope. If written directly in the top-level trigger block of a national event or decision without first entering MIO scope via mio:xxx = { }, the game will report a scope error and the condition will never take effect.
  2. Filling the token field with a policy name string instead of the token identifier: This trigger accepts the policy's token (the identifier declared in the policy definition), not the localized display name or filename. Incorrect entries will cause the condition to silently fail and always return false.