Hands-On Usage
compare_intel_with is commonly used in intelligence system–related mod scenarios, such as determining whether a country has gained sufficient intelligence advantage over a target nation, thereby unlocking special decisions or triggering events (e.g., subversion operations, predicting enemy deployment, etc.). The following example checks whether Germany has a leading civilian intelligence level against Poland; if satisfied, it can be used in a decision's available block:
# In a decision's available block, check if GER has sufficient intelligence advantage over POL
available = {
GER = {
compare_intel_with = {
target = POL
civilian_intel > 0.3
army_intel > 0
}
}
}
Synergy
[has_collaboration](/wiki/trigger/has_collaboration): Collaboration degree is closely related to intelligence acquisition. Typically, first check whether a certain collaboration level has been established with the target nation, then use compare_intel_with to confirm whether the intelligence scale meets the threshold. Both work together as a prerequisite for action.
[add_intel](/wiki/effect/add_intel): When the intelligence comparison result does not meet requirements, you can supplement intelligence values in the corresponding effect block; or reward additional intelligence when conditions are satisfied, forming a snowball effect in intelligence accumulation.
[has_active_mission](/wiki/trigger/has_active_mission): When an intelligence mission is in progress, specific intelligence value conditions must often be met simultaneously. Together, these can precisely control mission trigger timing.
[any_operative_leader](/wiki/trigger/any_operative_leader): Intelligence changes after operatives are dispatched. Combined with this trigger, you can check whether operatives are already active in the target nation, then use compare_intel_with for a dual-threshold assessment.
Common Pitfalls
- Using assignment syntax instead of comparison operators: Beginners often mistakenly write
civilian_intel = 0.5 instead of civilian_intel > 0.5. However, within this trigger, = means "exactly equal" rather than assignment, and the value must match precisely to evaluate true, causing the condition to almost never fire. Clearly distinguish the semantics of >, <, and = operators based on your actual needs.
- Incorrect scope causing reversed comparison subjects: The scope of
compare_intel_with is "the party that possesses intelligence," while target is "the party being surveilled." If written under the wrong country scope, navy_intel < 0 actually reflects that the target nation has more intelligence. Beginners easily confuse the comparison direction, resulting in logic that is completely opposite to expectations.