craft

Makes poisons, potions and traps through the game’s crafting screen, so the game’s own rules apply. kind picks the skill: poison, herbalism or traps. The maker is id, a party member (default: the creature you control).

  • Without recipe, lists the recipes the screen offers the maker and makes nothing. Each has its id, name, product, whether it canMake now, the skill rank it needs and whether the maker has it (skillHeld), and its ingredients with how many it needs and how many the pack has.
  • With recipe (an id or a name from that list), makes it count times, one at a time, like the screen’s Create button, for as long as the screen allows.

The answer includes made, the recipe’s ingredients afterwards, done, and reason: what ran short or which skill rank was missing, if it stopped. The screen opens for the creature you control, so another maker is given control first and control is handed back afterwards (controlBack). It refuses a maker without the skill. Recipes are bought from merchants.

Arguments

Name Type Required What
kind "poison" | "herbalism" | "traps" yes The crafting skill whose recipes to use.
id string   The maker, a party member’s creature id. Default: the creature you control.
recipe any   The recipe to make: its id (a number) or name, as the list shows. Omit it to list the recipes.
count integer (≥ 1, ≤ 99)   How many to make. Default 1.
showMs integer (≥ 0, ≤ 10000)   How long to linger on the screen, in milliseconds, so whoever watches sees it. Default 1000; 0 for none.

Call it as craft over MCP, or POST /api/tool/craft with the arguments as JSON.