# Adding New Entity Categories

**URL:** <https://discourse.stonehearth.net/t/adding-new-entity-categories/23860>\
**Category:** Modding\
**Created:** [July 12, 2016, 10:35pm UTC](https://discourse.stonehearth.net/t/adding-new-entity-categories/23860 "2016-07-12T22:35:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![xxdalexx](https://avatars.discourse-cdn.com/v4/letter/x/e9a140/32.png) [@xxdalexx](https://discourse.stonehearth.net/u/xxdalexx)\
**Post date:** [July 12, 2016, 10:35pm UTC](https://discourse.stonehearth.net/t/adding-new-entity-categories/23860/1 "2016-07-12T22:35:59Z")

</div>

So, I’ve noticed to add a new category into the locale, I have to directly mixinto to stonehearth’s local file by:

```
mixinto file:
{
  "ui": {
    "game": {
      "entities": {
        "item_categories": {
          "category_name": "Category Display Name"
        }
      }
    }
  }
}
manifest mixinto section:
"stonehearth/locales/en.json": "file(mixintos/category.json)"

```

Because the game is looking for the i18n entry at `stonehearth:ui.game.entities.item_categories.category_name`. The issue I see is that people like @Wiese2007 who are on top of making sure translations are good, this isn’t an obvious place to look, and is hardcoded to only mixinto en.json.

Am I correct here, or is there something I’m missing to add a new category that displays it’s name properly?

---

<div class="post-metadata">

**Author:** ![Wiese2007](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/wiese2007/32/15946_2.png) [@Wiese2007](https://discourse.stonehearth.net/u/Wiese2007)\
**Post date:** [July 12, 2016, 10:51pm UTC](https://discourse.stonehearth.net/t/adding-new-entity-categories/23860/2 "2016-07-12T22:51:27Z")

</div>

heyho ^^

here im mentioning @froggy´s cookmod 😉

the categories are in the stockpile\_filter.json - over this he has add two new categories (drinks\_container and quest\_items) and there it shows to en.json in his cookmod. so you need only to mixin this stockpilefilter^^

{  
“stockpile”: {  
“food\_and\_drink”: {  
“categories”: {  
“drink\_container”: {  
“ordinal”: 4,  
“display\_name”: “i18n(cookmod:ui.game.zones\_mode.stockpile.filters.tooltip\_drink\_containers)”,  
“icon”: “/cookmod/ui/game/modes/zones\_mode/stockpile/images/taxonomy/drink.png”,  
“filter”: “drink\_container”  
}  
}  
},  
“wealth”: {  
“categories”: {  
“quest\_items”: {  
“ordinal”: 4,  
“display\_name”: “i18n(cookmod:ui.game.zones\_mode.stockpile.filters.tooltip\_quest\_items)”,  
“icon”: “/cookmod/ui/game/modes/zones\_mode/stockpile/images/taxonomy/quest.png”,  
“filter”: “quest\_items”  
}  
}  
}  
}  
}

en.json:  
“stockpile”: {  
“filters”: {  
“tooltip\_quest\_items”: “Quest Items”,  
“tooltip\_drink\_containers”: “Drinks”  
}

---

<div class="post-metadata">

**Author:** ![xxdalexx](https://avatars.discourse-cdn.com/v4/letter/x/e9a140/32.png) [@xxdalexx](https://discourse.stonehearth.net/u/xxdalexx)\
**Post date:** [July 12, 2016, 11:11pm UTC](https://discourse.stonehearth.net/t/adding-new-entity-categories/23860/3 "2016-07-12T23:11:22Z")

</div>

Thanks for pointing me in the right direction. 😀

However, he did it the same way that I had figured out, but did his file structure is a way that makes a little more sense than mine. The code you posted all has to do will adding in stockpile filters, but he did indeed add new new categories, ‘drink’ and ‘quest items’. If you look at his en\_fix.json file, that’s where he is directly mixing into the stonehearth local file to add the category titles.

So this does in a sense answer my question, that yes you have to mixinto the stonehearth locale for new entity categories, and the downside in translations for mods, is you would have to manually add a mixinto line in the mod manifest that would point to category names for other languages.

I will follow @Froggy’s lead and name mine en\_fix.json and store it in the locales folder, makes a lot more sense than my idea.

---

<div class="post-metadata">

**Author:** ![Wiese2007](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/wiese2007/32/15946_2.png) [@Wiese2007](https://discourse.stonehearth.net/u/Wiese2007)\
**Post date:** [July 12, 2016, 11:33pm UTC](https://discourse.stonehearth.net/t/adding-new-entity-categories/23860/4 "2016-07-12T23:33:54Z")

</div>

ohhh you have right ^^ upss xD
