Hands-On Usage
num_of_available_naval_factories is commonly used to determine whether a nation possesses sufficient naval industrial capacity, allowing you to gate specific decisions, national focuses, or event options. For example, you can restrict large-scale shipbuilding programs to only nations with a certain number of idle naval factories. In naval mods, it's also frequently used as a prerequisite for AI strategies, preventing the AI from triggering naval-related options when factories are insufficient.
# Only allow this decision to be available if the country has enough idle naval factories
available = {
num_of_available_naval_factories > 5
}
Synergy
[has_army_size](/wiki/trigger/has_army_size): Pair with num_of_available_naval_factories to simultaneously check idle naval factory capacity and army size, useful for determining whether a nation meets conditions for comprehensive military expansion.
[building_count_trigger](/wiki/trigger/building_count_trigger): Can be used to confirm the number of dockyard buildings, and combined with this trigger to create a dual threshold of "has facilities and has idle production capacity."
[add_equipment_production](/wiki/effect/add_equipment_production): Works as the complementary effect; once the trigger is satisfied, it initiates ship production plans, logically forming a complete "check capacity → allocate production" workflow.
[any_owned_state](/wiki/trigger/any_owned_state): Use to iterate through owned states and combine with this trigger for more granular production capacity distribution checks, ideal for complex scripts that need to distinguish between coastal and inland state production capacity.
Common Pitfalls
- Confusing "available" with "total": This trigger checks the number of idle (available) naval factories, not the total count of all naval factories. Beginners often mistakenly treat it as equivalent to total factory count, leading to unexpected condition evaluation when a nation's factories are fully occupied by production queues. Always interpret this in the context of actual production lines.
- Incorrect scope causing silent failure: This trigger only works in COUNTRY scope; if mistakenly placed in STATE scope (such as inside an
any_owned_state block), the game won't error but the condition will never evaluate correctly. Pay special attention to the current scope when debugging.