Wiki

trigger · is_mio_trait_completed

Definition

  • Supported scope:INDUSTRIAL_ORG
  • Supported target:none

Description

Checks if the Military Industrial Organisation in scope has a trait matching the input token, which is also completed.
ex:
mio:my_mio = {
	is_mio_trait_completed = my_trait_token
	is_mio_trait_completed = {
		trait = my_trait_token
	}
}

实战 · 配合 · 坑

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

实战用法

is_mio_trait_completed 常用于判断某个军事工业组织是否已解锁并完成特定特性,从而决定后续奖励、事件触发或其他效果是否生效。例如在 MIO 相关事件或决议的 available 块中,检查某个关键生产特性是否已完成后再允许玩家执行高级操作。

# 在某个决议或事件 trigger 块中
mio:my_tank_manufacturer = {
    is_mio_trait_completed = advanced_armor_plating
}

配合关系

  • [has_mio_trait](/wiki/trigger/has_mio_trait):先用此 trigger 判断组织是否拥有该特性(无论是否完成),再用 is_mio_trait_completed 进一步确认已完成,形成两段式保险检查,避免因特性不存在而产生意外结果。
  • [complete_mio_trait](/wiki/effect/complete_mio_trait):常作为对应 effect 配合使用——先用 is_mio_trait_completed 检查特性是否尚未完成,条件不满足时才触发 complete_mio_trait 强制补全,防止重复执行。
  • [has_mio_number_of_completed_traits](/wiki/trigger/has_mio_number_of_completed_traits):两者结合可同时检查"整体完成数量"与"特定特性是否完成",构建更精细的解锁条件树。

常见坑

  1. Scope 写错位置:新手容易在国家 scope 或装备 scope 下直接写 is_mio_trait_completed,而实际上必须先通过 mio:my_mio = { ... } 进入 INDUSTRIAL_ORG scope,否则脚本报错或静默失效。
  2. 混淆"拥有特性"与"完成特性"has_mio_trait 只判断特性存在(包括未完成的锁定状态),而 is_mio_trait_completed 要求特性已完全解锁完成,两者含义不同,用错会导致条件在意料之外的情况下为真或为假。

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_mio_trait_completed is commonly used to check whether a military industrial organization has unlocked and completed a specific trait, thereby determining whether subsequent bonuses, event triggers, or other effects should apply. For example, in the available block of MIO-related events or decisions, you can verify that a critical production trait has been completed before allowing the player to perform advanced operations.

# In a decision or event trigger block
mio:my_tank_manufacturer = {
    is_mio_trait_completed = advanced_armor_plating
}

Synergy

  • [has_mio_trait](/wiki/trigger/has_mio_trait): First use this trigger to check whether the organization possesses the trait (regardless of completion status), then use is_mio_trait_completed to further confirm it is completed, forming a two-stage safety check that prevents unexpected results from traits not existing.
  • [complete_mio_trait](/wiki/effect/complete_mio_trait): Often used in conjunction with the corresponding effect—first use is_mio_trait_completed to check if the trait has not yet been completed, and only trigger complete_mio_trait to force completion when the condition is not met, preventing duplicate execution.
  • [has_mio_number_of_completed_traits](/wiki/trigger/has_mio_number_of_completed_traits): Combining the two allows you to simultaneously check "total number of completed traits" and "whether a specific trait is completed," building a more granular unlock condition tree.

Common Pitfalls

  1. Scope placement error: Beginners often write is_mio_trait_completed directly under a country scope or equipment scope, when in fact you must first enter the INDUSTRIAL_ORG scope via mio:my_mio = { ... }, otherwise the script will error or silently fail.
  2. Confusing "possessing a trait" with "completing a trait": has_mio_trait only checks whether the trait exists (including locked, incomplete states), while is_mio_trait_completed requires the trait to be fully unlocked and completed. These have different meanings—using the wrong one will cause conditions to evaluate true or false in unexpected situations.