# \[Tutorial\] Adding mining resources

**URL:** <https://discourse.stonehearth.net/t/tutorial-adding-mining-resources/10658>\
**Category:** Modding\
**Created:** [February 21, 2015, 5:05pm UTC](https://discourse.stonehearth.net/t/tutorial-adding-mining-resources/10658 "2015-02-21T17:05:19Z")\
**Posts on this page:** 12\
**Page:** 2

<div class="post-metadata">

**Author:** ![Tuhalu](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/tuhalu/32/44358_2.png) [@Tuhalu](https://discourse.stonehearth.net/u/Tuhalu)\
**Post date:** [July 31, 2015, 8:46am UTC](https://discourse.stonehearth.net/t/tutorial-adding-mining-resources/10658/21 "2015-07-31T08:46:37Z")

</div>

OK. So the list of blocks you can name is now in the stonehearth mod at /data/terrain/terrain\_blocks.json.

When you mixin to that file, you just need to add:

```
   "selectable_kinds" : {
      "MY_RESOURCE_ore" : "MY_ALIAS"
   }

```

You then have to create that alias in your manifest. It will point to a file that contains the information about that block type.

For an example, check inside the stonehearth mod at entitites/terrain/ui/coal\_block.json. You’ll have to modify it a bit though so that it correctly points at the ore\_block.json it mixins from. It will look like:

```
{
   "mixins" : "/stonehearth/entities/terrain/ui/ore_block",
   "components" : {
      "unit_info" : {
         "name": "MY_RESOURCE Vein", 
         "description": "Provides MY_RESOURCE when mined."
      }
   }
}

```

And that should be that. You’ll have a clickable tooltip for your ore vein. Obviously everything in ALL\_CAPS\_AND\_UNDERSCORES is something you will need to name yourself.

---

<div class="post-metadata">

**Author:** ![Chabonit](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/chabonit/32/54838_2.png) [@Chabonit](https://discourse.stonehearth.net/u/Chabonit)\
**Post date:** [August 1, 2015, 6:54am UTC](https://discourse.stonehearth.net/t/tutorial-adding-mining-resources/10658/22 "2015-08-01T06:54:37Z")

</div>

> [@Tuhalu](#):
>
> So the list of blocks you can name is **now** in the stonehearth

now means in alpha 11 ?  
because i tried it out (10.5.10) and it`s not working out and no error emerges

---

<div class="post-metadata">

**Author:** ![Tuhalu](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/tuhalu/32/44358_2.png) [@Tuhalu](https://discourse.stonehearth.net/u/Tuhalu)\
**Post date:** [August 1, 2015, 7:00am UTC](https://discourse.stonehearth.net/t/tutorial-adding-mining-resources/10658/23 "2015-08-01T07:00:59Z")

</div>

> [@Chabonit](#):
>
> now means in alpha 11 ?

Yes. As in develop-2521 in alpha 11.

You won’t get any error messages because nothing is wrong with the json files. Json files are just data. Superfluous data is simply ignored without causing an error.

---

<div class="post-metadata">

**Author:** ![Tuhalu](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/tuhalu/32/44358_2.png) [@Tuhalu](https://discourse.stonehearth.net/u/Tuhalu)\
**Post date:** [October 7, 2015, 7:15am UTC](https://discourse.stonehearth.net/t/tutorial-adding-mining-resources/10658/24 "2015-10-07T07:15:09Z")

</div>

Well, with the introduction of Biomes, adding in your own veins just got harder! The “color” tag in terrain\_blocks.json is now deprecated and the color of your veins is now stated in each individual biome file.

Currently, the game only uses stonehearth/data/biome/temperate.json, but eventually we’ll have at least 3 biomes (arctic and desert) and probably many more. In each biome json file, you need to find the “palettes” tag and then the “spring” tag within that. You’ll see that every kind of terrain block is named and has its own color. Later, we can expect to see more seasons than spring, so be prepared for that too!

Anyway, you’ll need to add an additional entry to the list of spring colors that defines your “kind” of block. The name for the color must be the same as you defined in /data/terrain/terrain\_blocks.json in “selectable kinds”. Do all this with a mixinto file type (not forgetting to add the manifest entry).

BTW, @phector2004, with all the changes since you made your tutorial, is it possible for you to update it? If not, would you mind if I made a tutorial topic on the subject myself?

---

<div class="post-metadata">

**Author:** ![phector2004](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/phector2004/32/44268_2.png) [@phector2004](https://discourse.stonehearth.net/u/phector2004)\
**Post date:** [October 7, 2015, 10:23am UTC](https://discourse.stonehearth.net/t/tutorial-adding-mining-resources/10658/25 "2015-10-07T10:23:46Z")

</div>

I’m really tight on time, so go for it, kid!

---

<div class="post-metadata">

**Author:** ![8BitCrab](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/8bitcrab/32/48512_2.png) [@8BitCrab](https://discourse.stonehearth.net/u/8BitCrab)\
**Post date:** [October 7, 2015, 2:47pm UTC](https://discourse.stonehearth.net/t/tutorial-adding-mining-resources/10658/26 "2015-10-07T14:47:53Z")

</div>

> [@Tuhalu](#):
>
> BTW, @phector2004, with all the changes since you made your tutorial, is it possible for you to update it? If not, would you mind if I made a tutorial topic on the subject myself?

that would be great for me, then i would actually probably revive an “old” project of mine…

---

<div class="post-metadata">

**Author:** ![Tuhalu](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/tuhalu/32/44358_2.png) [@Tuhalu](https://discourse.stonehearth.net/u/Tuhalu)\
**Post date:** [October 8, 2015, 9:35am UTC](https://discourse.stonehearth.net/t/tutorial-adding-mining-resources/10658/27 "2015-10-08T09:35:04Z")

</div>

OK. New tutorial topic is [here](http://discourse.stonehearth.net/t/tutorial-adding-mining-resources-updated-for-alpha-12/16994). Let me know what you think 🙂

---

<div class="post-metadata">

**Author:** ![phector2004](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/phector2004/32/44268_2.png) [@phector2004](https://discourse.stonehearth.net/u/phector2004)\
**Post date:** [October 8, 2015, 4:32pm UTC](https://discourse.stonehearth.net/t/tutorial-adding-mining-resources/10658/28 "2015-10-08T16:32:22Z")

</div>

Might have a look at it this weekend. Looks very organized 😄

---

<div class="post-metadata">

**Author:** ![xmmcxrockx](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/xmmcxrockx/32/47153_2.png) [@xmmcxrockx](https://discourse.stonehearth.net/u/xmmcxrockx)\
**Post date:** [November 5, 2015, 4:51am UTC](https://discourse.stonehearth.net/t/tutorial-adding-mining-resources/10658/29 "2015-11-05T04:51:59Z")

</div>

Can someone make a class tutorial please that would be amazing

---

<div class="post-metadata">

**Author:** ![xmmcxrockx](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/xmmcxrockx/32/47153_2.png) [@xmmcxrockx](https://discourse.stonehearth.net/u/xmmcxrockx)\
**Post date:** [November 5, 2015, 5:06am UTC](https://discourse.stonehearth.net/t/tutorial-adding-mining-resources/10658/30 "2015-11-05T05:06:27Z")

</div>

hey look at this

[http://discourse.stonehearth.net/t/to-many-mods-what-you-think/17634?u=xmmcxrockx](http://discourse.stonehearth.net/t/to-many-mods-what-you-think/17634?u=xmmcxrockx)

---

<div class="post-metadata">

**Author:** ![phector2004](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/phector2004/32/44268_2.png) [@phector2004](https://discourse.stonehearth.net/u/phector2004)\
**Post date:** [November 5, 2015, 7:15pm UTC](https://discourse.stonehearth.net/t/tutorial-adding-mining-resources/10658/31 "2015-11-05T19:15:57Z")

</div>

You might want to make a separate thread to ask for a class tutorial. I don’t know anything about adding new classes, but you can look at some other modders’ stuff to see how they managed it.

Best of luck!

---

<div class="post-metadata">

**Author:** ![xmmcxrockx](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/xmmcxrockx/32/47153_2.png) [@xmmcxrockx](https://discourse.stonehearth.net/u/xmmcxrockx)\
**Post date:** [November 5, 2015, 8:03pm UTC](https://discourse.stonehearth.net/t/tutorial-adding-mining-resources/10658/32 "2015-11-05T20:03:38Z")

</div>

Yeah I’ve started that I thought there would be an easy way like the resource tut

[Previous page](https://discourse.stonehearth.net/t/tutorial-adding-mining-resources/10658.md?page=1)
