What item IDs do corpses have?

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?
  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.

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

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.

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.

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.