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
- 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.
- 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.