Wiki

effect · division_template

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

add a division template to country

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

division_template is commonly used in national focuses, decisions, or historical start events to dynamically add custom division templates to a country—for example, unlocking a specialized elite division type upon completing a unique national spirit. Below is an example of adding an armored division template as a focus reward:

focus = {
    id = create_panzer_division
    ...
    completion_reward = {
        division_template = {
            name = "Panzer Division"
            division_names_group = GER_Panzer_01
            regiments = {
                medium_armor = { x = 0 y = 0 }
                medium_armor = { x = 0 y = 1 }
                motorized = { x = 1 y = 0 }
                motorized = { x = 1 y = 1 }
            }
            support = {
                artillery = { x = 0 y = 0 }
            }
        }
    }
}

Synergy

  • [add_manpower](/wiki/effect/add_manpower): After adding a template, you typically need to supplement manpower to ensure the player/AI can actually train the new divisions.
  • [add_equipment_to_stockpile](/wiki/effect/add_equipment_to_stockpile): Equipment for the new template won't appear from thin air; combining this with equipment stockpile additions makes the template immediately combat-ready.
  • [has_completed_focus](/wiki/trigger/has_completed_focus): In triggers, check whether a specific focus has been completed to conditionally trigger or block related decisions, preventing duplicate additions of the same template.
  • [country_lock_all_division_template](/wiki/effect/country_lock_all_division_template): In certain mods where you want players to only use scripted preset division templates, you can pair template additions with a lock command to restrict free editing.

Common Pitfalls

  1. Duplicate template names don't error but silently overwrite: If a template with the same name already exists, the game won't throw an error message; instead, it silently overwrites the original template, causing player-owned divisions with that name to be unexpectedly modified. Always ensure unique template naming during development.
  2. Scope must be COUNTRY, not STATE or CHARACTER: Beginners often call this effect directly within every_owned_state or character event scopes, resulting in ineffective scripts or errors. You must switch back to country scope using OWNER or methods like every_country_with_original_tag before executing.