Writing a craft
Turn a crafting method into a living flowchart
Every craft on this site — the flowcharts with live prices, hit odds, and expected cost — is generated from a short plain-text recipe in the craft language. This guide teaches you the whole language, one example at a time. Everything you see rendered below is live: the same engine that draws the Crafts pages draws these examples, and every one has an “Open in playground” link so you can edit it yourself.
What a craft is
A craft is a list of steps under a craft: title. Each step line names a node in the flowchart: a short id (lowercase letters, digits, and dashes), then a title. A step with no arrows simply flows into the next step in the file, and done marks the happy ending — so the smallest useful craft is just a title and a couple of steps:
craft: My First Craft
step buy: Buy a Sapphire Jewel base
step essence: Slam an essence on it
done "keep whatever it rolls"
Write it in the playground and the flowchart renders live as you type — parse problems show up as line-numbered messages under the editor, and # starts a comment anywhere outside double quotes.
Steps, notes, and materials
Two indented lines fill a step out. note: adds explanatory text to the node — the “why” a reader needs. use <N>x <material> attaches what the step consumes, and this is where the live prices come from: the name is matched against the currency-exchange catalog (exact match first, then contains), so use exact in-game names like Greater Essence of Haste, not shorthand like “haste essence”. A matched material gets its icon and current exchange price on the node; an unmatched one renders without a price and the playground warns you. The optional base: header is free text describing the item you craft on — it is displayed, not priced.
craft: My First Craft
base: Sapphire Jewel
step buy: Buy a Sapphire Jewel base
note: Any white or magic base works
step essence: Slam a Greater Essence of Haste
use 1x Greater Essence of Haste
done "two mods, one of them speed"
1× Greater Essence of Haste—Branching
Crafting is gambling, so most steps have more than one exit. hit -> step-id and miss -> step-id are the common pair; each takes an optional quoted label when the bare words need context. Two terminal lines end a path: done for success and fail for the honest dead end — use fail when recovering means a genuinely new item, not a retry.
craft: Essence Jewel
base: Sapphire Jewel
step essence: Slam a Greater Essence of Haste
use 1x Greater Essence of Haste
hit "two useful mods" -> regal
miss -> vendor
step regal: Regal the jewel
use 1x Regal Orb
hit "a third useful mod" -> keep
miss -> vendor
step keep: Use it
done "three-mod jewel"
step vendor: Vendor it
fail "start over on a new base"
1× Greater Essence of Haste—
1× Regal Orb—When a step has three or more results, drop hit/miss and write one on "label" -> step-id line per outcome:
craft: Corrupt the Jewel
step vaal: Corrupt it
use 1x Vaal Orb
on "no change" -> keep
on "rerolled into something usable" -> keep
on "bricked" -> trash
step keep: Socket it
done
step trash: It happens
fail "corruption is forever"
1× Vaal Orb—Loops and retries
Loops are nothing special: a branch that points at an earlier step draws a back-edge, and the summary treats every material inside the cycle as a per-attempt cost. One idiom is worth knowing. When a retry consumes materials, give it its own step with an unconditional -> step-id jump back, so the cost sits visibly on the loop instead of hiding inside a label. The annulment recovery below does exactly that — and miss -> buy restarts the whole craft on a fresh base.
craft: 5-Mod Essence Jewel
base: Sapphire Jewel
step buy: Buy a Sapphire Jewel base
note: Any white or magic base works
step essence: Slam a Greater Essence of Haste
use 1x Greater Essence of Haste
hit "two useful mods" -> regal
miss -> buy
step regal: Regal the jewel
use 1x Regal Orb
hit -> exalt
miss -> annul
step annul: Remove the bad mod
use 1x Orb of Annulment
hit -> exalt
miss "removed a good mod" -> buy
step exalt: Exalt to 5 mods
use 2x Exalted Orb
done "5-mod jewel"
1× Greater Essence of Haste—
1× Regal Orb—
1× Orb of Annulment—
2× Exalted Orb—Odds and expected cost
So far every branch is a coin the reader flips in their head. Name the exact base item and the site can weigh the coin for you. The item: header binds the craft to that base’s real modifier pool and spawn weights (use the exact base name, like Wicker Tiara); ilvl: optionally caps which mod tiers can roll. Then want lines declare what a step is hunting: prefix or suffix, a fragment of the in-game mod text (case-insensitive), and optionally a tier range within the mod group, where T1 is the best. Several want lines on one step mean “any of these”.
With targets declared, the hit edge shows the computed chance, loop steps show the expected number of attempts, and the summary prices the whole loop: per-attempt materials multiplied out into an expected cost. That number is the craft’s real budget — the thing to compare against just buying the finished item.
craft: Rarity Tiara
item: Runeforged Kamasan Tiara
ilvl: 81
step buy: Buy a white exceptional tiara
step alch: Alchemy it
use 1x Orb of Alchemy
want prefix "Rarity of Items" tier 1-2
hit "rarity landed" -> keep
miss -> buy
step keep: Keep it
done "rarity tiara"
1× Orb of Alchemy—
1× Orb of Alchemy per attempt—The computed odds model a single action on the current item. When the true chance is something the model cannot see — omen interactions, “two of these three mods” compounds, or a judgement call like “rolls worth keeping” — write odds <P>% on the step to set the hit chance yourself:
craft: Divine Until Good
step divine: Divine the rolls
use 1x Divine Orb
odds 33% # about one roll in three is worth keeping
hit "good numbers" -> keep
miss -> divine
step keep: Lock it in
done
1× Divine Orb—Share it
The playground’s Share button packs your whole craft into the link itself — no account, no server copy; anyone who opens the URL sees your recipe rendered with current prices. The optional source: header credits where the method came from, usually the video. If you have written a craft worth keeping, send us the share link and it can join the Crafts index.
Grammar reference
Everything the language understands, in one table. Header lines come first; indented lines belong to the step above them.
| Line | Form | What it does |
|---|---|---|
craft: | craft: <title> | Required. Names the craft. |
source: | source: <url> ["title"] | Optional attribution, usually the video. |
base: | base: <free text> | Describes the item you craft on. Displayed, not priced. |
item: | item: <base name> | Exact base item; unlocks computed odds and expected cost. |
ilvl: | ilvl: <1–100> | Caps eligible mods by required level. |
step | step <id>: <title> | A node. Id is a unique lowercase slug used as a branch target. |
use | use <N>x <material> | Materials the step consumes; exact in-game names get live prices. |
note: | note: <text> | Explanatory text on the node. |
hit / miss | hit ["label"] -> <step-id> | The common two-outcome branch. |
on | on "label" -> <step-id> | One line per outcome for steps with three or more results. |
-> | -> <step-id> | Unconditional jump; the idiom for paid retry loops. |
want | want <prefix|suffix> "text" [tier <N>[-<M>]] | A mod the step hunts. Multiple lines are any-of. Needs item:. |
odds | odds <P>% | Explicit hit-chance override when the single-action model is wrong. |
done / fail | done ["label"] | Terminal success / terminal failure. |
| (no branches) | — | A step without arrows flows into the next step in the file. |
# | # comment | Comment anywhere outside double quotes. |
