Hands-On Usage
When a mod involves intelligence/cryptography systems, this trigger is commonly used to check whether a country has established and activated a cryptology department, serving as a prerequisite for unlocking specific decisions, events, or technology rewards. For example, you can restrict a certain intelligence-enhancement decision to only be available when the cryptology department is operational:
available = {
is_cryptology_department_active = yes
has_army_experience > 50
}
Synergy
[has_completed_focus](/wiki/trigger/has_completed_focus): Often paired with checking whether a country has completed the national focus for establishing an intelligence agency, then combined with verifying whether the cryptology department is activated, to double-confirm that the intelligence system is in place.
[agency_upgrade_number](/wiki/trigger/agency_upgrade_number): The cryptology department is typically tied to the upgrade level of the intelligence agency; using both together allows precise control over the trigger conditions for intelligence-related decisions.
[add_decryption](/wiki/effect/add_decryption): Execute the decryption bonus effect only when the cryptology department is activated, logically ensuring the effect won't trigger erroneously when the department is absent.
[compare_intel_with](/wiki/trigger/compare_intel_with): Used in combination to determine whether your intelligence advantage meets the threshold after the cryptology department is activated, providing a complete condition chain for intelligence-game events.
Common Pitfalls
- Confusing yes/no values: Beginners sometimes write
is_cryptology_department_active = no to mean "no cryptology department exists," which is logically sound, but note that this trigger only applies to COUNTRY scope; calling it directly under state or character scope will cause script errors or silent failures. Always ensure the outer scope is a country.
- Confusing with intelligence agency existence:
is_cryptology_department_active checks whether the cryptology department is activated, not whether the intelligence agency exists. If the intelligence agency has never been created, this trigger will also return false, but the error message is not obvious. You should first use relevant intelligence agency triggers to confirm the agency is established, then check the cryptology department status, avoiding breaks in the logic chain.