# Confused about categories, especially 'OTHER'

**URL:** <https://discourse.cataclysmdda.org/t/confused-about-categories-especially-other/25618>\
**Category:** The Toolbox\
**Created:** [January 3, 2021, 9:42am UTC](https://discourse.cataclysmdda.org/t/confused-about-categories-especially-other/25618 "2021-01-03T09:42:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul\_Blay](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/paul_blay/32/6803_2.png) [@Paul\_Blay](https://discourse.cataclysmdda.org/u/Paul_Blay)\
**Post date:** [January 3, 2021, 9:42am UTC](https://discourse.cataclysmdda.org/t/confused-about-categories-especially-other/25618/1 "2021-01-03T09:42:19Z")

</div>

So I was [trying to find a way to list every item in category ‘other’](https://discourse.cataclysmdda.org/t/improved-filter-on-debug-spawn-item-and-or-additional-catalogues-in-item-browser/25612/) and getting confused.

Maybe I have some misconceptions which can be cleared up, but is ‘category’ not a mandatory field for items? Like pipe\_cleaner doesn’t have a category specified where it is defined in generic.json (though it is specified as

```auto
    "category": "CC_OTHER",
    "subcategory": "CSC_OTHER_TOOLS",

```

in the recipe in recipe\_other.json. So maybe that counts. Or maybe any item that doesn’t have a category defined is set to “other” by default.

I’m using AstroGREP now so it’s really easy to find every item with “category”: “other” but finding items that don’t have a category listed isn’t so straight forwards.

---

<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:** [January 4, 2021, 6:42am UTC](https://discourse.cataclysmdda.org/t/confused-about-categories-especially-other/25618/2 "2021-01-04T06:42:43Z")

</div>

Item and recipe categories are not related. Item category is not mandatory and if it is not set in json - it is calculated (see `calc_category` function in `item_factory.cpp`).

---

<div class="post-metadata">

**Author:** ![Paul\_Blay](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/paul_blay/32/6803_2.png) [@Paul\_Blay](https://discourse.cataclysmdda.org/u/Paul_Blay)\
**Post date:** [January 4, 2021, 7:20am UTC](https://discourse.cataclysmdda.org/t/confused-about-categories-especially-other/25618/3 "2021-01-04T07:20:21Z")

</div>

> [@Zhilkin](#):
>
> Item and recipe categories are not related. Item category is not mandatory and if it is not set in json - it is calculated (see `calc_category` function in `item_factory.cpp` ).

Should Item category be mandatory? Or give a ‘warning’ in a debug log or something if not present?

calc\_category doesn’t help me much in itself because I’d need to backtrack through the code to see where and how the .tool .gun etc. values are determined. I had a look, but it’s a bit much for me.

If I was going to guess, I’d guess that pipe cleaners aren’t recognized as being tools because you can’t (a)pply or (a)ctivate them.

The whole thing about calculated categories, though, means that I can’t just rely on searching the json to generate lists. It makes it more handy for the debug spawn filter to have a category filter.

---

<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:** [January 5, 2021, 8:25am UTC](https://discourse.cataclysmdda.org/t/confused-about-categories-especially-other/25618/4 "2021-01-05T08:25:06Z")

</div>

The thing is categories are not mandatory for item definition, some item definitions in json lacks category data and category is calculated automatically instead. Thus if you want to compile a list of all items with their categories you need to use that category autocalc code.
