trigger · and
Definition
- Supported scope:
any - Supported target:
THIS,ROOT,PREV,FROM,OWNER,CONTROLLER,OCCUPIED,CAPITAL
Description
all inside trigger must be true
andanyTHIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITALall inside trigger must be true
Hands-on notes are AI-generated and checked against the vanilla command vocabulary — treat them as a starting point, not authoritative reference. The definition above is the game's own documentation.
and is the most fundamental logical combinator, used to require multiple conditions to be true simultaneously. For example, in a country event's trigger block to restrict "must be a democratic nation and at war," or in a focus's available to stack multiple prerequisites. In large mods, it is commonly used to explicitly group sub-conditions and improve script readability.
focus = {
id = my_focus
available = {
and = {
is_historical_focus_on = no
country_exists = USA
not = { has_global_flag = ww2_started }
}
}
}
[not](/wiki/trigger/not) — Nested with and to implement composite logic of "all conditions satisfied AND a certain condition does not hold."[or](/wiki/trigger/or) — Commonly used as a sub-block of and, allowing one condition from a group to be satisfied within an overall "all true" requirement.[custom_trigger_tooltip](/wiki/trigger/custom_trigger_tooltip) — Wraps an and block to customize tooltip display text and avoid the interface listing multiple conditions excessively.[count_triggers](/wiki/trigger/count_triggers) — Used as a sibling or sub-condition of and to count satisfied conditions before combining with other mandatory conditions.and causes confusion in logic hierarchy: The top level of HOI4's trigger block implicitly functions as and by default, but within or / not, if you want to create a sub-combination of "all conditions must be true," you must explicitly write and = { ... }. Otherwise, the structure will be parsed incorrectly.and: and is a pure judgment block and cannot contain commands that modify game state like set_variable, if (effect version), etc. Logic judgments and state modifications should be placed in separate trigger and effect blocks respectively.