BIOME: I could really need some help with biome coding

So, the first three (octaves, persistence_ratio and amplitude) are not really important as it has very little impact on it. They control the “randomness” of the wall. Changing them will result in the same seed having different walls, but to a player the patterns will be very similar.

First the game generates a flat wall, then it adds those pieces to the sides to break the flatness.

layer_thickness is an integer value (I never tested 0 though to any of these, so if you want to remove them, try 0, who knows) and it is how far a piece can go from the wall. So a value of 1 will result in something like your pics, where they just go 1 block far from the wall.

unit_lenght is how long each piece will be. Ex. A wall that was 16 blocks wide, can have a piece that is 8 blocks long and doesn’t cover it entirely.

layer_count is how many of these pieces will be present at each wall.

If you have for example 2 pieces, with size 4 (and layer_thickness 1), your wall will have a flat area, then a piece 4 blocks large, another flat area then the second piece with 4 blocks.
Consider the underlines as the original wall and points as the blocks of a piece added to it, viewed from above

As their position in the wall are random, it can happen that they overlap. When this happens, the overlapped area sums their thickness. So those 2 pieces with 4 blocks large and a thickness of 1 can overlap in this way:
…::…_

Note that because of pieces overlapping your wall can reach very far than it would originally. I have a problem with floating water before because of this. The water were generating above the pieces, because blocks were so far from the wall, they reached the center of the neighbor chunk, tricking the water to think it was a high chunk of land and making it generate in the air. I fixed it by making sure even with overlapping it doesn’t go over 8 blocks (half a chunk).
Here an old image of the bug caused by thick walls and water:
https://discourse.stonehearth.net/uploads/short-url/1bHvhOYM4Hd54NBQpwfZ70KlTrk.png
Notice how far the pieces reaches.
If you are sure you are not going to have water next to those kinds of wall, then it is a free pass. Those wall were actually the same from the desert biome, which obviously would not have this problem.

All this for the “depth_function”. The “height_function” is similar, controlling its height instead of the distances from the wall. So you can make a piece that is almost the same height of the wall it is attached to, or having very deep steps.

When changing the values to see the results, I highly recommend checking them always in the same seed at the same area. So the changes are move evident.

4 Likes

This. This. THIS. is a big help. Thank you very much!
is there a way to visualize it easier like a real-time biome generator?
if non then just open-close stonehearth & notepad right?

1 Like

There is the option to use tiny maps (you will need to search about it, cause I can’t remember :stuck_out_tongue: )
I didn’t tried with it (had to re-open the game each time, very slow tests…) because the archipelago was not guarantee to have a piece of land in the tiny map lol, so I needed to generate the complete map

1 Like

yup, pretty much sums it up[quote=“BrunoSupremo, post:43, topic:22253”]
(had to re-open the game each time, very slow tests…)
[/quote]

It would make things easier if they had that kind of mod/tool (real-time biome generator) or a seperate app for biomes.

Thanks again for your time! :+1:

1 Like