Mod doesn't work

Hey, i have a problem with a small Mod i tried to make. Im really a Newbie in Coding so please don’t be too frustrated :smiley:

I tried to upload my .smod file to the Mods and in the game i get this error.

Its my first try in programming so im a little bit confused about this error. Copied the code from the example files…

{
"info" : {
   "name" : "HomeSweetHome",
   "version" : 1
  },
  "default_locale" : "en",
  "aliases" : {
    "herbalist_library" : "file(entities/furniture/herbalist_library/herbalist_library.json)"
  },
  "mixintos" : {
    "/stonehearth/jobs/herbalist/recipes/recipes.json" : "file(mixins/herbalist_recipes.json)"
  }
}

Here is also the entire Mod file… maybe someone can help me to find the Problem. Its only a basic version.

HomeSweetHome.zip (30.8 KB)

Make sure the version is 3. That version is the stonehearth modding api version, not the actual mod version.

You mean the version line in the “info”?

i changed this one in 3 but the game gives me the same error “invalid manifest” :sweat:

Ok, I’m downloading it to check.

Edit: you have two folders inside the zip.

You have __MacOS and inside it you have HomeSweetHome.

As I posted on the other topic, you should have a main folder and files inside it, not a folder inside another like you have now. If you put that __macos folder in your mods folder the game will not see it. And if you zip it and rename the zip to .smod it will not work, for the same reason.

Besides that, in your manifest you are trying to add a file from a path that does not exist.
"/stonehearth/jobs/herbalist/recipes/recipes.json" : "file(mixins/herbalist_recipes.json)"
there is no folder called mixins in your mod

Thx for checking it… it seems that the two folders are automatically created when im zipping the file on my mac :confused:

Trying to eliminate this folder

and thx for checking also the other code! changed the “mixins” to “recipes” hope this will work

I tried it again but always the same Error Message :frowning:

Tried also to zip the file on my windows but doesn’t work…

This are the folders that i tried to zip and convert to a .smod but it sems that im doing it wrong

The Folders

Upload your new mod here to check it.

i posted this one in the wrong place. sorry my mistake @BrunoSupremo

ok i found a way to make it work… but there are many other problems for now in this mod. for testing it here is the smod file homesweethome.zip (23.8 KB)

after crafting my object this error message pops up

I think a problem with my qubicle exportation. but also for this i used a tutorial to make it work

just a first thing:
First:
Your Mixinto for the herbalist recipes is wrong because it must have the same naming
(and paths ?)

like this:
“stonehearth/jobs/herbalist/recipes/recipes.json”: “file(jobs/herbalist/recipes/recipes.json)”,
(i nearly always use long path writing)
Try to stand by the original folder structure and naming when you use mixintos then you will have less errors

Second:
Your aliases in the manifest should be better. Look up the original stonehearth manifest to se the categories and the sub categories.
i do it like this
"aliases": {
“armor:silver_circlet”: “file(entities/armor/silver_circlet)”,

The error you have can be from the qb you made but i had that one just from naming typos

Yes, it is a .qb problem. I opened the files and resaved them and it worked. Though I do not use Qubicle, so you will need to see what setting are needed there.

Yes in the new smod-file i changed this :smiley:

And thx for the tip with the aliases. try to find something better

Ok thx Bruno! Try to find the right exporting settings :smiley:

Last question. I noticed that my created furniture was added above all crafts without a title displayed in the herbalist crafting menu. maybe its because the herbalist doesn’t craft furnitures but how i can add this category to the herbalist crafting menue?

Yes, you put the item in a category that does not exist. To create one you can check other recipes files. For example, the carpenter recipe list:

{
   "craftable_recipes": {
      "workbenches": {
         "ordinal": 1,
         "name": "i18n(stonehearth:jobs.carpenter.recipes.workbench_name)",
         "recipes": {
            "carpenter_workbench": {
               "recipe": "file(carpenter_workbench_recipe.json)"
            },
            "carpenter_toolbench": {
               "recipe": "file(carpenter_toolbench_recipe.json)"
            }
         }
      },

To have the workbenches category, it needed an ordinal (the order of who goes on the top of the list) and a name (to be displayed), then the recipes in it.

I think you can simple add those two missing bits to your recipe file and it will work in game.

Now its working :smiley: thanks for your help! I have to make some code optimizations but its a good start xD

5 Likes

Oh! Shame i couldn’t help you on this!, though it seems like you managed to fix it thanks to others

Cool looking furniture though! Can’t wait to see them in-game

1 Like

Ah thx Hyrule_Symbol :slight_smile:
Im planning to add some more furnitures and decorations in this Mod. First version only for the Herbalist :wink:

Maybe i need some help later too ahahahhaah :smiley:

No problem we are here and watching your progress :grinning:
The bookshelf is nice

1 Like

I changed something and everything stops working :frowning:

i can’t understand why the recipes aren’t visible in the Herbalist Craft screen. And why locales data can’t be read…

added this mod on my Github. Maybe someone can help me to solve this stupid problem

hello :
error :
typo in bookshelf.json
typo in bookshelf_ghost.json
–> “display_name”: “i18n(homesweethome:jobs.herbalist.entities.furniture.bookshelf_ghost.name)”,

to “display_name”: “i18n(homesweethome:jobs.herbalist.entities.furniture.bookshelf_ghost.display_name)”,

in small_jar_ghost.json
"description": “i18n(homesweethome:jobs.herbalist.entities.containers.small_jar_ghost_ghost.description)”,

—>
“description”: “i18n(homesweethome:jobs.herbalist.entities.containers.small_jar_ghost.description)”,

in small_jar_recipe.json
"description" : “i18n(homesweethome:herbalist.recipes.lsmall_jar.description)”,

–>
“description” : “i18n(homesweethome:herbalist.recipes.small_jar.description)”,

in en.json
"small_jar_ghost" : {
“description” : “Small but fine container.”,
“name”: “Small Jar”
},

–>
“small_jar_ghost” : {
“description” : “Small but fine container.”,
“name”: “Small Jar”
}

–> remove one } at the end of file

and the “entities”: { … need to go after “recipes”: { so check the order

Ahh thx… so many typo errors :confused:

Never code when you are busy… But i still have the problem that some bugs make the mod don’t work properly :confused: really don’t understand why