Where do we find the material names? 'wood resource'

Im having a look for the skull_trophy material name. The stable build version still has a tonne of Goblin Tokens drop (skull_trophy) still so I wanted to create a small modification that allows you to craft 1 log and 1 cloth resource out of a few goblin tokens.

Does anyone know where to find this material name and also others for future reference?

The materials for the skull trophy is “bone furniture”.

But the thing is, by using those material tags your crafter will also use other items that match those tags, and you only want to use the skull trophy right?

Then it’s better to just use the uri (the alias) and tell the crafters to only use the skull trophy for that recipe.

So instead of this:

"ingredients": [
   {
      "material" : "bone furniture",
      "count" : _some_number_
   }
]

Do something like this:

"ingredients": [
   {
      "uri" : "stonehearth:monsters:goblins:skull_trophy",
      "count" : _some_number_
   }
]

That should be it for the ingredients, I hope this answers your question! :smile:

Edit
Oh and for how I found the materials: I went into stonehearth/entities/ -> did a search for skull trophy -> opened up its json file and looked in there.
You can do similar things for other entities if you want to find something out. Also you should take note the “mixins” that might appear in the json, then it will use the file json file its pointing to (in this case it was the skull_trophy_ghost.json which actually has the material description).

4 Likes

That will be a lot better then actually as I won’t have to use my own json files. I can just link to the wood and cloth resource

Testing now, let’s hope the Goblins really want to see me today.

You could modify the microworld to spawn up goblins instead of starting up a game each time :wink:

Which makes it so much easier to test your mod.

2 Likes

I would love to edit microword but I don’t have the knowledge to do that.

No errors, but nothings happens. It’s probably something I’ve done wrong so I’m just going to post up my jsons.

manifest.json

{
“info”: {
“name”: “Goblin Token”,
“version”: 1
},
“aliases”: {
“oak_log”: “/stonehearth/entities/resources/wood/oak_log/oak_log.json”
},
“mixintos”: {
“/stonehearth/jobs/carpenter/recipes/recipes.json”: [
“file(mixins/carpenter_recipes.json)”
]
}
}

oak_log_recipie.json

{
“type”:“recipe”,

“work_units” : 2,
“recipe_name” : “Oak Log”,
“description” : “Use your tokens here.”,
“flavor” : “”,
“portrait” : “/Stonehearth/mods/stonehearth/ui/game/modes/zones_mode/stockpile/images/taxonomy/wood.png”,
“ingredients”: [
{
“material” : “stonehearth:monsters:goblins:skull_trophy”,
“count” : 1
}
],
“produces”: [
{
“item”:“stonehearth:resources:wood:oak_log”
}
]
}

carpenter_recipie.json

{
“craftable_recipes”: {
“Tools & Weapons”: {
“recipes”: {
“oak_log”: {
“recipe”: “file(/recipes/oak_log_recipe.json)”
}
}
}
}
}

[quote=“Drotten, post:4, topic:10615”]
microworld
[/quote] I have tried to install and run it a lot but can not do it sadly :frowning: any one have a YouTube video on it?

It should be "tools_weapons" instead of "Tools & Weapons", though I imagine that it should have its own category like "recources" but let’s just focus on getting it to work first. :wink:

Yeah, you’re right, although it still showed up in the crafting menu. I meant that nothing happens when queueing the token in the crafting menu.

Alright, so after when going to that link and downloading the zip-file, you unpack it into the mod folder for stonehearth. Be sure to remove the “-master” from its name! (so its name is only “microworld”).

To try and start up the microworld (in your Steam’s game list): right-click on Stonehearth -> Properties -> Set Launch Options… -> add “–game.main_mod=microworld” (without the quotes). After that select OK and start up Stonehearth.
If it all went well, you should have skipped the main-menu screen and have generated a tiny world to play on.

So to modify the worlds to fit your tests: look through the other worlds that come with microworld for examples on how to do it. They have examples on how to create entities, citizens, placing town-banner, etc etc.

To make sure that it’s your test world that’s generated: go to user_settings.json and add the following code:

	"mods" : {
		"microworld" : {
			"_world" : "harvest_test",
			"world" : "mini_game"
		}
	}

Note that I’ve added a “_” in front of one “world”, this is to make sure that I get the right world generated (in this case it would be the mini_game world that’s generated).

That should be it to get you started on microworld! :smile:

2 Likes

Oh… I’m gonna try out your mod for myself and see if I find out anything.

2 Likes

I must be missing something out. I just don’t know what yet.

Alright I think I know what causes the problem, first off I’m gonna show you how my oak_log_recipe.json ended up looking:

{
	"type":"recipe",

	"work_units" : 2,
	"recipe_name" : "Oak Log",
	"description" : "Use your tokens here.",
	"flavor" : "",
	"portrait" : "/stonehearth/entities/resources/wood/log.png", 
	"ingredients": [
		{
			"uri" : "stonehearth:monsters:goblins:skull_trophy",
			"count" : 1
		}
	],
	"produces": [
		{
			"item" : "stonehearth:resources:wood:oak_log"
		}
	]
}

First is the portrait: I changed to an image found under entities since the other one has a pretty low resolution and ended up pixelated.

Second (that I think you missed) is under ingredients; you’d have to change from "material" to "uri", because we’re specifying an item instead of some material so we have to say that it’s an uri instead.


Lastly, for your manifest.json: remove the "aliases", it doesn’t cause any problems really but it’s not needed anymore. :smile:

1 Like

Boom!

That worked, I noticed that I was using item instead of url.

Glad that’s sorted. Thanks a lot @Drotten

2 Likes

Thank you! now how do I get it back to making normal worlds? But thank you so so so much! :sunny:

1 Like

I’m happy to help! :smile:

Hopefully you’ve come to understand some details of modding in Stonehearth as well. :wink:

It’s a clever mod as well, giving an good use of the trophies.

2 Likes

Just go back to Set Launch Options in Steam and remove that line, than you can play as normal again! :blush:

1 Like

[quote=“Drotten, post:16, topic:10615”]
Just go back to Set Launch Options in Steam and remove that line, than you can play as normal again!
[/quote] Thank you so much! I have never modded anything and no nothing about it but I want to try to start with Stonehearth but it will be hard lol.

Have a good day!

~Wolf

1 Like

Thanks bud, just need to get a nice balance.

Was thinking of 10 tokens gives you one log and one thread. Maybe when you get higher carpenter’s level you need less tokens.

2 Likes

Drotten, you wouldn’t know if I could have multiple requirements for different Carpenter levels would you?

For example.

Level 1: 6 Goblin tokens for 1 thread and wood resource
Level 2: 5 Goblin tokens for 1 thread and wood resource
Level 3: 4 Goblin tokens for 1 thread and wood resource
Level 4: 3 Goblin tokens for 1 thread and wood resource
Level 5: 3 Goblin tokens for 1 cloth and wood resource

It would be nice to show some improvement in tearing down the token as the carpenter progresses and also at some point not ruining the cloth that it used in the Goblin Token.

i think the plan is when the shop system is active to give that an worth to sell it ^^ at the moment there are no lines in the json for it but even when the devs forget this it would be an easy change to add the lines to the json ^^