Fine Items, Recipes, and Minor Annoyances

Hello everyone,

I am attempting to make a mod which expands on the “fine items” system. For my first item, I pretty much made a slight recolor of the Stone Garden Lantern. I’ve figured out quite a bit of how things work with JSON, MagicaVoxel, the Debug Mod, and using vanilla and sample mod assets as a guide.

As a result I have an actual lantern that I can cheat into the game. The iconic and ghost versions work just fine. So here are the issues I’ve come across:

  • I’ve attempted to use a locales en.json file for names and descriptions. The idea is that should the mod “catch on”, then it could easily be updated to other languages. However the names in game all display as “long.name.with.a.lot.of.dots.in.them” How do I link the item json to the locales json?

  • The item (icon, ghost, and actual) all align and place correctly. Thank you to the debug tools I was able to ensure everything centered properly. However, when I designate the item to be picked up or moved, the arrows are floating off to the side of the item.

  • Finally, the whole purpose of this mod would be to add fine items to existing items. When I try to mixinto the recipes, I merely get an error. Is there a way to add an item to or replace an existing recipe? An example of this would be the Wooden Garden Lantern recipe with lists both the normal and fine version in the produces section.

Thank you so much for your help in this.

I’ve done some work on this to figure things out a bit.

I fixed the centering issue by switching to Voxel Shop and correcting the model there. This has worked for both the iconic and placed/ghost models with very minor mob values to adjust for fine tuning.

I’ve given up on the locales files. Instead I’ll just put the names and descriptions in the item jsons.

I haven’t been able to get the item to appear as a fine version of the lantern. Still looking to replace the original recipe or somehow amend it.

Also, my icon displays in the “all Inventory” list, but it does not in the placeables items list. Instead I show a larger than normal blank area with a number below it in the list.

Again any help would be appreciated. Thank you.

What problems are you having with locales?
Do you add the en.json file to your manifest?
Are you sure you have the right string calling the correct text?
Adding text should be really simple. What exactly happens when you try?

This I did not do. How do I add it?

by adding "default_locale": "en", to your manifest underneath the "info"part but above the aliases part, like this,

{
    "info": {

        "name": "mod_name",
        "version": 2
    },

   "default_locale": "en",

    "aliases": {

        "placeholder:placeholder_entity"   : "file(entities/placeholder/placeholder_entity/placeholder_entity.json)",
    }       
}

at least that’s how it worked when i last touched the localization stuff

hope that helps :slight_smile:

This, plus me being a bit more consistent with my naming conventions (oops), has corrected the issue with locales.

This issue with the missing icon is because I inadvertently deleted the icon info from the ghost json. (It is back, and working now).

That means I now have a 100% working fine lantern that functions as normal…

Except,

How can I add it to the existing recipe so that a fine version gets made?

so you need to add this line, "fine": "example_entity:example:example_entity:fine", in the “produces” part of the recipe, like this,

   "produces": [
      {
         "item": "example_mod:example_entity:example:example_entity",
         "fine": "example_mod:example_entity:example:example_entity:fine"
      }
   ]

if the fine version is for an already existing stonehearth recipe, you’ll need to override the old recipe, overrides go in the manifest much like mixintos,

{

   "info" : {

       "name" : "example_mod", 
      "version" : 2
   },

   "default_locale": "en",
   
   "overrides": {

      "stonehearth/jobs/carpenter/recipes/example_recipe.json" : "example_mod/jobs/carpenter/recipes/example_recipe.json"

   }
}

the first line is the path to the stonehearth file you want to override, the second is the path to your mods file that you want to override the original with.

Note: you might not need to override the original, but i never found a way to do it otherwise when i last made fine items for stonehearth items

hope that helps/makes sense :slight_smile:

Couldn’t you make this using mixinto? For example, with my biomes, I need to insert the biome into the list of biomes that the game will read from, like this:

"mixintos" :  {
	"stonehearth:biome:index": "file(data/biome/index.json)"
},

My index.json, is just another entry with my biome in it, that will be added to the original list index that have temperate and desert already.

1 Like

you probably can, but last time i tried i couldn’t get it to work, though i probably had messed something up…

I think it should work if he mixinto the recipes his file with this content:

{
   "produces": [
      {
         "fine": "your_mod:decoration:your_fine_item"
      }
   ]
}

If it didn’t work, maybe it is because of the array? (square bracket) In that case we would need that “mixintype_given_names”:“override” as explained here: [A17-3008] Overrides in mixintos

1 Like

I actually tried this with a mixinto, and it would not work.

Instead I used the override method and it did work. Here is my manifest:

{
  "info" : {
    "name" : "fine_items",
    "version" : 2
  },

 "default_locale": "en",

 "aliases" : {
   "decoration:stone_garden_lantern:fine" : "file(entities/decorations/stone_garden_lantern_fine/stone_garden_lantern_fine.json)"
 },
 "mixintos" : {
   "stonehearth/jobs/mason/recipes/recipes.json" : "file(jobs/mason/recipes/recipes.json)"
 },
 "overrides" : {
   "stonehearth/jobs/mason/recipes/stone_garden_lantern_recipe.json" : "fine_items/jobs/mason/recipes/stone_garden_lantern_fine_recipe.json"
 }
}

Thank you again for all of your help. Now that I have it working I can continue adding new items to it.

To maybe help clarify:
A straight mixinto (using your code example) would add the fine entry to the recipe; Using "mixintype_produces" : "override" would replace whatever is currently in the produces section with only the fine entry. Which route depends on what you’re trying to accomplish.