# Custom Decal

## Decals (rm\_decalv2/decals.lua)

#### How to Add Custom Decals

To add custom decals, you need to modify the rm\_decalv2/decals.lua file. Follow the steps below:

***

### Adding Custom Decals with a YTD File (Recommended)

1. **Open OpenIV.**
2. **Enable Edit Mode.**
3. **Click the New button.**
4. **Select "Texture dictionary (.ytd)".**
5. **Enter your texture dictionary name.**
6. **Find the texture dictionary in your GTA V folder** and double-click to open it.
7. **Click Import** and select all the images to convert to decals.
8. **Choose DXT5** for the texture format.
9. **Save and copy the .ytd file** to `rm_decalv2/stream`.
10. **Copy your image files** to `rm_decalv2/assets`.
11. **Open the config file** (`rm_decalv2/decals.lua`) and add your decal like this:

```lua
{
   label = 'Your New Decal Label',
   fileName = 'Your New Decal File Name.png',
   textureName = 'Your Decal Texture Name',
   textureDict = 'Your Decal Texture Dictionary (.ytd file name)',
   identifiers = {
      ['myIdentifier'] = true,
    },
},
```

12. **Restart the script** or refresh the server for the decal to be active.

***

### Adding Custom Decals with Image Files (.png, .webp, .jpg)

1. **Copy your image file** (`.png`, `.webp`, or `.jpg`) to the `rm_decalv2/assets` folder.
2. **Open the config file** (`rm_decalv2/decals.lua`).
3. **Add your decal** like this:

```lua
{
    label = 'Your New Decal Label',
    fileName = 'Your New Decal File Name.png', -- Change extension to match your file (.png, .webp, or .jpg)
    identifiers = {
        ['myIdentifier'] = true,
    },
},
```

4. **Restart the script** or type `refresh` and then `ensure rm_decalv2` in the server console.

***

#### Notes

* **For image-based decals**, ensure the file is in the `assets` folder. Supported formats are `.png`, `.webp`, and `.jpg`.
* **For YTD decals**, you still need to place the texture image in the `assets` folder and set `fileName`.
* **Restart or refresh** the server to activate new decals.


---

# Agent Instructions: 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.rainmad.com/resources/decal-v-graffiti-and-vehicle-sticker/custom-decal.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.
