'Invalid Manifest' my first mod

So I can’t write code but I know the slightly know how it works. I have been trying to add a new ore by copying files from another default ore and changing the code values and names.
I’ve created a folder in terrain\ui\ named the same way as the rest “blood_block” inside of it I have

{
“mixins”: “file(…/ore_block)”,
“components”: {},
“entity_data”: {
“stonehearth:catalog”: {
“display_name”: “i18n(stonehearth:entities.terrain.ui.blood_block.display_name)”,
“description”: “i18n(stonehearth:entities.terrain.ui.blood_block.description)”
}
}
}

I also made a folder in entities\resources\ and I called it blood inside it is a folder called blood_ore and inside that is a custom .qb model called “blood_ore” that is correctly mapped; a custom .png file for the GUI item called “blood_ore”; and a .json file reading this

{
“mixins”: “stonehearth:mixins:item_properties”,
“type”: “entity”,
“components”: {
“model_variants”: {
“default”: {
“models”: [
“file(blood_ore.qb)”
]
}
}
},
“entity_data”: {
“stonehearth:net_worth”: {
“value_in_gold”: 20,
“rarity”: “common”,
“shop_info”: {
“buyable”: true,
“sellable”: true,
“shopkeeper_level”: 1,
“shopkeeper_type”: “caravan”
}
},
“stonehearth:catalog”: {
“display_name”: “i18n(stonehearth:entities.resources.blood.blood_ore.display_name)”,
“description”: “i18n(stonehearth:entities.resources.blood.blood_ore.description)”,
“icon”: “file(blood_ore.png)”,
“is_item”: true,
“category”: “resources”,
“material_tags”: “stockpile_ore blood ore resource”
}
}
}

In the manifest.json I have added

  "resources:blood:ore": "file

(entities/resources/blood/blood_ore)",

and

  "terrain:ui:blood_block": "file

(entities/terrain/ui/blood_block)",

AND THAT’S ALL FALKS! I have no idea why it isn’t working. It may be because I didn’t put the mod in its own folder I just added it into stonehearth.smod directly. Someone PLEASE HELP!.

If you want to have new mining resources you need to mixinto the mining loot table or your new resource will not get they way into the game
You find the vanilla under services/server/mining/mining_loot_table.json

1 Like

Thanks,I’m just happy I got this far with very little help. How would I change the rarity of the ore? because I did see something in the ore files that read something about rarity but they where all the same so I just left it.
I think I will contact the devs to make a list of things the person need to do to make each mod. It would make modding for new people easier. Or I’ll just make the list myself.

I would appreciate a new
How to: Modding for Beginner
But if you are motivated enough you can read through the old stuff. It might be from 2015 or even earlier bit the system of modding has changed just a little. Mostly in version number of your manifest, path names and some json content.
Back in 2015 with my first modding experience it took me 3 weeks and two dozens of questions until i had a working mod in the game.
Today i think that is the right way. We all here in the discpurse will help you if there are qurstions and by reading the vanilla jsons you will learn much on your own.
But i dont think it is possible to watch 15min in youtube and start modding. It is an ongoing process of learning, doing and often failing and a lot of asking.
So just stay on it and go on.

1 Like

Ore is defined by drop chance in mining dirt, stone and veins. Just open the json i mentioned above and you will see. In the mining loot table every mined block is a roll on the table. The chance is the value out of the sum of all drop values. So if your mixinto ore has a value of 1000 and the sum of all values is 10000 it is 1 of 10 is your ore, which would be very high.

For writing a mixinto in your manifest look into other manifests of mods or use the search function of the discourse

“Typos are made by mobile phone”

ok. I did what you said and I added it to the mining_loot_table.json but it still isn’t working.

