# Adding Ammunition Types

**URL:** <https://discourse.cataclysmdda.org/t/adding-ammunition-types/2403>\
**Category:** The Toolbox\
**Created:** [July 25, 2013, 6:00am UTC](https://discourse.cataclysmdda.org/t/adding-ammunition-types/2403 "2013-07-25T06:00:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rivet](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/rivet/32/11_2.png) [@Rivet](https://discourse.cataclysmdda.org/u/Rivet)\
**Post date:** [July 25, 2013, 6:00am UTC](https://discourse.cataclysmdda.org/t/adding-ammunition-types/2403/1 "2013-07-25T06:00:26Z")

</div>

As a learning experiment I’m attempting to add a ammunition type and weapons to use it.

Both work as intended, but when examined in-game the ‘ammunition type’ is listed as XXX for both.

What is required to make the ammunition type display properly?

Bullets:

`"type" : "AMMO",
        "id" : "8mm_caseless",
        "rarity" : 10,
        "price" : 500,
        "name" : "8x40mm caseless",
        "symbol" : "=",
        "color" : "light_red",
        "description" : "8x40mm caseless rounds. Proprietary ammunition for Rivtech firearms.",
        "material" : "steel",
        "volume" : 2,
        "weight" : 7,
        "bashing" : 1,
        "cutting" : 0,
        "to_hit" : 0,
        "ammo_type" : "8x40mm",
        "damage" : 36,
        "pierce" : 12,
        "range" : 42,
        "dispersion" : 6,
        "recoil" : 20,
        "count" : 50,
        "effects" : ["COOKOFF"]`

Rifle:

`"id": "rm51_assault_rifle",
    "type": "GUN",
    "symbol": "(",
    "color": "red",
    "name": "RM51 Assault Rifle",
    "description": "Barely making it past the prototype stage before the world ended, the Rivtech RM51 assault rifle was designed for durability and power in a small package.",
    "rarity": 1,
    "price": 5000,
    "material": ["steel", "plastic"],
    "skill": "rifle",
    "ammo": "8x40mm",
    "weight": 25,
    "volume": 16,
    "bashing": 12,
    "cutting": 0,
    "to_hit": 1,
    "ranged_damage": 5,
    "range": 0,
    "dispersion": 2,
    "recoil": 0,
    "durability": 9,
    "burst": 0,
    "clip_size": 20,
    "reload": 600`

---

<div class="post-metadata">

**Author:** ![kevin.granade](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kevin.granade/32/1316_2.png) [@kevin.granade](https://discourse.cataclysmdda.org/u/kevin.granade)\
**Post date:** [July 25, 2013, 2:07pm UTC](https://discourse.cataclysmdda.org/t/adding-ammunition-types/2403/2 "2013-07-25T14:07:57Z")

</div>

Oops, there’s a method, ammo\_name() in itypedef.cpp that does this mapping, just another thing that needs to be pushed out to JSON.

---

<div class="post-metadata">

**Author:** ![Rivet](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/rivet/32/11_2.png) [@Rivet](https://discourse.cataclysmdda.org/u/Rivet)\
**Post date:** [July 25, 2013, 6:16pm UTC](https://discourse.cataclysmdda.org/t/adding-ammunition-types/2403/3 "2013-07-25T18:16:43Z")

</div>

Thank you very much!

I’d looked through a pile of files trying to see where it was linked but still hadn’t managed to track it down. You just saved me a lot of trouble!
