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
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.