> For the complete documentation index, see [llms.txt](https://luffyyy.gitbook.io/beardlib/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://luffyyy.gitbook.io/beardlib/modules/maskmodule.md).

# Mask

Updated for version 3.38.

## Module Definition

The module is inherited from [ItemModuleBase](https://luffyyy.gitbook.io/beardlib/modules/modulebase#itemmodulebase). So base parameters can be found there.

This modules let's you add masks.

### Module name

The name of the module you use as the meta of the module definition is 'Mask' or 'MaskModule' if `_force_search` is set to true in the module definition.

### XML Structure

```xml
<Mask id global_value unit type .../>
```

#### `<Mask ...>`

| Parameter               | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                     |
| ----------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id                      | String | The ID of the material                                                                                                                                                                                                                                                                                                                                                                                          |
| type                    | String | The type of the mask. Can be helmet, beard, glasses and mask. Defaults to mask.                                                                                                                                                                                                                                                                                                                                 |
| global\_value           | String | For packs of mods, a global id assigned to all. A nice way to label your mods. You'll still have to create the global value through [GlobalValueModule](https://luffyyy.gitbook.io/beardlib/modules/globalvaluemodule)                                                                                                                                                                                          |
| unit                    | String | Optional path to the unit of the mask. Defaults to units/mods/masks/msk\_`id`/msk\_`id` You still need to add it through [AddFiles](https://luffyyy.gitbook.io/beardlib/modules/addfilesmodule) and all its dependencies such as object and material config.                                                                                                                                                    |
| offsets                 | Table  | <p>Optional table of offsets for each character. Should look something like this:<br><code>\<offsets></code><br><code>\<old\_hoxton></code><br><code>\<value\_node value="0 0 0"></code><br><code>\<value\_node value="Rotation(0,0,0)"></code><br><code>\</old\_hoxton></code><br><code>\</offsets></code><br>Each character needs position and rotation offset. First is position and second is rotation.</p> |
| name\_id                | String | Localization ID for the title of the mask (Defaults to bm\_msk\_ + `id`)                                                                                                                                                                                                                                                                                                                                        |
| desc\_id                | String | Localization ID for the description of the mask (Defaults to bm\_msk\_ + `id`)                                                                                                                                                                                                                                                                                                                                  |
| texture\_bundle\_folder | String | Optional folder to contain the icon. The path will be guis/dlcs/`texture_bundle_folder`/textures/pd2/blackmarket/icons/masks/`id`. Defaults to `mods`                                                                                                                                                                                                                                                           |
| characters              | Table  | Optional table that contains characters and the mask for them. This allows you to have a unique mask for each character (See bm\_msk\_balaclava in masks tweakdata)                                                                                                                                                                                                                                             |

And any other tweakdata value. There are more that are not listed here yet.

#### The icon

The icon will be stored in guis/dlcs/mods/textures/pd2/blackmarket/icons/masks and will be named `id`.texture then add it using [AddFiles](https://luffyyy.gitbook.io/beardlib/modules/addfilesmodule).

### Example

This example is what you would put inside your main node within your [mod config](https://github.com/simon-wh/PAYDAY-2-BeardLib/wiki/Module-Config)

```xml
<Mask id="my_cool_mask" type="helmet"/>
```

This will add the mask `my_cool_mask`. You will still need to localize the title and description of the mask. In this case `bm_msk_my_cool_mask` and `bm_msk_my_cool_mask_desc` will need to be localized using [LocalizationModule](https://luffyyy.gitbook.io/beardlib/modules/localizationmodule). And add unit, object, material\_config, textures and icon through [AddFiles](https://luffyyy.gitbook.io/beardlib/modules/addfilesmodule)

#### Template

Download template here: [here](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/Luffyyy/BeardLib-Templates/tree/master/Mask-Template)


---

# 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, and the optional `goal` query parameter:

```
GET https://luffyyy.gitbook.io/beardlib/modules/maskmodule.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
