I am trying to make a recipe that can use all pelts, except for the wolf pelt.
If I could use the wolf pelt, then I could have written the ingredient list like this:
(edited according to Brunos’ response)
Imagine I add the code above into my versions of the rabbit_pelt.json, racoon_pelt.json, etc.
Then, in my custom recipe I add the following:
This recipe will now be able to use any material which include the tag “small_pelt”.
May not be the best way to do this, but it would be my way about it as I don’t know any way to exclude a specific material that is included within a tag.
small question, could this material tag also be used to describe loot drops, like this
"stonehearth:resource_node": {
“task_group_name”: “stonehearth:task_group:harvest”,
“resource” or “material” : “small_pelt”,
“harvest_overlay_effect”: “stonehearth:effects:mine_overlay_effect”,
“harvester_effect”: “mine”,
“description”: “mine”,
“durability”: 18
}
I believe this code means that upon the death of a Racoon, a combination of pelt and jerky may be droped (1 or 2 items).
It seems in this case the code points to the uri itself; but I’d say there’s no harm in trying, right?
If you are not able to have it work using this tag of yours, my suggestion would be to add aliases into your manifest-file and call thease instead.
Edit:
Answer based upon misunderstanding the question on my 2nd read..
Yes, @nikosthefan, you should be able to use this tag.
If I peek upon existing copper_ore.json, I see this code:
Note the “material_tags” - I believe this is where you should add your small_pelt-tag.
I’m not too sure where the code you provided would be located; I have never looked into any kind of loot drops before, sorry.
Your first way of interpreting the question was the right one, (sorry if i misformulated it). Thanks for the effort though.
The answer you gave is useful so far as that I now know that I would be able to use it if I wanted the “stonehearth:harvest_beast_loot_table” to do the loot dropping work. I am currently using “stonehearth:resource:node” : { “task_group_name” : “stonehearth:task_group:harvest” } to make it work, the same code used for log piles.
In the cod you gave me, the variable that conveyed what item was in the loot was called “uri”. I know from the recipe’s json that you can replace that with “material” and then you can use “material_tags” to define the loot. In the code I use, this variable is called “resource”, so I have no idea.
Well, I’m glad I was able to help somewhat; sorry for misunderstanding your question.
I’m sure you did not misformulate it - I just didn’t read it properly (twice!)
Yep, that is because it is not a new key/value pair like in most of the json. It is just a string, a text.
It is like changing a name of an item, you just replace the text.
This is something I talked about in a post, suggesting it to change into a proper list of tags, so we can simple add them instead of replacing the whole text, here:
I was not aware of this - I was thinking “it must be implemented as a key/value pair”.
Thank you for pointing it out, Bruno; you’re ever so helpful!
Edit: after writing it, I now realize the material-tag is missing the [].
So, it should not have been too difficult to figure out it was a string in the first place…
I had way more than 72, i didn’t count but the numbers for individual pelts were sometimes in the 60’s. I changed the weights to 0.25 (which should work, were your theory to be true), but I still got a total amount of 216 pelts.
But that raises the question what number even determines how much pelts you get. It is not the weight, clearly, and also not the numroll. I mean 216 is 12*18(<-- numroll) but still, is that a connection. (I don’t believe so anyway)
The weights are the chances. If all weights are the same, they all have the same chance to drop. If one has 15 weight and another item just 3, this means it is more likely that the first item will drop instead of the second, with a 15:3 ratio.
Only one item will drop, based on the chances of their weights.
The num_rolls is how many times items will drop the items in each harvest.
The durability is how many times that item can be harvested until it breaks.
If you have 2 durability, and num_rolls min 3 and max 4, this means they will harvest it twice, and each harvest will drop 3 or 4 items, with those with higher weights having more chances to be the ones dropped instead of the ones with lower weights.
No, if you set the min and max values of the num_rolls to different values, it will vary randomly between the two intervals. A min 1 and max 10 means each harvest hit will sometimes have a value of 5, or 3, or 7, each harvest is random between those min and max values.
Here is the thing, I didn’t. The min num_rolls was 1, and so was the max num_rolls. I understood everything you said the first time. I didn’t know for sure the first time that it would be consistent, but I assumed it was, when you had num_roll min and max at the same number. But when I tested it in game, I only got 12 pelts, and not 18, so maybe the system was not so consistent after all, and there is a chance that it sometimes doesn’t spawn things altogether. So I asked the question, but apparently it should actually have been 18 pelts. But the game does not agree with you, so it is just weird.
I guess I will do some experimenting…
So, after an experiment that didn’t work out, I tried how the old system behaved if I harvested more piles. The first one gave 12 pelts, again (this is the same in-game pile,
already in the save file when I loaded it to test), but all others (piles I spawned in after loading the game) consistently spat out 18 pelts.
So I guess the theory that explains all of this is that the changed loot_table only affect newly placed items, and not older ones. This still doesn’t explain why the 12 pelts came out of the first one, (I have no clue where that came from, the last time 12 was in that item was for how many pelts you needed for crafting and got when harvesting, before I changed it from 12 to 18, but that was already removed way before I started messing, or even introducing the new loot table) but it works now, so I won’t be complaining.
What is your durability? That is what defines how many times the object will be harvested.
If it is not 12, then you probably have some item incorrect, as the game simple spawn nothing for those and in the end you get less items as result.
It once was 12, but I changed that long before I started messing with the loot_table. Scince I changed it, it has been 18.
Ohh, wait, I know what it is. If the durability only updates when you replace an item in the world, (which I didn’t do often, I would just have a save game where I stored a certain setup, and reloaded that over and over again to test the changes I made) then it may be that I never replaced the pile I was testing from since the era that it had a durability of 12.
Yes, all the json files are saved in the objects, so everything that is already placed will not update. Just moving it around will not be enough. You need a new item.