Mod programming help thread for Azhrak

I don’t have time before work to really look at it in depth, but in the mason recipes file try using the absolute path instead of the file() one to see if it works.

Edit: Looking at it again your using ordinal 5 for your new item category which is already in use for the signage_decoration category. Try changing it to a higher number

I’d also suggest emulating stonehearth.smod folder system. It makes it a lot easier to work with paths if the paths within the mods are almost exactly the same.

I found one typo problem in the manifest:

"mixintos" : {
       "/stonehearth/jobs/mason/recipes/recipes.json" : [
          "file(mixins/mason_recipes/recipies.json)"
        ]
}

Change this to:

"mixintos" : {
       "/stonehearth/jobs/mason/recipes/recipes.json" : [
          "file(mixins/mason_recipes/mason_recipes.json)"
        ]
}

Basically you were looking for the file recipies.json while its true name is mason_recipes.json.

I haven’t tried it but I imagine it would work after that change.

1 Like

Yeah I did try it that way but it didn’t work so I changed it to just recipes.json

Did you make the change that @Avairian suggested?

I didn’t get what he meant by absolute, like is that the full file path e.g. stonehearth/jobs/class/recipes

Yeah, that would be the absolute path to the recipes folder in the SH mod. But the change you need to do is from

"recipe" : "file(/recipes/stone_armor_statue_recipe.json)"

to

"recipe" : "/extended_crafting_mod/recipes/stone_armor_statue_recipe.json"

EDIT: This way you have the absolute path to that specific json file. Using file() instead of this would look for a file from the same folder or and subsequent ones. But if you have to go up one folder to find a file, it’s better to use the absolute path.

1 Like

The download I provided works just fine, refer to it and you should be fine.

Overall there are still various things wrong with the new download you provided.

Change what @Drotten has point out.

In your recipe file

"portrait"    : "extended_crafting_mod/entities/stone_armor_statue/stone_armor_statue.png", 

to

"portrait"    : "/extended_crafting_mod/entities/stone_armor_statue/stone_armor_statue.png",   

"material" : "stone_resource",

to

"material" : "stone resource",

"item":"/extended_crafting_mod/entities/stone_armor_statue/stone_armor_statue"

to 

"item":"/extended_crafting_mod/entities/stone_armor_statue"

In your mason_recipes.json

 "recipe" : "file(/recipes/stone_armor_statue_recipe.json)"     

  to

 "recipe" : "file(../../recipes/stone_armor_statue_recipe.json)"
1 Like

Whats the … on “recipe” : “file(…/…/recipes/stone_armor_statue_recipe.json)”

These are used to move up to the parent folder. So there it’s moving up two folders, then going into the recipes folder and finally pointing to the actual recipe file.

I hope this makes sense. :stuck_out_tongue_winking_eye:

Okay, so I did all that, only to find out it didn’t work, does it matter where I place the mod file? I have been placing it in the mixins folder the stonehearth.smod file.

You can just have it as a folder there, this way you can make easy changes to your mod if there’s something wrong.

EDIT: hmm I somehow made an edit to this post, and overwrote everything, instead of making a new one…

1 Like

Do I have to compress it into a smod file or just place the folder in.

You can leave it just as a folder, put it right into the “mods” folder

@Drotten LOL Thats funny :wink:

1 Like

So I placed it into the mods folder, that didn’t work.
I have changed everything as you have said. I guess I will re upload the mod again and see if there is any more problems.

Why isn’t this working.

There’s a typo in the manifest.

Change “mason.recipies.json” to “mason_recipes.json”.

1 Like

Surprise, surprise. Still not working.

Hmm…

What does the log file say? IIRC SH makes a log if it fails to find a json file.

I’m not getting any log files.

There should be a stonehearth.log file in your installation directory.

Ah, found it
Theres a lot I have to go through.