Scenarios and Triggers
Use Map Settings maps carry their own rules and a trigger system that reads like sentences -- WHEN a condition holds, DO these actions -- with zones, timers, counters, per-player loops, and per-map costs.
Every map in Warigami is one of two kinds, chosen when it is created:
- ⚔ Melee — a standard match. Every player gets the same start at their flag, the stock rules apply, and the lobby’s own settings (AI difficulty, province, alliances) decide the rest. Win by destroying every enemy’s Palace or Prime — losing either eliminates a player.
- ⚡ Use Map Settings (“UMS”) — the map brings its own rules. Placed armies, per-map costs and stats, availability, vision, supply rules, alliances, and above all triggers that decide what happens and who wins. The lobby cannot override them.
This page is about the second kind: what a scenario can do and how its triggers think. To build one, see Armies and Scenario in the Map Builder guide.
The rules a map can carry
Under ⚖ Rules in the Scenario tab, a UMS map sets:
- Economy — costs, fold speeds, resources and availability for this map only. Any building or unit can be repriced (a modified cost replaces the whole cost), given a new fold time (down to instant), or given different health, damage and speed. Every upgrade and study can be repriced too. Resource nodes can be given a different amount, a regeneration rate, or made ♾ Perpetual so they never run dry.
- Availability (in the same Economy popup) — which buildings, units, upgrades and studies exist on this map at all. The tutorial uses this to hand you one thing at a time, and the Allow tech action can open more mid-mission.
- Vision — normal fog of war, Explored (the land is visible from the start, enemies still hidden), or Revealed (no fog at all).
- 📦 Push-less — no hauling; everything pays straight from stores, so the map plays without Pushers.
- ♻ No un-folding — switches off the un-fold refund.
- Defeat when the player has nothing left — on by default. Untick it for missions where losing your base is not the end.
- Victory when every enemy is annihilated — off by default. Tick it for a plain fight with extra rules; leave it off when a trigger decides the win, such as a survival timer.
- AI difficulty per player, and which players get a computer brain at all. Unchecked players do only what triggers tell them.
- Starting stock per player.
Players, teams, and picks
A player is a colour on the map — up to twelve. A team is a group of allied players, set under Players on the Armies tab. Allies share vision and win together.
Triggers name players three ways:
- A colour — “Blue”, “Red”.
- Several colours — a condition with more than one player attached. Headcounts, stockpiles and kill counts are checked for any one of them; zone entries and finished buildings are counted together. The editor shows which rule applies on each condition.
- A pick — resolved when the trigger fires: the player with the most (or fewest) kills, units, buildings, Paper, Pencilcore or Pitch; all allies of X; all enemies of X; or every other player (everyone except X, allies included).
For each player
A trigger can declare a scope — for each of Blue, Red, Green — and then run once per player, with ⟨that player⟩ standing in for each one in turn, in both its conditions and its actions:
FOR EACH of ⟨Blue, Red, Green⟩ · WHEN ⟨that player⟩ has 100 kills · DO give ⟨that player⟩ 500 Paper, message ⟨that player’s team⟩ “They pull ahead!”
One trigger instead of a copy per seat. Picks work inside the loop too: every other player of ⟨that player⟩ is “everyone but me”.
How a trigger fires
A trigger is a sentence assembled from dropdowns, no scripting: WHEN every condition holds, DO the actions in order. Each trigger also says how often:
- Once — fire and retire. The default.
- Repeatedly, with a cooldown — re-arm after N seconds. Pair Always with a cooldown for “every N seconds”, or Every N kills with cooldown 0 for an exact per-kill payout.
Zones — rectangles or circles drawn on the map with the ▭ tool — give conditions and actions somewhere to point. Broken references show up in the editor’s Problems panel before you ever test-play.
Conditions
- Units enter a zone — a player’s units (optionally of one type, optionally a count) are inside a zone.
- Match clock — the game has run N seconds.
- Unit count / Building count — a player has at least N of a type (or of anything).
- Building finishes folding — edge-triggered the moment a structure completes, optionally of a type, optionally inside a zone.
- Stockpile — a player’s Paper, Pencilcore or Pitch reaches (or drops to) an amount.
- Tagged group dead — every unit spawned with a tag is gone.
- Trigger already fired — chain triggers.
- Ink Storm starts / ends, Storm over a zone.
- Score / kill count reaches, Every N kills.
- Always — true every beat; the heartbeat for repeating triggers.
- Countdown hits zero, Timer is running, Timer has ended, Timer time left — for named timers.
- Counter compare — a named counter is ≥, ≤ or = a value.
- Units vs. saved count — compare a live headcount against one saved earlier (“did we lose anyone since?”).
- Upgrade installed.
Actions
- Show a message — a dialogue box with a speaker, for everyone or one player’s team.
- Objective — add or complete an entry in the objectives panel.
- Spawn — units or a building, at a point or scattered inside a zone, for a player or a pick, optionally tagged for later.
- Attack-move order, Hold position / release, Freeze / thaw units — freeze is stricter than hold: a frozen fold does nothing at all until thawed, then resumes exactly as it stood.
- Grant resources, Reveal a zone, Pan the camera.
- Conjure an Ink Storm at a zone, and Dissipate the Ink Storm.
- Victory / Defeat for a player or pick.
- Arm / disarm a trigger.
- Start a countdown, Pause, Resume, Add / remove timer seconds — several named timers can run at once.
- Set / change a counter, Count units into a counter, Show a counter scoreboard, Show the kill counter.
- Remove / destroy units — N of a type (or all), anywhere or in a zone, for a player or pick.
- Teleport units, Play a voice line, Set the water level.
- Allow tech — unlock buildings, units, upgrades or studies mid-mission.
Example: The First Fold, Refolded
The built-in tutorial is an authored scenario. Its Herald is a tagged unit walked in by triggers, its lessons are objectives unlocked one at a time through tech limits, its storm is conjured on cue, and its “not a page lost” praise compares a headcount saved before the plume against the one after it. Everything it does is available to your own maps.