Hands-On Usage
When players unlock a special division template through national focuses or decisions, this effect can be used to forcibly enable recruitment for that template. This is commonly found in designs that restrict elite division types to only be buildable under specific conditions. For example, in a certain mod, players can only unlock recruitment rights for Guard divisions after completing the "Establish the Guard" national focus:
complete_national_focus = {
# Within the national focus completion effect
set_division_force_allow_recruiting = {
division_template = "近卫师"
force_allow_recruiting = yes
}
}
Synergy
[division_template](/wiki/effect/division_template): Typically used first to define or modify a division template, then set_division_force_allow_recruiting is used to control its recruitment toggle. Together they manage the complete lifecycle of the template.
[clear_division_template_cap](/wiki/effect/clear_division_template_cap): Both commands regulate division template recruitment restrictions. clear_division_template_cap removes quantity limits, while this command controls whether recruitment is allowed. Combined use enables fine-grained unlock logic.
[complete_national_focus](/wiki/effect/complete_national_focus) / [has_completed_focus](/wiki/trigger/has_completed_focus): Commonly uses national focus completion as a trigger condition (checked via trigger), then executes this command within the corresponding effect block. This implements the design pattern "research/complete a focus to recruit specific divisions."
[add_ideas](/wiki/effect/add_ideas): When an idea represents a military reform, it is often executed together with this command in the same option, allowing players to unlock recruitment for the corresponding template while receiving the idea bonus.
Common Pitfalls
- The
division_template field must contain the exact name of an existing template (case-sensitive and space-sensitive). If the template has not been created via the division_template effect or defined in division_templates, the game will silently fail without error messages, leaving the effect ineffective and making debugging difficult.
- Forgetting to set
force_allow_recruiting back to no when forced allowance is no longer needed: If game logic requires the template to be locked again after a condition ends (such as war conclusion or idea removal), you must explicitly call this command again with force_allow_recruiting = no. Otherwise, the unlock state will permanently persist in the save file.