Hands-On Usage
Commonly used to check whether a country has a military industrial organization that meets specific conditions — for example, whether it already has an MIO that has completed a certain research trait, or an MIO covering a particular equipment type — in order to determine whether a focus or decision should trigger.
# In a focus's available block, check whether Germany has at least one MIO with a completed trait
GER = {
available = {
any_military_industrial_organization = {
is_mio_trait_completed = mio_advanced_manufacturing
}
}
}
Another example, using include_invisible to detect hidden MIOs:
any_military_industrial_organization = {
tooltip = check_mio_size_tt
include_invisible = yes
has_mio_size = {
size > 2
}
}
Synergy
- is_mio_trait_completed: The most common inner condition. Used to confirm whether an MIO has unlocked a specific trait; combine with
any_military_industrial_organization to check research progress.
- has_mio_equipment_type: Checks whether an MIO covers a specific equipment type. Often used to restrict a focus or decision so it is only available when an MIO with the relevant production line exists.
- has_mio_flag: Checks whether a custom flag has been set on an MIO. Pair with set_mio_flag to track MIO state across events.
- has_mio_size: Validates whether an MIO has reached a size threshold. Combine with
any_military_industrial_organization as a prerequisite condition for unlocking advanced national focuses.
Common Pitfalls
- Scope mismatch:
any_military_industrial_organization can only be used inside a COUNTRY scope. Writing it inside a STATE or UNIT LEADER scope will cause it to fail silently or throw an error. Beginners often forget to switch to the correct country scope first when working inside an event's trigger block.
- Using COUNTRY scope triggers inside the MIO scope: Once you are inside
any_military_industrial_organization = { ... }, the scope has switched to MIO. Writing country-level triggers such as has_war = yes at this point has no effect. You must use triggers that are valid in MIO scope (such as has_mio_trait, has_mio_size, and other whitelisted commands); otherwise the condition will never evaluate as expected.