How To Add A New Construction

I want to add a barbed wire a-frame type thingy (see atatched image), that can be built like a road block. Something where you don’t need a fence post so it can be built on a road, etc.

What’s the file setup I need to do to add it as a mod?

Cataclysm DDA\data\mods\ [your mod name]
Put your json file in here with the recipe, as well as the modinfo

I’m getting this error and I don’t know what it is.
I’ve even tried taking a json from the game, deleting it’s content and pasting in mine, but getting the same thing.

Can you provide the full script?

I got a similar error when I accidentally left an empty JSON file in a mod’s directory. Barring that, probably unbalanced brackets (like [ { ] } ] or similar).

Yeah, that was the reason for that error, but now i’m getting something else.

Would it be easier for me to upload the couple of jsons I’ve done? If so, what’s a good file hosting site?

Github or Pastebin for text files sharing I’d say? :slight_smile:

I dunno if I did that correctly…

Your bash section in barbed.json needs a closing brace.

    "bash": {
      "str_min": 3,
      "str_max": 40,
      "sound": "smash!",
      "sound_fail": "whump.",
      "items": [ { "item": "2x4", "count": [ 2, 6 ] }, { "item": "nail", "charges": [ 4, 8 ] }, {      "item": "splinter", "count": 1 } ]
    }
 }

like so, you only had one closing brace for the whole entry.

1 Like

Ah, thanks for that.
I can work on the components side of it now.

Just one more thing. Does it have the correct parameters to allow enemies to pass through it whilst taking damage?

yes, the SHARP flag does that.