Hands-On Usage
has_navy_size is commonly used to check whether a country has reached a certain naval size threshold, thereby unlocking specific national focuses, decisions, or event options. For example, it can restrict smaller nations from pursuing a naval superpower path, or set "fleet achievement" trigger conditions for players. It can also be used in AI strategy available blocks to permit commerce raiding decisions only after submarine counts meet the target.
# Allow the "Naval Supremacy" decision to be activated only when the player owns more than 20 destroyers
available = {
has_navy_size = {
size > 20
type = destroyer
}
}
Synergy
[has_army_size](/wiki/trigger/has_army_size) — Used alongside has_navy_size to simultaneously validate both land and naval force sizes, useful for checking "full mobilization" type conditions.
[any_navy_leader](/wiki/trigger/any_navy_leader) — Detects whether naval admirals exist; pair with has_navy_size to ensure "both ships and commanders" before triggering specific naval combat events.
[create_ship](/wiki/effect/create_ship) — Serves as a compensatory effect when has_navy_size is not satisfied, allowing you to grant additional ships to the player in event branches to meet subsequent checks.
[enemies_naval_strength_ratio](/wiki/trigger/enemies_naval_strength_ratio) — While checking your own fleet size, use this trigger to evaluate the relative naval strength ratio compared to enemies, building a more comprehensive naval advantage assessment logic.
Common Pitfalls
- Confusion over comparison operator direction:
size < 1 means "no ships of this type exist," not "fewer than 1 ship" in the intuitive sense—since ship counts are integers, < 1 is equivalent to = 0. Beginners sometimes mistakenly write size = 0 only to discover that this field does not accept the = operator and throws an error.
- Mixing up
type / archetype / unit: type corresponds to ship categories (e.g., convoy, destroyer), archetype corresponds to hull classes (e.g., ship_hull_light), and unit corresponds to concrete subunit definitions (e.g., heavy_cruiser). Filling in the wrong field for any of these causes the condition to silently fail (always returns false) without error reporting, making it extremely difficult to debug.