# \[WIP\] Crafting screen subcategories - PR #4884

**URL:** <https://discourse.cataclysmdda.org/t/wip-crafting-screen-subcategories-pr-4884/4396>\
**Category:** The Drawing Board\
**Created:** [December 5, 2013, 6:54pm UTC](https://discourse.cataclysmdda.org/t/wip-crafting-screen-subcategories-pr-4884/4396 "2013-12-05T18:54:53Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![desrik](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/desrik/32/1050_2.png) [@desrik](https://discourse.cataclysmdda.org/u/desrik)\
**Post date:** [December 5, 2013, 6:54pm UTC](https://discourse.cataclysmdda.org/t/wip-crafting-screen-subcategories-pr-4884/4396/1 "2013-12-05T18:54:53Z")

</div>

I’m in need of some ideas for crafting screen categories. I currently have:

NOTE:: All main categories have, and probably should always have a “MISC” subcategory. This allows a fallback (not yet implemented) for any items missing the subcategory assignment in recipes.json.

Screenshots inside spoilers.

Weapons:

[ul][li]Bashing[/li]  
[li]Cutting[/li]  
[li]Piercing[/li]  
[li]Explosives[/li]  
[li]Mods[/li]  
[li]Misc[/li][/ul]

 ![](http://i.imgur.com/ey55SUm.png)

Ammo:

[ul][li]Bullets[/li]  
[li]Arrows[/li]  
[li]Components[/li]  
[li]Misc[/li][/ul]

 ![](http://i.imgur.com/bmodXYS.png)

Food:

[ul][li]Drinks[/li]  
[li]Meat[/li]  
[li]Veggi[/li]  
[li]Snack[/li]  
[li]Bread[/li]  
[li]Pasta[/li]  
[li]Misc[/li][/ul]

 ![](http://i.imgur.com/Y2doYqI.png)

Chems:

[ul][li]Drugs[/li]  
[li]Mutagen[/li]  
[li]Chemicals[/li]  
[li]Misc[/li][/ul]

 ![](http://i.imgur.com/c9dXBvV.png)

Electronics:

[ul][li]CBMs[/li]  
[li]Lighting[/li]  
[li]Components[/li]  
[li]Misc[/li][/ul]

 ![](http://i.imgur.com/7MF8xKd.png)

Armor:

[ul][li]Storage[/li]  
[li]Suit[/li]  
[li]Head[/li]  
[li]Back[/li]  
[li]Torso[/li]  
[li]Arms[/li]  
[li]Hands[/li]  
[li]Legs[/li]  
[li]Feet[/li]  
[li]Misc[/li][/ul]

 ![](http://i.imgur.com/tmfXoQ1.png)

Misc:

[ul][li]Tools[/li]  
[li]Medical[/li]  
[li]Containers[/li]  
[li]Materials[/li]  
[li]Parts[/li]  
[li]Traps[/li]  
[li]Misc[/li][/ul]

 ![](http://i.imgur.com/G2QAwKp.png)

---

<div class="post-metadata">

**Author:** ![Binky](https://avatars.discourse-cdn.com/v4/letter/b/f04885/32.png) [@Binky](https://discourse.cataclysmdda.org/u/Binky)\
**Post date:** [December 5, 2013, 7:26pm UTC](https://discourse.cataclysmdda.org/t/wip-crafting-screen-subcategories-pr-4884/4396/2 "2013-12-05T19:26:42Z")

</div>

Looks good!  
Two ideas. Firstly is the electronics categories, it’d be better to have something like ‘basic, complex, CBMs, Misc’ or something. I know basic and complex aren’t amazing identifiers, but they probably make more sense from a gameplay perspective and you can probably imagine what goes in either. I imagine otherwise you’ll have loads in misc or have to have loads of categories.

Secondly, in Misc I would separate it into materials, vehicles, other and all. Materials is a tricky one, and some things obviously fall into both categories, but I imagine stuff can go in two categories?

Also, I know it’s a lot to ask, but it’d be nice if it could automatically go to the last used category (or the most populated?).

---

<div class="post-metadata">

**Author:** ![desrik](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/desrik/32/1050_2.png) [@desrik](https://discourse.cataclysmdda.org/u/desrik)\
**Post date:** [December 5, 2013, 7:35pm UTC](https://discourse.cataclysmdda.org/t/wip-crafting-screen-subcategories-pr-4884/4396/3 "2013-12-05T19:35:52Z")

</div>

Hmm… To be honest, I’m not sure what to consider when deciding whether an electronic is “basic” or “advanced”. I guess it could be based on required skill level, but that would be alot of comparison between items.

I had already had an similar idea for the Misc category. Materials, Parts, Tools, Misc… Something like that.

As for automatically selecting the last used category, that shouldn’t be too difficult. Store the last used category and subcategory and use those upon opening the crafting screen. Currently it’s forcing the tabs to Weapon-\>Bashing.

---

<div class="post-metadata">

**Author:** ![Cherry](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/cherry/32/230_2.png) [@Cherry](https://discourse.cataclysmdda.org/u/Cherry)\
**Post date:** [December 5, 2013, 7:38pm UTC](https://discourse.cataclysmdda.org/t/wip-crafting-screen-subcategories-pr-4884/4396/4 "2013-12-05T19:38:04Z")

</div>

You shoulda made a category for (Explosives) on the weapon subsections.  
Gotta be honest, that’s only crafting sub category I’m ever going to use.

Took a moment to think about it  
This has got to be a godsend for anyone who doesn’t already know all the recipes in the game.  
Great Job

Eddit: Lol didn’t notice explosives since it wasn’t on the bullet list. 😛  
[size=6pt]You spelled “planned” wrong btw[/size]

---

<div class="post-metadata">

**Author:** ![desrik](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/desrik/32/1050_2.png) [@desrik](https://discourse.cataclysmdda.org/u/desrik)\
**Post date:** [December 5, 2013, 7:42pm UTC](https://discourse.cataclysmdda.org/t/wip-crafting-screen-subcategories-pr-4884/4396/5 "2013-12-05T19:42:00Z")

</div>

From original post:

[quote=“desrik, post:1, topic:4396”]Weapons:

[ul][li]Bashing[/li]  
[li]Cutting[/li]  
[li]Piercing[/li]  
[li]Misc[/li][/ul]

Planed: Explosives[/quote]

Already had ya covered Cherry 🙂

---

<div class="post-metadata">

**Author:** ![desrik](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/desrik/32/1050_2.png) [@desrik](https://discourse.cataclysmdda.org/u/desrik)\
**Post date:** [December 5, 2013, 7:44pm UTC](https://discourse.cataclysmdda.org/t/wip-crafting-screen-subcategories-pr-4884/4396/6 "2013-12-05T19:44:19Z")

</div>

Now, if I can figure out the difference between CC\_NONCRAFT and CC\_NONCRAFTC and why CC\_NONCRAFT is declared twice in recipes.json I would be all set 🙂 Can’t find either of them used in the source code. Anyone have any ideas?

---

<div class="post-metadata">

**Author:** ![ShinQuickMan](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/shinquickman/32/2516_2.png) [@ShinQuickMan](https://discourse.cataclysmdda.org/u/ShinQuickMan)\
**Post date:** [December 5, 2013, 8:59pm UTC](https://discourse.cataclysmdda.org/t/wip-crafting-screen-subcategories-pr-4884/4396/7 "2013-12-05T20:59:08Z")

</div>

Maybe electronics could be subdivided to:

[ul][li]Components[/li]  
[li]Tools[/li]  
[li]CBMs[/li]  
[li]Misc[/li][/ul]

And the Misc category to:

[ul][li]Vehicle Components[/li]  
[li]Other Components[/li]  
[li]Traps[/li]  
[li]Medical Supplies[/li]  
[li]Tools[/li]  
[li]Misc[/li][/ul]

---

<div class="post-metadata">

**Author:** ![vache](https://avatars.discourse-cdn.com/v4/letter/v/ea666f/32.png) [@vache](https://discourse.cataclysmdda.org/u/vache)\
**Post date:** [December 5, 2013, 9:37pm UTC](https://discourse.cataclysmdda.org/t/wip-crafting-screen-subcategories-pr-4884/4396/8 "2013-12-05T21:37:37Z")

</div>

I would combine food and drinks into a single category, and then split drinks as a subcategory of that. No real reason to have food and drinks separate except to make boiled water quicker to get to.

---

<div class="post-metadata">

**Author:** ![desrik](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/desrik/32/1050_2.png) [@desrik](https://discourse.cataclysmdda.org/u/desrik)\
**Post date:** [December 5, 2013, 10:13pm UTC](https://discourse.cataclysmdda.org/t/wip-crafting-screen-subcategories-pr-4884/4396/9 "2013-12-05T22:13:17Z")

</div>

> [@vache](#):
>
> I would combine food and drinks into a single category, and then split drinks as a subcategory of that. No real reason to have food and drinks separate except to make boiled water quicker to get to.

Done.

---

<div class="post-metadata">

**Author:** ![desrik](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/desrik/32/1050_2.png) [@desrik](https://discourse.cataclysmdda.org/u/desrik)\
**Post date:** [December 5, 2013, 10:16pm UTC](https://discourse.cataclysmdda.org/t/wip-crafting-screen-subcategories-pr-4884/4396/10 "2013-12-05T22:16:51Z")

</div>

[quote=“ShinQuickMan, post:7, topic:4396”]Maybe electronics could be subdivided to:

[ul][li]Components[/li]  
[li]Tools[/li]  
[li]CBMs[/li]  
[li]Misc[/li][/ul]

And the Misc category to:

[ul][li]Vehicle Components[/li]  
[li]Other Components[/li]  
[li]Traps[/li]  
[li]Medical Supplies[/li]  
[li]Tools[/li]  
[li]Misc[/li][/ul][/quote]

Currently Electronics has: CBMs, Lighting, and Misc. No use for a tools tab as all tools have been moved to Misc-\>Tools. Also, Misc has the following: Tools, Medical, Containers, Materials, Parts, Traps, and Misc. I will update the OP with new changes.

---

<div class="post-metadata">

**Author:** ![Zireael](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/zireael/32/956_2.png) [@Zireael](https://discourse.cataclysmdda.org/u/Zireael)\
**Post date:** [December 6, 2013, 2:17pm UTC](https://discourse.cataclysmdda.org/t/wip-crafting-screen-subcategories-pr-4884/4396/11 "2013-12-06T14:17:26Z")

</div>

I already said it on Git: it’s excellent and cannot wait for this to be merged!

---

<div class="post-metadata">

**Author:** ![infectedmochi](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/infectedmochi/32/206_2.png) [@infectedmochi](https://discourse.cataclysmdda.org/u/infectedmochi)\
**Post date:** [December 6, 2013, 2:19pm UTC](https://discourse.cataclysmdda.org/t/wip-crafting-screen-subcategories-pr-4884/4396/12 "2013-12-06T14:19:36Z")

</div>

That’s a lot of work, thanks for your effort! 🙂 This should make the crafting process much easier.

---

<div class="post-metadata">

**Author:** ![Binky](https://avatars.discourse-cdn.com/v4/letter/b/f04885/32.png) [@Binky](https://discourse.cataclysmdda.org/u/Binky)\
**Post date:** [December 6, 2013, 5:10pm UTC](https://discourse.cataclysmdda.org/t/wip-crafting-screen-subcategories-pr-4884/4396/13 "2013-12-06T17:10:01Z")

</div>

> [@desrik](#):
>
> Hmm… To be honest, I’m not sure what to consider when deciding whether an electronic is “basic” or “advanced”. I guess it could be based on required skill level, but that would be alot of comparison between items.

Yeah, I suppose it might be difficult. I second ShinQuickMan in that there should be a components tab within electronics - most of the components are pretty specific (atm) and it’d make it a lot less cluttered.

---

<div class="post-metadata">

**Author:** ![desrik](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/desrik/32/1050_2.png) [@desrik](https://discourse.cataclysmdda.org/u/desrik)\
**Post date:** [December 6, 2013, 5:59pm UTC](https://discourse.cataclysmdda.org/t/wip-crafting-screen-subcategories-pr-4884/4396/14 "2013-12-06T17:59:44Z")

</div>

> [@Binky](#):
>
> Yeah, I suppose it might be difficult. I second ShinQuickMan in that there should be a components tab within electronics - most of the components are pretty specific (atm) and it’d make it a lot less cluttered.

Well I just looked in recipes.json and turns out I had assigned some the Components subcategory but didn’t set the tab to display. DOH!!!

Going to fix it now…

EDIT::Fixed. Also while back in the code I realized that any recipe without an assigned subcategory will fail to show up. Solution is set default subcategory to MainCategory-\>Other

---

<div class="post-metadata">

**Author:** ![desrik](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/desrik/32/1050_2.png) [@desrik](https://discourse.cataclysmdda.org/u/desrik)\
**Post date:** [December 6, 2013, 6:08pm UTC](https://discourse.cataclysmdda.org/t/wip-crafting-screen-subcategories-pr-4884/4396/15 "2013-12-06T18:08:21Z")

</div>

Now we just need to fill these categories up 🙂 A few are quite barren 😛

---

<div class="post-metadata">

**Author:** ![Cherry](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/cherry/32/230_2.png) [@Cherry](https://discourse.cataclysmdda.org/u/Cherry)\
**Post date:** [December 7, 2013, 5:32am UTC](https://discourse.cataclysmdda.org/t/wip-crafting-screen-subcategories-pr-4884/4396/16 "2013-12-07T05:32:44Z")

</div>

I posted it in the bug reports, but just so the creator might know.

The new system looks nice and all, but when you use the search function, it only looks through sub category you are currently highlighting.  
Ex. I have to go to Other -\> Materials and only then will searching duct tape give me the result I want.

This updated system does not come with an option, and it makes the search function unusable.  
JUST SAYING.

---

<div class="post-metadata">

**Author:** ![desrik](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/desrik/32/1050_2.png) [@desrik](https://discourse.cataclysmdda.org/u/desrik)\
**Post date:** [December 7, 2013, 6:24am UTC](https://discourse.cataclysmdda.org/t/wip-crafting-screen-subcategories-pr-4884/4396/17 "2013-12-07T06:24:00Z")

</div>

Hmm… I’ll have to check that out. Thanks for the info!

EDIT:: PR#[4923](https://github.com/CleverRaven/Cataclysm-DDA/pull/4923) opened. Waiting on merge. Not the best way to fix it, but it should be fine just to get the search working again.

---

<div class="post-metadata">

**Author:** ![Savidiy](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Savidiy](https://discourse.cataclysmdda.org/u/Savidiy)\
**Post date:** [December 7, 2013, 1:39pm UTC](https://discourse.cataclysmdda.org/t/wip-crafting-screen-subcategories-pr-4884/4396/18 "2013-12-07T13:39:59Z")

</div>

When I select a tab Food, move right by pressing the right key to the limit and then the game crashes. [0.9-1874] Windows Tiles

---

<div class="post-metadata">

**Author:** ![desrik](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/desrik/32/1050_2.png) [@desrik](https://discourse.cataclysmdda.org/u/desrik)\
**Post date:** [December 7, 2013, 4:48pm UTC](https://discourse.cataclysmdda.org/t/wip-crafting-screen-subcategories-pr-4884/4396/19 "2013-12-07T16:48:41Z")

</div>

> [@Savidiy](#):
>
> When I select a tab Food, move right by pressing the right key to the limit and then the game crashes. [0.9-1874] Windows Tiles

I can’t reproduce this. Can anyone else confirm?

---

<div class="post-metadata">

**Author:** ![Savidiy](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Savidiy](https://discourse.cataclysmdda.org/u/Savidiy)\
**Post date:** [December 8, 2013, 5:08am UTC](https://discourse.cataclysmdda.org/t/wip-crafting-screen-subcategories-pr-4884/4396/20 "2013-12-08T05:08:47Z")

</div>

I couldn’t reproduce this error on a new experimental version #314.

I have a request.

1. Add PageUp, PageDown key to move between categories.
2. Add a transition to the next room category, if you selected the last right and press the right. Similarly with the previous category.
3. And designate a subcategory in which there are no recipes or to block and ignore it.

[Next page](https://discourse.cataclysmdda.org/t/wip-crafting-screen-subcategories-pr-4884/4396.md?page=2)
