Finally started modding and ran into a minor issue

Hey guys, I finally started getting into modding and ran into a minor issue where the name and description of the object is not displaying right

and here is my code

sample_object.json
{
“type” : “entity”,
“components” : {
“//” : “the composition of the entity also no comments allowed in model_variants because it will try to iterate the comment”,
“model_variants” : {
“default” : {
“///” : “but comments are allowed in here”,
“//” : “this will be the default array of models”,
“models” : [
“file(sample_object.qb)”
]
}
}
},
“entity_data”: {
“stonehearth:catalog”: {
“//” : “name and description are located in …/locales/en.json”,
“///” : “format i18n\(modname:folder.objectname.property)”,
“description” : “i18n(test_mod:entities.sample_object.description)”,
“display_name”: “i18n(test_mod:entities.sample_object.display_name)”,
“icon” : “file(sample_object.png)”
},
“stonehearth:appeal”: {
“appeal”: 10
}
}
}

manifest.json
{
“info” : {
“//” : “information about the test_mod”,
“name” : “test_mod”,
“namespace”: “test_mod”,
“version” : 3,
},

“aliases” : {
“//” : “name of object and file path from the same directory as the manifest”,
“sample_object” : “file(entities/sample_object/sample_object.json)”
},

“mixinto” : {
“//” : “how your mod interacts with the main stonehearth mod (files that you create that are merged with the existing files in the stonehearth mod”,
}
}

en.json
{
“entities”: {
“sample_object”: {
“description”: “Sample description.”,
“display_name”: “Sample Object”
}
}
}

I am extremely new to this stuff so bare with me please. I am following the reference mod video from awhile back and had to make some slight changes, but it still appears I am missing something. could someone point it out.

1 Like

For the locales to work, you need to add it to your manifest as this:

"default_locale": "en",
1 Like

thanks man!

I got another problem maybe you can solve, I am doing the tutorial Stephanie did awhile back but it seems some stuff with recipes are a little different now is there something I am missing which is why the recipe is not appearing

manifest.json

{
“info” : {
“//” : “information about the test_mod”,
“name” : “test_mod”,
“namespace”: “test_mod”,
“version” : 3,
},
“//” : “the language file you are getting your data (object names and descriptions)from”,
“///” : “in this case the english language file”,
“default_locale”: “en”,

“aliases” : {
“//” : “name of object and file path from the same directory as the manifest”,
“sample_object” : “file(entities/sample_object/sample_object.json)”
},

“mixinto” : {
“//” : “how your mod interacts with the main stonehearth mod (files that you create that are merged with the existing files in the stonehearth mod”,
“///” : “file path of file you are mixing into : file you are going to merge into carpenter recipes”,
“/stonehearth/jobs/carpenter/recipes/recipes.json” : “file(recipes/recipes.json)”
}
}

sample_recipe_1.json

"type" : "recipe",
"//" : "amount of animations played",
"work_units" : 2, 
"effort" : 20,
"recipe_name" : "i18n(test_mod:recipes.sample_recipe_1.recipe_name)",
"description" : "i18n(test_mod:recipes.sample_recipe_1.description)",
"flavor" : "i18n(test_mod:recipes.sample_recipe_1.flavor)",
"///" : "full path when it has to leave out the folder and go into another one",
"portrait" : "/test_mod/entities/sample_object/sample_object.png",
"workshop": "stonehearth:carpenter:workbench",
"level_requirement" : 0,
"ingredients" : [
  {
     "material": "wood resource",
     "count": 1
  }
],
"produces" : [
	{
		"item" : "test_mod:sample_object"
	}
]

recipes.json

"//": "have every object in the hierarchy that is required for merging of where you want the recipe to be and require",
"///" : "will merge the denoted objects",
"////" : "category then object of recipes then recipe name then where it is from",
"craftable_recipes" :{
	"furniture" : {
		"recipes" : {
			"sample_recipe" : {
				"recipe" : "file(sample_recipe_1.json)"
			}
	    }
	}
}

You pointed in your manifest to a recipes.json, while your file is called recipe.json

And all json files starts and ends with opening and closing brackets {}. Everything must go inside those “master” brackets.

Else, you can check your stonehearth.log file where most errors are logged for a clue of what is happening, or check the base game as a more accurate template.

1 Like

also I forgot an ‘s’ after mixinto, should be mixintos. Thanks for the help!