# What item IDs do corpses have?

**URL:** <https://discourse.cataclysmdda.org/t/what-item-ids-do-corpses-have/25442>\
**Category:** The Toolbox\
**Created:** [December 1, 2020, 10:35am UTC](https://discourse.cataclysmdda.org/t/what-item-ids-do-corpses-have/25442 "2020-12-01T10:35:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nymall1](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/nymall1/32/2865_2.png) [@Nymall1](https://discourse.cataclysmdda.org/u/Nymall1)\
**Post date:** [December 1, 2020, 10:35am UTC](https://discourse.cataclysmdda.org/t/what-item-ids-do-corpses-have/25442/1 "2020-12-01T10:35:22Z")

</div>

So, I’m working on a mod and one of the core ideas I’m playing with is having crafting recipies that incorperate zombie corpses. I’ve been running down a rabbit hole the last few days trying to figure out what the game actually calls them, and I’ve kind of run into a dead end.

FRom looking at the code “src\item.cpp”, it suggests that the corpse itself is created with the id to corpse\_generic\_human and then simply changes the NAME of the item to the name of the zombie or creature that was killed, that it does not give an actual item ID. This is problematic, because I want to be able to determine if the zombie corpse is that of a Shocker Zombie or a Soldier Zombie, for example. I see the var zombie\_form should be set with the zombie type, but I’m not sure if I can detect that from JSON.

so, my questions are:

1. Is there a way to filter in crafting recipies based off of flags? For example, [filthy]?
2. Is there a way to tell what the original monster was in the recipie, without resorting to the [zombie\_form] flag?
3. Is there a way to tell for animals that do not zombify, for example the rabbit?
4. Can you point me to a mod or code sippet that does something similar?

---

<div class="post-metadata">

**Author:** ![Nymall1](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/nymall1/32/2865_2.png) [@Nymall1](https://discourse.cataclysmdda.org/u/Nymall1)\
**Post date:** [December 1, 2020, 11:33am UTC](https://discourse.cataclysmdda.org/t/what-item-ids-do-corpses-have/25442/2 "2020-12-01T11:33:04Z")

</div>

1. Is there a way to “inherit” the monster name into the product, or use it to select between potential products in the JSON code? That might just skip that step, and deal with it in a secondary item deffinition.

---

<div class="post-metadata">

**Author:** ![Zhilkin](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/zhilkin/32/3749_2.png) [@Zhilkin](https://discourse.cataclysmdda.org/u/Zhilkin)\
**Post date:** [December 1, 2020, 3:30pm UTC](https://discourse.cataclysmdda.org/t/what-item-ids-do-corpses-have/25442/3 "2020-12-01T15:30:21Z")

</div>

There is no code in crafting that checks which monster this corpse was made from.

---

<div class="post-metadata">

**Author:** ![Venera3](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/venera3/32/10569_2.png) [@Venera3](https://discourse.cataclysmdda.org/u/Venera3)\
**Post date:** [December 3, 2020, 6:00am UTC](https://discourse.cataclysmdda.org/t/what-item-ids-do-corpses-have/25442/4 "2020-12-03T06:00:55Z")

</div>

A possible workaround for that would be adding a “dissected X” item to the harvest list of the zombie, and having the recipe use that.

---

<div class="post-metadata">

**Author:** ![zantanzuken](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/zantanzuken/32/10325_2.png) [@zantanzuken](https://discourse.cataclysmdda.org/u/zantanzuken)\
**Post date:** [December 3, 2020, 7:30am UTC](https://discourse.cataclysmdda.org/t/what-item-ids-do-corpses-have/25442/5 "2020-12-03T07:30:53Z")

</div>

honestly there has to be -some- code related to what zombie corpse you’re dissecting, considering you can dissect specifically shocker zombies for CBM’s, just as an example… it has to tag them in some way.

---

<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:** [December 4, 2020, 3:41am UTC](https://discourse.cataclysmdda.org/t/what-item-ids-do-corpses-have/25442/6 "2020-12-04T03:41:24Z")

</div>

> [@zantanzuken](#):
>
> honestly there has to be -some- code related to what zombie corpse you’re dissecting, […]

Yes, of course it does. As far as I can tell, it’s contained in the `mtype` of an item. You can get this by calling get\_mtype() on the item-object in C++.  
However, as far as I know, there’s no way to do this with JSON (yet) and therefore can’t be checked in a crafting recipe.
