General

Setting What it does
Config.Debug Extra logging, and the tr-crafting:testAnim command for trying animations.
Config.KeyHashes Keys used for prompts. The first opens the crafting menu; the second puts out your campfire.
Config.PromptDistance How close (in metres) you need to be to a spot to see the prompt.
Config.PropDistance How close you need to be to a crafting prop (campfire, stove...).
Config.AllowMovement Whether the player can move while the menu is open.
Config.Minigame true for the key-press minigame (one round per item); false to craft once after Config.CraftTime seconds.
Config.Webhook A Discord webhook for crafting logs (leave empty for none).

Locations

Config.CraftingLocations = {
    ["carpenter"] = {
        label = "Carpenter",
        blip = "blip_mp_ugc",                -- leave out for no blip
        jobs = {                             -- leave out for anyone
            { name = "carpenter" },          -- any grade
            { name = "builder", minGrade = 2 },
        },
        locations = {
            ["strawberry"] = vector3(-1812.8, -426.44, 159.95),
            ["blackwater"] = vector4(-867.15, -1291.85, 43.0, 90.0),
        },
        categories = {
            ["Materials"] = {
                jobs = { { name = "carpenter", minGrade = 2 } }, -- optional: replaces the location's jobs here
                recipes = {
                    ["plank"] = {
                        output = { { item = "plank" } },
                        cost = { { item = "hwood", quantity = 5 } },
                    },
                },
            },
        },
    },
}
  • locations are the spots players walk up to. Use a vector4 to make the player face a direction (the heading) when they start.
  • jobs is a list: a player with any one of them can use it. minGrade and maxGrade are both inclusive, and either can be left out.
  • A location can also have props (craft at any matching object) or a command (craft anywhere). See Props & field crafting.
  • Categories with no recipes the player can see aren't shown.

Animations

Anims.Animations lists the animations recipes can use. Each has a dict, a name, an optional flag (default 17, which loops), and optional props the player holds:

["hammer_kneel"] = {
    dict = "amb_work@world_human_hammer@kneel@male_a@trans",
    name = "base_trans_base",
    props = {
        { model = "p_hammerclaw01x", pos = vector3(0.1, -0.04, 0.22), rot = vector3(175.0, 20.0, 170.0) },
    },
},

A prop's bone defaults to the right hand (SKEL_R_Finger13). A prop can have its own props that go with it, like the plank and nails in hammer_table.

Text

Everything players read is in lang.lua.