<aside> 💡
“>” sign in the described parameters means that in its place you can use ANY one of the following signs: <, <=, =, >=, >
</aside>
| Condition name | Parameters / number of uses (if applicable) | Description | Additional info |
|---|---|---|---|
| COUNTERS | |||
| Counter | ”sidCounter”, “>”, ”X” | Triggers when the value of a local counter with the specified sid satisfies the specified inequality for the first time. |
Х — any integer. | Knows nothing about counters from other maps. Cannot interact with them in any way. | | CompareCounters | “sidCounter1”, “>”, “sidCounter2” | Triggers when, after changing either of the two specified counters with the specified sids, their values satisfy the specified inequality for the first time. | | | CounterEqualityInDays | “sidCounter”, “X” | Triggers if the value of the counter with the specified sid does not change for X days in a row. | Among other things it is used to call certain actions a number of days after an event. | | StoryCounter | ”sidStoryCounter”, “>”, ”X” | Triggers when the value of a campaign counter with the specified sid satisfies the specified inequality for the first time.
Х — any integer. | Campaign counters, unlike regular ones, can change value and be read across different missions.
They are defined and stored in the file:
\StreamingAssets\Core.zip\campaigns\*campaign_name*\**storyCounters.json** |
| QUESTS | | | |
| QuestCompleted | “sidQuest” | Triggers when the quest with the specified sid is turned off. | Does not know whether the quest was completed or failed. |
| CURRENT DIFFICULTY | | | |
| Difficulty | “indexDifficulty” | Triggers if, at the moment a new day begins, the current campaign mission difficulty selected by the player matches the difficulty with the specified index. | Possible index values:
0 — Easy
1 — Normal
2 — Difficult
3 — Impossible
4 — Lethal |
| DifficultyCustomMap | “typeDifficulty”, “indexDifficulty” | Triggers if, at the moment a new day begins, the current scenario difficulty selected by the player matches the difficulty with the specified index. | typeDifficulty refers to the difficulty settings host defines in the lobby.
Possible typeDifficulty values:
Economy — ‘Economy’ difficulty
Neutral — ‘Enemy Strength’ difficulty
Ai — ‘Ai” difficulty
Possible index values: 0 — Easy 1 — Normal 2 — Difficult 3 — Impossible 4 — Lethal |
| Condition name | Parameters / number of uses (if applicable) | Description | Additional info |
|---|---|---|---|
| GLOBAL EVENTS | |||
| StartTurn | “weekNumber”, “dayNumber” |
OR ”counter”: X | If parameters are used: Triggers as soon as the turn with the corresponding week and day number starts.
If counter is used: Triggers when X days have passed (from the moment the condition is enabled). | Neither parameters nor counter need to be specified. In that case the condition will trigger at the nearest turn start.
❗The condition only works for weeks 1-4, and only for month 1. | | AnyStartTurn | “monthNumber”, ”weekNumber”, ”dayNumber” | Triggers as soon as the turn with the corresponding month, week, and day number starts. | Instead of any of the parameters, you can input "-1" = any day/week/month.
The parameter set [ ”-1”, ”-1”, ”-1” ] = the condition will trigger at the nearest turn start. | | StartWeek | —
ONLY
”counter”: X | Triggers when a new week begins X times. | counter does not need to be specified — In that case the condition will trigger at the nearest week start. |
| NodeRevealed | “indexNode” | Triggers when the node with the specified index has been revealed from the fog of war. | indexNode can be viewed in the map editor in the bottom right corner by hovering the cursor over the desired cell. |
| PlayerDefeated | “indexPlayer” | Triggers when the player with the specified index is defeated = is completely removed from the map. | DEPRECATED — it is better to use the following combination instead:
"conditionsLogic": "Or", "conditions": [ { "c": "CheckLoseIfHeroKilled", "p": [ "1" ] }, { "c": "CheckLoseIfCityLost", "p": [ "1" ] } ],
The player's "defeat" conditions are determined by the win condition set in the map settings. ❗If no win condition is set, PlayerDefeated will not work.
❗index numbering starts from 0. Player1 = 0, Player2 = 1, etc. | | CheckLoseIfHeroKilled | “indexPlayer” | Triggers if the player with the specified indexPlayer loses a hero and no longer has any castles and/or heroes remaining. | An auxiliary condition. Used only in an "Or" combination with CheckLoseIfCityLost. | | CheckLoseIfCityLost | “indexPlayer” | Triggers if the player with the specified indexPlayer loses a castle and no longer has any castles and/or heroes remaining. | An auxiliary condition. Used only in an "Or" combination with CheckLoseIfHeroKilled. | | ECONOMY | | | | | ResCounter | ”sidResource”, “>”, ”X” | Triggers when the amount of a simultaneously accumulated resource with the specified sid satisfies the specified inequality for the first time.
Х — any integer. | Possible sidResource values: gold — Gold dust — Alchemical Dust wood — Wood ore — Ore crystals — Crystals mercury — Mercury gemstones — Gems | | BuildingConstruct | ”sidBuilding”, ”levelBuilding”, ”entityCity” | Triggers when the player constructs a building with the specified sid at the specified level in the castle with the specified entity.
level refers to the upgrade level (of walls / the main building / creature dwellings / mage guild) — from 1 to 5. | Instead of entityCity, an empty set "" can be specified. In that case the condition will trigger for any castle belonging to the player.
❗If the building was already constructed at the time this condition is enabled, it will not trigger. | | BuildingOwn | ”sidBuilding”, ”levelBuilding”, ”entityCity” | Triggers if the player controls/captures a castle with the specified entity that already has a building with the specified sid at the specified level constructed. | Instead of entityCity, an empty set "" can be specified. In that case the condition will trigger for any castle controlled/captured by the player.
❗The check only occurs when changes are made in the castle interface. Meaning it will not trigger if the building was already constructed but the player has not interacted with construction in the castle since. | | SPELLS | | | | | SpellCast | “sidSpell”
AND ”counter”: X | Triggers when the player X times uses the spell with the specified sid. | Applicable to both combat spells and adventure map spells. | | ARTEFACTS | | | | | ItemOwnSide | “sidItem”, ”>”, ”X” | Triggers when the total number of artifacts with the specified sid held by the player (across all hero inventories and all storehouses) satisfies the specified inequality for the first time.
Х — any integer. | Instead of sidItem, an empty set "" can be specified. In that case the condition will trigger when the amount of artefacts of any kind player satisfies the specified inequality for the first time. | | ItemDestroyed | “sidItem” | Triggers when the player destroys an artifact with the specified sid. | Destroying an artifact = dismantling it for dust in the inventory interface of any hero OR in the interface of another storehouse (Outpost / Pocket Dimension). | | UNITS | | | | | UnitOwnSide | “sidUnit”, “>”, “X” | Triggers when the total number of units with the specified sid belonging to the player (across all armies and garrisons) satisfies the specified inequality for the first time.
X — any integer. | | | UnitHire | “sidUnit”
AND ”counter”: X | Triggers when the player recruits X units with the specified sid. | Only direct purchase of units in castles or external dwellings counts as recruitment. | | UnitLose | “sidUnit”
AND ”counter”: X | Triggers when the player loses X units with the specified sid. | Both death in combat and manual removal from the army via the "Dismiss unit" button count as losing a unit. | | UnitKill | “sidUnit”
AND ”counter”: X | Triggers when the player kills X units with the specified sid. | Only the death in combat of a unit that did NOT belong to that player counts as a kill. |
| Condition name | Parameters / number of uses (if applicable) | Description | Additional info |
|---|---|---|---|
| HeroKill | “sidHero” | Triggers when the hero with the specified sid is removed in ANY way — via the DeleteHero action, upon their defeat, retreat, or surrender. | It does not matter which player the specified hero belonged to. |
Does NOT trigger if the hero is removed temporarily — for example, when going into training at the faction building of the Temple. | | ItemOwnHero | “sidItem”, ”sidHero” | Triggers when an artifact with the specified sid appears in the inventory of the hero with the specified sid for the first time. | Instead of sidItem, an empty set "" can be specified. In that case the condition will trigger when any artifact appears in the hero's inventory for the first time. | | UnitOwnHero | “sidHero", “sidUnit”, “>”, “X” | Triggers when the number of units with the specified sid belonging to the hero with the specified sid satisfies the specified inequality for the first time.
X — any integer. | | | HeroStat | “sidHero”, ”statName”, ”>”, ”X” | Triggers when the numerical value of the specified stat of the hero with the specified sid satisfies the specified inequality for the first time.
X — any integer. | Instead of sidHero, an empty set "" can be specified. In that case the condition will trigger when the player's currently selected hero has the required number of stat points.
Possible statName values: offence — Attack defence — Defense spellPower — Spell Power intelligence — Knowledge luck — Luck moral — Morale |
| Condition name | Parameters / number of uses (if applicable) | Description | Additional info |
|---|---|---|---|
| INTERACTIVE OBJECTS | |||
| ObjectInteractionBefore | “entityObject”, “sidHero” | Triggers when the hero with the specified sid interacts with an interactive object that has been assigned the specified entity. |
BEFORE the interaction (akin to Actions Before). | sidHero can be omitted entirely. In that case the condition will trigger when any human player's hero performs the interaction.
❗The condition will only trigger for human players' interactions. | | ObjectInteractionAfter | “entityObject”, “sidHero” | Triggers when the hero with the specified sid interacts with an interactive object that has been assigned the specified entity.
AFTER the interaction (akin toActions After). | sidHero can be omitted entirely. In that case the condition will trigger when any human player's hero performs the interaction.
❗The condition will only trigger for human players' interactions. | | ObjectCaptureEntity | “entityObject” | Triggers when the player captures an object that has been assigned the specified entity for the first time. | Capturable objects: Mines, Barracks, Castles + “Abandoned Outpost”, “Remote Foothold”, “Endless Scrolls of …”, “Insara’s Eye”. | | ObjectCaptureSid | “sidObject”
AND ”counter”: X | Triggers when the player X times captures an object with the specified sid. | ❗The counter also counts every repeated capture of the same object. | | MultipleObjectOwn | “sidObject”, ”>”, ”X” | Triggers when the number of objects with the specified sid captured by the player satisfies the specified inequality for the first time. | | | ObjectLose | “entityObject” | Triggers when an object with the specified entity belonging to the player is captured by another player for the first time. | | | NEUTRAL SQUADS | | | | | SquadInteraction | “entitySquad”, “sidHero” | Triggers when the hero with the specified sid interacts with a neutral squad that has been assigned the specified entity.
BEFORE the battle (akin to Actions Before). | sidHero can be omitted entirely. In that case the condition will trigger when any human player's hero performs the interaction.
❗The condition will only trigger for human players' interactions. ❗Do NOT use for triggering dialogues before battle. This condition is unable to interrupt the execution of standard logic — the battle will begin immediately at the moment the dialog is called, which will close it. | | SquadKill | “entitySquad”, “sidHero” | Triggers when the hero with the specified sid interacts with a neutral squad that has been assigned the specified entity.
AFTER the battle (akin to Actions After). | sidHero can be omitted entirely. In that case the condition will trigger when any human player's hero performs the interaction.
❗The condition will trigger if the squad is killed by ANY player on the map. It does not matter whether it is a human or an AI. |
| Condition name | Parameters / number of uses (if applicable) | Description | Additional info |
|---|---|---|---|
| TutorialMovePoints | “X”, ”>”, “sidHero” | Triggers when the hero with the specified sid, after stopping/finishing movement on the map, has a number of movement points satisfying the described inequality for the first time. |
Х — any integer. | sidHero can be omitted entirely. In that case the condition will trigger when any hero on the map has the corresponding number of movement points after stopping. | | TutorialOpenCity | — | Triggers when the player opens the city screen for the first time. | | | TutorialShowTooltipSquad | — | Triggers when the player opens the tooltip of a neutral squad on the map for the first time. | | | TutorialShowTooltipWO | — | Triggers when the player opens the tooltip of any interactive object (except a city) for the first time. | | | TutorialResChange | “sidRes” | Triggers when the player's amount of the resource with the specified sid changes for the first time. | | | TutorialLevelUp | — | Triggers when the player levels up a hero for the first time. | | | TutorialHeroUI | — | Triggers when the player opens the hero interface for the first time. | | | TutorialMagicGuild | — | Triggers when the player opens the magic observatory window for the first time. | | | TutorialOpenFractionLaws | — | Triggers when the player opens the faction laws window for the first time. | | | TutorialLevelUppedFractionLaws | — | Triggers when the player accumulates enough experience to learn a faction law for the first time. | | | TutorialOpenMagicBookMap | — | Triggers when the player opens the spellbook on the map for the first time. | | | TutorialHeroInteractWithAllyHero | — | Triggers when the player interacts with an allied hero for the first time. | | | TutorialStartBattleForMap | — | Triggers when the player enters combat for the first time. | Triggers at the moment the tactical phase starts. | | TutorialStartBattleForCity | — | Triggers when the player enters a siege battle for the first time. | Triggers at the moment the tactical phase starts. | | TutorialStartBattleForWorldObject | — | Triggers when the player enters combat with a bank's inner guard for the first time. | Triggers at the moment the tactical phase starts. | | TutorialStartTurnUnit | — | Triggers when the turn passes to a player's stack in combat for the first time. | | | TutorialOpenMagicBookBattle | — | Triggers when the player opens the spellbook in combat for the first time. | | | TutorialBattleEnergy | — | Triggers when the player accumulates 1 energy cell for the first time. | | | TutorialUnitUI | — | Triggers when the player opens the detailed unit view window for the first time. | |