Wiki

trigger · has_mio_number_of_completed_traits

Definition

  • Supported scope:INDUSTRIAL_ORG
  • Supported target:none

Description

Make comparaison on the number of unlocked traits of the military industrial organization in the scope.
Can use < or > to compare the value with either a fixed value or from a variable.
ex:
var:my_mio_var = {
	has_mio_number_of_completed_traits > 5
	has_mio_number_of_completed_traits < 2
	has_mio_number_of_completed_traits > var:my_number_var
}

实战 · 配合 · 坑

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

实战用法

此 trigger 常用于根据军工组织的特质解锁进度来动态触发事件或解锁新内容,例如当 MIO 积累了一定数量的已完成特质后才允许执行某项决议或触发特殊奖励。也可用在 available 块中限制某个 focus 或 decision 的可用条件,确保玩家的 MIO 已达到一定成熟度。

# 当 MIO 完成了足够多的特质后,允许解锁特殊研究奖励
some_mio_scope = {
    limit = {
        has_mio_number_of_completed_traits > 3
    }
    add_mio_research_bonus = {
        # ... 奖励配置
    }
}

配合关系

  • [is_mio_trait_completed](/wiki/trigger/is_mio_trait_completed):常与本 trigger 搭配,在确认总数达标的同时,进一步检查某个关键特质是否已被解锁,实现更精确的条件分支。
  • [has_mio_size](/wiki/trigger/has_mio_size):MIO 规模与特质数量往往同步增长,两者联合判断可确保 MIO 在规模和研究深度上同时达到预期水平。
  • [complete_mio_trait](/wiki/effect/complete_mio_trait):当满足特质数量门槛后,可用此 effect 自动补全某个特质,形成「达到 N 个特质后触发连锁解锁」的设计逻辑。
  • [add_mio_research_bonus](/wiki/effect/add_mio_research_bonus):常作为本 trigger 为真时的奖励手段,根据已完成特质的数量阶段性提升 MIO 的研究加成。

常见坑

  1. 比较符写法错误:本 trigger 使用 > / < 而非 = 进行比较,新手容易误写成 has_mio_number_of_completed_traits = 5,这在语法上不合法,会导致脚本报错或条件永远不生效,务必使用大于/小于符号。
  2. Scope 用错:此 trigger 只在 INDUSTRIAL_ORG scope 下有效,若直接写在国家 scope 或省份 scope 下而未先切换到具体 MIO scope,条件将无法正常求值,需通过类似 var:my_mio_var = { ... } 的方式确保处于正确的 MIO scope 内。

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 to dynamically fire events or unlock new content based on the traits completed by a Military Industrial Organization, for example allowing a decision to be executed or granting special rewards only after an MIO has accumulated a sufficient number of completed traits. It can also be used in the available block to restrict the availability conditions of a focus or decision, ensuring that the player's MIO has reached a certain level of maturity.

# Allow special research bonuses to be unlocked once the MIO has completed enough traits
some_mio_scope = {
    limit = {
        has_mio_number_of_completed_traits > 3
    }
    add_mio_research_bonus = {
        # ... reward configuration
    }
}

Synergy

  • [is_mio_trait_completed](/wiki/trigger/is_mio_trait_completed): Often paired with this trigger to simultaneously verify that the total count threshold is met while also checking whether a specific critical trait has been unlocked, enabling more precise conditional branching.
  • [has_mio_size](/wiki/trigger/has_mio_size): MIO size and trait count typically grow in tandem; using both together ensures the MIO reaches expected levels in both scale and research depth.
  • [complete_mio_trait](/wiki/effect/complete_mio_trait): Once the trait count threshold is satisfied, this effect can be used to automatically complete a specific trait, implementing a "cascading unlock triggered at N traits" design pattern.
  • [add_mio_research_bonus](/wiki/effect/add_mio_research_bonus): Commonly serves as a reward when this trigger evaluates to true, progressively boosting the MIO's research bonus based on the completion stage of finished traits.

Common Pitfalls

  1. Incorrect comparison operator syntax: This trigger uses > / < rather than = for comparison; beginners often mistakenly write has_mio_number_of_completed_traits = 5, which is syntactically invalid and causes script errors or conditions to never evaluate correctly. Always use greater-than/less-than operators.
  2. Wrong scope: This trigger only functions within the INDUSTRIAL_ORG scope; if written directly in a country or provincial scope without first switching to the specific MIO scope, the condition will fail to evaluate properly. Ensure correct MIO scope using constructs like var:my_mio_var = { ... }.