> For the complete documentation index, see [llms.txt](https://docs.gunchi.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gunchi.dev/scripts/grave-robbing/installation.md).

# Installation

## **1. Add Grave Items to Core**

Add all grave-robbing items to:

**`core > shared.gta5.lua`**

These items and their definitions come from the included `coreitemconfig.txt`

Example entries:

```lua
['gravebook'] = {
    ['label'] = 'Old Book',
    ['weight'] = 100,
    ['type'] = 'item',
    ['image'] = 'gravebook.webp',
    ['unique'] = false,
    ['stackable'] = true,
    ['useable'] = false,
    ['shouldClose'] = true,
    ['description'] = 'An old book..',
},

['gravebowl'] = {
    ['label'] = 'Cracked Bowl',
    ['weight'] = 50,
    ['type'] = 'item',
    ['image'] = 'gravebowl.webp',
    ['unique'] = false,
    ['stackable'] = true,
    ['useable'] = false,
    ['shouldClose'] = true,
    ['description'] = "Won't be eating cereal out of this..",
},

['gravebrokenpot'] = {
    ['label'] = 'Broken Pot Fragment',
    ['weight'] = 5,
    ['type'] = 'item',
    ['image'] = 'gravebrokenpot.webp',
    ['unique'] = false,
    ['stackable'] = true,
    ['useable'] = false,
    ['shouldClose'] = true,
    ['description'] = 'Not much I can do with this..',
},
```

> Be sure to add **all items** shown in the file, along with their images.

***

## **2. Add Included Item Images**

Each item requires a matching `.webp` file in your **inventory images** directory.\
Ensure filenames match the `"image"` field exactly.

***

## **3. Add Grave Robbing Resource**

Place the included folder:

```
graverobbing
```

into your server’s **resources** directory.

Add to your `resources.cfg` or `server.cfg`:

```
ensure graverobbing
```

***

## **4. (Optional) Add a Sell Shop**

If you want players to sell grave items, add this entry in:

**`inventory > config.lua > Config.Shops`**

```lua
['gravebuyer'] = {
    label = 'Strange Items Buyer',
    type = 'sell',
    locations = {
        {
            center = vec3(-302.282227, 2815.399902, 59.351391),
            length = 1.4,
            width = 3.4,
            options = {
                heading = 325,
                minZ = 56.351390838623,
                maxZ = 60.351390838623
            }
        },
    },
    products = 'gravebuyer'
},
```

***

## **5. Add Sell Shop Products**

Add the following entry into:

**`Config.ShopProducts`**\
(You may adjust prices as preferred.)\
README

```lua
['gravebuyer'] = {
    { name = 'gravebook', price = 50.0 },
    { name = 'gravebowl', price = 5.0 },
    { name = 'gravebrokenpot', price = 5.0 },
    { name = 'gravebrokenwatch', price = 10.0 },
    { name = 'gravecan', price = 5.0 },
    { name = 'gravecloth', price = 5.0 },
    { name = 'gravedogbones', price = 10.0 },
    { name = 'gravehorseshoe', price = 25.0 },
    { name = 'gravehumanbones', price = 50.0 },
    { name = 'gravehumanbones2', price = 25.0 },
    { name = 'graveloveletter', price = 5.0 },
    { name = 'graveoldlamp', price = 25.0 },
    { name = 'graveoldnote', price = 5.0 },
    { name = 'graverustykey', price = 50.0 },
    { name = 'graveshoe', price = 5.0 },
    { name = 'gravesodacan', price = 5.0 },
    { name = 'graverustynail', price = 1.0 },
    { name = 'gravecoin', price = 150.0 },
    { name = 'gravegoblet', price = 150.0 },
    { name = 'gravegoldring', price = 150.0 },
    { name = 'gravenecklace', price = 200.0 },
    { name = 'gravewatch', price = 100.0 }
},
```

These entries align with the item definitions in the core item config.

***

## **🎉 Installation Complete**

Once all steps are completed:

* Grave items can be looted and stored
* The optional buyer shop will purchase grave finds
* All items display correctly with icons and descriptions
* The `graverobbing` resource will run when the server starts


---

# 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 current page URL with the `ask` query parameter:

```
GET https://docs.gunchi.dev/scripts/grave-robbing/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
