# Tried to get invalid ammunition: rebar\_bolt

**URL:** <https://discourse.cataclysmdda.org/t/tried-to-get-invalid-ammunition-rebar-bolt/29326>\
**Category:** The Lab\
**Created:** [July 22, 2024, 11:27pm UTC](https://discourse.cataclysmdda.org/t/tried-to-get-invalid-ammunition-rebar-bolt/29326 "2024-07-22T23:27:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrAbrahms](https://avatars.discourse-cdn.com/v4/letter/m/fbc32d/32.png) [@MrAbrahms](https://discourse.cataclysmdda.org/u/MrAbrahms)\
**Post date:** [July 22, 2024, 11:27pm UTC](https://discourse.cataclysmdda.org/t/tried-to-get-invalid-ammunition-rebar-bolt/29326/1 "2024-07-22T23:27:49Z")

</div>

I’m trying to add a couple of vehicle-mounted railguns to my ForkIt mod, but it’s having trouble with this one type of ammunition, which is the default one.

The guns definition:

{  
“id”: “emrail”,  
“copy-from”: “rifle\_semi”,  
“looks\_like”: “m2browning”,  
“type”: “GUN”,  
“name”: { “str\_sp”: “electromagnetic railgun” },  
“description”: “A mass driver that uses electromagnets to drive a sled on rails carrying a heavy payload, and launch the payload at high speed much like a slingshot. The sled is designed to carry payloads of a wide variety of shapes and sizes, up to about 20kg. Too heavy to be fired handheld, but can be mounted on a vehicle. Powered by UPS, and consumes 150 charges per shot.”,  
“weight”: “38000 g”,  
“volume”: “9020 ml”,  
“longest\_side”: “165 cm”,  
“price”: 1800000,  
“price\_postapoc”: 10000,  
“to\_hit”: -1,  
“bashing”: 12,  
“material”: [“steel”],  
“ammo”: [“rebar\_bolt”],  
“range”: 110,  
“dispersion”: 150,  
“durability”: 8,  
“min\_cycle\_recoil”: 5,  
“reload”: 250,  
“ups\_charges”: 150,  
“modes”: [[ “DEFAULT”, “semi-auto”, 1] ],  
“flags”: [“MOUNTED\_GUN”],  
“pocket\_data”: [  
{  
“pocket\_type”: “MAGAZINE”,  
“ammo\_restriction”: { “rebar\_bolt”: 1 }  
}  
]  
},  
{  
“id”: “pnrail”,  
“copy-from”: “rifle\_semi”,  
“looks\_like”: “m2browning”,  
“type”: “GUN”,  
“name”: { “str\_sp”: “pneumatic railgun” },  
“description”: “A mass driver that uses compressed air stored by a high-pressure pump to drive a sled on rails carrying a heavy payload, and launch the payload at high speed much like a slingshot. The sled is designed to carry payloads of a wide variety of shapes and sizes, up to about 15kg. Too heavy to be fired handheld, but can be mounted on a vehicle. Consumes little energy, but takes a long time to reload between shots.”,  
“weight”: “38000 g”,  
“volume”: “9020 ml”,  
“longest\_side”: “165 cm”,  
“price”: 1800000,  
“price\_postapoc”: 10000,  
“to\_hit”: -1,  
“bashing”: 12,  
“material”: [“steel”],  
“ammo”: [“rebar\_bolt”],  
“range”: 110,  
“dispersion”: 150,  
“durability”: 8,  
“min\_cycle\_recoil”: 5,  
“reload”: 2400,  
“ups\_charges”: 15,  
“modes”: [[ “DEFAULT”, “semi-auto”, 1] ],  
“flags”: [“MOUNTED\_GUN”],  
“pocket\_data”: [  
{  
“pocket\_type”: “MAGAZINE”,  
“ammo\_restriction”: { “rebar\_bolt”: 1 }  
}  
]  
}

They use several different types of ammo, but I’ve set it to just the one for debugging. However, even when I had all of them in, it was only the rebar\_bolt that produced an error.

The ammo type definition:

{  
“id”: “mass\_driver”,  
“type”: “ammunition\_type”,  
“name”: “mass driver projectile”,  
“default”: “rebar\_bolt”  
}

The ammo definitions:

{  
“id”: “cannon\_slug”,  
“type”: “AMMO”,  
“name”: { “str\_sp”: “cannon slug” },  
“description”: “A roughly bullet-shaped 4 pound piece of steel, for use in a mass driver.”,  
“//”: “Copied from the 4 pound cannonball, as it’s identical except for the shape and propellant, and muzzle velocity should be similar.”,  
“weight”: “2350 g”,  
“volume”: “1000 ml”,  
“price”: 1100,  
“price\_postapoc”: 1200,  
“material”: [“steel”],  
“symbol”: “=”,  
“color”: “white”,  
“count”: 1,  
“stack\_size”: 1,  
“ammo\_type”: “mass\_driver”,  
“range”: 60,  
“damage”: { “damage\_type”: “bullet”, “amount”: 352 },  
“//2”: “4 pound cannonball weighs 28000 grains,shot at 1215 ft/s by a 3in ordnance rifle, equals 124459 joules of muzzle energy according to Shooters Calculator, round down from square root 352.78”,  
“dispersion”: 45,  
“recoil”: 5,  
“loudness”: 5,  
“effects”: [“RECYCLED”]  
},  
{  
“type”: “AMMO”,  
“id”: “rebar”,  
“symbol”: “/”,  
“color”: “light\_gray”,  
“name”: { “str”: “rebar” },  
“description”: “An 80cm length of nice straight rebar, for use in a mass driver.”,  
“category”: “spare\_parts”,  
“price”: 7500,  
“price\_postapoc”: 25,  
“material”: [“steel”],  
“weight”: “1245 g”,  
“volume”: “159 ml”,  
“longest\_side”: “80 cm”,  
“bashing”: 10,  
“to\_hit”: -1,  
“count”: 1,  
“stack\_size”: 1,  
“ammo\_type”: “mass\_driver”,  
“range”: 60,  
“damage”: { “damage\_type”: “bullet”, “amount”: 60 },  
“dispersion”: 35,  
“recoil”: 5,  
“loudness”: 5,  
“effects”: [“RECYCLED”]  
},  
{  
“type”: “AMMO”,  
“id”: “rebar\_bolt”,  
“symbol”: “/”,  
“color”: “light\_gray”,  
“name”: { “str”: “rebar bolt” },  
“description”: “A 20cm piece of rebar, sharpened on one end, for use in a mass driver. It flies much more stably than a full-sized piece of rebar, and is more likely to hit on-end, doing considerably more damage.”,  
“category”: “spare\_parts”,  
“price”: 7500,  
“price\_postapoc”: 25,  
“material”: [“steel”],  
“weight”: “312 g”,  
“volume”: “40 ml”,  
“longest\_side”: “20 cm”,  
“bashing”: 10,  
“to\_hit”: -1,  
“count”: 1,  
“stack\_size”: 1,  
“ammo\_type”: “mass\_driver”,  
“range”: 60,  
“damage”: { “damage\_type”: “bullet”, “amount”: 45, “armor\_penetration”: 20 },  
“dispersion”: 10,  
“recoil”: 5,  
“loudness”: 5,  
“effects”: [“RECYCLED”]  
},  
{  
“type”: “AMMO”,  
“id”: “steel\_lump”,  
“symbol”: “o”,  
“color”: “light\_gray”,  
“name”: { “str”: “lump of steel” },  
“description”: “A 1kg lump of rough scrap steel, for use in a mass driver.”,  
“category”: “spare\_parts”,  
“price”: 7500,  
“price\_postapoc”: 25,  
“material”: [“steel”],  
“weight”: “1000 g”,  
“volume”: “126 ml”,  
“longest\_side”: “12 cm”,  
“bashing”: 10,  
“to\_hit”: -1,  
“count”: 1,  
“stack\_size”: 1,  
“ammo\_type”: “mass\_driver”,  
“range”: 60,  
“damage”: { “damage\_type”: “bullet”, “amount”: 35 },  
“dispersion”: 45,  
“recoil”: 5,  
“loudness”: 5,  
“effects”: [“RECYCLED”]  
},  
{  
“type”: “AMMO”,  
“id”: “ducart”,  
“symbol”: “/”,  
“color”: “light\_gray”,  
“name”: { “str”: “30mm du cartridge” },  
“description”: “A 30x173mm cartridge loaded with a depleted uranium-cored HEDP projectile. If only you had an A10 Thunderbolt to fire it from. You could launch it with a mass driver, though, albeit much less effectively.”,  
“category”: “spare\_parts”,  
“price”: 7500,  
“price\_postapoc”: 25,  
“material”: [“aluminum”, “du”],  
“weight”: “1215 g”,  
“//3”: “395g projectile mass (from Wikipedia), 150g propellant mass (from General Dynamics), 670g cartridge mass (GD), 1215g total assuming that 670 is mass of brass alone. Otherwise, 125g brass.”,  
“volume”: “40 ml”,  
“longest\_side”: “20 cm”,  
“bashing”: 10,  
“to\_hit”: -1,  
“count”: 1,  
“stack\_size”: 1,  
“ammo\_type”: “mass\_driver”,  
“range”: 60,  
“damage”: { “damage\_type”: “bullet”, “amount”: 60, “armor\_penetration”: 15 },  
“//4”: “The round isn’t being fired, but rather launched as from a slingshot, casing and all, at a lower (but still fairly high) velocity. The round is designed to punch through tank armour though, so it’s going to get at”,  
“//5”: “least some penetration against vehicle armour, at least if it detonates, and should punch through any body armour like a .50bmg through butter.”,  
“dispersion”: 15,  
“recoil”: 5,  
“loudness”: 5,  
“effects”: [“COOKOFF”, “EXPLOSIVE”]  
}

The du material definition, not that it’s relevant to the current issue.

{  
“type”: “material”,  
“id”: “du”,  
“name”: “depleted uranium”,  
“density”: 19.0,  
“bash\_resist”: 6,  
“specific\_heat\_liquid”: 0.82,  
“specific\_heat\_solid”: 0.45,  
“latent\_heat”: 273,  
“cut\_resist”: 6,  
“bullet\_resist”: 3,  
“acid\_resist”: 7,  
“fire\_resist”: 3,  
“conductive”: true,  
“chip\_resist”: 20,  
“dmg\_adj”: [“marked”, “dented”, “smashed”, “shattered”],  
“bash\_dmg\_verb”: “dented”,  
“cut\_dmg\_verb”: “scratched”,  
“burn\_products”: [[ “scrap”, 1] ],  
“fuel\_data”: { “energy”: “500 kJ” }  
}

(it’s mostly just copied from regular uranium)

I assume the issue is a missing , or " or ) or a typo somewhere, but I’ve searched and searched, and can’t find anything.

---

<div class="post-metadata">

**Author:** ![MrAbrahms](https://avatars.discourse-cdn.com/v4/letter/m/fbc32d/32.png) [@MrAbrahms](https://discourse.cataclysmdda.org/u/MrAbrahms)\
**Post date:** [July 22, 2024, 11:52pm UTC](https://discourse.cataclysmdda.org/t/tried-to-get-invalid-ammunition-rebar-bolt/29326/2 "2024-07-22T23:52:40Z")

</div>

It also gives a “missing item definition” error, but doesn’t say what item.
