I need help with modding - recipes don't show up

Hey guys,
I’ve recently bought Stonehearth. I’ve tried to create an armor which makes my workers super fast and as good as invulnerable. This should already work. The thing is I can’t craft the armor in a normal game. I added a recipe but it doesn’t work. Could some of you take a look at it and tell me what is wrong?

Dropbox

Thanks in advance!

Hey there @Zottelchen!

So there is a couple of problems in bloodarmor_recipe.json; which is easily fixed by replacing “stonehearth” with “bloodarmor”.

Pretty much the problem was that you were looking for the alias “worker:outfit:bloodarmor” in the stonehearth mod; which exists for your mod, so it has to look something like this instead: “bloodarmor:worker:outfit:bloodarmor”. The same problem exists for “portrait” (in the same file); so, again, change from “stonehearth” to “bloodarmor”.

I didn’t try it out myself but I think that’s what missing, let us know if you have any more problems! :smile:

2 Likes

Thanks for helping out @Drotten .
I fixed the mentioned error but it still doesn’t work.

bloodarmor_recipe.json now looks like this:

{
   "type":"recipe",

   "work_units"  : 1,
   "recipe_name" : "Blood Armor",
   "description" : "Holy shit!",
   "portrait"    : "/jobs/worker/bloodarmor/bloodarmor.png",
   "level_requirement" : 0,

   "ingredients": [
      {
         "material" : "wood resource",
         "count" : 1
      }
  ],
  "produces": [
      {
         "item":"bloodarmor:worker:outfit:bloodarmor"
      }
  ]
}

I also fixed an error in bloodarmor.json (reference to the selfmade buff was wrong too…)

"portrait" : "/jobs/worker/bloodarmor/bloodarmor.png"

Change this to

"portrait" : "/bloodarmor/jobs/worker/bloodarmor/bloodarmor.png".

So SH will know that it’s looking for the file bloodarmor.png in your bloodarmor mod (otherwise it’s looking for that file in the jobs mod).

But that only fixes the icon of the recipe, it should still work properly. When testing out your mod, did you load a saved game or start a new game?

3 Likes

Thanks again @Drotten
I tried to use an saved game, but when I start a new game it works. Thank you very much.

1 Like

Glad to see it working!

One piece of advice: if you wanna release the mod for the public; best to use more family friendly descriptions. :wink:

1 Like

Thanks for the advice @Drotten, but it is just for my personal use :slight_smile: The mod is too unbalanced to publish^^ Also do you know if I can assign multiple roles to armor like worker,blacksmith,trapper or do I have to create an armor for each?

That’s ok too, yeah it’s a bit unbalanced but it’s up to the player what he/she wants to do. :smile:

you can easily do this! In bloodarmor.json: just add all the jobs under “roles,” with a space inbetween each job. So for worker, blacksmith and trapper it would look something like this:

         ...
         "roles" : "worker_job blacksmith_job trapper_job",
         ...

This is how each hearthling knows that the equipment is for them.

1 Like