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

Post Reply
User avatar
paramat
Developer
Posts: 3658
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

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

by paramat » Post

Image


Download https://github.com/paramat/highlandpool ... 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.
Last edited by paramat on Tue Aug 09, 2016 04:41, edited 2 times in total.
I rely on donations for basic income. PayPal viewtopic.php?f=3&t=14935 Patreon https://www.patreon.com/paramat

User avatar
Krock
Developer
Posts: 4524
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

by Krock » Post

Nice.
Image
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
paramat
Developer
Posts: 3658
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

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.
Last edited by paramat on Sun Jan 26, 2014 03:42, edited 1 time in total.
I rely on donations for basic income. PayPal viewtopic.php?f=3&t=14935 Patreon https://www.patreon.com/paramat

User avatar
Casimir
Member
Posts: 1164
Joined: Fri Aug 03, 2012 16:59
GitHub: CasimirKaPazi

by Casimir » Post

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.

User avatar
paramat
Developer
Posts: 3658
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

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.
Last edited by paramat on Tue Feb 04, 2014 23:07, edited 1 time in total.
I rely on donations for basic income. PayPal viewtopic.php?f=3&t=14935 Patreon https://www.patreon.com/paramat

Frai
Member
Posts: 14
Joined: Tue Apr 22, 2014 05:51

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

by Frai » Post

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

User avatar
Wuzzy
Member
Posts: 3963
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

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

by Wuzzy » Post

Quite interesting mod. It is simple and clean. I like the lakes. They vary greatly in size and depth. Some lakes are really cool:
Image

I don't really like the very flat lakes which are pretty large but only 1-2 blocks deep. They seem too … artificial. They look more like a puddle than an actual lake.

Image

It has a few bugs. It currently does not seem to remove flowers and grass, so they end up being in the lake.
Sometimes (but rarely) this mod seems to obliterate trees and cut trunks in half which looks really strange (leads to floating trees):

Image

The strange thing is, this happens at places very far from lakes.


I'm considering using this mod for MineClone 2 (but I don't like the flower and tree bugs) . It seems to fit almost perfectly. Using this mod in any subgame is really just a matter of replacing node names. Cool. :-)

I suggest:
- Create lakes in snowy biomes
- Replace node names like default:dirt with mapgen_dirt to ease subgame integration even further
- Maybe add random variety to the ground (sand, gravel, stone)
- Fewer puddle-like lakes, or tweak them
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

hajo
Member
Posts: 602
Joined: Thu Oct 13, 2016 10:45
Location: DE
Contact:

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

by hajo » Post

Wuzzy wrote:Quite interesting mod. .. It has a few bugs.
It currently does not seem to remove flowers and grass, so they end up being in the lake.
Maybe replace them with waterlillies, at the watersurface ?

User avatar
paramat
Developer
Posts: 3658
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

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

by paramat » Post

This mod needs updating for new nodes and new biomes, the stuff it removes needs updating.
This works by filling an already-existing depression with water using a flood-fill method (which is why it can be very slow). So a shallow depression still gets filled. Maybe it could be edited to only fill deeper depressions.

User avatar
Sokomine
Member
Posts: 4045
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

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

by Sokomine » Post

Wuzzy wrote: - Fewer puddle-like lakes, or tweak them
I like those not so deep mini-lakes more than the much deeper ones. Especially if there's rich plantlife around it.
A list of my mods can be found here.

User avatar
Hamlet
Member
Posts: 742
Joined: Sat Jul 29, 2017 21:09
IRC: H4mlet
In-game: Hamlet
Location: Lombardy, Italy

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

by Hamlet » Post

I've tried this mod and I like it very much.
It doesn't seem to work with mgv7, not sure though.
My repositories: Codeberg.org | My ContentDB's page | I'm on PureOS with XFCE

User avatar
texmex
Member
Posts: 1752
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

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

by texmex » Post

Yes, we need this for 5/7/valleys/carpathian mapgens as well!
Mods | Support Mesehub: bc1qluuests9rxmlnvpjrhsnyjg9ucwy6z3r0y3srw

Azazel
Member
Posts: 20
Joined: Sun Dec 13, 2015 18:44
In-game: Omallem

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

by Azazel » Post

Also using river water to fill the lakes would be a good idea. This could generate specific types of mobs in lakes

User avatar
acidzebra
Member
Posts: 75
Joined: Sun Sep 10, 2017 09:11

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

by acidzebra » Post

I realize the mod code was last modified 5 years ago but I still find it extremely charming to have these pools at elevation dotted around the world.

at some point you said
paramat wrote:Maybe it could be edited to only fill deeper depressions.
how would you do this?

ps. I forked the code https://github.com/acidzebra/highlandpools and changed max_height to suit my world, changed the water type to river water so it doesn't go on a water flow rampage, and added dissolve code written by casimir (viewtopic.php?f=9&t=8917) for leaves, flora, flowers and a custom group "dissolve".

User avatar
Sokomine
Member
Posts: 4045
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

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

by Sokomine » Post

This mod is far too nice to sit around more or less ignored. There ought to be more lakes in the world! Inspired by this mod here, I've written the lakes mod, which follows a diffrent algorithm and adds rich vegetation around the shore.
A list of my mods can be found here.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests