trigger · division_has_battalion_in_template
Definition
- Supported scope:(none)
- Supported target:
none
Description
checks if division template has the subunit type.
division_has_battalion_in_templatenonechecks if division template has the subunit type.
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
常用于检查某支师的模板是否包含特定的子单位类型,从而在 focus、event 或 decision 的 available/trigger 块中对特定编制的师做限制或解锁。例如在一个"装甲突破"国策中,可以要求玩家至少有一支包含坦克营的师模板才能触发:
available = {
any_division_template = {
division_has_battalion_in_template = medium_armor
}
}
由于当前白名单中 effect 和 trigger 均为空,没有可交叉引用的同 scope 命令,无法列出配合关系。
注意:该 trigger 的可用 scope 列表为空,实际使用时须结合外层迭代 scope(如
any_division_template)来定位到具体的师模板,否则无法正常求值。
division_has_battalion_in_template = xxx 会导致条件永远不成立或报错,必须用 any_division_template/every_division_template 等迭代块包裹。/common/units/ 下定义的 sub_unit 的真实 token 名(如 light_armor、motorized),拼写错误或使用显示名称(本地化字符串)会导致条件静默失败,不会给出任何报错提示。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.
Commonly used to check whether a division template contains specific battalion types, allowing you to restrict or unlock divisions with particular compositions in the available/trigger blocks of focuses, events, or decisions. For example, in an "Armored Breakthrough" national focus, you can require the player to have at least one division template containing medium armor battalions before triggering it:
available = {
any_division_template = {
division_has_battalion_in_template = medium_armor
}
}
Since the current whitelist contains no effects or triggers in this scope, there are no same-scope commands available for cross-reference. Therefore, synergy relationships cannot be listed.
Note: The available scope list for this trigger is empty. In actual usage, you must combine it with an outer iterating scope (such as
any_division_template) to target a specific division template, otherwise it cannot be evaluated properly.
Writing directly under country scope: Beginners often forget that this trigger must exist within a division template scope to function. Writing division_has_battalion_in_template = xxx bare under country-level scope will cause the condition to never evaluate or produce errors. You must wrap it with iteration blocks like any_division_template/every_division_template.
Confusing battalion type names: The parameter passed must be the actual token name of a sub_unit defined in /common/units/ (such as light_armor, motorized). Typos or using display names (localization strings) will cause the condition to fail silently with no error messages.