> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markz3d.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Adding a new component

A skateboard is built from parts players can swap in the editor and buy in the shop. They are listed in `Config.Components`, split into four sections:

* **board**: the deck
* **truckplate**: the trucks
* **wheels**: the wheels
* **base**: the assembled skateboard item itself

> [!WARNING]
>
> A new component needs its own prop. We do not provide it, it has to be created and streamed by you.\
> \
> This is not a config only change, it requires some actual modeling skills.

**1. Stream your model**

The model only needs to be streamed by any resource on your server, otherwise it cannot be fitted or shown in the shop.

**2. Open the `config.lua` and scroll down to `Config.Components`**

**3. Now, you can create a new component.**

Add it to the section it belongs to, following this format:

```lua theme={null}
["wheels_classic_21"] = {
    model = "mxc_skateboard_prop_wheels_classic_21",
    price = 420,
    shopModel = "mxc_skateboard_prop_shop_wheels_classic_21"
},
```

`wheels_classic_21` *refers to the name of the item that will function as this component.*\
`model` *is the model fitted onto the skateboard.*\
`price` *is what it costs in the shop.*\
`shopModel` *is a different model to show in the shop preview* (optional, default: the same as `model`)

> [!NOTE]
>
> You need to register the item in your inventory for it to work.\
> [how to install items?](https://docs.markz3d.com/other/general-faq.md#how-to-install-items%3F)

**4. Add the images**

Your component needs a picture in two places:

1. Your inventory images folder, so it shows in the player's inventory
2. `utility_skate/web/images/`, so it shows in the editor and shop menus

Both are named after the component, so `wheels_classic_21.png` for the example above.

> [!WARNING]
>
> The component name, the item name and the image names are the same word everywhere. If one of them doesn't match, the component cannot be bought or fitted.

***

## Good to know

Decks don't use `shopModel`, they are shown in the shop with the same model that gets fitted.

The dirt that builds up on the wheels while riding is a separate overlay that sits on top of whatever wheels are fitted, new wheels don't need their own dirty versions.

The `base` section holds a single entry, the `skate` item, which is the assembled skateboard players buy to get started. It only takes `price` and `shopModel`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.