# How do you create mods?

**URL:** <https://discourse.cataclysmdda.org/t/how-do-you-create-mods/2234>\
**Category:** The Lab\
**Created:** [July 16, 2013, 8:27am UTC](https://discourse.cataclysmdda.org/t/how-do-you-create-mods/2234 "2013-07-16T08:27:18Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gatora](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/gatora/32/36_2.png) [@Gatora](https://discourse.cataclysmdda.org/u/Gatora)\
**Post date:** [July 16, 2013, 8:27am UTC](https://discourse.cataclysmdda.org/t/how-do-you-create-mods/2234/1 "2013-07-16T08:27:18Z")

</div>

how do i make my own recipes and/or items for the game?

---

<div class="post-metadata">

**Author:** ![CIB](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/cib/32/903_2.png) [@CIB](https://discourse.cataclysmdda.org/u/CIB)\
**Post date:** [July 16, 2013, 1:11pm UTC](https://discourse.cataclysmdda.org/t/how-do-you-create-mods/2234/2 "2013-07-16T13:11:33Z")

</div>

Look in data/raw/recipes.json and data/raw/items/{category}.json

---

<div class="post-metadata">

**Author:** ![Otaku](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/otaku/32/27_2.png) [@Otaku](https://discourse.cataclysmdda.org/u/Otaku)\
**Post date:** [July 16, 2013, 4:10pm UTC](https://discourse.cataclysmdda.org/t/how-do-you-create-mods/2234/3 "2013-07-16T16:10:53Z")

</div>

For recipes there is the recipes.json. I will start with that since it is easier. Lets assume that you are making a recipe for something that is already in the game but is not craft able (it is easier, something like military rucksack). An example in the recipes.json is

```auto
        {
            "result": "backpack",
            "category": "CC_ARMOR",
            "skill_pri": "tailor",
            "difficulty": 3,
            "time": 50000,
            "reversible": false,
            "autolearn": true,
            "tools": [
                         [
                             ["needle_bone", 20],
                             ["sewing_kit", 20]
                         ]
                     ],
            "components": [
                              [
                                  ["rag", 20],
                                  ["fur", 16],
                                  ["leather", 12]
                              ]
                          ]
        },
```

Might be a bit hard to read because of the formatting but bear with me.  
So for the most part it is fairly simple, so I will put my comments after the // on ever other line or so.

```auto
        {
            "result": "backpack",
// This is the name of the item, found in data/raw/items/{category}.json. More on that later.
            "category": "CC_ARMOR",
// This is the tab that the recipe falls in. More later.
            "skill_pri": "tailor",
// This is the first skill that is used, such as cooking, mechanics, survival, etc.
            "skill_sec": "survival",
// This is the secondary skill for the recipe, if there is none than delete that line.
            "difficulty": 5,
// This is the difficulty level that the recipe requires to make it, like a minimum skill level to craft. Just type a digit, no ""
            "time": 20000,
// This is the time required to make the object, in ticks. There are 1000 ticks in a game minute, plan accordingly. Again, just digit. This is 20 minutes game time.
            "reversible": true,
// A true/false option, decides if you can deconstruct it with the disassemble menu. Don't type any "" for this one. 
            "autolearn": true,
// A true/false option, decides if you can learn it automatically or just through a book. Here it is automatically learnt. No ""
            "tools": [
// This opens up the brackets for all tools necessary.
                         [
// This opens up the bracket for possible tools that do the same thing (rock hammer or regular hammer).
                             ["needle_bone", 20],
                             ["sewing_kit", 20]
// First come the crafting tool needed. Then the number of charges, if no charges (like hammer) type -1. 
                         ]
// This closes the bracket for tool variants, if there is another variation place it before this bracket.
                     ] ,
// This closes the bracket for all tools needed, if you need another tool place it before this bracket. 
            "components": [
// This opens up the things that will be consumed when the recipe is crafted.
                              [
// This opens up the possible alternative materials usable, such as different fabrics, or different stick-likes or others. 
                                  ["rag", 20],
// Same as before, it is the name of the object followed by the number needed to craft. 
                                  ["fur", 16],
// To craft this backpack it will take either 20 rags or 16 fur or 12 leather. 
                                  ["leather", 12]
                              ]
// This bracket closes the alternative materials usable for the first ingredient. 
                          ]
// This bracket closes all of the materials, so if you have any more add them before this bracket. 
        },
// This squiggly bracket closes off the recipe, so anything added outside of this is irrelevant to the recipe that you made. 
```

This is the basics on recipe crafting. I will update this thread with another post on how to work around in the data/raw/items/{category}.json files tomorrow, because where I live it is late at night.

But I suggest taking a peek at the items json files, just by looking at them your brain will absorb some information (hopefully).  
If you have any questions about this post just ask them, I am sure that the forums are filled with very nice people…[size=1pt]except[/size].[size=1pt]for[/size].[size=1pt]some[/size]…

---

<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 16, 2013, 4:35pm UTC](https://discourse.cataclysmdda.org/t/how-do-you-create-mods/2234/4 "2013-07-16T16:35:39Z")

</div>

Great explanation, appreciate it.

One thing to be extra-aware of is commas

In the file it’s like:

```auto
{
   {
      <some recipe>
   },
   {
      <some other recipe>
   },
   {
      <the last recipe>
   }
}
```

Notice that all of the recipes end with “},” except the last one! All of the lists are like this, it can be really easy (especially if you’re copy/pasting a lot) to misplace a comma.

It’s the same within a recipe, if you have a list of tools for example:

```auto
"tools": [
            [
               ["screwdriver", -1],
               ["cheeseburger", 7],
               ["happiness", 9]
            ],
            [
               ["bionic_fingernail", -1]
            ]
         ],
```

There’s no comma after the “happiness” entry because it’s the last member of a list, and none after the “bionic\_fingernail” entry for the same reason, the only entry in a list is the last entry.  
To be clear, this means you have to have a bionic fingernail (but doesn’t use charges from it), and either a screwdriver (no charges used), 7 charges of cheeseburger, or 9 charges of happiness.

---

<div class="post-metadata">

**Author:** ![Gatora](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/gatora/32/36_2.png) [@Gatora](https://discourse.cataclysmdda.org/u/Gatora)\
**Post date:** [July 16, 2013, 6:42pm UTC](https://discourse.cataclysmdda.org/t/how-do-you-create-mods/2234/5 "2013-07-16T18:42:12Z")

</div>

i think i see it. i gunna go try to make my own recipe for an item. thanks for the help.

---

<div class="post-metadata">

**Author:** ![Redstonize](https://avatars.discourse-cdn.com/v4/letter/r/919ad9/32.png) [@Redstonize](https://discourse.cataclysmdda.org/u/Redstonize)\
**Post date:** [October 7, 2013, 8:51pm UTC](https://discourse.cataclysmdda.org/t/how-do-you-create-mods/2234/6 "2013-10-07T20:51:25Z")

</div>

I’m a novice too. Thanks for creating this topic, it helps me a lot and I’m sure many other future modders too.

---

<div class="post-metadata">

**Author:** ![stone94](https://avatars.discourse-cdn.com/v4/letter/s/f9ae1b/32.png) [@stone94](https://discourse.cataclysmdda.org/u/stone94)\
**Post date:** [October 7, 2013, 10:50pm UTC](https://discourse.cataclysmdda.org/t/how-do-you-create-mods/2234/7 "2013-10-07T22:50:22Z")

</div>

Try this

[http://smf.cataclysmdda.com/index.php?topic=2666.0](http://smf.cataclysmdda.com/index.php?topic=2666.0)  
CataModder - Tool for editing Cataclysm files  
By BMacZero

---

<div class="post-metadata">

**Author:** ![Chiko](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/chiko/32/3238_2.png) [@Chiko](https://discourse.cataclysmdda.org/u/Chiko)\
**Post date:** [October 8, 2013, 12:57am UTC](https://discourse.cataclysmdda.org/t/how-do-you-create-mods/2234/8 "2013-10-08T00:57:00Z")

</div>

[quote=“stone94, post:7, topic:2234”]Try this

[http://smf.cataclysmdda.com/index.php?topic=2666.0](http://smf.cataclysmdda.com/index.php?topic=2666.0)  
CataModder - Tool for editing Cataclysm files  
By BMacZero[/quote]  
Is this one similar or better to JSONedit?

I’m currently using this one.
