Annotorio


Settle your island and grow your settlement. A total conversion mod for Factorio.

Overhaul
4 years ago
0.17
185

g Terrain generation

5 years ago

Hi- I noticed you left a comment elsewhere that you were looking for a way to generate terrain for your Annotorio mod. I have a mod, Custom Terrain Generation, which provides a wide variety of terrain generation methods, including some designed to give natural looking islands. I don't know what you are looking for, but you may want to take a look and see if there is something suitable for what you have in mind.

Here are screenshots of some examples of the terrain generation: https://imgur.com/a/C2pFsf8

5 years ago

That looks pretty awesome, you got all these crazy options. Current annotorio uses modified code from "Islands World" to generate the land and my own code to place resources. I have very specfic requierements like the water start so your mod must be adaptable.
Finally i will generate a number of maps and make a poll for the discord members.

5 years ago

I think the only pattern that will be useful to you is the NoiseCustom pattern (and maybe also Union or Intersection), which was used to make the various "natural"-looking islands in the screenshots. In the Readme the examples section shows how it is used, and the "further notes" section gives more explanation of what each option does. In particular you may want the option "start_on_beach = true" that causes the player to start on land that is near water. I can explain further if there is anything unclear.

The algorithm used by NoiseCustom is largely similar to the algorithm used by Factorio (and by Islands World) but Factorio uses Perlin noise instead of a mathematically correct noise... in theory the Perlin noise is "flawed" but it is good enough that one cannot see the difference.

Currently the mod only makes shallow water and no deep water, however I would like to improve that.

If there are specific requirements you have you can let me know, maybe I will know a good way to fulfill them.

5 years ago
(updated 5 years ago)

1) Is there some example how another mod can define the map generation? As i understand it currenty the user has to paste a string in the mod settings. Can this be be done automatically by my mod? I would rather hide your options.
2) Second i would like to transition away from natural islands. They are suboptimal for the gameplay. I need shores which have more straight parts. And less lakes also less funny outgrowths. They shouldnt be more than 4 times wider than they are tall. The smalest islands should not be more than 6 times smaller than the biggest. These are the things i can think off the top of my head.
3) Is there some way to have the preview working?

5 years ago
(updated 5 years ago)

1) Not yet. It would be easy for me to add this (and I've been planning on doing so) but there is the problem of what happens if someone deactivates a mod that uses mine without deactivating mine. This is a trickier problem to deal with but I'm working on it now.

2) With the current design of the "natural" map generation, it is not possible to create a strict limit on island size / shape / etc., but the typical behavior can be controlled. Here's an example that might be closer to what you have in mind:

NoiseCustom({exponent=2, noise=v1, land_percent = 0.1})
v1 = {0, 0, 1, 1, 1, 0, 0, 0}

or

v1 = {0, 0, 0, 1, 0, 0, 0, 0}

A screenshot of the former (each pixel is one tile): https://i.imgur.com/Wj55vHU.png
The latter: https://i.imgur.com/iad5veS.png

By setting the small values of the noise array to 0, this creates very smooth boundaries; and by setting the large values of the noise array to 0, this removes large scale behavior (so that islands are more similar in size and spacing). With only one element of the array being nonzero this makes all the islands more-or-less circular-ish and of more-or-less the same size: if even this is not regular / smooth enough I can show how to make it even more so. Otherwise try tweaking the numbers to get the desired level of smoothness and island size. See the readme for more information on what the noise numbers do, or ask.

(The noise generation algorithm I use is not biased towards vertical / horizontal orientation so even when it makes smooth borders, these need not be aligned with the grid. If you must have straight edges aligned to the grid you can use something like Zoom(...., n) to enlarge a patten by a factor of n, which for the "natural" shapes will have the effect of pixelating the terrain (so each n x n chunk is either all land or all water). n does not need to be an integer.)

If these things suggestions are not along the lines of what you are looking for, then CTG is probably not suitable.

3) No: the preview uses Factorio's built-in terrain generation algorithm, and CTG makes terrain that is not possible with that algorithm.

5 years ago
(updated 5 years ago)

Il try myself some experiments to generate some better? bigger islands, the result was givin me a smile. To proove if is stable to play i settled, and after more than 1 day it seems to be ok. mapseed below, have fun to try it out. :)

eNpjYBBkcGVgZAACB3sGhgZ7Jq7UvNTcSt2kxOLU1au07EBiIMxa
UpSaWgzjgTGj2zyO1IYWOQYQ/l/PoPD/PwgDWQ+AxoEwGBwAqgSKQQG
TbnJ+XklRfo5ucWpJSWZeulVufmZxSWlRqlVaUWphaWpecqVVbmlOSW
ZBTmZqEYeBnrmpARBwpuakliWWZObniSbm5eXH5wF1pcanVhQUpRYXA
0VZk3My09IYGBQcgdgJZBMjI2O1yDr3h1VT7Bkhdus5QBkfoCIHkmAi
njCGnwNOKRUYwwTJHGMw+IzEgFhaArQCqorDAcGASLaAJBkZe99uXfD
92AU7xj8rP17yTUqwZzR0FXn3wWidHVCaHeQFJjgxayYI7IR5hQFm5g
N7qNRNe8azZ0DgjT0jK0iHCIhwsAASB7yZGRgF+ICsBT1AQkGGAeY0O
5gxIg6MaWDwDeaTxzDGZXt0fwADwgZkuByIOAEiwBbCXcYIZUY6QCQk
EbJArUYMyNanIDx3EmbjYSSr0dyAGQfIXkATUUEKeC6QPSlw4gUz3BH
AELzADuM5zHdgZkAAYATXVlwvAgDnkJ3O<<<

regards
Charles

New response