Berry spawning woes

I have a small mod, and one of the purposes of that mod is to add another type of berry bush into the game, coexisting with the OG berry bush. I have added the code for my new bush’s placement table in a temperate.json that loads without any errors in the log, but doesn’t actually spawn them in game. I noticed another section that appears to be dedicated to where the berry bush’s are supposed to spawn.

“berries”: {
“placement”: {
“function”: “gaussian”,
“mean”: -50,
“std_dev”: 30,
“__comment”: “offset of mean near different terrain/landscape”,
“mean_offset”: {
“tree”: 100,
“water”: 0,
“boundary”: 0
“density”: {
“plains”: 0.6,
“foothills”: 0.8,
“mountains”: 0

I was wondering if that is indeed what my problem is(which i think it is), and if so, how I would get that section of code to recognize my new berry bush as something to spawn along with the old? @Drotten

That section is only for default berry bush. For example in the desert biome it isn’t used even though they have another kind of “bush” (the pear cactus).

You are on the right track. You added it into the placement table, this means that now the game recognizes your object.
You then need to add it into one of the sections that actually spawn them. There are multiple section, one for trees, one for plants, and another for rocks.

I recommend adding it into the plant sections. Look how one of them is setup and use it as a model for your plant. There is multiple parameters, like the frequency they will spawn at each elevation and their density.

Around this part of the code:

  "scattered": {
     "plants": {
        "weights": {
           "plains": {
              "1": {
                 "stonehearth:plants:frostsnap": 1,
                 "your_plant_here": 1

The problem with that is that if I do that, it spawns more like the flowers do, and not in the nice rows the berry bush’s do, which is what I want it to do.

You can spawn then in rows too. I actually did this in archipelago biome with rabbit statues so they would spawn in line to mimic moai statues.

At the placement table part, I did this:

     "stonehearth:rabbit:statue": {
        "placement_type": "pattern",
        "parameters": {
           "min_rows": 1,
           "max_rows": 1,
           "min_cols": 3,
           "max_cols": 3,
           "item_spacing": 10,
           "item_density": 1

Min/max rows/columns are exactly what the name implies. The game will randomly chose a size based on those. In my case, they are the same so it will always spawn 3, berries varies between 2 and 3 columns with 2 rows.
Item spacing is how many blocks spaces between them, I used 10 cause they are very big.
Item density is the chance of spawning. I used 1 so it always spawn the 3. Berries has a 0.9 (90%) chance, that is why sometimes there is one or 2 missing, breaking/creating more interesting patterns.