(help)Need the lastest(a14) tutorial for adding mining resource

im making the usual mining resource but im getting sceptical since im not seeing any new tutorials about it so the question is

1.is it the same as alpha 13?
2.what files needed?

i cant say, havent attempted anything with ores since sometime around A11, so im going to page our lovely modding support, @Drotten, for this :slightly_smiling:

i found the tutorial for a13 i followed that but i dont know it worked since i cant find a vein or even a spawn of the ore when mining

Hey @ACEXHUNT, do you mean this tutorial by phector2004?

Yes it’s a bit outdated now. The files that the tutorial are pointing at are correct though, but the files themselves have undergone some changes since the tutorial was made. I haven’t, for this alpha, really looked at how to make ore veins, but for simply getting ores by mining in rocky areas can be done the same way as the tutorial says. Again, you’ll have to make some changes in your mine_loot.json file (or whatever you choose to call it) to reflect Stonehearth’s own file; which is found in stonehearth/services/server/mining/mining_loot_tables.json.

In short, the mining loot table, that you are making, would have to look something like:

{
   "mineable_blocks": {
      "rock" : {
         "entries": {
            "default": {
               "items" : {
                  "MY_ORE": {
                     "uri" : "MY_MOD:MY_RESOURCE_ALIAS",
                     "weight" : 0.1
                  }
               }
            }
         }
      }
   }
}

Again, I haven’t looked at how to add ore veins, but I imagine that the process is the same: look at the files at which the tutorial is referring to and make the changes to match their current state (if needed, of course).

2 Likes

i was actually referring to this tutorial tnx for the help but this didnt help much since i cant figure what files i actually need.

Oh right, forgot about that one!

The files you need to look at are found under the first step. "mixintos" contain references to all the necessary files from the stonehearth mod, and below the manifest text block are short explanations of the purpose of each file. From there you should be able to create what you want, later on I’m gonna give it a try myself to see if that’s the case though.

Edit: If you’re wondering how mixintos work, you could take a look at this blog post which details that, overrides, and a bit more.

1 Like

if you may can send me the sample mod just to make my life much more easier to figure out this mining resourse thing

To test it out you just pump the values way higher (like 100x) so you encounter them almost everywhere. If everything works, then you balance the values to the right amounts

Sure thing, here’s a modified and working version of the RESOURCE_MOD from the same tutorial.

The resource’s weight is set to 200 now, you can modify this value later when you feel you’ve got the rest sorted out. The value itself can be found in the file RESOURCE_MOD/scenarios/static/terrian/RESOURCE_vein/RESOURCE_vein.json.

cool tip and a working template.wow tnx guy i can finally finish spacestuff 1.9.i will report back if anything happens

edit: @drotten what did you change specifically?
Report: every seem to fit i think(nothings breaking) but im not sure it working or not.Ace_mod.zip (68.2 KB)

1 Like

The only change I had to make was in RESOURCE_MOD/services/server/mining/mining_loot_tables.json, I simply changed so that its structure mimics Stonehearth’s own mining_loot_tables.json file.

1 Like

value of what specifically?

Of the spawn rate.
As mentioned by Drotten[quote=“Drotten, post:9, topic:19842”]
The resource’s weight is set to 200 now, you can modify this value later when you feel you’ve got the rest sorted out. The value itself can be found in the file RESOURCE_MOD/scenarios/static/terrian/RESOURCE_vein/RESOURCE_vein.json.
[/quote]
You put a really high value so whenever someone mines they get your ore, just to test if it is working, then later you balance the spawn to what you desire, maybe the same rate of the other ores.

1 Like