Changing Biome/Terrain generator

I’ve been tweaking around in the biome terrain generation files because I want to get rid of the dirt patches that spawn in plains. Anyone been able to accomplish this or anything similar?

I don’t know much on the files or anything related to modding; however maybe take a look at RCs Terrain generation might help in what you are trying to accomplish. Since the desert Terrain for the most part does not contain those far as I know.

Figure I would point that out just in case it would be helpful in some way. :slight_smile:

Thanks for the tip. I had already been using the existing templates as an example (got a spoiler on what the Arctic northlands will look like!).

1 Like

best way look in the biome mods or ask the hosters their :wink:

http://discourse.stonehearth.net/t/new-biome-archipelago/19962
http://discourse.stonehearth.net/t/mod-anorien-biome/22290

1 Like

Neither of them did away with the dirt plains. They’re in Anorien

1 Like

i think you must only remove the line:

“dirt”: [
{
“width”: 8,
“name”: “dirt_edge_1”
}
],

and that also in the palette :wink:

You’ll see if you simply try to remove code related to the dirt regions it will throw up errors during terrain generation. Also, I considered simply changing the palettes, but I didn’t want the sunken regions at all, not just hiding them with color.

1 Like

soo i have just removed the dirt edges and this is what happens xD



i have just let the normal dirt palett exist ^^ so no issues at all :wink:

perhaps you have forget to remove something so that you have get an error - here is the json: Dropbox - Link not found

edit: ok this hasnt resolved it ^^ now i have found some maps with the dirt in -.-
edit2: ok i will look into it again, after some sleep ^^

1 Like

Yeah my biome generates very few. I think it has something to do with the amplitude settings I ended up with. It can all be very hard to know exactly how it shows up! I appreciate your enthusiastic support in searching haha

1 Like

Here I gave some help about this: [Help] Map Generation

Those dirt patches are actually terrain elevations, so yeah, amplitude settings will change a little of it. The same way we have multiple elevations of foot hills and mountains, we also have from plains, and the result are those patches.

From that link, the code mentioned makes sure to have only one plain elevation, nullifying those holes. But you also need to change the base height of the map to match a multiple of 5, also mentioned there. The default from temperate and desert are base 36, so just change to 39 and it will work. (if you used the code from that link)

4 Likes

There’s my issue! I had misunderstood whether the step was counted in the base 5 so I had kept setting my base altitude to invalid numbers as a result! Thanks for the fix!

1 Like

to not derail the mainthread:

for the bushes etc i can help perhaps ^^

at first you must add the bushes etc in the manifest like
"tree:spirowiese" : “file(entities/tree/spirowiese)”,
“tree:spirowiese2” : “file(entities/tree/spirowiese2)”

and then you can add them simply to the biomefile:

“sizes”: {
“archipelago_biome:tree:spirowiese”: {
“small” : 0,
“large”: 9
}
},
“weights”: {
“plains”: {
“1”: {
“archipelago_biome:tree:spirowiese”: 1
}
},
“foothills”: {
“1”: {
“archipelago_biome:tree:spirowiese”: 1
},
“2”: {
“archipelago_biome:tree:spirowiese”: 1
}
},
“mountains”: {
“1”: {
“archipelago_biome:tree:spirowiese”: 1
},
“2”: {
“archipelago_biome:tree:spirowiese”: 1
}
}
},

with this i have replaced the trees in the archipelago xD

here is a link to my modded mod - if you want to see it xD

1 Like

Interesting, perhaps I will make some custom ground plants and test them out this way. Ideally, I would love to be able to have them mixed in between trees rather than replace them, but maybe I can find a way to achieve that

like i know json, you can simply add them so that it should be work with multiples ^^ because in the normal biome is also more then just one tree :wink:

“landscape”: {
“placement_table”: {
“stonehearth:trees:oak:small”: {
“placement_type”: “dense”,
“parameters”: {
“grid_multiple”: 2,
“item_density”: 0.5,
“exclusion_radius”: 2
},
“mountains”: {
“placement_type”: “single”,
“parameters”: {
“ground_radius”: 2,
“exclusion_radius”: 3
}
}

Right, I understand that, but what I meant is there is currently no way of fitting something in between the tree placements, right? Like, if I wanted to put a plant between two naturally spawning trees? Does that make sense?

ahhh now i know what you mean … hmmmmmmmmm that could be difficult … at first you must smaller the collision regions of the trees - then it should be possible^^

Yeah I thought that would probably be the first step, but I doubt it will be easy to figure out haha. Basically I want to go from something like this:


to something like this:

2 Likes

You know what? Do not use that code I offered to remove dirt patches.

If you set this:

  "height_base": 39,
  "plains": {
     "step_size": 1,
     "valley_count": 1,
     "step_count": 1
  },

The game will generate only 1 layer of plains, good. But the first layer is always considered dirt, so your entire plains will be one big dirt patch… You will notice that because of this, nothing will generate at it, no trees, plants or boulders, cause they don’t on the first layer. (Although the color will be green grass, the behavior is from dirt)

The best thing to do is to just change the valley_count to 2. That’s it.
The game will now consider your plains as a real plain (second layer) but will not generate the holes. Why? No idea. I’m still looking through the files to figure why. I’m so rusty at this…

And the multiple of 5 rule is the following: (step_size * step_count) + height_base
If it results in a multiple of 5, it is ok. Else it will throw an error. (Cause the mining tool needs the plains to always start at that height)

2 Likes

Ah I should have played with Valley Count more, I just ended up changing the Hex values for the dirt to make it look like grass haha

1 Like

I think there’s a section on the JSON that tells which trees grow on which areas / levels.

What I never understood is that in the temperate biome, the “scattered” section doesn’t include trees, but for the desert biome, if you don’t place the trees there they don’t appear.

I don’t understand why there’s this difference between the temperate and the desert biomes, why the temperate is the only one that is not forced to put the trees in that section.

My biomes have all the plants and trees custom, and I always had to had the trees also in the “scattered” section, or else they don’t appear. Maybe it’s due to

?
Maybe I used the desert biome as a template most of the times and always ended up running onto that issue?

Do you think it could be due to the values for other parameters on the file? :confused: