> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/cas-gunsmith/configuration/ammunition.md).

# Ammunition

CAS Gunsmith ammunition config — the ammo types for sale, per-weapon ammo lists, per-class carry limits and the RSG ammo boxes.

## Ammo types

`Config.Ammo` holds the ammo types for sale. Keys are the in-game ammo names used by VORP and rsg-ammo (for example `AMMO_REVOLVER_EXPRESS`). On RSG, each type is sold as the `rsg-ammo` box set in `Config.Rsg.ammoBoxes`, and a box holds the rounds set there. Entries are written with the `ammo` helper function:

```lua
ammo(name, icon, box, price, desc, stats, lock)
```

| Field   | Description                                                                              |
| ------- | ---------------------------------------------------------------------------------------- |
| `name`  | Name shown in the interface.                                                             |
| `icon`  | Ammo image. The file name in `web/dist/tex/items/` without `.png`.                       |
| `box`   | Rounds in one box.                                                                       |
| `price` | Price of one box.                                                                        |
| `desc`  | Short description.                                                                       |
| `stats` | Optional. Effect shown in the statistics panel, for example `{ damage = 4, range = 5 }`. |
| `lock`  | Optional rank lock, `{ rank = N }`.                                                      |

For revolvers, pistols, repeaters and rifles, five types are defined in a single loop: Regular, High Velocity, Split Point, Express and Explosive. Shotguns have Buckshot, Slug, Incendiary Buckshot and Explosive Slug. The Varmint and Elephant rifles have their own ammo defined separately.

## Weapon ammo list

Each weapon's `ammo` field lists the ammo types that can be selected for it. The first type in the list is the factory ammo.

```lua
ammo = ammoSet('REVOLVER')
ammo = { 'AMMO_22' }
```

Edit this list to add or remove an ammo type for a weapon.

## Carry limit

```lua
Config.AmmoCap = { revolver = 72, pistol = 60, repeater = 100, rifle = 60, shotgun = 50 }
```

The maximum rounds that can be carried per ammo type, by weapon class. Players cannot buy enough boxes to go over this limit. Keep these values in line with the ammo limits of your inventory (VORP) or of rsg-ammo (`maxAmmo`). If the inventory does not accept some ammo, the price of that line is refunded to the player.

The box limit per order is set with `Config.MaxAmmoBoxes`. See [General Settings](/script-documentation/cas-gunsmith/configuration/general.md).
