# How do you modify an existing .json files with a mod?

**URL:** https://discourse.cataclysmdda.org/t/how-do-you-modify-an-existing-json-files-with-a-mod/24169
**Category:** The Lab
**Tags:** mod
**Created:** [July 16, 2020, 2:58am UTC](https://discourse.cataclysmdda.org/t/how-do-you-modify-an-existing-json-files-with-a-mod/24169 "2020-07-16T02:58:30Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![BobaPearl](https://avatars.discourse-cdn.com/v4/letter/b/838e76/32.png) [@BobaPearl](https://discourse.cataclysmdda.org/u/BobaPearl)
#### Post date: [July 16, 2020, 2:58am UTC](https://discourse.cataclysmdda.org/t/how-do-you-modify-an-existing-json-files-with-a-mod/24169/1 "2020-07-16T02:58:30Z")

</div>

For example, if I want to change a recipe for the item so that it uses completely different items, how do I do so?

---

<div class="post-metadata">

### Author: ![featherball](https://avatars.discourse-cdn.com/v4/letter/f/e99b99/32.png) [@featherball](https://discourse.cataclysmdda.org/u/featherball)
#### Post date: [July 16, 2020, 2:36pm UTC](https://discourse.cataclysmdda.org/t/how-do-you-modify-an-existing-json-files-with-a-mod/24169/3 "2020-07-16T14:36:53Z")

</div>

You need to completely recreate the entry. For example, I made this test modification that changes cordless drill recipe:

> **Summary**
>
> ```
> {
> "type": "recipe",
> "result": "cordless_drill",
> "category": "CC_ELECTRONIC",
> "subcategory": "CSC_ELECTRONIC_TOOLS",
> "components": [
> [["boots_rubber", 1] ]
> ]
> } 
> 
> ```

But this sets crafting time to 0, removes all other prerequisites and so on. So I would need something like this instead:

> **Summary**
>
> ```
> {
> "type": "recipe",
> "result": "cordless_drill",
> "category": "CC_ELECTRONIC",
> "subcategory": "CSC_ELECTRONIC_TOOLS",
> "skill_used": "fabrication",
> "skills_required": ["electronics", 3],
> "difficulty": 4,
> "time": "20 m",
> "reversible": true,
> "decomp_learn": 4,
> "book_learn": [["advanced_electronics", 3], ["textbook_electronics", 3] ],
> "using": [["soldering_standard", 10], ["surface_heat", 10] ],
> "qualities": [{ "id": "SCREW", "level": 1 }],
> "tools": [[[ "mold_plastic", -1] ] ],
> "components": [
> [["boots_rubber", 1] ]
> ]
> }
> 
> ```

I think item definitions did have some inheritance but the number of attributes you had to explicitly add anyway was around 80% or more. Maybe this have changed since because development is very active.

---

<div class="post-metadata">

### Author: ![Valase](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/valase/32/6972_2.png) [@Valase](https://discourse.cataclysmdda.org/u/Valase)
#### Post date: [July 16, 2020, 2:46pm UTC](https://discourse.cataclysmdda.org/t/how-do-you-modify-an-existing-json-files-with-a-mod/24169/4 "2020-07-16T14:46:33Z")

</div>

> [@featherball](#):
>
> But this sets crafting time to 0, removes all other prerequisites and so on.

That’s where the `"copy-from"` tag could help (if it’s possible to apply those to recipes, I’m not sure about that).  
In your example case, `"copy-from": "cordless_drill"`.

---

<div class="post-metadata">

### Author: ![featherball](https://avatars.discourse-cdn.com/v4/letter/f/e99b99/32.png) [@featherball](https://discourse.cataclysmdda.org/u/featherball)
#### Post date: [July 16, 2020, 3:17pm UTC](https://discourse.cataclysmdda.org/t/how-do-you-modify-an-existing-json-files-with-a-mod/24169/5 "2020-07-16T15:17:56Z")

</div>

Oh, right, I forgot about that. Does it work well for overriding existing recipes? I do remember that it worked for items.
