Hands-On Usage
stockpile_ratio is commonly used in AI decision-making or focus availability checks to prevent triggering large-scale warfare or military expansion when ammunition/equipment stockpiles are insufficient. For example, in a custom decision, you might require the nation to have adequate equipment on hand before unlocking offensive strategic options:
available = {
stockpile_ratio = {
archetype = infantry_equipment
ratio > 1.5
}
}
Synergy
[fuel_ratio](/wiki/trigger/fuel_ratio): Both are "ratio-based" resource checks and are frequently used together within the same limit block to comprehensively assess a nation's war readiness.
[has_army_size](/wiki/trigger/has_army_size): Confirm troop size first before checking stockpile ratio to avoid false positives where inflated ratios occur when the military is extremely small.
[add_equipment_to_stockpile](/wiki/effect/add_equipment_to_stockpile): Acts as a complementary effect; when stockpile_ratio triggers rewards or supply decisions, it directly injects additional equipment into the stockpile.
[conscription_ratio](/wiki/trigger/conscription_ratio): Pair with manpower ratio to comprehensively evaluate whether a nation meets full mobilization conditions before triggering relevant AI strategies.
Common Pitfalls
- Inflated ratio trap: When a nation has almost no troops deployed in the field (fielded approaches 0), even minimal stockpile quantities will produce extremely high ratios, causing the condition to unexpectedly evaluate as true. You should combine this with filters like
[has_army_size](/wiki/trigger/has_army_size) to exclude such edge cases.
- Confusion between archetype and equipment: This trigger requires the archetype of the equipment, such as
infantry_equipment, not a specific variant or technology name. When filled incorrectly, the game may not report an error, but the condition will never match correctly, causing the logic to silently fail.