Skip to main content
A recipe turns ingredients (consumed from the bag) into an output item. forge-crafting orchestrates the job; the items come from forge-items and live in forge-inventory.

Register a definition

Fields

Knowledge: who can craft it

By default a character must learn a recipe before crafting it:
Set requires = { unlock = false } to make a recipe common knowledge, anyone can craft it with no learning step. (The shipped recipe:bandage uses this so a fresh character can craft immediately.)

Craft it

The job validates ingredients, runs for craftTimeSec, and consumes ingredients at completion, so cancelling, disconnecting, or walking away mid-craft is lossless (no ingredients lost, no output minted). On success the output is added to the bag (overflow spills to a world drop) and any xp is granted.
To ship your own neutral default recipe, add it to forge-crafting’s shared/data/recipes.lua with ShipDefaults = true.

Back to the packages