Wiki

trigger · has_mio_size

Definition

  • Supported scope:INDUSTRIAL_ORG
  • Supported target:none

Description

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

实战 · 配合 · 坑

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

实战用法

has_mio_size 常用于军事工业组织相关的事件、决策或特性解锁条件中,判断某个 MIO 是否达到了特定规模门槛,从而触发奖励或开放新功能。例如,可以在 MIO 特性的 available 块中限制只有成长到一定规模的组织才能解锁高阶特性:

# 在 MIO 特性定义中,要求组织规模大于 5 才可解锁
available = {
    has_mio_size > 5
}

也可结合变量做动态比较,使门槛随 mod 逻辑灵活变化:

available = {
    has_mio_size > var:required_mio_tier
}

配合关系

  • [add_mio_size](/wiki/effect/add_mio_size):常作为"达到规模条件后奖励进一步扩张"的配套 effect,先用 has_mio_size 判断规模,再通过此 effect 追加规模值。
  • [is_mio_trait_completed](/wiki/trigger/is_mio_trait_completed):组合使用可构造多重门槛——既要求组织规模足够大,又要求已完成特定特性,常见于精英特性解锁。
  • [has_mio_number_of_completed_traits](/wiki/trigger/has_mio_number_of_completed_traits):与规模判断并列,共同衡量 MIO 的"综合成熟度",避免仅靠规模就能解锁过强能力。
  • [add_mio_task_capacity](/wiki/effect/add_mio_task_capacity):在规模达标后才解锁额外任务容量的场景下,has_mio_size 充当前置 limit 条件。

常见坑

  1. 作用域错误has_mio_size 只能在 INDUSTRIAL_ORG scope 下使用,若直接写在国家或省份 scope 的 trigger 块中会静默失效甚至报错,务必先通过正确的 scope 切换(如遍历 MIO 的上下文块)进入组织作用域。
  2. 比较运算符不可省略:该 trigger 必须配合 <> 使用,不支持直接写 has_mio_size = 5 的等值判断,新手照搬普通 trigger 的等号写法会导致脚本解析失败。

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_size is commonly used in events, decisions, or trait unlock conditions related to military industrial organizations to determine whether an MIO has reached a specific size threshold, thereby triggering rewards or unlocking new features. For example, you can restrict high-tier trait unlocks to only organizations that have grown to a certain scale by using it in the available block of an MIO trait:

# In MIO trait definition, requires organization size greater than 5 to unlock
available = {
    has_mio_size > 5
}

You can also combine it with variables for dynamic comparisons, allowing thresholds to vary flexibly based on mod logic:

available = {
    has_mio_size > var:required_mio_tier
}

Synergy

  • [add_mio_size](/wiki/effect/add_mio_size): Often serves as a companion effect to "reward further expansion after reaching size conditions"—first use has_mio_size to check size, then use this effect to add size values.
  • [is_mio_trait_completed](/wiki/trigger/is_mio_trait_completed): Combined usage can construct multiple thresholds—requiring both sufficient organization size and completion of specific traits, commonly seen in elite trait unlocks.
  • [has_mio_number_of_completed_traits](/wiki/trigger/has_mio_number_of_completed_traits): Used alongside size checks to jointly measure the "overall maturity" of an MIO, preventing overly powerful abilities from being unlocked based solely on size.
  • [add_mio_task_capacity](/wiki/effect/add_mio_task_capacity): In scenarios where additional task capacity is only unlocked after reaching size thresholds, has_mio_size serves as a prerequisite limit condition.

Common Pitfalls

  1. Scope Error: has_mio_size can only be used under the INDUSTRIAL_ORG scope. If written directly in trigger blocks of country or state scope, it will silently fail or even cause errors. You must first switch to the correct scope (such as entering the organization context block through MIO iteration) before using it.
  2. Comparison Operators Cannot Be Omitted: This trigger must be paired with < or > operators and does not support direct equality checks like has_mio_size = 5. Beginners copying the equals syntax from regular triggers will cause script parsing failures.