> For the complete documentation index, see [llms.txt](https://arivia.rlib.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://arivia.rlib.io/developers/food/category.md).

# ▸category

## Alias

&#x20;           *`category`*

## Source

&#x20;           *`added in Arivia v3`*

## Requires

&#x20;           *`no additional requirements`*

## Type

&#x20;           *`string`*

## Info

By default; darkrp does not offer customization for food categories. Arivia has however added the ability to assign categories to food just like you can for entities, etc.

* Open **lua\modules\arivia\cfg\sh\_6\_food.lua**
* Locate the table **cfg.food.categories**
* Add new category *(see example 1 below)*
* Open your darkrp entities file that you wish to add the food item to
* Add new food item and assign category *(see example 2 below)*

####

## Example

{% tabs %}
{% tab title="Example 1:      sh\_6\_food.lua" %}

```lua
cfg.food.categories =
{
    [ 'yum' ] =
    {
        name                = 'Yum',
        startExpanded       = true,
        sortOrder           = 1,
        tip                 = 'The good stuff',
    },
}
```

{% endtab %}

{% tab title="Example 2:       entities.lua" %}

```lua
DarkRP.createFood( 'Bunch of bananas',
{
    model       = "models/props/cs_italy/bananna_bunch.mdl",
    energy      = 20,
    price       = 20,
    category    = 'Yum',
} )
```

{% endtab %}
{% endtabs %}

After following the steps above; restart the server and open your F4 menu. You should see the new category and your food item listed within it.

## Notes

{% hint style="info" %}
DarkRP does not handle adding new entities without a restart, and may error out. Ensure you always restart your server if adding new darkrp jobs / entities.
{% endhint %}