{
   "type": "index",
   "mineable_blocks": {
      "grass": {
         "entries": {
            "default": {
               "num_rolls": 0,
               "items": {
                  "none": {
                     "uri": "",
                     "weight": 100
                  }
               }
            }
         }
      },
      "dirt": {
         "entries": {
            "default": {
               "num_rolls": 1,
               "items": {
                  "none": {
                     "uri": "",
                     "weight": 100
                  },
                  "hunk_of_stone": {
                     "uri": "stonehearth:resources:stone:hunk_of_stone",
                     "weight": 1
                  },
                  "clay_mound": {
                     "uri": "stonehearth:resources:clay:clay_mound",
                     "weight": 1
                  }
               }
            }
         }
      },
      "rock": {
         "entries": {
            "default": {
               "num_rolls": 1,
               "items": {
                  "none": {
                     "uri": "",
                     "weight": 10000
                  },
                  "hunk_of_stone": {
                     "uri": "stonehearth:resources:stone:hunk_of_stone",
                     "weight": 200
                  },
                  "copper_ore": {
                     "uri": "stonehearth:resources:copper:ore",
                     "weight": 40
                  },
                  "tin_ore": {
                     "uri": "stonehearth:resources:tin:ore",
                     "weight": 40
                  },
                  "iron_ore": {
                     "uri": "stonehearth:resources:iron:ore",
                     "weight": 28
                  },
                  "lump_of_coal": {
                     "uri": "stonehearth:resources:coal:lump_of_coal",
                     "weight": 28
                  },
                  "silver_ore": {
                     "uri": "stonehearth:resources:silver:ore",
                     "weight": 20
                 },
                  "blood_ore": {
                     "uri": "stonehearth:resources:blood:ore",
                     "weight": 20
                 },
                  "gold_ore": {
                     "uri": "stonehearth:resources:gold:ore",
                     "weight": 10
                  }
               }
            }
         }
      },
      "copper_ore": {
         "entries": {
            "default": {
               "num_rolls": 1,
               "items": {
                  "none": {
                     "uri": "",
                     "weight": 100
                  },
                  "ore": {
                     "uri": "stonehearth:resources:copper:ore",
                     "weight": 50
                  }
               }
            }
         }
      },
      "tin_ore": {
         "entries": {
            "default": {
               "num_rolls": 1,
               "items": {
                  "none": {
                     "uri": "",
                     "weight": 100
                  },
                  "ore": {
                     "uri": "stonehearth:resources:tin:ore",
                     "weight": 50
                  }
               }
            }
         }
      },
      "iron_ore": {
         "entries": {
            "default": {
               "num_rolls": 1,
               "items": {
                  "none": {
                     "uri": "",
                     "weight": 100
                  },
                  "ore": {
                     "uri": "stonehearth:resources:iron:ore",
                     "weight": 50
                  }
               }
            }
         }
      },
      "coal": {
         "entries": {
            "default": {
               "num_rolls": 1,
               "items": {
                  "none": {
                     "uri": "",
                     "weight": 100
                  },
                  "lump_of_coal": {
                     "uri": "stonehearth:resources:coal:lump_of_coal",
                     "weight": 50
                  }
               }
            }
         }
      },
      "silver_ore": {
         "entries": {
            "default": {
               "num_rolls": 1,
               "items": {
                  "none": {
                     "uri": "",
                     "weight": 100
                  },
                  "ore": {
                     "uri": "stonehearth:resources:silver:ore",
                     "weight": 50
                  }
               }
            }
         }
      },
      "blood_ore": {
         "entries": {
            "default": {
               "num_rolls": 1,
               "items": {
                  "none": {
                     "uri": "",
                     "weight": 100
                  },
                  "ore": {
                     "uri": "stonehearth:resources:blood:ore",
                     "weight": 50
                  }
               }
            }
         }
      },
      "gold_ore": {
         "entries": {
            "default": {
               "num_rolls": 1,
               "items": {
                  "none": {
                     "uri": "",
                     "weight": 100
                  },
                  "ore": {
                     "uri": "stonehearth:resources:gold:ore",
                     "weight": 50
                  }
               }
            }
         }
      }
   }
}

Considering you added the correct alias, that file is ok and it should work. Maybe you are not seeing it because you made it as rare as gold… Try adding a super ridiculous high value, so there is no doubt it is indeed working.

1 Like

You ought to try out the discourse code-formatting feature. It helps with the readability of code sections like the JSON you are posting. :merry:

Check out this handy post:

Best regards,
illdred

3 Likes

ok, I will try this but I am unsure about what value you are telling me to chance, remember I dunno how to write code and this is my first mod.

              "blood_ore": {
                 "uri": "stonehearth:resources:blood:ore",
                 "weight": 20
             },

The weight. Change it to 100000 for example. This will ensure that if it is working, any stone you mine will drop it. Else it could be working but you were just unlucky with your mining. This way you can remove that doubt.

ok I will try this right now

OH WOW! that is really strange. my Hearthlings where mining and it looked like I was getting nothing from it but then they started walking back holding somethings that was invisible and when I checked my inv there it is with a broken name but the right texture even though the entity had no texture ingame.

Probably it has a wrong *.qb model file or a wrong file path to it.

if you look at the code in the original post it is referencing the correct file, OHHH I see the issue. I created the model correctly but when I opened it it is just a transparent square. dunno why it looks like that at all cus I used CubikStudio and I exported it with the correct texture but it is just showing nothing.

i tried recreating the model but it is still nothing. I don’t know why this is happening.

I went into the website of this cubik studio, it seems it can do a lot of thing. So it is probably something with the save settings.

I saved it as a .qd as I should

But a .qb file has multiple properties. For example, some files have the y axe as the vertical axe, while others have the z axe. There is also optimizations that can be done to the files and so on. And many of this things are not accepted by the game.

For example, in VoxelShop, another voxel editor, there is this screen option with all the saving parameters:


As you can see, some options like compression or visibility mask should be disabled or it will not work.

I have no idea how this software you are using works, what options it has and what is the default it is saving for you, sorry. It is possible that maybe it can’t save the way the game needs? Not sure. You will need to look in there.