Hands-On Usage
non_damaged_building_level is commonly used in industrial warfare damage assessment scenarios, such as determining whether a state retains sufficient intact military factories to trigger a specific decision or event. Typical applications include: restricting enemy options after strategic bombing, or in scripted mods requiring a state's industry to be undamaged before unlocking production bonus events.
# Decision is only available if the state has at least 3 undamaged infrastructure levels
available = {
non_damaged_building_level = {
building = infrastructure
level = 3
}
}
Synergy
[building_count_trigger](/wiki/trigger/building_count_trigger): Checks total building level (including damaged). Combined with non_damaged_building_level, allows simultaneous assessment of "how much was built" versus "how much is actually operational," distinguishing construction volume from functional capacity.
[days_since_last_strategic_bombing](/wiki/trigger/days_since_last_strategic_bombing): Detects days elapsed since last strategic bombing. Combined with intact building checks, precisely describes the state window of "post-bombing before recovery."
[damage_building](/wiki/effect/damage_building): Effect that actively damages buildings, commonly paired with this trigger in testing or scripted mods—manually inflict damage first, then use the trigger to verify results against thresholds.
[free_building_slots](/wiki/trigger/free_building_slots): Checks remaining building slots in a state. Combined with intact building counts, provides comprehensive assessment of state industrial status, commonly used in conditions limiting "whether further construction is possible."
Common Pitfalls
- Confusing "total level" with "intact level": Beginners often mistakenly substitute
building_count_trigger for this trigger, but the former counts all levels of damaged buildings while the latter counts only intact portions. In scenarios with frequent strategic bombing, the two can yield significantly different results—selecting the wrong one causes conditions to unexpectedly remain true even after building damage.
- Scope must be STATE: This trigger only works within state scope. If written in country scope (such as within a
country_event's trigger block without first switching to state scope), the script silently errors or perpetually returns false. Use any_owned_state, capital_scope, or similar to switch to state scope first before invoking.