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

# Weapon Modules

{% hint style="info" %}
New to the wiki? This page contains **important information** about config! Read this first!
{% endhint %}

## Weapon Title

All weapons have a unique "weapon title" in config. It is the name at the top of the file, like:

<figure><img src="/files/wBmgd3z28qBZZeKs3Bxs" alt="the weapon title is the root key in the yaml file" width="375"><figcaption></figcaption></figure>

In the image above, the weapon title is `AK_47`. To get the weapon in your server, use `/wm get AK_47`.

{% hint style="danger" %}
The names of files are completely ignored. We suggest matching them with your weapon title (e.g., `AK_47.yml`), but this is optional and does not affect the plugin.
{% endhint %}

{% hint style="danger" %}
Your weapon title (And ALL OTHER config options) should **never** use any character other then a->z, A->Z, 0->9, and underscores `_`. Do NOT use periods or dashes.
{% endhint %}

## Modules

All weapons use modules. A "Module" is a fancy way of saying a section in your config. For example, the [Shoot](/weaponmechanics/weapon-modules/shoot.md) module is required for all weapons. It goes under your weapon name in the config with 2 spaces. Let's look at an example of the `AK_47`:

```yaml
AK_47:
  Shoot:
    # Other options go here, like Trigger and Projectile_Speed
```

Most modules can also have sections inside. For example:

```yaml
AK_47:
  Shoot:
    Trigger: 
      # Other options go here, like Main_Hand and Off_Hand
```

Here is the complete list of modules (You can also see this on the sidebar on the left of this page!):

1. [Info](/weaponmechanics/weapon-modules/info.md)
2. [Shoot](/weaponmechanics/weapon-modules/shoot.md)
   1. [Spread](/weaponmechanics/weapon-modules/shoot/spread.md)
   2. [Recoil](/weaponmechanics/weapon-modules/shoot/recoil.md)
   3. [Broken mention](broken://pages/FkbN9evQBnDXwlus4cf8)
3. [Scope](/weaponmechanics/weapon-modules/scope.md)
4. [Reload](/weaponmechanics/weapon-modules/reload.md)
   1. [Ammo](/weaponmechanics/weapon-modules/reload/ammo.md)
5. [Skin](/weaponmechanics/weapon-modules/skin.md)
6. [Projectile](/weaponmechanics/weapon-modules/projectile.md)
7. [Explosion](/weaponmechanics/weapon-modules/explosion.md)
8. [Damage](/weaponmechanics/weapon-modules/damage.md)
9. [Firearm\_Action](/weaponmechanics/weapon-modules/firearm_action.md)
10. [Melee](/weaponmechanics/weapon-modules/melee.md)
11. [Firemode](https://cjcrafter.gitbook.io/weaponmechanicsplus/firemode) <mark style="color:yellow;">-> Requires WeaponMechanicsPlus</mark>
12. [Cosmetics](https://cjcrafter.gitbook.io/weaponmechanicscosmetics/cosmetics) <mark style="color:yellow;">-> Requires WeaponMechanicsCosmetics</mark>
13. [Trails](https://cjcrafter.gitbook.io/weaponmechanicscosmetics/trails) <mark style="color:yellow;">-> Requires WeaponMechanicsCosmetics</mark>
14. [Show Time](https://cjcrafter.gitbook.io/weaponmechanicscosmetics/show-time) <mark style="color:yellow;">-> Requires WeaponMechanicsCosmetics</mark>

## Required Modules

The [Info](/weaponmechanics/weapon-modules/info.md) and [Shoot](/weaponmechanics/weapon-modules/shoot.md) modules are the only required modules. *Most* config options are optional and can be omitted from your config file.
