Need a little help xD

heyho at the moment i try to rework the plants from the brewerymod - but after rework it shows the plants and they are harvestable BUT they are not placed anymore …

is there a specifc command that i must add?

here the actual reworked version - perhaps anybody can find the issue xD

https://drive.google.com/open?id=0ByBHK3AjrbF2S2NSeGpkc3BPUGc

Try checking the brightbell flower and mod it from there. I’m looking at it through shed and it says this error in the plants “No net worth even though object is an item! Add an entity_data.stonehearth:networth!”

Edit, I think I get it. You have the entity_data inside components. At mod version 3 it is outside (siblings).

{
	"components": {
		etc...
	},
	"entity_data": {
		etc...
	}
}

that i have already tested xD but no changes at all :frowning:

new version uploaded

I think that for the plants to appear placed you might have to do a mixinto to the biome file, but I’m not 100% sure. :confused:

the interessting part in the old version they were placed -.-

the only difference was there was an extra file for the plant…

Hmm the mixin file (scenario_index) is different from the old mod, maybe it is that?

thats correct - i have removed the … and change it to terrain thats all ^^

1 Like

ok i have restored the own file plant and now its placed - but the movebuttons are missing xD

ok i have found the problem … its has something todo with:

so the new version works xD

},
“stonehearth:entity_forms”: {
“iconic_form”: “file(blueberry_iconic.json)”,
“ghost_form”: “file(blueberry_ghost.json)”,
“placeable_on_ground”: true,
“hide_undeploy_ui”: true
}
},

if i remove this its placed - but then i have no option to move it ^^

im honest i dont know why xD

ok forget movable … it works and its a renewable ressource now^^

perhaps when steffi or yang are back i will ask them xD

I’m a little confused here.
What exactly should happen and what was wrong?

When I tested a world with this mod, all plants were generating normally in the terrain. Except they were all in iconic form, so to use it I had to order a hearthling to get the item and place it down (like we do with furnitures). At this point the plant was visible bigger and I could use the harvest tool on it.

Here at this image we can see it. The right flowers were natural in the terrain, and are small iconics. I could even loot one and put in my stockpile, The big one is after I ordered them to place it down again, and this version is the harvestable.

The json data was wrong as I mentioned, check the mod manual for a18, there is an example for this case.
You had two “entity_data”, which is ok because one was in the old position and would work for old a17 and the new one to a18, except the position of the new was wrong, it was inside components, while it be outside, following it.

ok what should happen: they shouldnt be generated as icons :wink: they should be generated as planted.

like the normal berry bush - you can harvest them and then will be regenerate after some time - and you can move them around.

the format was wrong thats correct - but is already fixed. like check between the old and the new version - its the entitiy_form which makes issues. if i remove it - the plants are planted and can be harvest from the start on (but not moved) - with it they are in the iconform over the complete terrain.and must be placed to be usable (but can be moved).

for the size (i have scaled it down now that it “works”)

Glad you found a way.
In case you are curious (or want to revert back to the old way) I found the problem. It was the way you were inserting them in the biomes. You were using scenarios which is a clever way and gets all biomes.

The correct way is to mixinto the biomes generation files all your plants with the generation you desire for each biome. I added your allium flower to the archipelago and it generated correctly.

The small one were generated through scenarios, the big ones were part of my terrain generation code. Hearthlings had just spawned, nothing was touched :slight_smile:

1 Like

so i should add it to?

“landscape”: {
“placement_table”: {

Yes, and also at the plants section. (the placement_table is just a list of all the items the biome will use, but does not tell how to use)

This is the file I used.

{
   "landscape": {
      "placement_table": {
         "brewerymod:allium:plant": {
            "placement_type": "dense",
            "parameters": {
               "grid_multiple": 4,
               "item_density": 0.1,
               "exclusion_radius": 1
            }
         }
      },
      "scattered": {
         "plants": {
            "__comment": "for example, a small probability with a large density would be more clustered than a large probability with small density.",
            "weights": {
               "foothills": {
                  "1": {
                     "brewerymod:allium:plant": 1
                  }
               }
            }
         }
      }
   }
}

So you add all your items the way you want. Have different weights, spawns at different height, and so on. You do this for each biome.

And at the manifest I added:
"archipelago_biome/data/biome/archipelago_generation_data.json": "file(data/biome/archipelago_generation_data.json)",

Although this file path is different from what my mod has only. This is for the new a18, which I hadn’t updated yet, just on my machine.

1 Like

ahhhhhhhhhhhh the plants is what i have missed ^^ xD

With this method you also have way more controls. For example, maybe on the archipelago you don’t want your flowers spawning on the beaches, so you just add them to the foothills, but in the temperate you add to both foothills and plains.
You can play with the weight values too, to make things more common or rare.

1 Like

at the moment i experiment with

“grid_multiple”: 4,
“item_density”: 1,
“exclusion_radius”: 1

xD

Do you know how to use those? It is actually easy after understanding what each setting does.

grid_multiple is how the chunk will be going to be divided. A chunk here is a 16 by 16 block area. (In the minimap each block cell is a 2x2 chunk, so a 32x32 blocks area)
So a “grid_multiple”: 4, will divide each chunk in 4x4 grid, meaning 16 possible spots for the item to spawn.

Item density is the chance to spawn at each spot in that grid. “item_density”: 1, will always spawn, so you end up with the full 4x4 spots filled with items. This value goes from 1 to 0. For example 0.5 is half chances for each item at each spot.

“exclusion_radius”: 1 is how precisely they will be spawned in their spots. A value of 1 means they will randomly shift 1 block, so they don’t end up in a grid formation, like the berry bushes do. Higher values will make them move more from their spots making it even less like a grid. If you use 0 it will be perfectly fit in rows and columns, like the bushes

1 Like

so for plains it works now :smiley:

now i must only figure out how i can say that they are more important than trees (on mountains and foothills) xD

thank you for your help - has helped me very good :smiley: