[Solved] Game won't start with mod

I have created a custom item and weaver recipe to practice basic modding, but when I tried to open the game nothing happened. As far as I’m aware I followed all the instructions. I opened the log file and got this message:

2014-Aug-10 16:46:34.486990logger initialized
2014-Aug-10 16:46:34.486990 | 1 | app | Stonehearth Version
2014-Aug-10 16:46:34.830191 | 1 | resources | error looking for manifest in stonehearth: invalid file path ‘stonehearth/manifest.json’.
2014-Aug-10 16:46:34.830191 | 1 | resources | error looking for manifest in stonehearth_mod: invalid file path ‘stonehearth_mod/manifest.json’.
2014-Aug-10 16:46:34.830191 | 1 | app | Running Stonehearth server on port 62013

Can you explain what you did exactly (especially if you have created new folders and moved existing ones)? It seems like you have done something with the manifest.json file which you should not have done ;-).

Here’s what I did:

  1. Created entities/furniture sub-folder containing 2 .qb, 3 .json, and a .png for the new item
  2. Added recipe to weaver recipes folder and to the recipes.json file
  3. Added one line to manifest.json for the item

Can you post the line you’ve added to the Manifest.json? Best with the line before and that one after.

Here it is:

“geranium_hanging” : “file(entities/furniture/simple_hanging/geranium_hanging.json)”,
[blank line]
“uk_flag” : “file(entities/furniture/uk_flag/uk_flag.json)”,
“green_hanging” : “file(entities/furniture/simple_hanging/green_hanging.json)”,

edit: to clarify, “geranium_hanging” and “green_hanging” were already there in the file before I added my item.

file is assuming them to be in the same folder, which isn’t the case. Either use /stonehearth_mod/entities/furniture/... or write them into the stonehearth_mod/manifest.json, which is a more proper way to do it.

@RepeatPan All of the other entities in the manifest use file, so surely the custom item can as well?

edit: stonehearth_mod is just the stonehearth.smod folder before it was zipped and turned into .smod

Yes, if you use it properly. “file()” is a “magic function” that works relative to wherever it was written in. I’ve written a description of it long ago:

Sadly, Steve messed it a bit up and used the not-quite-so-clear version. To validate your paths and all that stuff, you can use

which would tell you that the files “/stonehearth/entities/furniture/…” do not exist.

Also, of course you will run into trouble if you keep both the .smod and the directory and especially if you rename them. The game will prefer .smods over directories and if you have a stonehearth_mod/ and a stonehearth.smod, it will load both - which is a bad thing (and won’t do what you expect either).

Use either or the other, rename the stonehearth.smod to something like stonehearth.smod.disabled. In any case, use Jofferson to validate your installation - it will tell you what’s wrong.

This is the location of the two files:
Manifest location: stonehearth/manifest.json
Item location: stonehearth/entities/furniture/uk_flag/uk_flag.json

So surely file(entities/furniture/uk_flag/uk_flag.json) should work when it is written in the manifest?

Yepp, this should work, although the /uk_flag.json is not necessary. Use Jofferson, it can probably give you a better idea than we can.

Jofferson said this:

Click on the big red “1” next to “Errors”. Also, you need to have a mod called “stonehearth” if I’m not mistaken - some hardcoded magic there.

The huge issue I think here is that your trying to mod the stonehearth.smod. It’s so much easier to make your own mod folder and mixinto the recipe files for the crafters. So you can’t just take the stonehearth.smod and rename it because like @RepeatPan said the game is hardcoded to require that on launch.

OK. It said “manifest missing”. I looked into the files and it was like this: stonehearth\stonehearth\[all the files] when it should normally be: stonehearth\[all the files]

At least I think that is the problem.

Edit: By the way, I have a back-up of the original stonehearth.smod file so I can still play by using that.

Problem solved!

This was indeed the problem. I have got it to work now.
Thank you all for your help!

@Avairian From now on I think I will use a separate folder with mixintos as you suggest. That sounds much easier.