> For the complete documentation index, see [llms.txt](https://mrcscripts.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mrcscripts.gitbook.io/docs/scripts/quickstart/factory-tags.md).

# Factory Tags

The `tags` section is only used on **factories** (cooking stations) in `config.lua`.

It controls how a station looks and behaves.

You use it to set camera angles, play animations, attach props, and run particles.

### Camera

Adjust where the camera points when a player uses or crafts at a station.

```lua
['camera'] = {
  onUse = {
    offset = vector3(X, Y, Z),         -- Move the camera to this spot
    rotationOffset = vector3(X, Y, Z), -- Rotate the camera
  },
  onCraft = {
    offset = vector3(X, Y, Z),
    rotationOffset = vector3(X, Y, Z),
  },
}
```

### Player animation

Play an animation while using or crafting.

```lua
['player_animation'] = {
  onUse = {
    dict = 'animation_dictionary', -- Animation group
    animation = 'animation_name',  -- Animation name
    flag = 1,                      -- Usually 1
  },
  onCraft = {
    dict = 'animation_dictionary',
    animation = 'animation_name',
    flag = 1,
  },
}
```

### Props

Spawn objects on the station, or attach them to the player.

```lua
['props'] = {
  onUse = {
    {
      model = 'prop_model_name',
      offset = vector3(X, Y, Z),
      rotationOffset = vector3(X, Y, Z),
    },
  },
  onCraft = {
    {
      model = 'prop_model_name',
      bone = 'IK_R_Hand', -- Optional. Attaches to player if set.
      offset = vector3(X, Y, Z),
      rotationOffset = vector3(X, Y, Z),
    },
  }
}
```

{% hint style="info" %}
If you set `bone`, the prop follows the player.

If you don’t, it stays on the station.
{% endhint %}

### Particles

Add effects like steam, smoke, or fire.

```lua
['particles'] = {
  onCraft = {
    {
      dict = "particle_dictionary",
      name = "effect_name",
      scale = 1.0,
      color = vector3(R, G, B),      -- Optional
      offset = vector3(X, Y, Z),
      rotationOffset = vector3(X, Y, Z),
      looped = true,
    },
  },
}
```

### Example

```lua
tags = {
  camera = {
    onUse = {
      offset = vector3(-1, -1, 2),
      rotationOffset = vector3(-45, 0, -45),
    },
  },
  player_animation = {
    onCraft = {
      dict = 'amb@prop_human_bbq@male@idle_a',
      animation = 'idle_b',
      flag = 1,
    },
  },
  props = {
    onCraft = {
      {
        model = 'prop_kitch_pot_lrg',
        offset = vector3(0, 0.75, 0),
        rotationOffset = vector3(0, 0, -30),
      },
    },
  },
  particles = {
    onCraft = {
      {
        dict = "core",
        name = "ent_amb_torch_fire",
        scale = 0.5,
        offset = vector3(0, 0.75, -0.15),
        rotationOffset = vector3(0, 0, 0),
        looped = true,
      },
    },
  },
}
```

{% hint style="success" %}
Tune offsets by trial and error in-game.

Small changes make a big difference.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://mrcscripts.gitbook.io/docs/scripts/quickstart/factory-tags.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
