# Modifiers

Modifiers are used in [attachment](https://cjcrafter.gitbook.io/weaponmechanicsplus/attachment "mention") to modify the stats of the affected weapon. Arguments here take advantage of the DoubleModifier and the IntModifier. When using `Mechanics`, you can replace the config key with `Replace_Mechanics` to override all previous mechanics. The mechanics will be *added* to the base list if you use `Mechanics`.

## DoubleModifier

We use the double modifier to modify the existing value *without* replacing it. Uses the format `<Operation> <decimal>`. This is different than the `IntModifier` because it allows decimals.

Here are valid operations:

* `ADD` -> Adds the decimal to the **existing value**
* `MULTIPLY` -> Multiplies the **existing value** by the decimal
* `SET` -> Replaces the **existing value** with the decimal

## IntModifier

We use the double modifier to modify the existing value *without* replacing it. Uses the format `<Operation> <integer>`. This differs from the `DoubleModifier` because it does not allow decimals.

Here are valid operations:

* `ADD` -> Adds the integer to the **existing value**
* `MULTIPLY` -> Multiplies the **existing value** by the integer
* `SET` -> Replaces the **existing value** with the integer

### Modifier

```yaml
  Modifier:
    Damage_Modifier: # See the Damage Modifier wiki
    Shoot_Modifier: # See the Shoot Modifier wiki
    Projectile_Modifier: # See the Projectile Modifier wiki
    Reload_Modifier: # See the Reload Modifier wiki
    Scope_Modifier: # See the Scope Modifier wiki
    Explosion_Modifier: # See the Explosion Modifier wiki
```


---

# 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://cjcrafter.gitbook.io/weaponmechanicsplus/modifiers.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.
