Terrain generation questions

A’ight… so another idea I had, although likely not one that would be included in the my previously mentioned mod concept, was the idea of having a more smoothed out map; eg. with one block increments, instead of the current 2 chunk increment. There’d be flavour variation of this ofc, as sheer cliff-walls do exist, but I think you get the gist of it.

My questions to the modding community is:

  • Has this been attempted before? If so, could you link me to it? (Pardon if it has, I couldn’t seem to find it at first glance)
  • How difficult do you reckon it would be to rewrite this in the map generation code?
  • Are there any known or estimated issues that would occur from such a rewrite? (Abnormal water physics, poor pathfinding, etc.)
  • Is this something that could be done as a global change in the game files or would this have to be done for each of the map types?

Any input is appreciated, especially if there’s something if I forgot to ask that you think is worth considering.

Also, while I know this would make construction quite difficult… I know. That’s actually half the point. It’s an issue that people had to (and still have to) deal with when planning and making settlements, plus I think a city that adapts to the terrain looks better :wink:.

If it comes to it, I realize I could always just spam ‘IB’ commands to sculpt the terrain to something more like I want it, but something automatic and algorithm controlled would be waaay~ more convenient; for obvious reasons.

1 Like

Paging @Albert for his terrain expertise :smiley:

1 Like

We’ve sort of thrown this idea around before, as a suggestion rather than a mod. Rolling Hills and Natural Slopes

Most people agreed that the smaller steps didn’t work very well with the game’s style, so you’d have to look into more drastic changes to the shape of things like hills and plains. It would probably mean using small generation steps all over the place, otherwise the rolling hills tend to look more like stacked layers of cardboard.

If you’re going to play around with it, though, I’d be very keen to see what you come up with!

As far as your other questions, I doubt that the shape of the terrain will effect much except meaning you’ll need to re-work the whole map generation sequence – for example, having less sheer drops shouldn’t affect water performance but will almost certainly effect where water can generate (since it needs a solid border to prevent flooding, it can only spawn in large-ish flat areas), and if you do release water onto those rolling hills it will probably have more calculations to go through before it settles.

I have no idea about whether you can do a global change to the map generator, but I suspect you’d want to avoid that anyway. I’d suggest you talk to @BrunoSupremo, who has created a lot of awesome biome mods – I know he’s played around with the terrain generator itself as well as the per-map generation, so he may be able to point you in the right direction.


Such a change is done in Lua.
All the files are in /services/server/world_generation/

I mean “all files” because there is a lot to change in a lot of places.

1 Like

I remembered seeing a video of stonehearth with rolling terrain.

1 Like

Hmm… The attempt made by Bruno in RH&NS was still a plateaued generation though and as I think I suggested clearly enough in the OP (and was discussed in RH&NS), then it’s the coarse map generation at fault, not the smaller increments.

Thank you for your expertise on this Bruno, now I’m at least closer to a place to start :slightly_smiling_face:.

Another inquiry regarding this idea… Would it be possible to somehow take the code for chunk generation from Minecraft and re-engineer it a bit? Or would it be faster to create it from scratch?

In essence both Minecraft and Stonehearth use some form of perlin noise. Here we use simplex noise, there they use something they developed themselves (for features like multiple biomes)

Alright, so in essence you could learn something by dissecting and studying their code, but it wouldn’t be worth it trying to copy-pasta edit the code?

Sure, I just don’t have any idea on how to get their code. With the code, you just translate it from java to lua

A’ight, thanks. I’m not too familiar with Java (or even Lua for that matter), but I’ll try to see if I can get the code and reverse-engineer it some time in the future. If anyone else fancies a challenge, then I think it could be a good place to start and invite you to attempt it as well/instead.