Build Order Workbench

Write a build order in the editor below using a custom scripting language, hit Run, and get a live simulation with a timeline, resource tracking, and scoring. Good for stress-testing timing assumptions without launching a game.
Data sourced from aoe2database.com & Spirit of the Law.

Click here for LLM Benchmarks

Build Order Editor

Item Reference
ready cmd/ctrl+enter to run

Scores & Health

Scores

CriterionValue

Health Metrics

Entity Timeline

0:00 / 0:00

Warnings

TimeCodeMessage
Build Order Reference
A minimal build order
evaluation 15:00      # required — how long to simulate
ruleset aoe2          # standard AoE2 rules
setting arabia        # standard Arabia start (2 starter sheep, 6 neutral sheep, 2 boar, berries…)

auto-queue train_villager using town_center  # keep training villagers non-stop
assign villager 1 to sheep
assign villager 2 to sheep
queue build_house using villager 3 then assign to sheep  # build, then gather

Need valid action/entity names? Browse all actions, entities & resources →

Setup lines — go before any commands
evaluation <MM:SS>Required. How long to simulate, e.g. evaluation 15:00.
stop after clicked|completed|depleted|exhausted <target> [xN]Optional early stop; sim ends 5 seconds after this trigger or at evaluation time, whichever comes first.
ruleset aoe2Use standard AoE2 rules.
setting arabiaStandard Arabia start — 2 starter sheep, 6 neutral sheep, 2 boar, berries, etc.
debt-floor <N>Allow resources to go this far negative (default −30).
score time clicked|completed <action> [xN]Track a timing goal, e.g. Feudal click or 3rd scout.
starting-resource <res> <amount>Override a starting resource amount.
Sending villagers to gather
assign villager 4 to sheep              # send villager #4 to sheep
assign villager x3 to forest            # send any 3 villagers to wood
assign villager all from gold to farm   # move everyone off gold onto farms
Queuing actions — build, research, train, age up
queue build_house using villager 3
queue build_lumber_camp using villager 7 then assign to forest  # build, then chop
auto-queue train_villager using town_center   # keep repeating continuously
stop-auto-queue build_farm                    # cancel an auto-queue
queue advance_feudal_age

then chains a follow-up: the second command runs as soon as the first finishes.

Market trading
sell 100 wood      # sell 100 wood for gold
buy 100 food       # buy exactly 100 food with gold
sell 500 stone     # expands to five 100-stone market actions

Amounts must be positive multiples of 100. Use buy/sell (not trade X for Y).

Timing and triggers

Use at to schedule at a fixed time, or after to react to in-game events:

at 4:30 queue lure_deer
after villager 18 queue advance_feudal_age             # click up at 18 pop
after completed advance_feudal_age queue build_stable  # stable as soon as feudal hits
after depleted boar assign villager x3 from boar to sheep
after every depleted sheep assign villager from sheep to boar deer  # repeats each time
after <entity> <N>When your Nth entity is created
after completed|clicked <action>When action finishes or is clicked (once)
after depleted|exhausted <node>When a resource node runs out (once)
after every …Same triggers, but fires every time, not just the first
after … after …Chain conditions — both must happen before the command runs
on …Alias for after every
Picking villagers and resources

Selectors appear in using, from, and to clauses:

Villager selectorMeaning
villagerAny one available villager
villager 3The specific 3rd villager created
villager x3Any 3 villagers
villager allEvery villager of that type
villager from sheepA villager currently gathering sheep

Resource nodes: sheep · boar · berries · forest · gold_mine · straggler_trees · farms · idle · created

created is for trigger-context assign lines (for example after completed build_farm assign to created) and targets resource nodes created by that trigger.

Full syntax reference
# Preamble
evaluation <MM:SS>
ruleset <name> | setting <name>
debt-floor <N> | starting-resource <resource> <amount>
human-delay <action> <chance> <minSec> <maxSec>
score time completed|clicked <action> [xN]
stop after clicked|completed|depleted|exhausted <target> [xN]

# Commands
[at <MM:SS>] [after [every] <condition>] <directive>
[at <MM:SS>] [after [every] <condition>] queue <action> … then <directive>

# Directives
queue <action> [xN] [using <selector>[, …]] [from <node>…]
assign <actorType> <N | xN | all> [from <node>…] to <node>…
auto-queue <action> [using <actorType>] [from <node>…]
stop-auto-queue <action> [using <actorType>]
spawn-assign <entityType> to <node>
consume-res <prototypeId> [<count>]
create-res <prototypeId> [<count>]
sell <amount> <resource>   # positive multiple of 100, non-gold
buy <amount> <resource>    # positive multiple of 100, non-gold
Saved Builds