Wiki

trigger · has_mio_research_category

Definition

  • Supported scope:INDUSTRIAL_ORG
  • Supported target:none

Description

Checks if the Military Industrial Organisation in scope has the input research category.
ex:
mio:my_mio = {
	has_mio_research_category = my_research_category_token
}

实战 · 配合 · 坑

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

实战用法

在制作自定义军工组织(MIO)时,常需要根据该组织是否具有特定研究分类来决定能否解锁某条特性或触发某段事件。例如,你想为一个专注于装甲研究的 MIO 限制某特性的可用条件,可以写:

some_mio_trait = {
    available = {
        mio:my_armor_mio = {
            has_mio_research_category = mio_cat_armor
        }
    }
}

这样只有当该 MIO 拥有装甲研究分类时,特性才对玩家可见可选。

配合关系

  • [has_mio_trait](/wiki/trigger/has_mio_trait):常与本 trigger 并列使用,同时检查 MIO 是否拥有某研究分类已完成特定特性,构成更精确的解锁前提。
  • [has_mio_size](/wiki/trigger/has_mio_size):配合使用可在"研究分类符合且规模达到一定级别"时才开放高级内容,避免玩家过早获得强力加成。
  • [add_mio_research_bonus](/wiki/effect/add_mio_research_bonus):在 effect 块中作为后续奖励,当 trigger 判断研究分类存在后,给予对应加成,逻辑上形成"检查分类 → 发放奖励"的完整流程。
  • [is_mio_trait_available](/wiki/trigger/is_mio_trait_available):两者组合可以在特性可用性检查中先确认研究方向是否匹配,再判断特性本身是否满足其他前提。

常见坑

  1. Scope 写错位置:本 trigger 必须在 INDUSTRIAL_ORG scope 下执行,新手容易在国家 scope 直接写 has_mio_research_category,导致脚本报错或静默失效。正确做法是先通过 mio:my_mio = { ... } 进入对应 MIO 的 scope 再使用。
  2. 分类 token 拼写不一致:研究分类的 token 需与 mio_categories 定义文件中的名称完全一致(区分大小写),若直接填写装备类型名或研究科技 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

When creating custom Military Industrial Organizations (MIOs), you often need to conditionally unlock certain traits or trigger events based on whether the organization has a specific research category. For example, if you want to restrict a trait's availability for an MIO focused on armor research, you can write:

some_mio_trait = {
    available = {
        mio:my_armor_mio = {
            has_mio_research_category = mio_cat_armor
        }
    }
}

This way, the trait will only be visible and selectable to the player when the MIO possesses the armor research category.

Synergy

  • [has_mio_trait](/wiki/trigger/has_mio_trait): Commonly used alongside this trigger to check both whether an MIO has a specific research category and has completed a particular trait, forming more precise unlock conditions.
  • [has_mio_size](/wiki/trigger/has_mio_size): Used in combination to unlock advanced content only when "research category matches and organizational size reaches a certain level," preventing players from obtaining powerful bonuses too early.
  • [add_mio_research_bonus](/wiki/effect/add_mio_research_bonus): Serves as a subsequent reward in effect blocks; after the trigger confirms the research category exists, it grants the corresponding bonus, forming a complete logical flow of "check category → grant reward."
  • [is_mio_trait_available](/wiki/trigger/is_mio_trait_available): The combination of both can first verify whether research direction matches during trait availability checks, then determine whether the trait itself meets other prerequisites.

Common Pitfalls

  1. Incorrect scope placement: This trigger must be executed within the INDUSTRIAL_ORG scope. Beginners often mistakenly write has_mio_research_category directly in the country scope, causing script errors or silent failures. The correct approach is to first enter the corresponding MIO's scope via mio:my_mio = { ... } before using the trigger.
  2. Research category token spelling inconsistencies: The research category token must exactly match the name in the mio_categories definition file (case-sensitive). Directly entering equipment type names or research technology tokens will always return false, and the game will not provide obvious error messages.