# Modding Help: How to Overwrite a Vanilla Item

**URL:** https://discourse.cataclysmdda.org/t/modding-help-how-to-overwrite-a-vanilla-item/26550
**Category:** The Toolbox
**Created:** [June 28, 2021, 3:00pm UTC](https://discourse.cataclysmdda.org/t/modding-help-how-to-overwrite-a-vanilla-item/26550 "2021-06-28T15:00:29Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Dalamar\_Aaefe](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/dalamar_aaefe/32/6515_2.png) [@Dalamar\_Aaefe](https://discourse.cataclysmdda.org/u/Dalamar_Aaefe)
#### Post date: [June 28, 2021, 3:00pm UTC](https://discourse.cataclysmdda.org/t/modding-help-how-to-overwrite-a-vanilla-item/26550/1 "2021-06-28T15:00:29Z")

</div>

Hello, as the title says I’m looking for some help for overwriting a vanilla item, so that when my mod is in use it will read my variant of the item.

Example being I’m trying to make it so when my martial arts mod is being used it replaces some values of the weapons my martial arts use.

Thank you for any help you can give in advance.

---

<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: [June 28, 2021, 6:08pm UTC](https://discourse.cataclysmdda.org/t/modding-help-how-to-overwrite-a-vanilla-item/26550/2 "2021-06-28T18:08:57Z")

</div>

Well, the quick answer would be: Use the same `id` of whatever item you want to overwrite, change the parameters you like, and it will do so automatically when your mod loads.

For example, defining this somewhere in your mod:

```auto
  {
    "id": "bio_armor_eyes",
    "copy-from": "bio_armor_eyes",
    "type": "BIONIC_ITEM",
    "name": { "str": "Better Protective Lenses CBM" },
    "weight": "10 g",
    "difficulty": 1
  },

```

…will overwrite the base game `Protective Lenses CBM` with your own definition (if your mod is loaded into the world), where the item only weighs 10 gram (instead of 500) and has a installation difficulty of 1 (instead of 5)… and has a fancy new name.

For the long answer on how to properly mod, I’d highly suggest you take a look at the modding guide on the game’s GitHub page:

> **[CleverRaven/Cataclysm-DDA](https://github.com/CleverRaven/Cataclysm-DDA/wiki/Guide-to-adding-new-content-to-CDDA-for-first-time-contributors)**
>
> Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world. - CleverRaven/Cataclysm-DDA

---

<div class="post-metadata">

### Author: ![Dalamar\_Aaefe](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/dalamar_aaefe/32/6515_2.png) [@Dalamar\_Aaefe](https://discourse.cataclysmdda.org/u/Dalamar_Aaefe)
#### Post date: [June 28, 2021, 6:26pm UTC](https://discourse.cataclysmdda.org/t/modding-help-how-to-overwrite-a-vanilla-item/26550/3 "2021-06-28T18:26:10Z")

</div>

Thank you very much for the VERY efficient answer!

---

<div class="post-metadata">

### Author: ![mlangsdorf](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mlangsdorf/32/2462_2.png) [@mlangsdorf](https://discourse.cataclysmdda.org/u/mlangsdorf)
#### Post date: [June 29, 2021, 12:43am UTC](https://discourse.cataclysmdda.org/t/modding-help-how-to-overwrite-a-vanilla-item/26550/4 "2021-06-29T00:43:56Z")

</div>

I really need to add a section on copy-from to the Guide. It’s too much to ask that you’d be willing to write one, isn’t it?

---

<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: [June 30, 2021, 1:25pm UTC](https://discourse.cataclysmdda.org/t/modding-help-how-to-overwrite-a-vanilla-item/26550/5 "2021-06-30T13:25:21Z")

</div>

> [@mlangsdorf](#):
>
> It’s too much to ask that you’d be willing to write one, isn’t it?

Yes… yes it is.  
…  
Sigh…

I have a bit of a weather related headache right now, so I wasn’t able to include everything I would have liked to, but it’s a start.

Here’s what I have so far (I did not proofread it, but I’ve tested the code against 0.E-3 and whatever more or less current experimental build I had).  
I’ve also created a text file so it keeps the formatting.

Edit: Dead links removed. You can now [visit the page on the official wiki](https://github.com/CleverRaven/Cataclysm-DDA/wiki/New-contributor-Guide-copy-from).

---

<div class="post-metadata">

### Author: ![mlangsdorf](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mlangsdorf/32/2462_2.png) [@mlangsdorf](https://discourse.cataclysmdda.org/u/mlangsdorf)
#### Post date: [June 30, 2021, 4:23pm UTC](https://discourse.cataclysmdda.org/t/modding-help-how-to-overwrite-a-vanilla-item/26550/6 "2021-06-30T16:23:23Z")

</div>

Thank you so much! I’ve added it to the Guide.
