trigger · num_of_military_factories
Definition
- Supported scope:
COUNTRY - Supported target:
THIS,ROOT,PREV,FROM,OWNER,CONTROLLER,OCCUPIED,CAPITAL
Description
check amount of military factories
num_of_military_factoriesCOUNTRYTHIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITALcheck amount of military factories
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
常用于判断某国是否具备足够的军工产能,以控制决策、国策或事件是否可触发——例如限制"大规模武器出口"决策只对工业强国开放,或在 AI 脚本中判断是否具备扩军条件。
# 仅当军工厂数量达到一定规模时,允许触发某项决策
available = {
num_of_military_factories > 50
}
[has_completed_focus](/wiki/trigger/has_completed_focus):常与国策完成判断组合,既要求完成了特定工业国策,又要求军工厂数量达标,双重门槛使条件更合理。[building_count_trigger](/wiki/trigger/building_count_trigger):两者互补——前者统计全国军工厂总量,后者可精确到特定州的建筑数量,配合使用实现精细化产能判断。[add_ideas](/wiki/effect/add_ideas):在效果块中给满足军工条件的国家添加特定国家精神,形成"达到军工规模 → 获得生产加成"的奖励逻辑。[has_army_size](/wiki/trigger/has_army_size):工厂产能与军队规模常同时检验,用来判断一个国家是否同时具备"造得出"和"养得起"的双重军事实力。[has_damaged_buildings](/wiki/trigger/has_damaged_buildings) 做容错判断。[building_count_trigger](/wiki/trigger/building_count_trigger),新手常将两者场景用反。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 determine whether a country has sufficient military factory capacity, controlling whether decisions, national focuses, or events can be triggered—for example, restricting a "large-scale weapons export" decision to only industrial powerhouses, or checking in AI scripts whether conditions for military expansion are met.
# Only allow a decision to trigger when military factory count reaches a certain threshold
available = {
num_of_military_factories > 50
}
[has_completed_focus](/wiki/trigger/has_completed_focus): Often combined with national focus completion checks, requiring both a specific industrial focus to be completed and military factory count to meet the threshold, creating a dual-requirement gate that makes conditions more balanced.[building_count_trigger](/wiki/trigger/building_count_trigger): The two are complementary—the former counts total military factories nationwide, while the latter can target specific building counts in individual states; using them together enables fine-grained capacity judgment.[add_ideas](/wiki/effect/add_ideas): In effect blocks, grant specific national spirits to countries meeting military factory conditions, forming a "reach factory scale → gain production bonus" reward logic.[has_army_size](/wiki/trigger/has_army_size): Factory capacity and army size are often validated simultaneously to determine whether a country possesses both "production capability" and "affordability" for military strength.[has_damaged_buildings](/wiki/trigger/has_damaged_buildings) for fallback checking.[building_count_trigger](/wiki/trigger/building_count_trigger) instead; newcomers often reverse the usage scenarios between the two.