Getting trees to drop seeds... how do it work?

So i am delwing into the biome modding and i have some custom trees that i want to implement.
I have the trees show up in the stamptool and i managed to get them to drop my custom wood resource.

But whatever i try to “copy” from other tree seed json files, only produces errors…

Is the seeds different from the wood resource? i see that they have some kind of pelt tag? what is that all about?

Any help or thoughts on this is very welcome! And i must stress that i am not very skilled in all this codingthing :smiley:

Inside a resource_node, you add this:

			"resource_loot_table": {
				"entries": {
					"first_table": {
						"num_rolls": {
							"min": 1,
							"max": 1
						},
						"items": {
							"none": {
								"uri": "",
								"weight": 12
							},
							"seed": {
								"uri": "archipelago_biome:trees:dranden:seed",
								"weight": 1
							}
						}
					}
				}
			}

It will drop an amount between min and max. It will try to drop a item every time someones “chop” the tree. (The duration you set in your tree, which is the amount of hits it takes to destroy it)
That is why we also add an empty item with a high chance to be chosen, so a big tree would not drop a lot of seeds (you can if you want)

3 Likes

aha so the weight is the ratio of chance? hehe then i already might have it working, just with a ridicolus low chance :smiley:

Thanks for the explanation Bruno :heartpulse:

2 Likes

Yes, when testing always make the chance high to see if it is at least working, then pump it down to the correct values desired.

2 Likes

yeah i had that with my mythril… cough accidental one in 20.000 chance…

3 Likes

after adding the resource loot table i tested it again, but i get this error:

It says i dont have an alias or something? I thought that i had added this in the manifest, but i must admit that these aliases really confuses me! what is the error trying to tell me?

Here are my manifest:

{

"info" : {
	"name" : "Poyo Hills",
	"namespace" : "poyo_hills",
	"version" : 3,
	"steam_file_id" : "1387794573",
	"author": "Fornjotr"
},
"default_locale" : "en",
"aliases" : {
  "biome:poyo_hills": "file(data/biome/poyo_hills.json)",
  
  "trees:blue_tree:large" : "file(entities/trees/blue_tree/large_blue_tree)",
  
  "entities:resources:wood:blue_log" : "file(entities/resources/wood/blue_log)",
  
  "entities:trees:tree_blue_seed" : "file(entities/trees/blue_tree/seed)"
},
"mixintos" : {
  "stonehearth:biome:index" : "file(data/biome/index.json)"
},
"overrides" : {},
"components" : {},
"controllers" : {}

}

In your resource, you told it to drop “trees:blue_tree:seed”, but in your manifest you called it “entities:trees:tree_blue_seed”

1 Like

ok i tried to change that… i am really at a loss here, i cant see it, is there something called codeblindness? it keeps throwing up different errors with every change i make…

Would someone be kind to take a look at my mod here:
poyo_hills.zip (5.8 MB)

And then explain to me how this works and why? I want to learn this, but i find it very hard at the moment :roll_eyes:

Thank you!

When you say “file(entities/trees/blue_tree/seed)” ending in a folder and not in a file, the game understands that as a way to look into that last folder and load a file named exactly the same, so in that case a file named seed.json inside the folder seed. But in that folder the files have other names. So you either add the file name to that path (…/seed/your_file.json) or you change the file name to be seed.json

4 Likes

I cant get it to work… so i paused that aspect for now and focus on the other things in the world generation…