Skip to content

Nereithr/CategoryIngredientDisplayFix

Repository files navigation

Category Ingredient Display Fix

What is this (and mod compat)?

A simple SMAPI Harmony mod for Stardew Valley 1.6 that fixes the way unused (in vanilla) category ingredients are displayed where applicable (recipe tooltip, collections tab). A category ingredient is an ingredient that is defined with a category such as Fish (Any) instead of one specific item and matches any item included in that category. Added category ingredients now display a proper name (standardized as "<Category>(Any)") instead of ???, and an icon representing the category. This is an updated fork of Traktori7's Categories in Recipes with the following key differences:

  • Updated to 1.6, duh.
  • Now uses postfix over prefix patches. The main difference is that it allows all vanilla logic for grabbing item names and sprites to run first before overriding specific icons and names, instead of doing its own logic first and potentially not allowing the vanilla method to run. In practice this shouldn't really matter for a simple mod like this, including for mod compatibility.
  • Supports more categories. The original mod supports Vegetable, Fruit and Greens (edible forage). This additionally supports Cooking, Mineral, Meat, Fertilizer, Junk, Bait, Syrup, Seeds, Flower.
  • The icon for each category is now customizable by specifying the source item in the config.json directly or through the Generic Mod Config Menu.
    • Optionally customize icons for categories that already display properly, which are Gem (fully functional but unused), Fish, Egg and Milk, for the simple reason that I wanted BIG EGGS as an icon.
  • Yoinked ko and pt translations from KhloeLeclair's BetterCrafting for (nearly) all of the above categories, added ru translation, removed other translations from the base mod as they only had one machine-translated category.

Note that this only modifies vanilla methods for displaying icons and names in recipes. Mods such as Love of Cooking and BetterCrafting entirely replace Cooking (and/or Crafting) menus. They include similar (but not identical) changes, but only for their own crafting menus. Looking at the source BetterCrafting is also supposed to fix some of the vanilla categories, but that code doesn't seem to get called. This means that the fixes from this mod will only apply in the collections tab and the vanilla crafting menus (which you can still call in BetterCrafting using the shift modifier or config file). For the sake of consistency, this mod uses the same default icons as BetterCrafting, barring Cooking and Meat icons, for which BetterCrafting uses non-item icons, and this mod uses Tom Kha Soup and Bug Steak (which isn't actual meat), which are the closest vanilla matches. Note that this mod also adds support for Bait and Syrup categories, which BetterCrafting does not support and will display with an invalid name/icon. Some of the translated names are different because I think they sound more natural (e.g. Dish (Any) vs Cooking (Any)), edit the lang files if it annoys you :^).

How to install/use

Requires SMAPI

  1. Unzip the folder containing the .dll and manifest.json into your Stardew Valley\Mods folder.
  2. Optionally change icons in the GMCM.
  3. Hover over crafting/cooking recipes that had previously unsupported category ingredients.
  4. Rejoice.

Some info on categories and why not everything is included

The original reason I even wanted a mod that fixed item category displays was to add some Content Patcher recipes that use category ingredients. While this is still useful for cooking, most of the other categories include way too many different items for them to be useful within the context of recipes without recategorizing half the items. Below is a quick summary of the included/affected categories:

  • Gem (Any) | category_gem: All Minerals listed as "Gems" (e.g. Jade) and "Foraged Minerals" (e.g. Quartz) on the wiki. Excludes everything listed as "Geode Minerals" (e.g. Jasper).
  • Fish (Any) | category_fish: All Fish (including crabpot).
  • Egg (Any) | category_egg: All Animal Products considered Eggs.
  • Milk (Any) | category_milk: All Animal Products considered Milk.
  • Dish (Any) | category_cooking: All cooked dishes. This excludes food items like Bug Steak or Joja Cola.
  • Mineral (Any) | category_minerals: All Minerals listed as "Geode Minerals" on the wiki.
  • Meat (Any) | category_meat: Quite literally nothing in vanilla.
  • Fertilizer (Any) | category_fertilizer: All Fertilizers.
  • Junk (Any) | category_junk: All Trash.
  • Bait (Any) | category_bait: All Bait.
  • Syrup (Any) | category_syrup: Maple Syrup, Oak Resin, Pine Tar and Magic Syrup. Recategorize Oak Resin and Pine Tar Objects in your content patch/mod OR use Ingredient Yeeter to ban them from matching category ingredients.
  • Seeds (Any) | category_seeds: All Seeds.
  • Vegetable (Any) | category_vegetable: All Vegetable items, including Fiddlehead Ferns, which are foraged.
  • Fruit (Any) | category_fruits: All Fruit items, including farmed, foraged and fruit tree fruits.
  • Flower (Any) | category_flowers: All Flower items, including farmed and foraged flowers.
  • Greens (Any) | category_greens: All Forage items, which includes various greens, mushrooms and, notably, Sap. Recategorize the Sap Object in your content patch/mod OR use Ingredient Yeeter to ban it from matching category ingredients.

Some other categories that could feasibly and easily be included, such as Tackle, were omitted because I'm not really sure how you would use them in a recipe. If you need them for a mod, open an issue on GitHub/write a comment/do a PR and I will add them. However, do note that certain other categories such as Crafting, Equipment, Weapons, Hats or BigCraftables were deliberately excluded due to either being too all-encompassing (Crafting, includes very diverse craftables and even some foods such as Bug Steak and Field Snack) or causing unintuitive behaviour when crafting (Equipment, which includes permanent and non-permanent tools).

Translation status for the one and a half people who care

If the language isn't listed, there are no translations at all. Contribute if needed, you can either do a PR or simply list proper translations for the supported categories in a comment/issue. Note that the the newly enabled Vegetable (Any) and Greens (Any) categories already have translated base game strings and so do Gems/Fish/Eggs/Milk, this is for every other category. GMCM strings are not translated.

  • default | English - Yeah :^)
  • ru | Russian - Yeah :^)
  • pt | Portugese - Missing Bait and Syrup
  • ko | Korean - Missing Bait and Syrup

Credits:

Source

You are looking at it.

About

A small Stardew Valley mod that fixes the way category ingredients are displayed

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages