Page 1 of 1

[Mod] Above sea level pools [0.1.1] [highlandpools]

PostPosted: Sat Jan 25, 2014 07:15
by paramat
Image


Download https://github.com/paramat/highlandpools/archive/master.zip rename to 'highlandpools'
Browse code https://github.com/paramat/highlandpools

Minetest 0.4.8 or later
Depends default
Licenses: code WTFPL

Developed for mgv6, may need some work to work perfectly in other mapgens.
Adds pools to floatlands too.
A search using the voxelmanip for natural water-retaining depressions in core mapgens, these are then filled with water and the trees removed.

PostPosted: Sat Jan 25, 2014 07:40
by Krock
Nice.
Image

PostPosted: Sun Jan 26, 2014 03:40
by paramat
Version 0.1.1
Compatible with indev mapgen and will add pools to floatlands too, just set the maximum y for pools with parameter YMAX. Seems to work well in the farlands of indev, since the more extreme terrain creates more and deeper depressions. Pools on the floatlands are fairly small and rare.

PostPosted: Sun Jan 26, 2014 09:39
by Casimir
You can move the get_content_id out of the functions, so you only get them once. That makes it slightly faster.

Can you explain how this works? You seem to try a very different attempt then my mod.

PostPosted: Tue Feb 04, 2014 23:07
by paramat
Casimir wrote:You can move the get_content_id out of the functions, so you only get them once. That makes it slightly faster.

Can you explain how this works? You seem to try a very different attempt then my mod.

Hi, i'm following hmmmm's advice to get content ids as locals within the ongen function. As i understand him it is actually more efficient this way.

Hehe this is a complex method for a few small pools, i'll try to explain ...

After a chunk is generated the mod makes 81 attempts to form a pool, each attempt is centered on a particular XZ column and these are spread through the chunk in a grid, spaced 8 nodes apart.

For each 'attempt':

Working downwards through the column grass is searched for to find ground level, the mod then works on the XZ plane of nodes just above ground level, this will be the pool surface.

The mod then checks if the central node just above ground is surrounded on all sides by nodes (at any distance within the chunk), in order to contain water: from the central node just above ground the mod searches outwards in the 4 NESW horizontal directions, if any of these searches reaches a chunk border without hitting a node the current 'attempt' is aborted.

Passing that test water is then placed in the central node just above ground level, and then the water is spread horizontally through that 1 node high XZ plane: each water node creates 8 water nodes around it. If the water finds a way to leak out to the chunk border all water in the plane is erased and the 'attempt' aborted.

Finally, having passed all those tests water is allowed to flow downwards from the 1 node high XZ plane to fill any air gaps below.

Re: [Mod] Above sea level pools in mapgen v6 [0.1.1] [highla

PostPosted: Thu May 08, 2014 23:35
by Frai
hi, i like this mod, but when i use it the mgv6 doesn't generate grass, papyrus and cactus anymore

edit: the same problem with your landup-mod. unfortunately i have no idea of lua and programming in general