Wiki

effect · set_equipment_version_number

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Changes current version number for a given equipment type to N.
The next equipment variant created from that type will have version number N+1.

#### Example

set_equipment_version_number = { type = small_plane_airframe_1 version = 4 }

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 a mod needs to reset a country's equipment version progress (for example, to simulate "technology regression" in a scenario event or force version alignment across multiple nations), this effect can be used. A typical scenario is resetting the version of a certain airframe type to zero in a focus or event, causing subsequent development variants to restart counting from a specified number.

country_event = {
    id = my_mod.1
    # ...
    option = {
        name = my_mod.1.a
        # Reset this country's small plane airframe version to 2, next variant will be V3
        set_equipment_version_number = {
            type = small_plane_airframe_1
            version = 2
        }
    }
}

Synergy

  • [create_equipment_variant](/wiki/effect/create_equipment_variant) — Create a new variant immediately after resetting the version number to ensure the new variant's version ID matches the intended narrative logic.
  • [add_equipment_to_stockpile](/wiki/effect/add_equipment_to_stockpile) — Replenish equipment stockpiles while adjusting version numbers to simulate a complete "re-equipment" process.
  • [has_design_based_on](/wiki/trigger/has_design_based_on) — Check beforehand whether the country possesses a design based on the target equipment type to avoid executing this effect on nations without the relevant technology, which could cause logic errors.

Common Pitfalls

  1. type should be filled with the equipment type name (such as small_plane_airframe_1), not the variant name — Beginners often mistakenly fill in custom variant names, causing the script to fail silently with the version number remaining unchanged.
  2. version sets the "currently completed version number" rather than the "next version number" — If you want the next variant numbered N, you should set version = N - 1. Otherwise, the variant actually generated will be one version higher than expected.