trigger · ai_wants_divisions
Definition
- Supported scope:
COUNTRY - Supported target:
none
Description
Will compare towards the amount of divisions an ai wants to have.
ai_wants_divisionsCOUNTRYnoneWill compare towards the amount of divisions an ai wants to have.
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.
ai_wants_divisions is commonly used in AI strategy adjustment mods to determine whether the current AI has "satisfied" its division count target, thereby deciding whether to trigger certain auxiliary effects (such as additional factory allocation, research redirection, etc.). A typical scenario is within the available block of a national focus or decision, ensuring that a reinforcement path only opens when the AI has not yet reached its target division count.
# In the available block of a decision, only usable when AI still needs more divisions
available = {
ai_wants_divisions > 0 # AI expected quantity has not yet been satisfied
}
[has_army_size](/wiki/trigger/has_army_size) — Used in conjunction with ai_wants_divisions, first use has_army_size to detect the current actual division scale, then compare against the AI's target expectation, forming a dual judgment logic of "current vs expected".[ai_has_role_template](/wiki/trigger/ai_has_role_template) — Confirm whether the AI already possesses a division template for the corresponding role, preventing logic confusion where the AI is still judged as "needing more divisions" when lacking a suitable template.[add_manpower](/wiki/effect/add_manpower) — When determining that the AI's division count is insufficient, combine with this effect to provide additional manpower supplements, helping the AI fill its target establishment more quickly.[amount_manpower_in_deployment_queue](/wiki/trigger/amount_manpower_in_deployment_queue) — Check whether there is already substantial manpower in transit within the deployment queue, preventing repeated triggering of supplemental effects that would cause numerical stacking to become excessive.is_ai = yes before use.ai_wants_divisions compares the quantity the AI expects to have, not the divisions currently deployed — newcomers often mistakenly equate it with has_army_size, resulting in completely reversed condition logic.