Need help setting up for modding

right now im trying to script a mod. im making everything i can an just taking pieces of the game and changing them slightly so i can implement them. right now im having just hell getting things to work. I just want to be able to see the files that the error is talking about. I think its decoda i use to run the game to do this but im not sure how to setup and run the lua scripts to start doing this. right now im just stuck closing the program repeatedly editing a line and reoping it over and over and over. this is the error im looking at. and i just need to know the tools i need to go about fixing it in real time. just something that can point me to where the error is coming from in my files. please please please someone help me with this. Im brand spanking new and im just trying to set it all up to work fluidly.

Well, Decoda can be used for putting break points into Lua scripts to see assigned variables and what have you the same way chrome developer tools does for js. While helpful for Lua debugging, not what you’re looking for in this case.

Your error is in a json file. From your screenshots, you are referencing bunny_quest:wars_sword somewhere (99% sure it’s your recipe file), but the way it needs to be referenced based on your manifest is bunny_quest:weapons:wars_sword.

Whenever you get the <mod> has no alias named <reference> in the manifest error, it means you are calling a uri somewhere that hasn’t been declared in the manifest, usually the result of a typo.

1 Like

literally about to do that when stonehearth stoped working with my manifest. it refuses to open now when i put my manifest in the bunny_quest folder

If you want zip the folder for your mod and post it here, I can look at it and see what’s wrong.

I got it back working again. it was the locales en file i just deleted it. now im kind of at this point where i can add them in the game and they work on the stamp. the sword is even equipped and used but now i cant craft either of them.

Alright, let’s start by talking about uri’s. URI is short for Uniform Resource Identifier. Google can go more in depth about it’s concept, but in layman’s terms it’s shortcut that you name, and that is what you do in your manifest. Stonehearth handles them <mod_name>:<reference_name>. In your manifest you declare them "<reference_name>" : "file(path/to/file)", and your mod_name is set in the info section of the manifest "name" : "<mod_name>.

Currently, you have your manifest references:

      "bunny_quest:weapons:wars_sword" : "file(entities/weapons/wars_sword/wars_sword.json)",
      "bunny_quest:weapons:wars_sword" : "file(entities/weapons/wars_sword/wars_sword_iconic.json)",

So as is, the bunny_quest part is redundant, or what the game is looking for is bunny_quest:bunny_quest:weapons:wars_sword. So your first step is to remove bunny_quest: from your entries.

Second, the file path for entities only need to point to the folder, not each json file. The game will load wars_sword.json automatically when you point to file(entities/weapons/wars_sword), and wars_sword.json tells the game to load wars_sword_iconic.json here: (so no need to manifest it)

  "stonehearth:entity_forms": {
     "iconic_form": "file(wars_sword_iconic.json)"

After this, the aliases section of your manifest should look like:

      "weapons:wars_sword" : "file(entities/weapons/wars_sword)",

Next lest look at wars_sword_recipe.json

"produces": [
         "item": "stonehearth:weapons:wars_sword"

From what we discussed already, the game is looking for weapons:wars_sword in the stonehearth manifest. But it’s not there, it’s apart of your mod, so we need to tell the game to look at your manifest. Change stonehearth to bunny_quest

We also need to fix the legends_tome_recipe.


You defined it as furniture:legends_tome so it needs to be changed to "bunny_quest:furniture:legends_tome"

Once we fix that, we’re still throwing an error because in your manifest mixintos, you’re calling a file that doesn’t exist.

   "stonehearth/jobs/carpenter/recipes/recipes.json" : "file(jobs/carpenter/recipes/recipes.json)",
   "stonehearth/jobs/blacksmith/recipes/recipes.json" : "file(jobs/blacksmith/recipes/recipes.json)"

At a glance it looks right, but if you look at the actual file structure of your mod, there is no recipes folder in the carpenter directory. (There is in the blacksmith directory, and it’s fine). To fix just create a new folder recipes in your carpenter folder, and move you json files into it.

##We’re getting closer!
Item’s are showing up in the game now, but:

The portraits aren’t displaying. This is apart of the recipe files, and your file paths are off.
"portrait":"/bunny_quest/entities/legends_tome/legends_tome.png", is missing the furniture folder in the path
"portrait": "/stonehearth/entities/weapons/wars_sword/wars_sword.png", is pointing to stonehearth instead of your mod.

Once all of that is fixed, congratulations, you have your first working mod. Let me know when you get a grasp on this part, and then we can talk about how to do your locale file, and your items render scaling and collision shapes.


i followed eveything to point but during one of the saves the mod refuse’s to load into stonehearth now

Did you commit your changes to github?

Here, you can run a compare between your files and mine. (26.0 KB)

thank you very much. i got rid of the most of the code before the zip but there was a few things like commas and useless text in files. it all works now thank you so much. i can now take an hour nap before work XD i understand the manifest alot more now. and how the code is put together. I cant believe i forgot to put the tome in a fold. that explains why it was never showing up. I had alot working at one point for both of them seperatly but when i put them together all hell broke lose. XD thank you so much again. the stuff may seem abstrange and op for the game at the moment but it’s just small pieces to the puzzle at the moment. thank you so much again.

uploaded the fixed version now. thank you again. your help is valued immensely by me. This is a first time modding for me. I was told its a modders dream game. so i figured id give it a crack. seemed so easy after i recolord a tree XD. man was i ever in for a surprise. thank you again. i now have something to work off of for the next 3 items before things get interesting again

it only took like 15 mins to code in a second weapon and 10 mins to voxel it. Nice. TY!

1 Like