Wiki

effect · clear_division_template_cap

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Clears division cap for a division template
Example: clear_division_template_cap = { division_template = <name>  }

实战 · 配合 · 坑

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

实战用法

当 mod 中需要通过事件或决议动态解除某个师团模板的数量上限限制时,此 effect 非常实用。例如在科技解锁或国策完成后,允许玩家无限制地训练特定精锐模板,可在相应的 option 块中调用它。

option = {
    name = my_event.option_a
    clear_division_template_cap = {
        division_template = "Elite Panzer Division"
    }
}

配合关系

  • [division_template](/wiki/effect/division_template) — 通常先用 division_template 创建或修改模板,再用本 effect 清除其数量上限,形成完整的模板管理流程。
  • [country_lock_all_division_template](/wiki/effect/country_lock_all_division_template) — 一个用于批量锁定所有模板,本 effect 用于有针对性地解除特定模板的 cap,两者形成锁定与解锁的对应关系。
  • [has_completed_focus](/wiki/trigger/has_completed_focus) — 作为触发条件,判断某国策是否完成后再执行清除 cap,确保解锁时机符合游戏设计逻辑。
  • [add_units_to_division_template](/wiki/effect/add_units_to_division_template) — 在调整模板编制后配合清除 cap,保证新模板不会因数量限制而无法大规模训练。

常见坑

  1. division_template 字段填写的名称必须与游戏中实际模板名称完全一致(区分大小写和空格),填写错误时游戏不会报错但 effect 静默失败,导致上限并未被清除,新手很难察觉。
  2. 误以为此 effect 作用于 STATE 或 CHARACTER scope,实际上它只能在 COUNTRY scope 下执行,若写在州级或人物事件的 immediate 块中会直接失效,需确认当前 scope 为国家。

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 dynamically remove the division template cap for a specific unit template through events or decisions, this effect is highly useful. For example, after a technology unlock or national focus completion, you can allow players to train a specific elite template without limit by calling this effect in the corresponding option block.

option = {
    name = my_event.option_a
    clear_division_template_cap = {
        division_template = "Elite Panzer Division"
    }
}

Synergy

  • [division_template](/wiki/effect/division_template) — Typically use division_template first to create or modify a template, then use this effect to remove its cap, forming a complete template management workflow.
  • [country_lock_all_division_template](/wiki/effect/country_lock_all_division_template) — Used to batch-lock all templates, while this effect selectively removes the cap for specific templates, forming a corresponding lock-unlock relationship.
  • [has_completed_focus](/wiki/trigger/has_completed_focus) — Serves as a trigger condition to check whether a national focus has been completed before executing the cap removal, ensuring the unlock timing aligns with game design logic.
  • [add_units_to_division_template](/wiki/effect/add_units_to_division_template) — When adjusting template composition, pair it with cap removal to ensure new templates can be trained at scale without being constrained by the limit.

Common Pitfalls

  1. The division_template field name must exactly match the actual template name in-game (case-sensitive and space-sensitive). When filled incorrectly, the game will not error but the effect silently fails, causing the cap to remain unremoved—something newcomers often struggle to detect.
  2. Mistakenly believing this effect works in STATE or CHARACTER scope. In reality, it can only execute under COUNTRY scope. If placed in the immediate block of a state or character event, it will directly fail. Always confirm the current scope is at country level.