Automation · DSL · Public API
The only strategy game that tells you to write a bot.
Travian and Tribal Wars ban automation. Screeps requires you to code before you can play. Blood and Thunder sits in the gap: bots are legal, first-class, and optional. Script cities and battles in a declarative DSL, drive the same actions through a public REST API, or buy scripts when you would rather command than compile.
Early access (v0.1.0). No fake player counts. The API and DSL ship in the live game app — this page shows honest samples from the real grammar.
Real DSL — battle and city
Two script kinds. Battle scripts pick targets and actions each round. City scripts manage the empire every tick with eight verbs. Snippets below match the production parser in apps/bt-web/src/lib/dsl/.
- ASSIGN
- BUILD
- TRAIN
- CRAFT
- TRANSFER
- UPGRADE
- EQUIP
- ALERT
Battle script
Built-in: Hold Position
# Hold the line. Attack only what walks into range.
RETREAT WHEN army_strength < 0.2
ACTIVATE any WHERE in_range
TARGET enemy any WHERE nearest
ACTION attack
WHEN target_in_range
ACTIVATE any
TARGET enemy any WHERE nearest
ACTION attack
City script
All eight verbs — built-in + fixture syntax
# City automation — every city verb in one readable plan.
# Verbs: ASSIGN · BUILD · TRAIN · CRAFT · TRANSFER · UPGRADE · EQUIP · ALERT
ASSIGN 50% workers TO food_production
ASSIGN 30% workers TO wood_production
ASSIGN 20% workers TO stone_production
WHEN NOT has_building("Barracks")
ASSIGN 40% workers TO food_production
ASSIGN 20% workers TO wood_production
ASSIGN 20% workers TO iron_production
ASSIGN 20% workers TO military
WHEN has_building("Barracks")
BUILD "Farm"
WHEN building_count("Farm") < 2 AND building_slots_free > 0
BUILD "Barracks"
WHEN population >= 50 AND building_count("Barracks") < 1 AND building_slots_free > 0
UPGRADE walls
WHEN wall_level < 2 AND stone >= 2000
TRAIN infantry AMOUNT 5
WHEN garrison_size < 10 AND has_building("Barracks")
CRAFT "Crossbow" AMOUNT 10
WHEN armory_stock("Crossbow") < 15
TRANSFER 500 food TO city("Thornwall")
WHEN food_surplus > 2000
EQUIP army("defending") WITH template("Heavy Assault")
ALERT "Population milestone reached!"
WHEN population >= 100 AND population_prev < 100Public REST API — UI parity
Everything the browser can do, a client should be able to do with a key. Generate API keys in Settings (bt_…). Bearer auth. Same /api/v1/… routes the game UI calls. OpenAPI lives at https://game.bloodandthundergame.com/api/v1/docs.
- Keys once, then prefix only — the full bt_ secret is shown at generation; list endpoints return prefixes, never the raw key again.
- UI parity — army list, move, attack, cities, scripts, and the rest of the v1 surface share the same ownership checks as the War Room UI.
- Fair rate limits — sliding-window budgets scale with empire size (about 60–120 actions/min by city count). Humans and bots share the same ceilings; skill is the ceiling, not pay or request spam.
curl · GET /api/v1/armies
# List your armies — same ownership-scoped data the UI reads
curl -sS \
-H "Authorization: Bearer bt_YOUR_KEY" \
-H "Accept: application/json" \
"https://game.bloodandthundergame.com/api/v1/armies"
curl · POST /api/v1/armies/{id}/move
# March an army — UI-parity write (202 + pending action)
curl -sS -X POST \
-H "Authorization: Bearer bt_YOUR_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: demo-move-1" \
"https://game.bloodandthundergame.com/api/v1/armies/ARMY_ID/move" \
-d '{"destination_x":42,"destination_y":17}'Script Marketplace
Sell battle, squad, and city scripts. Listings target a $0–$9.99 price band with a 70/30 author split (author keeps 70%). Built-ins stay free; marketplace scripts raise the floor for non-coders without raising the skill ceiling for people who write their own.
Marketplace payouts coming with v1. Stripe-backed payouts are not live in early access. You can write and run scripts today; author revenue shares ship when the store is production-ready — we will not pretend checkout exists before it does.
Not a coder?
Play by hand or buy scripts
The full UI works without writing a line. Attach built-in city plans and battle postures, fork templates, or pick marketplace scripts when those land. Bots and scripts raise the floor so you are not farmed for being offline — they do not buy you a stronger army than a skilled human can field.
Anti-P2W · fair automation
No pay-to-win power sales. Automation is a feature, not a ban reason — and not a wallet check. Rate limits apply equally to clickers and bots. Gold and cosmetics stay out of combat advantage. Early access: rules and economy still harden toward v1.
Write the bot. Or don't.
Free browser strategy MMO. No download. Found a city, attach a script, or call /api/v1/armies yourself.
Play Free — No Download