Wiki

effect · complete_mio_trait

Definition

  • Supported scope:INDUSTRIAL_ORG
  • Supported target:none

Description

Complete a trait in the military industrial organization in scope.
This effect will not take into account the current state of the trait tree and will allow you to unlock a trait even if the one before is not unlocked.
Will also add 1 size to the MIO so that size and numbers of unlocked traits are always aligned.
ex:
var:my_mio_var = {
  complete_mio_trait = my_trait_token
  complete_mio_trait = {
	trait = my_trait_token
	show_modifiers = no # Optional, default = yes
  }
}

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

complete_mio_trait is commonly used in scripted events or focus completion to forcibly unlock a specific trait for a designated military industrial organization without requiring the player to manually progress through the trait tree level by level. This is ideal for mod scenarios involving "story rewards" or "historical milestone-triggered unlocks". For example, when a certain nation completes a specific focus, immediately grant its primary military industrial organization an advanced trait:

# In a focus completion effect block
if = {
    limit = { has_mio_flag = mio_upgraded }
    var:target_mio = {
        complete_mio_trait = {
            trait = advanced_manufacturing_trait
            show_modifiers = no
        }
    }
}

Synergy

  • [is_mio_trait_completed](/wiki/trigger/is_mio_trait_completed) — Check whether the trait is already unlocked before execution to avoid repeated triggers causing logic conflicts.
  • [has_mio_number_of_completed_traits](/wiki/trigger/has_mio_number_of_completed_traits) — Judge the current number of completed traits to determine whether conditions for triggering additional rewards are met.
  • [add_mio_size](/wiki/effect/add_mio_size) — Although this command automatically increases size by 1, if additional growth rewards are needed, you can manually stack additional size within the same block.
  • [set_mio_flag](/wiki/effect/set_mio_flag) — Apply a flag immediately after unlocking the trait to prevent the same event chain from repeatedly executing the same unlock logic.

Common Pitfalls

  1. Forgetting to switch to INDUSTRIAL_ORG scope: This effect can only be used within a military industrial organization scope. If written directly in a country scope (such as an option block in country_event) without transitioning to the MIO through variables or a dedicated scope, the script will silently fail without error and the trait will not be unlocked.
  2. Mistakenly believing that show_modifiers = no prevents size growth: show_modifiers only controls whether interface tooltips display modifier values; it does not affect the automatic +1 size behavior. If multiple traits are unlocked in quick succession, size will accumulate multiple times, requiring advance planning of the correspondence between trait quantity and size.