Wiki

effect · add_divisional_commander_xp

Definition

  • Supported scope:(none)
  • Supported target:none

Description

add divisional commander xp to unit: add_divisional_commander_xp = 10

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

add_divisional_commander_xp is commonly used in custom event or decision systems to grant divisional commanders additional experience points through specific actions (such as completing training missions or winning campaigns), thereby accelerating their progression to higher ranks. It can also be utilized in beginner tutorial mods to provide players with commander experience rewards at game start, lowering the difficulty threshold.

# Award experience to divisional commander upon decision completion
country_event = {
    id = my_mod.1
    option = {
        name = my_mod.1.a
        add_divisional_commander_xp = 25
    }
}

Synergy

As there are currently no other effects or triggers listed under the same scope in the whitelist, no cross-reference entries conforming to specifications can be provided. It is recommended to combine this effect with country-level event trigger logic during actual implementation to ensure it is invoked within the correct execution block.

Common Pitfalls

  1. Incorrect scope usage: This effect's supported scope list is empty, meaning it has strict limitations in concrete execution environments. Beginners often place it in inappropriate scopes (such as the top level of country scope), causing the command to silently fail. You must verify that the script execution context correctly corresponds to the divisional commander unit.
  2. Overflow from excessive values: Directly assigning extremely large experience values (such as thousands) may cause experience calculation anomalies or unexpected rank jumps, resulting in unintended game states. It is recommended to increment values gradually and observe actual effects in test mode rather than providing excessively high values at once.