An interactive counter lab for Age of Empires IV.
Learn which unit beats which — with an explainable matchup model, decision drills, and six practical combat rules.
Modes · How it works · Use it · Tech · Data
WAR ROOM turns raw Age of Empires IV unit data into something you can actually learn from. Instead of a static counter chart, it explains why a matchup tips the way it does — bonus damage, range, cost efficiency, terrain and micro — and lets you change the fight and watch the answer change with it.
It runs as a single HTML file: open it, host it anywhere, or use the live demo. No install, no account, no tracking.
- 🗡️ 205 units across 23 civilizations, 42,025 directed unit-vs-unit matchups
- 🧠 Explainable model — every verdict comes with its reasoning and a confidence score, close fights are flagged as skill matchups
- 🎚️ Change the fight — resources vs. 1-on-1, age, upgrades, terrain and micro; watch tight matchups flip
- 🌍 German & English — full UI toggle, your choice is remembered
- 🎯 Real data — pulled from aoe4world/data, no made-up numbers
- 📦 Standalone — one self-contained file, works offline (images/fonts load online), deploy on any static host
- ♿ Accessible & responsive — keyboard-friendly, focus-managed, mobile-ready
| ⚔️ Counter Lab | Pick your unit and the enemy. Get a clear verdict (from clear counter to hard loss), a model-confidence %, and the reasons behind it. Ranked counter suggestions update as you tweak the combat variables. |
| 🔎 Unit Explorer | Browse and filter every unit. Each dossier shows stats, weapons, strong against / weak against lists and concrete usage tips. |
| ⏱️ Drills | The enemy is massing something — pick the best affordable answer in 12 seconds. Your streak and progress are saved locally. |
| 🧭 Fight IQ | Six practical combat rules (scout production, compare resources, control the contact, play the space, target by value, switch before you must) plus a 10-second pre-fight checklist. |
The app itself is bilingual — switch between 🇩🇪 Deutsch and 🇬🇧 English with the toggle in the top-right corner.
The matchup score is a learning model, not a frame-perfect combat simulator. For each side it combines:
- class & bonus damage against the opponent's classes,
- hit points, armour, attack speed and range,
- a cost comparison (equal resources) or a straight 1-on-1,
- and modifiers for terrain, micro level and relative upgrade advantage.
The two sides are compared into a ratio, mapped to a verdict, and paired with a model-confidence value so you can tell a clear result from a coin-flip.
Deliberate limits — civilization bonuses, activated abilities, landmark
effects, formation depth, real pathfinding and patch special cases can flip a
result. That's exactly why close matchups are marked as skill matchups rather
than pretending to be certain. All tuning constants are named and documented in
src/lib/matchup.config.js.
- ▶ Live demo: https://aoe4.hazii.org
- 📥 Download: grab
war-room.htmlfrom the latest release and open it by double-clicking. - 🌐 Self-host: it's a single static file — drop it on any webspace, Netlify Drop, GitHub Pages, etc. See
deploy/for a ready-made CSP and step-by-step notes.
React 19 + Vite 6, bundled into one file via vite-plugin-singlefile. Quality is
guarded by ESLint, Prettier, JSDoc type-checking, a Vitest suite and GitHub
Actions CI.
npm install
npm run dev # local dev server on http://127.0.0.1:5173
npm run build # production build → outputs/index.html (standalone)
npm run audit # lint · typecheck · test · build · standalone checkUpdating the game data:
git clone --depth 1 https://github.com/aoe4world/data.git work/aoe4world-data
npm run generate:dataThe generator bakes data-driven combat flags into src/data/units.generated.js
and warns when listed special units disappear or new class tokens appear, so
balance patches surface instead of silently breaking the logic.
- Official civilization directory
- Official introduction to the counter principle
- aoe4world/data — unit values extracted from the game files
- aoe4world Explorer
The exact upstream commit is recorded in the header of
src/data/units.generated.js.
Age of Empires IV and related marks are property of their respective owners. This is an independent, non-commercial fan learning project and is not affiliated with Microsoft or Relic Entertainment. Unit values are derived from the community dataset aoe4world/data; unit artwork and fonts load from their original sources and are not redistributed here.
The project's own source code is released under the MIT License. The disclaimer above covers third-party names, marks and data.
// webdesign: haZii.org
